Changeset 854:893c8fc07a74 for plugins/tags
- Timestamp:
- 08/01/12 10:59:38 (13 years ago)
- Branch:
- sexy
- Location:
- plugins/tags
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/tags/_admin.php
r818 r854 119 119 "metaEditor.prototype.text_all = '".html::escapeJS(__('all'))."';\n". 120 120 "metaEditor.prototype.text_separation = '';\n". 121 "jsToolBar.prototype.elements.tag.title = '".html::escapeJS(__('Tag'))."';\n".122 "jsToolBar.prototype.elements.tag.url = '".html::escapeJS($tag_url)."';\n".123 121 "dotclear.msg.tags_autocomplete = '".html::escapeJS(__('used in %e - frequency %p%'))."';\n". 124 122 "dotclear.msg.entry = '".html::escapeJS(__('entry'))."';\n". -
plugins/tags/js/post.js
r0 r854 58 58 }); 59 59 }); 60 61 // Toolbar button for tags62 jsToolBar.prototype.elements.tagSpace = {type: 'space'};63 64 jsToolBar.prototype.elements.tag = {type: 'button', title: 'Keyword', fn:{} };65 jsToolBar.prototype.elements.tag.context = 'post';66 jsToolBar.prototype.elements.tag.icon = 'index.php?pf=tags/img/tag-add.png';67 jsToolBar.prototype.elements.tag.fn.wiki = function() {68 this.encloseSelection('','',function(str) {69 if (str == '') { window.alert(dotclear.msg.no_selection); return ''; }70 if (str.indexOf(',') != -1) {71 return str;72 } else {73 window.dc_tag_editor.addMeta(str);74 return '['+str+'|tag:'+str+']';75 }76 });77 };78 jsToolBar.prototype.elements.tag.fn.xhtml = function() {79 var url = this.elements.tag.url;80 this.encloseSelection('','',function(str) {81 if (str == '') { window.alert(dotclear.msg.no_selection); return ''; }82 if (str.indexOf(',') != -1) {83 return str;84 } else {85 window.dc_tag_editor.addMeta(str);86 return '<a href="'+this.stripBaseURL(url+'/'+str)+'">'+str+'</a>';87 }88 });89 };90 jsToolBar.prototype.elements.tag.fn.wysiwyg = function() {91 var t = this.getSelectedText();92 93 if (t == '') { window.alert(dotclear.msg.no_selection); return; }94 if (t.indexOf(',') != -1) { return; }95 96 var n = this.getSelectedNode();97 var a = document.createElement('a');98 a.href = this.stripBaseURL(this.elements.tag.url+'/'+t);99 a.appendChild(n);100 this.insertNode(a);101 window.dc_tag_editor.addMeta(t);102 };
Note: See TracChangeset
for help on using the changeset viewer.