Add functions for entry check
This commit is contained in:
parent
eafc4dd625
commit
d459d54271
@ -88,7 +88,7 @@
|
||||
<a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=delete&serendipity[id]={$entry_vars.entry.id}&{$entry_vars.urlToken}" title="{$CONST.DELETE}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a>
|
||||
{/if}
|
||||
<input class="entry_preview" type="submit" value="{$CONST.PREVIEW}">
|
||||
<input type="submit" value="{$CONST.SAVE}">
|
||||
<input type="submit" onclick="return serendipity.checkSave();" value="{$CONST.SAVE}">
|
||||
</div>
|
||||
|
||||
<div id="edit_entry_metadata" class="clearfix">
|
||||
@ -170,4 +170,4 @@
|
||||
{$wysiwyg_block_item|emit_htmlarea_code:$wysiwyg_block_jsname}
|
||||
{/foreach}
|
||||
{$entry_vars.wysiwyg_blocks|serendipity_refhookPlugin:'backend_wysiwyg_finish'}
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -659,11 +659,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
// ..?
|
||||
// check that the entry is validated for saving, used mainly by serendipity_event_entrycheck
|
||||
serendipity.checkSave = function() {
|
||||
{serendipity_hookPlugin hook='backend_entry_checkSave' hookAll='true'}
|
||||
return true;
|
||||
}
|
||||
|
||||
// set a category to checked
|
||||
serendipity.enableCategory = function(catNumber) {
|
||||
$("#" + "serendipity_category_" + catNumber).prop("checked", true);
|
||||
}
|
||||
|
||||
// is no category enabled?
|
||||
serendipity.hasNoCategoryEnabled = function() {
|
||||
var $source = $('#edit_entry_category');
|
||||
var $selected = $source.find('input:checkbox:checked');
|
||||
|
||||
if ($selected.length > 0) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// save in which directory the first uploaded files is stored (the default when only inserting one file)
|
||||
serendipity.rememberUploadOptions = function() {
|
||||
@ -1805,4 +1823,4 @@ serendipity_imageSelector_done = function(textarea) {
|
||||
|
||||
serendipity_imageSelector_addToElement = function(str, id) {
|
||||
return serendipity.serendipity_imageSelector_addToElement(str, id);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user