DataObjects/Companies.php
[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" : 600,
27    "$ xns" : "Roo",
28    "closable" : false,
29    "resizable" : false,
30    "height" : 180,
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        \n        _this.dialog.el.unmask();\n        \n        _this.data = action.result.data;\n        \n        if(typeof(_this.data.keywords) != 'undefined'){\n            var n = Roo.decode(_this.data.keywords);\n            _this.form.findField('keyword_filters').setValue(n);\n        }\n        \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" : 400,
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" : "campaign_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          "Boolean allowBlank" : false,
113          "fieldLabel" : "Keywords",
114          "hiddenName" : "keyword_filters",
115          "xtype" : "ComboBoxArray",
116          "width" : 410,
117          "$ xns" : "Roo.form",
118          "name" : "keyword_filters_name",
119          "items" : [
120           {
121            "alwaysQuery" : true,
122            "listWidth" : 400,
123            "triggerAction" : "all",
124            "fieldLabel" : "Keyword",
125            "forceSelection" : true,
126            "displayField" : "keyword",
127            "minChars" : 2,
128            "valueField" : "id",
129            "xtype" : "ComboBox",
130            "allowBlank" : true,
131            "editable" : true,
132            "width" : 400,
133            "$ xns" : "Roo.form",
134            "* prop" : "combo",
135            "queryParam" : "query[keyword]",
136            "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{keyword}</b> </div>",
137            "items" : [
138             {
139              "listeners" : {
140               "beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    var s = _this.form.findField('campaign_id').getValue() * 1;\n    \n    if(isNaN(s) || s < 1){\n        return false;\n    }\n    \n    o.params.is_active  = 1;\n    o.params.is_keyword = 1;\n    o.params.project_id = s;\n}\n"
141              },
142              "xtype" : "Store",
143              "remoteSort" : true,
144              "$ sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
145              "$ xns" : "Roo.data",
146              "* prop" : "store",
147              "items" : [
148               {
149                "$ url" : "baseURL + '/Roo/clipping_keywords.php'",
150                "xtype" : "HttpProxy",
151                "method" : "GET",
152                "$ xns" : "Roo.data",
153                "* prop" : "proxy"
154               },
155               {
156                "id" : "code",
157                "root" : "data",
158                "xtype" : "JsonReader",
159                "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"keyword\",\"type\":\"string\"}]",
160                "$ xns" : "Roo.data",
161                "* prop" : "reader",
162                "totalProperty" : "total"
163               }
164              ]
165             }
166            ]
167           }
168          ]
169         },
170         {
171          "xtype" : "Hidden",
172          "$ xns" : "Roo.form",
173          "name" : "id"
174         }
175        ]
176       }
177      ]
178     },
179     {
180      "listeners" : {
181       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
182      },
183      "text" : "Cancel",
184      "xtype" : "Button",
185      "$ xns" : "Roo",
186      "* prop" : "buttons[]"
187     },
188     {
189      "listeners" : {
190       "|click" : "function() {\n    \n    _this.form.doAction('submit');\n    \n}"
191      },
192      "text" : "OK",
193      "xtype" : "Button",
194      "$ xns" : "Roo",
195      "* prop" : "buttons[]"
196     }
197    ]
198   }
199  ]
200 }