Changeset 379:fb925235a866 for admin
- Timestamp:
- 06/17/11 08:41:21 (14 years ago)
- Branch:
- wysiwyg
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/dcToolBar.js
r326 r379 16 16 $.data(this,'toolbar',new tinymce.Editor($(this).attr('id'),dcToolBar.getConfig(settings.formatter))); 17 17 $(this).data('toolbar').activeFormatter = settings.formatter; 18 $(this).data('toolbar').onPreInit.add(function(ed) { 19 tinymce.addI18n(dcToolBar.getI18n()); 20 }); 18 21 }); 19 22 … … 32 35 throw 'Toolbar should be initialize before show it'; 33 36 } 34 $(this).data('toolbar').show(); 37 var t = $(this).data('toolbar'); 38 39 tinymce.dom.show(t.getContainer()); 40 t.load(); 35 41 }); 36 42 }, … … 40 46 throw 'Toolbar should be initialize before hide it'; 41 47 } 42 $(this).data('toolbar').hide(); 48 var t = $(this).data('toolbar'); 49 50 tinymce.dom.hide(t.getContainer()); 51 t.load(); 43 52 }); 44 53 }, … … 48 57 throw 'Toolbar should be initialize before toogle it'; 49 58 } 50 if ($(this).data('toolbar').isHidden()) { 51 $(this).data('toolbar').show(); 52 } else { 53 $(this).data('toolbar').hide(); 59 var t = $(this).data('toolbar'); 60 if (t.isHidden()) { 61 t.show(); 62 t.load(); 63 } 64 else { 65 t.save(); 66 $(t.getContainer()).hide(); 54 67 } 55 68 }); … … 97 110 }; 98 111 112 this.setI18n = function(i18n) { 113 this.i18n = i18n; 114 }; 115 99 116 this.getConfig = function(formatter) { 100 117 if (this.configurations.hasOwnProperty(formatter)) { … … 104 121 } 105 122 }; 123 124 this.getI18n = function() { 125 return this.i18n == null ? {} : this.i18n; 126 }; 106 127 } 107 128 108 129 dcToolBar.prototype = { 109 configurations: {} 130 configurations: {}, 131 i18n: null 110 132 }
Note: See TracChangeset
for help on using the changeset viewer.