JsRender/Roo.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 8 May 2012 08:19:30 +0000 (16:19 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 8 May 2012 08:19:30 +0000 (16:19 +0800)
JsRender/Roo.js

index 45bcfdb..9ad6202 100644 (file)
@@ -233,6 +233,23 @@ Roo = XObject.define(
             els.push('xns: '+ bits.join('.'));
         },
         
+        
+        toSourcePreview: function()
+        {
+            
+            var top = this.guessName(this.items[0]);
+            if (!top) {
+                return false;
+            }
+            if (top.match(/Dialog/)) {
+                return this.toSourceDialog(true);
+            }
+            return this.toSourceLayout(true);
+            
+            
+            
+        }
+        
         /**
          * This needs to use some options on the project
          * to determine how the file is output..