094d28caa2816690bbb302afface8c7cd8ffa405
[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   "135d0838bf9429a58dc388369036be2c" : "Add / Edit Column Configuration",
12   "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
13   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
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" : "Add / Edit Column Configuration",
28    "xtype" : "LayoutDialog",
29    "width" : 400,
30    "$ xns" : "Roo",
31    "closable" : false,
32    "resizable" : false,
33    "height" : 150,
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" : "margin: 5px",
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          "value" : 0,
78          "$ xns" : "Roo.form",
79          "name" : "name"
80         },
81         {
82          "xtype" : "Hidden",
83          "$ xns" : "Roo.form",
84          "name" : "id"
85         }
86        ]
87       }
88      ]
89     },
90     {
91      "listeners" : {
92       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
93      },
94      "text" : "Cancel",
95      "xtype" : "Button",
96      "$ xns" : "Roo",
97      "* prop" : "buttons[]"
98     },
99     {
100      "listeners" : {
101       "|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}"
102      },
103      "text" : "OK",
104      "xtype" : "Button",
105      "$ xns" : "Roo",
106      "* prop" : "buttons[]"
107     }
108    ]
109   }
110  ]
111 }