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