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   "6a5b847af3d97df722040debdbccfbed" : "Page Type",
10   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
11   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12   "20bec77364d863100a1f9325873a8504" : "Select Page Type",
13   "92ef36ad9cc4bd4d2aa8369194bdfddb" : "Select Template Element",
14   "c9cc8cce247e49bae79f15173ce97354" : "Save",
15   "779e2624ddf330fb05b51ae59faf212d" : "Select Status Type"
16  },
17  "items" : [
18   {
19    "listeners" : {
20     "show" : "function (_self)\n{\n    \n    \n}"
21    },
22    "collapsible" : false,
23    "xtype" : "LayoutDialog",
24    "title" : "Select Template Element",
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       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\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        "method" : "POST",
48        "xtype" : "Form",
49        "style" : "margin:10px;",
50        "$ xns" : "Roo.form",
51        "items" : [
52         {
53          "alwaysQuery" : true,
54          "listWidth" : 400,
55          "triggerAction" : "all",
56          "fieldLabel" : "Page Type",
57          "forceSelection" : true,
58          "selectOnFocus" : true,
59          "pageSize" : 20,
60          "displayField" : "display_name",
61          "emptyText" : "Select Status Type",
62          "hiddenName" : "page_type_id",
63          "minChars" : 2,
64          "valueField" : "id",
65          "xtype" : "ComboBox",
66          "typeAhead" : false,
67          "editable" : false,
68          "$ xns" : "Roo.form",
69          "name" : "page_type_id_display_name",
70          "qtip" : "Select Page Type",
71          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
72          "loadingText" : "Searching...",
73          "items" : [
74           {
75            "listeners" : {
76             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.etype = 'cms_page_type'; \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/core_enum.php'",
86              "method" : "GET",
87              "xtype" : "HttpProxy",
88              "$ xns" : "Roo.data",
89              "* prop" : "proxy"
90             },
91             {
92              "id" : "id",
93              "root" : "data",
94              "xtype" : "JsonReader",
95              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
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    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\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 }