Changeset 1276


Ignore:
Timestamp:
11/17/10 17:27:20 (7 years ago)
Author:
ejucovy
Message:

refs #1555 (applying patch http://trac.xinha.org/attachment/ticket/1555/dblclickList.diff) -- strip out functionality from the DoubleClick plugin, because the functionality now exists in core as the config.dblclickList option. so, if this plugin is loaded, it will just copy its config into the now-built-in config. core will handle the rest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/DoubleClick/DoubleClick.js

    r1271 r1276  
    1616DoubleClick._pluginInfo = { 
    1717  name          : "DoubleClick", 
    18   version       : "1.0", 
     18  version       : "1.1", 
    1919  developer     : "Marijn Kampf", 
    2020  developer_url : "http://www.marijn.org", 
     
    4949DoubleClick.prototype.onGenerate = function() { 
    5050  var self = this; 
    51   var doc = this.editordoc = this.editor._iframe.contentWindow.document; 
    52   Xinha._addEvents(doc, ["dblclick"], 
    53           function (event) { 
    54           return self.onDoubleClick(Xinha.is_ie ? self.editor._iframe.contentWindow.event : event); 
    55           }); 
    56   this.currentClick = null; 
    57 }; 
    58  
    59 DoubleClick.prototype.onDoubleClick = function(ev) { 
    60   var target = Xinha.is_ie ? ev.srcElement : ev.target; 
    61   var tagName = target.tagName.toLowerCase(); 
    62  
    63   if (this.editor.dblClickList[tagName] != undefined) { 
    64     this.editor.dblClickList[tagName][0](this.editor, target); 
     51  var config = this.editor.config; 
     52  for( var i in this.editor.dblClickList ) { 
     53      if( typeof i != 'string' ) { 
     54          continue; 
     55      } 
     56      var actions = this.editor.dblClickList[i]; 
     57      if( typeof actions != 'object' ) { 
     58          continue; 
     59      } 
     60      this.editor.config.dblclickList[i] = actions; 
    6561  } 
    6662}; 
Note: See TracChangeset for help on using the changeset viewer.