Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/double-click.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/double-click.js,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/double-click.js 2 Feb 2007 21:04:50 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/DoubleClick/double-click.js 24 Nov 2007 15:35:34 -0000 1.4 @@ -1,4 +1,4 @@ -// Double Click Plugin for HTMLArea-3.0 +// Double Click Plugin for Xinha // Implementation by Marijn Kampf http://www.marijn.org // Sponsored by http://www.smiling-faces.com // @@ -14,53 +14,53 @@ // DoubleClick._pluginInfo = { - name : "DoubleClick", - version : "1.0", - developer : "Marijn Kampf", - developer_url : "http://www.marijn.org", - c_owner : "Marijn Kampf", - sponsor : "smiling-faces.com", - sponsor_url : "http://www.smiling-faces.com", - license : "htmlArea" + name : "DoubleClick", + version : "1.0", + developer : "Marijn Kampf", + developer_url : "http://www.marijn.org", + c_owner : "Marijn Kampf", + sponsor : "smiling-faces.com", + sponsor_url : "http://www.smiling-faces.com", + license : "htmlArea" }; function DoubleClick(editor) { - this.editor = editor; + this.editor = editor; - // ADDING CUSTOM DOUBLE CLICK ACTIONS - // format of the dblClickList elements is "TAGNAME: [ ACTION ]" - // - TAGNAME: tagname of the tag that is double clicked - // - ACTION: function that gets called when the button is clicked. - // it has the following prototype: - // function(editor, event) - // - editor is the HTMLArea object that triggered the call - // - target is the selected object - this.editor.dblClickList = { - // Edit Link dialog - a: [ function(e) {e.config.btnList['createlink'][3](e); } ], - // Follow link - //a: [ function(editor, target) { window.location = target.href; properties(target); } ], + // ADDING CUSTOM DOUBLE CLICK ACTIONS + // format of the dblClickList elements is "TAGNAME: [ ACTION ]" + // - TAGNAME: tagname of the tag that is double clicked + // - ACTION: function that gets called when the button is clicked. + // it has the following prototype: + // function(editor, event) + // - editor is the Xinha object that triggered the call + // - target is the selected object + this.editor.dblClickList = { + // Edit Link dialog + a: [ function(e) {e.config.btnList['createlink'][3](e); } ], + // Follow link + //a: [ function(editor, target) { window.location = target.href; properties(target); } ], - img: [ function(e) {e.execCommand("insertimage");} ], - td: [ function(e) {e.execCommand("inserttable");} ] - }; + img: [ function(e) {e.execCommand("insertimage");} ], + td: [ function(e) {e.execCommand("inserttable");} ] + }; } DoubleClick.prototype.onGenerate = function() { - var self = this; - var doc = this.editordoc = this.editor._iframe.contentWindow.document; - HTMLArea._addEvents(doc, ["dblclick"], - function (event) { - return self.onDoubleClick(HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event); - }); - this.currentClick = null; + var self = this; + var doc = this.editordoc = this.editor._iframe.contentWindow.document; + Xinha._addEvents(doc, ["dblclick"], + function (event) { + return self.onDoubleClick(Xinha.is_ie ? self.editor._iframe.contentWindow.event : event); + }); + this.currentClick = null; }; DoubleClick.prototype.onDoubleClick = function(ev) { - var target = HTMLArea.is_ie ? ev.srcElement : ev.target; - var tagName = target.tagName.toLowerCase(); + var target = Xinha.is_ie ? ev.srcElement : ev.target; + var tagName = target.tagName.toLowerCase(); - if (this.editor.dblClickList[tagName] != undefined) { - this.editor.dblClickList[tagName][0](this.editor, target); - } + if (this.editor.dblClickList[tagName] != undefined) { + this.editor.dblClickList[tagName][0](this.editor, target); + } }; \ No newline at end of file