f20fb9268f893e40e87d8faf3c0b170713254c0a
[Pman.Core] / Pman.Dialog.CoreColumnConfig.bjs
1 {
2  "name" : "Pman.Dialog.CoreColumnConfig",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreColumnConfig.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "cfcd208495d565ef66e7dff9f98764da" : "0",
10   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
11   "c40cab5f875bb6c270d800eff77a4af0" : "Save Column Configuration",
12   "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
13   "c9cc8cce247e49bae79f15173ce97354" : "Save"
14  },
15  "named_strings" : {
16   "description_fieldLabel" : "b5a7adde1af5c87d7fd797b6245c2a39",
17   "name_value" : "cfcd208495d565ef66e7dff9f98764da"
18  },
19  "items" : [
20   {
21    "listeners" : {
22     "show" : "function (_self)\n{\n    \n}"
23    },
24    "modal" : true,
25    "collapsible" : false,
26    "background" : true,
27    "title" : "Save Column Configuration",
28    "xtype" : "LayoutDialog",
29    "width" : 400,
30    "$ xns" : "Roo",
31    "closable" : false,
32    "resizable" : false,
33    "height" : 110,
34    "items" : [
35     {
36      "xtype" : "LayoutRegion",
37      "$ xns" : "Roo",
38      "titlebar" : false,
39      "* prop" : "center"
40     },
41     {
42      "background" : true,
43      "region" : "center",
44      "fitToFrame" : true,
45      "xtype" : "ContentPanel",
46      "$ xns" : "Roo",
47      "items" : [
48       {
49        "listeners" : {
50         "|actioncomplete" : "function (_self, action)\n{\n  if (action.type == 'setdata') {\n\n        \n        \n        if(typeof(_this.data.title) != 'undefined' && _this.data.title.length){\n            _this.dialog.setTitle(_this.data.title);\n        }\n  \n        if(_this.data.id){\n            _this.dialog.el.mask(\"Loading\");\n            this.load({ method: 'GET', params: { '_id' : _this.data.id }}); \n        }\n       \n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type == 'submit' ) {\n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n\n        if (_this.callback) {\n           _this.callback.call(_this, action.result.data);\n        }\n        _this.form.reset();\n    }\n}\n",
51         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
52        },
53        "$ url" : "baseURL + '/Roo/core_setting'",
54        "method" : "POST",
55        "xtype" : "Form",
56        "style" : "border:none",
57        "$ xns" : "Roo.form",
58        "items" : [
59         {
60          "listeners" : {
61           "keyup" : "function (_self, e)\n{\n    _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n    \n}"
62          },
63          "fieldLabel" : "Description",
64          "xtype" : "TextField",
65          "allowBlank" : false,
66          "width" : 250,
67          "$ xns" : "Roo.form",
68          "name" : "description"
69         },
70         {
71          "xtype" : "Hidden",
72          "$ xns" : "Roo.form",
73          "name" : "module"
74         },
75         {
76          "xtype" : "Hidden",
77          "$ xns" : "Roo.form",
78          "name" : "val"
79         },
80         {
81          "xtype" : "Hidden",
82          "value" : 0,
83          "$ xns" : "Roo.form",
84          "name" : "name"
85         },
86         {
87          "xtype" : "Hidden",
88          "$ xns" : "Roo.form",
89          "name" : "id"
90         }
91        ]
92       }
93      ]
94     },
95     {
96      "listeners" : {
97       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
98      },
99      "text" : "Cancel",
100      "xtype" : "Button",
101      "$ xns" : "Roo",
102      "* prop" : "buttons[]"
103     },
104     {
105      "listeners" : {
106       "|click" : "function() {\n\n    var name =     _this.form.findField('name').getValue();\n    name = name.toUpperCase().replace(/[^A-Z]+/g, '');\n    if (!name.length) {\n        Roo.MessageBox.alert(\"Error\",\"Please fill in a valid name\");\n        return;\n    }\n    _this.form.findField('name').setValue(name);\n \n    _this.form.doAction('submit');\n    \n}"
107      },
108      "text" : "Save",
109      "xtype" : "Button",
110      "$ xns" : "Roo",
111      "* prop" : "buttons[]"
112     }
113    ]
114   }
115  ]
116 }