|
|
@ -54,6 +54,8 @@ if (config('permalink.type') == 'post') { |
|
|
$delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destination=' . $destination; |
|
|
$delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destination=' . $destination; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$tags = tag_cloud(true); |
|
|
|
|
|
|
|
|
?>
|
|
|
?>
|
|
|
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> |
|
|
<link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> |
|
|
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> |
|
|
<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> |
|
|
@ -64,6 +66,53 @@ if (config('permalink.type') == 'post') { |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Extra.js"></script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Extra.js"></script> |
|
|
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css"> |
|
|
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css"> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/jquery.ajaxfileupload.js"></script> |
|
|
<script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/jquery.ajaxfileupload.js"></script> |
|
|
|
|
|
<script> |
|
|
|
|
|
$( function() { |
|
|
|
|
|
var availableTags = [ |
|
|
|
|
|
<?php foreach ($tags as $tag => $count):?>
|
|
|
|
|
|
"<?php echo tag_i18n($tag) ?>", |
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
|
]; |
|
|
|
|
|
function split( val ) { |
|
|
|
|
|
return val.split( /,\s*/ ); |
|
|
|
|
|
} |
|
|
|
|
|
function extractLast( term ) { |
|
|
|
|
|
return split( term ).pop(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$( "#pTag" ) |
|
|
|
|
|
// don't navigate away from the field on tab when selecting an item
|
|
|
|
|
|
.on( "keydown", function( event ) { |
|
|
|
|
|
if ( event.keyCode === $.ui.keyCode.TAB && |
|
|
|
|
|
$( this ).autocomplete( "instance" ).menu.active ) { |
|
|
|
|
|
event.preventDefault(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.autocomplete({ |
|
|
|
|
|
minLength: 0, |
|
|
|
|
|
source: function( request, response ) { |
|
|
|
|
|
// delegate back to autocomplete, but extract the last term
|
|
|
|
|
|
response( $.ui.autocomplete.filter( |
|
|
|
|
|
availableTags, extractLast( request.term ) ) ); |
|
|
|
|
|
}, |
|
|
|
|
|
focus: function() { |
|
|
|
|
|
// prevent value inserted on focus
|
|
|
|
|
|
return false; |
|
|
|
|
|
}, |
|
|
|
|
|
select: function( event, ui ) { |
|
|
|
|
|
var terms = split( this.value ); |
|
|
|
|
|
// remove the current input
|
|
|
|
|
|
terms.pop(); |
|
|
|
|
|
// add the selected item
|
|
|
|
|
|
terms.push( ui.item.value ); |
|
|
|
|
|
// add placeholder to get the comma-and-space at the end
|
|
|
|
|
|
terms.push( "" ); |
|
|
|
|
|
this.value = terms.join( ", " ); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} ); |
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
<?php if (isset($error)) { ?>
|
|
|
<?php if (isset($error)) { ?>
|
|
|
<div class="error-message"><?php echo $error ?></div>
|
|
|
<div class="error-message"><?php echo $error ?></div>
|
|
|
|