Changeset 2939:597ca1582463
- Timestamp:
- 01/29/15 13:45:34 (11 years ago)
- Branch:
- default
- Location:
- plugins/tags
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/tags/inc/tags.behaviors.php
r2924 r2939 16 16 public static function adminPostEditor($editor='',$context='',array $tags=array()) 17 17 { 18 if ( $editor != 'dcLegacyEditor'|| $context != 'post') return;18 if (($editor != 'dcLegacyEditor' && $editor != 'dcCKEditor') || $context != 'post') return; 19 19 20 20 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 21 21 22 return 23 '<script type="text/javascript" src="index.php?pf=tags/js/legacy-post.js"></script>'. 24 '<script type="text/javascript">'."\n". 25 "//<![CDATA[\n". 26 "jsToolBar.prototype.elements.tag.title = '".html::escapeJS(__('Tag'))."';\n". 27 "jsToolBar.prototype.elements.tag.url = '".html::escapeJS($tag_url)."';\n". 28 "\n//]]>\n". 29 "</script>\n"; 22 if ($editor == 'dcLegacyEditor') { 23 return 24 '<script type="text/javascript" src="index.php?pf=tags/js/legacy-post.js"></script>'. 25 '<script type="text/javascript">'."\n". 26 "//<![CDATA[\n". 27 "jsToolBar.prototype.elements.tag.title = '".html::escapeJS(__('Tag'))."';\n". 28 "jsToolBar.prototype.elements.tag.url = '".html::escapeJS($tag_url)."';\n". 29 "\n//]]>\n". 30 "</script>\n"; 31 } elseif ($editor == 'dcCKEditor') { 32 return 33 '<script type="text/javascript">'."\n". 34 "//<![CDATA[\n". 35 "dotclear.msg.tag_title = '".html::escapeJS(__('Tag'))."';\n". 36 "dotclear.msg.tag_url = '".html::escapeJS($tag_url)."';\n". 37 "\n//]]>\n". 38 "</script>\n"; 39 } 40 return; 30 41 } 31 42 … … 34 45 global $core; 35 46 36 if ($context !='post') {47 if ($context != 'post') { 37 48 return; 38 49 } -
plugins/tags/js/ckeditor-tags-plugin.js
r2743 r2939 6 6 if (editor.getSelection().getNative().toString().replace(/\s*/,'')!='') { 7 7 var str = editor.getSelection().getNative().toString().replace(/\s*/,''); 8 var url = jsToolBar.prototype.elements.tag.url;8 var url = dotclear.msg.tag_url; 9 9 window.dc_tag_editor.addMeta(str); 10 10 var link = '<a href="'+$.stripBaseURL(url+'/'+str)+'">'+str+'</a>'; … … 16 16 17 17 editor.ui.addButton('dcTags', { 18 label: jsToolBar.prototype.elements.tag.title,18 label: dotclear.msg.tag_title, 19 19 command: 'dcTagsCommand', 20 20 toolbar: 'insert',
Note: See TracChangeset
for help on using the changeset viewer.