Changeset 854:893c8fc07a74 for admin/js
- Timestamp:
- 08/01/12 10:59:38 (13 years ago)
- Branch:
- sexy
- Location:
- admin/js
- Files:
-
- 6 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_index.js
r454 r854 2 2 var f = $('#quick-entry'); 3 3 if (f.length > 0) { 4 var contentTb = new jsToolBar($('#post_content',f)[0]);5 contentTb.switchMode($('#post_format',f).val());6 4 7 5 $('input[name=save]',f).click(function() { … … 21 19 22 20 function quickPost(f,status) { 23 if (contentTb.getMode() == 'wysiwyg') {24 contentTb.syncContents('iframe');25 }26 21 27 22 var params = { … … 53 48 $('#post_title',f).val(''); 54 49 $('#post_content',f).val(''); 55 if (contentTb.getMode() == 'wysiwyg') {56 contentTb.syncContents('textarea');57 }58 50 } 59 51 -
admin/js/_post.js
r740 r854 77 77 if (document.getElementById('edit-entry')) 78 78 { 79 // Get document format and prepare toolbars80 79 var formatField = $('#post_format').get(0); 81 $(formatField).change(function() { 82 excerptTb.switchMode(this.value); 83 contentTb.switchMode(this.value); 84 }); 85 86 var excerptTb = new jsToolBar(document.getElementById('post_excerpt')); 87 var contentTb = new jsToolBar(document.getElementById('post_content')); 88 excerptTb.context = contentTb.context = 'post'; 89 } 90 91 if (document.getElementById('comment_content')) { 92 var commentTb = new jsToolBar(document.getElementById('comment_content')); 80 93 81 } 94 82 … … 123 111 }); 124 112 125 // We load toolbar on excerpt only when it's ready126 113 $('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{ 127 fn: function() { excerptTb.switchMode(formatField.value);},114 fn: function() { }, 128 115 cookie: 'dcx_post_excerpt', 129 116 hide: $('#post_excerpt').val() == '' 130 117 }); 131 118 132 // Load toolbars133 contentTb.switchMode(formatField.value);134 119 135 120 // Replace attachment remove links by a POST form submit … … 226 211 }); 227 212 228 $('#add-comment').onetabload(function() {229 commentTb.draw('xhtml');230 });231 213 });
Note: See TracChangeset
for help on using the changeset viewer.