]> git.proxmox.com Git - extjs.git/blobdiff - extjs/examples/kitchensink/classic/samples/view/form/FieldContainerController.js
import ExtJS 7.0.0 GPL
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / form / FieldContainerController.js
index fddb8b8725c87ae854eee10d9816d256502bb141..4c0404d4880a718a5fc252d7369ac67d8418cd0f 100644 (file)
@@ -1,44 +1,44 @@
-Ext.define('KitchenSink.view.form.FieldContainerController', {\r
-    extend: 'Ext.app.ViewController',\r
-    alias: 'controller.form-fieldcontainer',\r
-    \r
-    requires: [\r
-        'KitchenSink.model.PartTimeEmployee'\r
-    ],\r
-\r
-    onLoadClick: function() {\r
-        this.getView().loadRecord(Ext.create('KitchenSink.model.PartTimeEmployee', {\r
-            'email'    : 'abe@sencha.com',\r
-            'title'    : 'mr',\r
-            'firstName': 'Abraham',\r
-            'lastName' : 'Elias',\r
-            'startDate': '01/10/2003',\r
-            'endDate'  : '12/11/2009',\r
-            'phone-1'  : '555',\r
-            'phone-2'  : '123',\r
-            'phone-3'  : '4567',\r
-            'hours'    : 7,\r
-            'minutes'  : 15\r
-        }));\r
-    },\r
-\r
-    onSaveClick: function() {\r
-        var form   = this.getView(),\r
-            encode = Ext.String.htmlEncode,\r
-            s      = '';\r
-\r
-        if (form.isValid()) {\r
-            Ext.iterate(form.getValues(), function(key, value) {\r
-                value = encode(value);\r
-                \r
-                s += Ext.util.Format.format("{0} = {1}<br />", key, value);\r
-            }, this);\r
-\r
-            Ext.Msg.alert('Form Values', s);\r
-        }\r
-    },\r
-\r
-    onResetClick: function() {\r
-        this.getView().reset();\r
-    }\r
-});
\ No newline at end of file
+Ext.define('KitchenSink.view.form.FieldContainerController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.form-fieldcontainer',
+
+    requires: [
+        'KitchenSink.model.PartTimeEmployee'
+    ],
+
+    onLoadClick: function() {
+        this.getView().loadRecord(Ext.create('KitchenSink.model.PartTimeEmployee', {
+            'email': 'abe@sencha.com',
+            'title': 'mr',
+            'firstName': 'Abraham',
+            'lastName': 'Elias',
+            'startDate': '01/10/2003',
+            'endDate': '12/11/2009',
+            'phone-1': '555',
+            'phone-2': '123',
+            'phone-3': '4567',
+            'hours': 7,
+            'minutes': 15
+        }));
+    },
+
+    onSaveClick: function() {
+        var form = this.getView(),
+            encode = Ext.String.htmlEncode,
+            s = '';
+
+        if (form.isValid()) {
+            Ext.iterate(form.getValues(), function(key, value) {
+                value = encode(value);
+
+                s += Ext.util.Format.format("{0} = {1}<br />", key, value);
+            }, this);
+
+            Ext.Msg.alert('Form Values', s);
+        }
+    },
+
+    onResetClick: function() {
+        this.getView().reset();
+    }
+});