Changeset 1011 for branches/new-dialogs-merge/modules/InsertTable
- Timestamp:
- 06/07/08 09:08:53 (4 years ago)
- Location:
- branches/new-dialogs-merge/modules/InsertTable
- Files:
-
- 2 modified
-
insert_table.js (modified) (3 diffs)
-
pluginMethods.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/new-dialogs-merge/modules/InsertTable/insert_table.js
r1008 r1011 37 37 var self = this; 38 38 39 editor.config.btnList.inserttable[3] = function() { self.show(); }39 editor.config.btnList.inserttable[3] = function() { self.show(); } 40 40 } 41 41 … … 47 47 InsertTable.prototype.onGenerateOnce = function() 48 48 { 49 this.prepareDialog(); 50 this.loadScripts(); 49 InsertTable.loadAssets(); 51 50 }; 52 53 InsertTable.prototype.loadScripts = function() 51 InsertTable.loadAssets = function() 54 52 { 55 var self = this; 56 if(!this.methodsReady) 57 { 58 Xinha._getback(_editor_url + 'modules/InsertTable/pluginMethods.js', function(getback) { eval(getback); self.methodsReady = true; }); 59 return; 60 } 53 var self = InsertTable; 54 if (self.loading) return; 55 self.loading = true; 56 Xinha._getback(_editor_url + 'modules/InsertTable/dialog.html', function(getback) { self.html = getback; self.dialogReady = true; }); 57 Xinha._getback(_editor_url + 'modules/InsertTable/pluginMethods.js', function(getback) { eval(getback); self.methodsReady = true; }); 61 58 }; 62 59 63 60 InsertTable.prototype.onUpdateToolbar = function() 64 61 { 65 if (!( this.dialogReady && this.methodsReady))62 if (!(InsertTable.dialogReady && InsertTable.methodsReady)) 66 63 { 67 64 this.editor._toolbarObjects.inserttable.state("enabled", false); 68 65 } 66 else this.onUpdateToolbar = null; 69 67 }; 70 68 … … 74 72 var editor = this.editor; 75 73 76 if(!this.html) // retrieve the raw dialog contents 77 { 78 Xinha._getback(_editor_url + 'modules/InsertTable/dialog.html', function(getback) { self.html = getback; self.prepareDialog(); }); 79 return; 80 } 81 82 // Now we have everything we need, so we can build the dialog. 83 84 var dialog = this.dialog = new Xinha.Dialog(editor, this.html, 'Xinha',{width:400}) 74 var dialog = this.dialog = new Xinha.Dialog(editor, InsertTable.html, 'Xinha',{width:400}) 85 75 // Connect the OK and Cancel buttons 86 76 dialog.getElementById('ok').onclick = function() {self.apply();} -
branches/new-dialogs-merge/modules/InsertTable/pluginMethods.js
r1008 r1011 1 1 InsertTable.prototype.show = function(image) 2 2 { 3 var editor = this.editor; 3 if (!this.dialog) this.prepareDialog(); 4 5 var editor = this.editor; 4 6 5 7 var values =
