php7 fixes
[Pman.Builder] / Pman.Builder.js
index f671c19..e078a7c 100644 (file)
@@ -77,25 +77,43 @@ Pman.Builder = {
         
         //var _this = this;
         
-        Pman.request({
+        // should we try and render first???
+        var html = '';
+        try {
+             html = Pman.Builder.View.frameToHTML();
+            
+        } catch (e) {
+            
+        }
+        
+        
+        
+        new Pman.Request({
             url: baseURL + '/Roo/Builder_part.php',
             method : 'POST',
             params : {
                 json : Roo.encode(js, null, 4),
                 jsource : render.toSource(),
+                html : html,
                 name :   js.name,
                 module_id : Pman.Tab.BuilderTop.modsel.getValue(),
                 id : sid
             }, 
-            success : function(data) {
+            success : function(res) {
+                var data = res.data;
                 // set the fileSel!!
                 console.log(data);
                 if (data) {
                     Pman.Tab.BuilderTop.filesel.setFromData(data);
                     
                 }
+                data.jsource = render.toSource();
+                data.json = Roo.encode(js, null, 4);
+                data.html = html; 
+                
+                
                 if (data && cb) {
-                     cb.call(data);
+                     cb.call(Pman.Tab.BuilderTop,data);
                     // ??? _this.postCode(data);
                 }