Pman.Tab.FtpTab.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 12 Apr 2010 09:46:58 +0000 (17:46 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 12 Apr 2010 09:46:58 +0000 (17:46 +0800)
Pman.Tab.FtpTab.js [new file with mode: 0644]

diff --git a/Pman.Tab.FtpTab.js b/Pman.Tab.FtpTab.js
new file mode 100644 (file)
index 0000000..7e9b248
--- /dev/null
@@ -0,0 +1,101 @@
+//<script type="text/javascript">
+
+
+/**
+* Tab for clipping stuff - top lvl..
+*/
+
+
+Pman.on('beforeload', function()
+{
+    if (!Pman.hasPerm('Ftp.Ftp', 'S') || Pman.Tab.FtpTab.disabled) {
+        return;
+    }
+    
+    
+    Pman.register({
+        modKey : '017-pman-tab-ftptab',
+        module : Pman.Tab.FtpTab,
+        region : 'center',
+        parent : Pman,
+        name : "Ftp Tab",
+        finalize : function() {
+            
+            var _this = Pman.Tab.FtpTab;
+            if (!_this.layout) {
+                return;
+            }
+            
+            _this.layout.endUpdate(); 
+            //_p.refreshPager.defer(1000, _p);
+            
+        }
+    });
+    
+    
+     
+    
+});
+Pman.Tab.FtpTab = {
+    
+    tab : false,
+    layout : false,
+    disabled : false,
+    add : function(parentLayout, region)
+    {
+        
+        if (!Pman.hasPerm('Ftp.Ftp', 'S')  || this.disabled) {
+            return;
+        }
+            
+        var _this = this;
+      
+        
+        this.layout = new Ext.BorderLayout(
+            parentLayout.getEl().createChild({tag:'div'}),
+            {
+                west: {
+                    title: "Directories",
+                    split:true,
+                    initialSize: 220,
+                    titlebar: true,
+                    collapsible: true,
+                    autoScroll:false
+                },
+                
+                center: {
+                    titlebar: false,
+                    autoScroll:false,
+                    closeOnTab: true,
+                    tabPosition: 'top',
+                    
+                    //resizeTabs: true,
+                    alwaysShowTabs: false,
+                    minTabWidth: 140
+                }
+            }
+        );
+        
+            
+        
+        //throw 'done';
+        
+        this.tab = parentLayout.add(region,  new Ext.NestedLayoutPanel(
+            this.layout, { title: "Ftp"
+                //, toolbar: mainTb 
+        }));
+        
+        this.tab.on('activate', function() {
+            _this.layout.getRegion('west').showPanel(0);
+            _this.layout.getRegion('center').showPanel(0);
+        });
+        this.layout.beginUpdate(); 
+      
+        //this.adminLayout.beginUpdate();
+    }
+     
+};
+        
+    
\ No newline at end of file