Pman.Dialog.AddChildElementToPage.bjs
[Pman.Cms] / Pman.Dialog.AddChildElementToPage.bjs
1 {
2  "name" : "Pman.Dialog.AddChildElementToPage",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Cms/Pman.Dialog.AddChildElementToPage.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "463ab1bc075f498d1aa03b9bc062efa3" : "Element Type",
10   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
11   "e0626222614bdee31951d84c64e5e9ff" : "Select ",
12   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
13   "20bec77364d863100a1f9325873a8504" : "Select Page Type",
14   "92ef36ad9cc4bd4d2aa8369194bdfddb" : "Select Template Element",
15   "c9cc8cce247e49bae79f15173ce97354" : "Save"
16  },
17  "items" : [
18   {
19    "listeners" : {
20     "show" : "function (_self)\n{\n    \n    \n}"
21    },
22    "collapsible" : false,
23    "title" : "Select Template Element",
24    "xtype" : "LayoutDialog",
25    "width" : 400,
26    "$ xns" : "Roo",
27    "closable" : false,
28    "resizable" : false,
29    "height" : 120,
30    "items" : [
31     {
32      "xtype" : "LayoutRegion",
33      "$ xns" : "Roo",
34      "* prop" : "center"
35     },
36     {
37      "region" : "center",
38      "xtype" : "ContentPanel",
39      "$ xns" : "Roo",
40      "items" : [
41       {
42        "listeners" : {
43         "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       \n       return;\n    }\n    if (action.type == 'load') {\n        \n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         \n         _this.form.reset();\n         \n         return;\n    }\n}\n",
44         "|rendered" : "function (form)\n{\n    _this.form = form;\n}\n"
45        },
46        "$ url" : "baseURL + '/Roo/cms_category_type.php'",
47        "xtype" : "Form",
48        "method" : "POST",
49        "style" : "margin:10px;",
50        "$ xns" : "Roo.form",
51        "items" : [
52         {
53          "alwaysQuery" : true,
54          "listWidth" : 400,
55          "triggerAction" : "all",
56          "fieldLabel" : "Element Type",
57          "forceSelection" : true,
58          "selectOnFocus" : true,
59          "pageSize" : 20,
60          "displayField" : "name",
61          "emptyText" : "Select ",
62          "hiddenName" : "element_id",
63          "minChars" : 2,
64          "valueField" : "id",
65          "xtype" : "ComboBox",
66          "typeAhead" : false,
67          "editable" : false,
68          "$ xns" : "Roo.form",
69          "name" : "element_id_name",
70          "qtip" : "Select Page Type",
71          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
72          "loadingText" : "Searching...",
73          "items" : [
74           {
75            "listeners" : {
76             "|beforeload" : "function (_self, o){\n    \n    o.params = o.params || {};\n    \n    if(!_this.data.template_id || _this.data.template_id * 1 < 1){\n        return false;\n    }\n    \n    o.params.template_id = _this.data.template_id;\n    \n}\n"
77            },
78            "xtype" : "Store",
79            "remoteSort" : true,
80            "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }",
81            "$ xns" : "Roo.data",
82            "* prop" : "store",
83            "items" : [
84             {
85              "$ url" : "baseURL + '/Roo/Cms_template_element.php'",
86              "xtype" : "HttpProxy",
87              "method" : "GET",
88              "$ xns" : "Roo.data",
89              "* prop" : "proxy"
90             },
91             {
92              "id" : "id",
93              "root" : "data",
94              "xtype" : "JsonReader",
95              "$ fields" : "[\n    {\n        \"name\":\"id\",\n        \"type\":\"int\"\n    },\n    {\n        \"name\":\"name\",\n        \"type\":\"string\"\n    }\n]",
96              "$ xns" : "Roo.data",
97              "* prop" : "reader",
98              "totalProperty" : "total"
99             }
100            ]
101           }
102          ]
103         }
104        ]
105       }
106      ]
107     },
108     {
109      "listeners" : {
110       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
111      },
112      "text" : "Cancel",
113      "xtype" : "Button",
114      "$ xns" : "Roo",
115      "* prop" : "buttons[]"
116     },
117     {
118      "listeners" : {
119       "click" : "function (_self, e)\n{\n    _this.form.doAction(\"submit\");\n\n}"
120      },
121      "text" : "Save",
122      "xtype" : "Button",
123      "$ xns" : "Roo",
124      "* prop" : "buttons[]"
125     }
126    ]
127   }
128  ]
129 }