Changeset 2751:a96ec5640056 for plugins/dcLegacyEditor
- Timestamp:
- 09/09/14 16:30:31 (11 years ago)
- Branch:
- default
- Location:
- plugins/dcLegacyEditor/js
- Files:
-
- 2 edited
-
_post_editor.js (modified) (5 diffs)
-
jsToolBar/jsToolBar.dotclear.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/dcLegacyEditor/js/_post_editor.js
r2705 r2751 1 1 $(function() { 2 2 if ($('#edit-entry').length==0) {return;} 3 4 // remove editor prefix5 var getPostFormat = function getPostFormat(post_format) {6 return post_format.replace(/[^:]*:/,'');7 };8 var getPostEditor = function getPostEditor(post_format) {9 return post_format.replace(/:.*/,'');10 };11 3 12 4 // Get document format and prepare toolbars … … 14 6 var last_post_format = $(formatField).val(); 15 7 $(formatField).change(function() { 16 if ( getPostEditor(this.value)!='dcLegacyEditor') { return;}8 if (this.value!='dcLegacyEditor') { return;} 17 9 18 var post_format = getPostFormat(this.value);10 var post_format = this.value; 19 11 20 12 // Confirm post format change … … 37 29 38 30 $('.format_control > *').addClass('hide'); 39 $('.format_control:not(.control_no_'+ getPostFormat(last_post_format)+') > *').removeClass('hide');31 $('.format_control:not(.control_no_'+last_post_format+') > *').removeClass('hide'); 40 32 41 33 if ($('#comment_content').length>0) { … … 61 53 excerpt: excerpt_content, 62 54 content: post_content, 63 format: getPostFormat($('#post_format').get(0).value),55 format: $('#post_format').get(0).value, 64 56 lang: $('#post_lang').get(0).value 65 57 }; … … 111 103 112 104 // Load toolbars 113 contentTb.switchMode( getPostFormat(formatField.value));114 excerptTb.switchMode( getPostFormat(formatField.value));105 contentTb.switchMode(formatField.value); 106 excerptTb.switchMode(formatField.value); 115 107 116 108 // Check unsaved changes before XHTML conversion -
plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js
r2614 r2751 5 5 jsToolBar.prototype.elements.link.open_url = 'popup_link.php'; 6 6 7 jsToolBar.prototype.elements.link.popup = function (args) {7 jsToolBar.prototype.elements.link.popup = function(args) { 8 8 window.the_toolbar = this; 9 9 args = args || ''; … … 155 155 fn: {}, 156 156 fncall: {}, 157 open_url: 'media.php?popup=1 ',157 open_url: 'media.php?popup=1&plugin_id=dcLegacyEditor', 158 158 data: {}, 159 159 popup: function() { … … 355 355 title: 'Link to an entry', 356 356 fn: {}, 357 open_url: 'popup_posts.php ',357 open_url: 'popup_posts.php?plugin_id=dcLegacyEditor', 358 358 data: {}, 359 359 popup: function() {
Note: See TracChangeset
for help on using the changeset viewer.
