Pman.Dialog.CmsApplyStyleSheets.bjs
authorEdward <edward@roojs.com>
Fri, 19 Jun 2015 08:31:11 +0000 (16:31 +0800)
committerEdward <edward@roojs.com>
Fri, 19 Jun 2015 08:31:11 +0000 (16:31 +0800)
Pman.Dialog.CmsApplyStyleSheets.js

Pman.Dialog.CmsApplyStyleSheets.bjs
Pman.Dialog.CmsApplyStyleSheets.js

index f7ad756..80a1fa1 100644 (file)
@@ -69,7 +69,7 @@
     },
     {
      "listeners" : {
-      "click" : "function (_self, e)\n{\n    _this.form.doAction(\"submit\");\n}"
+      "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}"
      },
      "text" : "OK",
      "xtype" : "Button",
index 08fcf99..7e0aee7 100644 (file)
@@ -73,6 +73,24 @@ Pman.Dialog.CmsApplyStyleSheets = {
       listeners : {
        click : function (_self, e)
         {
+            var stylesheets = _this.form.findField('stylesheets').getValue();
+            
+            var v = [];
+            
+            if(res.stylesheets.length){
+                var css = res.stylesheets.split("\n");
+                
+                Roo.each(css, function(c){
+                    if(!c.length){
+                        return;
+                    }
+                    
+                    c = c.replace('{rootURL}', rootURL);
+                    
+                    v.push(c);
+                });
+            }
+            
             _this.form.doAction("submit");
         }
       }