Pman.Dialog.CoreColumnConfig.bjs
[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      "String style" : "border:none",
48      "items" : [
49       {
50        "listeners" : {
51         "|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",
52         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
53        },
54        "$ url" : "baseURL + '/Roo/core_setting'",
55        "method" : "POST",
56        "xtype" : "Form",
57        "style" : "padding:5px",
58        "$ xns" : "Roo.form",
59        "items" : [
60         {
61          "listeners" : {
62           "keyup" : "function (_self, e)\n{\n    _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n    \n}"
63          },
64          "fieldLabel" : "Description",
65          "xtype" : "TextField",
66          "allowBlank" : false,
67          "width" : 250,
68          "$ xns" : "Roo.form",
69          "name" : "description"
70         },
71         {
72          "xtype" : "Hidden",
73          "$ xns" : "Roo.form",
74          "name" : "module"
75         },
76         {
77          "xtype" : "Hidden",
78          "$ xns" : "Roo.form",
79          "name" : "val"
80         },
81         {
82          "xtype" : "Hidden",
83          "value" : 0,
84          "$ xns" : "Roo.form",
85          "name" : "name"
86         },
87         {
88          "xtype" : "Hidden",
89          "$ xns" : "Roo.form",
90          "name" : "id"
91         }
92        ]
93       }
94      ]
95     },
96     {
97      "listeners" : {
98       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
99      },
100      "text" : "Cancel",
101      "xtype" : "Button",
102      "$ xns" : "Roo",
103      "* prop" : "buttons[]"
104     },
105     {
106      "listeners" : {
107       "|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}"
108      },
109      "text" : "Save",
110      "xtype" : "Button",
111      "$ xns" : "Roo",
112      "* prop" : "buttons[]"
113     }
114    ]
115   }
116  ]
117 }