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   "0ee0f676f631ad4e8a5844314a3a20de" : "Select campaign",
10   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
11   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK",
13   "790f855c2139f2faecb810519e90b833" : "Add Notification Keywords",
14   "ded4cba1b04eb8236e24a3e39470d8a7" : "Select Campaign"
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          "alwaysQuery" : true,
58          "listWidth" : 400,
59          "triggerAction" : "all",
60          "fieldLabel" : "Campaign",
61          "forceSelection" : true,
62          "selectOnFocus" : true,
63          "pageSize" : 20,
64          "Number width" : 200,
65          "displayField" : "name",
66          "emptyText" : "Select Campaign",
67          "hiddenName" : "campaign_id",
68          "minChars" : 2,
69          "valueField" : "id",
70          "xtype" : "ComboBox",
71          "allowBlank" : false,
72          "typeAhead" : false,
73          "editable" : true,
74          "$ xns" : "Roo.form",
75          "name" : "camapign_id_name",
76          "qtip" : "Select campaign",
77          "queryParam" : "query[name]",
78          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b></div>",
79          "loadingText" : "Searching...",
80          "items" : [
81           {
82            "listeners" : {
83             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n}\n"
84            },
85            "xtype" : "Store",
86            "remoteSort" : true,
87            "$ sortInfo" : "{ direction : 'DESC', field: 'id' }",
88            "$ xns" : "Roo.data",
89            "* prop" : "store",
90            "items" : [
91             {
92              "$ url" : "baseURL + '/Roo/Projects.php'",
93              "method" : "GET",
94              "xtype" : "HttpProxy",
95              "$ xns" : "Roo.data",
96              "* prop" : "proxy"
97             },
98             {
99              "id" : "id",
100              "root" : "data",
101              "xtype" : "JsonReader",
102              "$ xns" : "Roo.data",
103              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
104              "* prop" : "reader",
105              "totalProperty" : "total"
106             }
107            ]
108           }
109          ]
110         },
111         {
112          "fieldLabel" : "Company Types",
113          "hiddenName" : "filter_company_type",
114          "xtype" : "ComboBoxArray",
115          "width" : 210,
116          "$ xns" : "Roo.form",
117          "name" : "filter_company_type_name",
118          "items" : [
119           {
120            "alwaysQuery" : true,
121            "listWidth" : 200,
122            "idField" : "id",
123            "triggerAction" : "all",
124            "fieldLabel" : "company",
125            "forceSelection" : true,
126            "displayField" : "display_name",
127            "minChars" : 2,
128            "valueField" : "id",
129            "xtype" : "ComboBox",
130            "allowBlank" : true,
131            "editable" : true,
132            "width" : 200,
133            "$ xns" : "Roo.form",
134            "* prop" : "combo",
135            "queryParam" : "search[display_name]",
136            "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
137            "nameField" : "display_name",
138            "items" : [
139             {
140              "listeners" : {
141               "beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.etype = 'COMPTYPE';\n    o.params.active  = 1;\n}\n"
142              },
143              "xtype" : "Store",
144              "remoteSort" : true,
145              "$ sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
146              "$ xns" : "Roo.data",
147              "* prop" : "store",
148              "items" : [
149               {
150                "$ url" : "baseURL + '/Roo/core_enum.php'",
151                "xtype" : "HttpProxy",
152                "method" : "GET",
153                "$ xns" : "Roo.data",
154                "* prop" : "proxy"
155               },
156               {
157                "id" : "code",
158                "root" : "data",
159                "xtype" : "JsonReader",
160                "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"keyword\",\"type\":\"string\"}]",
161                "$ xns" : "Roo.data",
162                "* prop" : "reader",
163                "totalProperty" : "total"
164               }
165              ]
166             }
167            ]
168           }
169          ]
170         },
171         {
172          "xtype" : "Hidden",
173          "$ xns" : "Roo.form",
174          "name" : "id"
175         }
176        ]
177       }
178      ]
179     },
180     {
181      "listeners" : {
182       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
183      },
184      "text" : "Cancel",
185      "xtype" : "Button",
186      "$ xns" : "Roo",
187      "* prop" : "buttons[]"
188     },
189     {
190      "listeners" : {
191       "|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    \n}"
192      },
193      "text" : "OK",
194      "xtype" : "Button",
195      "$ xns" : "Roo",
196      "* prop" : "buttons[]"
197     }
198    ]
199   }
200  ]
201 }