Changeset 603
- Timestamp:
- 04/21/09 22:21:44 (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/apps/drupal/wysiwyg/editors/js/wymeditor.js
r601 r603 14 14 if (typeof params != 'undefined') { 15 15 var $field = $('#' + params.field); 16 var instance = $field.next().data(WYMeditor.WYM_INDEX); 17 if (typeof instance != 'undefined') { 18 WYMeditor.INSTANCES[instance].update(); 19 $field.next().remove(); 16 var index = $field.data(WYMeditor.WYM_INDEX); 17 if (typeof index != 'undefined') { 18 var editor = WYMeditor.INSTANCES[index]; 19 editor.update(); 20 $(editor._box).remove(); 21 delete editor; 20 22 } 21 23 $field.show(); … … 24 26 jQuery.each(WYMeditor.INSTANCES, function() { 25 27 this.update(); 26 $(this._box).prev().show().end() 27 .remove(); 28 $(this._box).remove(); 29 $(this._element).show(); 30 delete this; 28 31 }); 29 32 } -
trunk/src/wymeditor/jquery.wymeditor.js
r602 r603 741 741 this._box = jQuery(this._element).hide().after(this._options.boxHtml).next().addClass('wym_box_' + this._index); 742 742 743 //store the instance index in the wymbox element743 //store the instance index in wymbox and element replaced by editor instance 744 744 //but keep it compatible with jQuery < 1.2.3, see #122 745 if( jQuery.isFunction( jQuery.fn.data ) ) 745 if( jQuery.isFunction( jQuery.fn.data ) ) { 746 746 jQuery.data(this._box.get(0), WYMeditor.WYM_INDEX, this._index); 747 jQuery.data(this._element.get(0), WYMeditor.WYM_INDEX, this._index); 748 } 747 749 748 750 var h = WYMeditor.Helper;
Note: See TracChangeset
for help on using the changeset viewer.