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   "b48968e1c912da07df5e8d6d246291ec" : "Display Name",
11   "c4ca4238a0b923820dcc509a6f75849b" : "1",
12   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
13   "135d0838bf9429a58dc388369036be2c" : "Add / Edit Column Configuration",
14   "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
15   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
16  },
17  "named_strings" : {
18   "display_name_fieldLabel" : "b48968e1c912da07df5e8d6d246291ec",
19   "seqid_value" : "cfcd208495d565ef66e7dff9f98764da",
20   "active_fieldLabel" : "4d3d769b812b6faa6b76e1a8abaece2d",
21   "active_value" : "c4ca4238a0b923820dcc509a6f75849b"
22  },
23  "items" : [
24   {
25    "listeners" : {
26     "show" : "function (_self)\n{\n    \n}"
27    },
28    "modal" : true,
29    "collapsible" : false,
30    "background" : true,
31    "title" : "Add / Edit Column Configuration",
32    "xtype" : "LayoutDialog",
33    "width" : 400,
34    "$ xns" : "Roo",
35    "closable" : false,
36    "resizable" : false,
37    "height" : 150,
38    "items" : [
39     {
40      "xtype" : "LayoutRegion",
41      "$ xns" : "Roo",
42      "titlebar" : false,
43      "* prop" : "center"
44     },
45     {
46      "background" : true,
47      "region" : "center",
48      "fitToFrame" : true,
49      "xtype" : "ContentPanel",
50      "$ xns" : "Roo",
51      "items" : [
52       {
53        "listeners" : {
54         "|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",
55         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
56        },
57        "$ url" : "baseURL + '/Roo/core_setting'",
58        "method" : "POST",
59        "xtype" : "Form",
60        "style" : "margin: 5px",
61        "$ xns" : "Roo.form",
62        "items" : [
63         {
64          "listeners" : {
65           "keyup" : "function (_self, e)\n{\n    _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n    \n}"
66          },
67          "fieldLabel" : "Display Name",
68          "xtype" : "TextField",
69          "allowBlank" : false,
70          "width" : 250,
71          "$ xns" : "Roo.form",
72          "name" : "display_name"
73         },
74         {
75          "String actionMode" : "fieldEl",
76          "Boolean checked" : true,
77          "fieldLabel" : "Active",
78          "inputValue" : 1,
79          "hidden" : true,
80          "value" : 1,
81          "xtype" : "Checkbox",
82          "valueOff" : 0,
83          "$ xns" : "Roo.form",
84          "name" : "active"
85         },
86         {
87          "xtype" : "Hidden",
88          "$ xns" : "Roo.form",
89          "name" : "etype"
90         },
91         {
92          "xtype" : "Hidden",
93          "value" : 0,
94          "$ xns" : "Roo.form",
95          "name" : "seqid"
96         },
97         {
98          "xtype" : "Hidden",
99          "$ xns" : "Roo.form",
100          "name" : "id"
101         }
102        ]
103       }
104      ]
105     },
106     {
107      "listeners" : {
108       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
109      },
110      "text" : "Cancel",
111      "xtype" : "Button",
112      "$ xns" : "Roo",
113      "* prop" : "buttons[]"
114     },
115     {
116      "listeners" : {
117       "|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}"
118      },
119      "text" : "OK",
120      "xtype" : "Button",
121      "$ xns" : "Roo",
122      "* prop" : "buttons[]"
123     }
124    ]
125   }
126  ]
127 }