From: <bo...@kr...> - 2009-04-22 22:58:39
|
Revision: 6114 Author: bodo Date: 2009-04-22 18:58:26 -0400 (Wed, 22 Apr 2009) Log Message: ----------- Prototype's observe() no longer accepts useCapture argument. Modified Paths: -------------- trunk/krang/htdocs/poortext/src/poortext_ie.js trunk/krang/htdocs/poortext/src/poortext_webkit.js Modified: trunk/krang/htdocs/poortext/src/poortext_ie.js =================================================================== --- trunk/krang/htdocs/poortext/src/poortext_ie.js 2009-04-22 12:31:36 UTC (rev 6113) +++ trunk/krang/htdocs/poortext/src/poortext_ie.js 2009-04-22 22:58:26 UTC (rev 6114) @@ -129,7 +129,7 @@ // Hook in default events var events = PoorText.events; for (type in events) { - this.observe(type, 'builtin', this[events[type]], true); + this.observe(type, 'builtin', this[events[type]]); } }, @@ -279,23 +279,27 @@ document.execCommand('selectAll', false, null); // register handlers - this.observe('click', - 'toggleSelectAll', - function(event) { - this.toggleSelectAll(); - Event.stop(event); - }, true); + this.observe( + 'click', + 'toggleSelectAll', + function(event) { + this.toggleSelectAll(); + Event.stop(event); + } + ); - this.observe('keydown', - 'toggleSelectAll', - function(e) { - if (e.ctrlKey == true) return; - // gimmi the focus for edit commands - this.focusEditNode(); - this.selectedAll = false; - this.stopObserving('click', 'toggleSelectAll'); - this.stopObserving('keydown', 'toggleSelectAll'); - }, true); + this.observe( + 'keydown', + 'toggleSelectAll', + function(e) { + if (e.ctrlKey == true) return; + // gimmi the focus for edit commands + this.focusEditNode(); + this.selectedAll = false; + this.stopObserving('click', 'toggleSelectAll'); + this.stopObserving('keydown', 'toggleSelectAll'); + } + ); } return true; }, Modified: trunk/krang/htdocs/poortext/src/poortext_webkit.js =================================================================== --- trunk/krang/htdocs/poortext/src/poortext_webkit.js 2009-04-22 12:31:36 UTC (rev 6113) +++ trunk/krang/htdocs/poortext/src/poortext_webkit.js 2009-04-22 22:58:26 UTC (rev 6114) @@ -257,7 +257,7 @@ // Hook in default events var events = PoorText.events; for (type in events) { - this.observe(type, 'builtin', this[events[type]], true); + this.observe(type, 'builtin', this[events[type]]); } }, @@ -488,19 +488,23 @@ // selectall document.execCommand('selectall', false, null); - this.observe('click', - 'toggleSelectAll', - function() { - this.toggleSelectAll(); - }, true); + this.observe( + 'click', + 'toggleSelectAll', + function() { + this.toggleSelectAll(); + } + ); - this.observe('keypress', - 'toggleSelectAll', - function(event) { - if (event.ctrlKey == true) return true; - // Let the default action be taken - setTimeout(function() {this.toggleSelectAll()}.bind(this), 1); - }, true); + this.observe( + 'keypress', + 'toggleSelectAll', + function(event) { + if (event.ctrlKey == true) return true; + // Let the default action be taken + setTimeout(function() {this.toggleSelectAll()}.bind(this), 1); + } + ); } return true; }, @@ -569,7 +573,6 @@ this.restoreSelection(); }.bind(this), 10); } - }); /** |