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          "xtype" : "Hidden",
58          "$ xns" : "Roo.form",
59          "name" : "id"
60         },
61         {
62          "alwaysQuery" : true,
63          "listWidth" : 400,
64          "triggerAction" : "all",
65          "fieldLabel" : "Campaign",
66          "forceSelection" : true,
67          "selectOnFocus" : true,
68          "pageSize" : 20,
69          "Number width" : 200,
70          "displayField" : "name",
71          "emptyText" : "Select Campaign",
72          "hiddenName" : "campaign_id",
73          "minChars" : 2,
74          "valueField" : "id",
75          "xtype" : "ComboBox",
76          "allowBlank" : false,
77          "typeAhead" : false,
78          "editable" : true,
79          "$ xns" : "Roo.form",
80          "name" : "camapign_id_name",
81          "qtip" : "Select campaign",
82          "queryParam" : "search[name]",
83          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>#{pressrelease_id} - {name}</b></div>",
84          "loadingText" : "Searching...",
85          "items" : [
86           {
87            "listeners" : {
88             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n}\n"
89            },
90            "xtype" : "Store",
91            "remoteSort" : true,
92            "$ sortInfo" : "{ direction : 'DESC', field: 'pressrelease_id' }",
93            "$ xns" : "Roo.data",
94            "* prop" : "store",
95            "items" : [
96             {
97              "$ url" : "baseURL + '/Roo/Projects.php'",
98              "method" : "GET",
99              "xtype" : "HttpProxy",
100              "$ xns" : "Roo.data",
101              "* prop" : "proxy"
102             },
103             {
104              "id" : "id",
105              "root" : "data",
106              "xtype" : "JsonReader",
107              "$ xns" : "Roo.data",
108              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
109              "* prop" : "reader",
110              "totalProperty" : "total"
111             }
112            ]
113           }
114          ]
115         }
116        ]
117       }
118      ]
119     },
120     {
121      "listeners" : {
122       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
123      },
124      "text" : "Cancel",
125      "xtype" : "Button",
126      "$ xns" : "Roo",
127      "* prop" : "buttons[]"
128     },
129     {
130      "listeners" : {
131       "|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}"
132      },
133      "text" : "OK",
134      "xtype" : "Button",
135      "$ xns" : "Roo",
136      "* prop" : "buttons[]"
137     }
138    ]
139   }
140  ]
141 }