Pman.Dialog.CoreNotifyRecurKeywords.bjs
[Pman.Core] / Pman.Dialog.CoreNotifyRecurKeywords.bjs
1 {
2  "name" : "Pman.Dialog.CoreNotifyRecurKeywords",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreNotifyRecurKeywords.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "6c768695a8efb18436d5b7b4374cdb45" : "Select core_enum",
10   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
11   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12   "8145869e6b6583cbdf33dd8d10cec023" : "Select Industry",
13   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK",
14   "790f855c2139f2faecb810519e90b833" : "Add Notification Keywords"
15  },
16  "items" : [
17   {
18    "listeners" : {
19     "show" : "function (_self)\n{\n    \n}"
20    },
21    "modal" : true,
22    "collapsible" : false,
23    "background" : true,
24    "title" : "Add Notification Keywords",
25    "xtype" : "LayoutDialog",
26    "width" : 400,
27    "$ xns" : "Roo",
28    "closable" : false,
29    "resizable" : false,
30    "height" : 150,
31    "items" : [
32     {
33      "xtype" : "LayoutRegion",
34      "$ xns" : "Roo",
35      "titlebar" : false,
36      "* prop" : "center"
37     },
38     {
39      "region" : "center",
40      "fitToFrame" : true,
41      "background" : true,
42      "xtype" : "ContentPanel",
43      "$ xns" : "Roo",
44      "items" : [
45       {
46        "listeners" : {
47         "|actioncomplete" : "function (_self, action)\n{\n  if (action.type == 'setdata') {\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",
48         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
49        },
50        "$ url" : "baseURL + '/Roo/Core_notify_recur.php'",
51        "xtype" : "Form",
52        "method" : "POST",
53        "style" : "margin: 5px",
54        "$ xns" : "Roo.form",
55        "items" : [
56         {
57          "xtype" : "Hidden",
58          "$ xns" : "Roo.form",
59          "name" : "id"
60         },
61         {
62          "listeners" : {
63           "add" : "function (combo)\n{\n    Pman.Dialog.CrmIndustry.show({ id: 0 }, function(data) { \n    \n       \n        _this.form.setValues({\n            crm_industry_id: data.id,\n            crm_industry_id_display_name : data.display_name\n        });\n    });\n}"
64          },
65          "alwaysQuery" : true,
66          "listWidth" : 400,
67          "triggerAction" : "all",
68          "fieldLabel" : "Industry",
69          "forceSelection" : true,
70          "selectOnFocus" : true,
71          "pageSize" : 20,
72          "displayField" : "display_name",
73          "emptyText" : "Select Industry",
74          "hiddenName" : "crm_industry_id",
75          "minChars" : 2,
76          "valueField" : "id",
77          "xtype" : "ComboBox",
78          "allowBlank" : false,
79          "typeAhead" : false,
80          "editable" : true,
81          "width" : 217,
82          "$ xns" : "Roo.form",
83          "name" : "crm_industry_id_display_name",
84          "qtip" : "Select core_enum",
85          "queryParam" : "search[display_name]",
86          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
87          "loadingText" : "Searching...",
88          "items" : [
89           {
90            "listeners" : {
91             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.etype = 'crm_industry';\n    o.params.active  = 1;\n}\n"
92            },
93            "xtype" : "Store",
94            "remoteSort" : true,
95            "$ sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
96            "$ xns" : "Roo.data",
97            "* prop" : "store",
98            "items" : [
99             {
100              "$ url" : "baseURL + '/Roo/core_enum.php'",
101              "method" : "GET",
102              "xtype" : "HttpProxy",
103              "$ xns" : "Roo.data",
104              "* prop" : "proxy"
105             },
106             {
107              "id" : "id",
108              "root" : "data",
109              "xtype" : "JsonReader",
110              "$ xns" : "Roo.data",
111              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]",
112              "* prop" : "reader",
113              "totalProperty" : "total"
114             }
115            ]
116           }
117          ]
118         }
119        ]
120       }
121      ]
122     },
123     {
124      "listeners" : {
125       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
126      },
127      "text" : "Cancel",
128      "xtype" : "Button",
129      "$ xns" : "Roo",
130      "* prop" : "buttons[]"
131     },
132     {
133      "listeners" : {
134       "|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}"
135      },
136      "text" : "OK",
137      "xtype" : "Button",
138      "$ xns" : "Roo",
139      "* prop" : "buttons[]"
140     }
141    ]
142   }
143  ]
144 }