Pman.Dialog.CmsApplyStyleSheets.bjs
[Pman.Cms] / Pman.Dialog.CmsApplyStyleSheets.bjs
1 {
2  "name" : "Pman.Dialog.CmsApplyStyleSheets",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Cms/Pman.Dialog.CmsApplyStyleSheets.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
10   "4f6a786f206270451624db40d61d9855" : "Add Stylesheets",
11   "85e8231d44b865e90f6a39b356ded9bd" : "Stylesheets",
12   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
13  },
14  "items" : [
15   {
16    "modal" : true,
17    "collapsible" : false,
18    "title" : "Add Stylesheets",
19    "xtype" : "LayoutDialog",
20    "width" : 600,
21    "$ xns" : "Roo",
22    "closable" : false,
23    "resizable" : false,
24    "height" : 300,
25    "items" : [
26     {
27      "xtype" : "LayoutRegion",
28      "$ xns" : "Roo",
29      "* prop" : "center"
30     },
31     {
32      "region" : "center",
33      "xtype" : "ContentPanel",
34      "$ xns" : "Roo",
35      "items" : [
36       {
37        "listeners" : {
38         "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        \n        this.load({ method: 'GET', params: { '_stylesheets' : 1 }});\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",
39         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
40        },
41        "$ url" : "baseURL + '/Roo/Cms_page.php'",
42        "method" : "GET",
43        "xtype" : "Form",
44        "style" : "margin:10px;",
45        "String labelAlign" : "top",
46        "$ xns" : "Roo.form",
47        "items" : [
48         {
49          "fieldLabel" : "Stylesheets",
50          "Number width" : 550,
51          "xtype" : "TextArea",
52          "allowBlank" : true,
53          "Number height" : 200,
54          "$ xns" : "Roo.form",
55          "name" : "stylesheets"
56         }
57        ]
58       }
59      ]
60     },
61     {
62      "listeners" : {
63       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
64      },
65      "text" : "Cancel",
66      "xtype" : "Button",
67      "$ xns" : "Roo",
68      "* prop" : "buttons[]"
69     },
70     {
71      "listeners" : {
72       "click" : "function (_self, e)\n{\n    var stylesheets = _this.form.findField('stylesheets').getValue();\n    \n    var v = [];\n    \n    if(res.stylesheets.length){\n        var css = res.stylesheets.split(\"\\n\");\n        \n        Roo.each(css, function(c){\n            if(!c.length){\n                return;\n            }\n            \n            c = c.replace('{rootURL}', rootURL);\n            \n            v.push(c);\n        });\n    }\n    \n    _this.form.doAction(\"submit\");\n}"
73      },
74      "text" : "OK",
75      "xtype" : "Button",
76      "$ xns" : "Roo",
77      "* prop" : "buttons[]"
78     }
79    ]
80   }
81  ]
82 }