Upgrade to ExtJS 3.3.0 - Released 10/06/2010
[extjs.git] / examples / ux / SearchField.js
index bbe31db..b852359 100644 (file)
@@ -1,53 +1,53 @@
 /*!
 /*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
-Ext.ns('Ext.ux.form');\r
-\r
-Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {\r
-    initComponent : function(){\r
-        Ext.ux.form.SearchField.superclass.initComponent.call(this);\r
-        this.on('specialkey', function(f, e){\r
-            if(e.getKey() == e.ENTER){\r
-                this.onTrigger2Click();\r
-            }\r
-        }, this);\r
-    },\r
-\r
-    validationEvent:false,\r
-    validateOnBlur:false,\r
-    trigger1Class:'x-form-clear-trigger',\r
-    trigger2Class:'x-form-search-trigger',\r
-    hideTrigger1:true,\r
-    width:180,\r
-    hasSearch : false,\r
-    paramName : 'query',\r
-\r
-    onTrigger1Click : function(){\r
-        if(this.hasSearch){\r
-            this.el.dom.value = '';\r
-            var o = {start: 0};\r
-            this.store.baseParams = this.store.baseParams || {};\r
-            this.store.baseParams[this.paramName] = '';\r
-            this.store.reload({params:o});\r
-            this.triggers[0].hide();\r
-            this.hasSearch = false;\r
-        }\r
-    },\r
-\r
-    onTrigger2Click : function(){\r
-        var v = this.getRawValue();\r
-        if(v.length < 1){\r
-            this.onTrigger1Click();\r
-            return;\r
-        }\r
-        var o = {start: 0};\r
-        this.store.baseParams = this.store.baseParams || {};\r
-        this.store.baseParams[this.paramName] = v;\r
-        this.store.reload({params:o});\r
-        this.hasSearch = true;\r
-        this.triggers[0].show();\r
-    }\r
+Ext.ns('Ext.ux.form');
+
+Ext.ux.form.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
+    initComponent : function(){
+        Ext.ux.form.SearchField.superclass.initComponent.call(this);
+        this.on('specialkey', function(f, e){
+            if(e.getKey() == e.ENTER){
+                this.onTrigger2Click();
+            }
+        }, this);
+    },
+
+    validationEvent:false,
+    validateOnBlur:false,
+    trigger1Class:'x-form-clear-trigger',
+    trigger2Class:'x-form-search-trigger',
+    hideTrigger1:true,
+    width:180,
+    hasSearch : false,
+    paramName : 'query',
+
+    onTrigger1Click : function(){
+        if(this.hasSearch){
+            this.el.dom.value = '';
+            var o = {start: 0};
+            this.store.baseParams = this.store.baseParams || {};
+            this.store.baseParams[this.paramName] = '';
+            this.store.reload({params:o});
+            this.triggers[0].hide();
+            this.hasSearch = false;
+        }
+    },
+
+    onTrigger2Click : function(){
+        var v = this.getRawValue();
+        if(v.length < 1){
+            this.onTrigger1Click();
+            return;
+        }
+        var o = {start: 0};
+        this.store.baseParams = this.store.baseParams || {};
+        this.store.baseParams[this.paramName] = v;
+        this.store.reload({params:o});
+        this.hasSearch = true;
+        this.triggers[0].show();
+    }
 });
\ No newline at end of file
 });
\ No newline at end of file