[richfaces-svn-commits] JBoss Rich Faces SVN: r18665 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Aug 16 10:13:20 EDT 2010


Author: abelevich
Date: 2010-08-16 10:13:20 -0400 (Mon, 16 Aug 2010)
New Revision: 18665

Modified:
   trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
Log:
remove RichFaces.Event

Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js	2010-08-16 14:13:03 UTC (rev 18664)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js	2010-08-16 14:13:20 UTC (rev 18665)
@@ -15,17 +15,16 @@
             this.label = $(document.getElementById(options.label));
             this.initialValue = this.label.text();
             
-            richfaces.Event.bind(this.element, this.editEvent, this.__editHandler, this);
-            richfaces.Event.bind(this.input, "change", this.__saveHandler, this);
-            richfaces.Event.bind(this.input, "blur", this.__saveHandler, this);
-            
-            /* TODO: discuss this with Pavel */
-            this.__boundEditFunc = richfaces.Event.bind(this.input, "focus", this.__editHandler, this);
+            this.element.bind(this.editEvent, $.proxy(this.__editHandler, this));
+            this.input.bind("change", $.proxy(this.__saveHandler, this));
+            this.input.bind("blur", $.proxy(this.__saveHandler, this));
+            this.input.bind("focus", $.proxy(this.__editHandler, this));
+         
             if(this.showControls) {
             	this.okbtn = $(document.getElementById(options.okbtn));
             	this.cancelbtn = $(document.getElementById(options.cancelbtn));
-            	richfaces.Event.bind(this.okbtn, "mousedown", this.__saveBtnHandler, this);
-            	richfaces.Event.bind(this.cancelbtn, "mousedown", this.__cancelBtnHandler, this);
+            	this.okbtn.bind("mousedown", $.proxy(this.__saveBtnHandler, this));
+            	this.cancelbtn.bind("mousedown", $.proxy(this.__cancelBtnHandler, this));
             }
         };
         
@@ -87,14 +86,15 @@
            		}, 
            		
            		__cancelBtnHandler: function(e) {
-           			this.cancel(); this.input.blur(); return false;
+           			this.cancel(); 
+           			this.input.blur(); 
+           			return false;
            		}, 
            		
            		__editHandler: function(e) {
-           			richfaces.Event.unbind(this.input, "focus", this.__boundEditFunc);
-           			this.__boundEditFunc = null;
+           			this.input.unbind("focus", this.__editHandler);
            			this.edit();
-                    this.__boundEditFunc = richfaces.Event.bind(this.input, "focus", this.__editHandler, this);
+           			this.input.bind("focus", $.proxy(this.__editHandler, this));
            		}, 
            		
            		__saveHandler: function(e) {



More information about the richfaces-svn-commits mailing list