Dump.php
[Pman.Builder] / old / Pman.Tab.Builder.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5
6
7 // register the module first
8 Pman.on('beforeload', function()
9 {
10     Pman.register({
11         modKey : '750-Pman.Tab.Builder',
12         module : Pman.Tab.Builder,
13         region : 'center',
14         parent : Pman,
15         name : "Pman.Tab.Builder",
16         disabled : false, 
17         permname: 'Builder' 
18     });
19 });
20
21 Pman.Tab.Builder = new Roo.util.Observable({
22
23     panel : false,
24     disabled : false,
25     parentLayout:  false,
26
27     add : function(parentLayout, region)
28     {
29
30         var _this = this;
31         this.parentLayout = parentLayout;
32
33         this.panel = parentLayout.addxtype({
34             xtype: 'NestedLayoutPanel',
35             xns: Roo,
36             listeners : {
37                 activate : function (_self)
38                 {
39                     if (_this.keyListener) {
40                         return;
41                     }
42                     _this.keyListener = true;
43                     
44                     Roo.get(document).on(   'keyup',  function(e) {
45                         if (!  _this.panel.active ) {
46                             return;
47                         }
48                          
49                         // check..
50                         if (!Pman.Tab.BuilderPanel.isMouseOver && !Pman.Tab.BuilderTree.isMouseOver) {
51                             return;
52                         }
53                        // console.log(e);
54                         //Roo.EventObject.DELETE,
55                         if (e.getCharCode() == Roo.EventObject.DELETE) {
56                             //  console.log('delete');
57                           
58                             var res = Pman.Tab.BuilderTree.deleteCurrent();
59                             if (res) {
60                                  var bp = Pman.Tab.BuilderPanel;
61                                  bp.redraw.defer(100,bp, [ true ]);
62                                 
63                             }
64                             e.stopEvent();
65                         }
66                         
67                          
68                      });
69                  
70                 }
71             },
72             title : "Customize",
73             layout : {
74                 xtype: 'BorderLayout',
75                 xns: Roo,
76                 north : {
77                     xtype: 'LayoutRegion',
78                     xns: Roo,
79                     height : 26
80                 },
81                 west : {
82                     xtype: 'LayoutRegion',
83                     xns: Roo,
84                     split : true,
85                     width : 255
86                 },
87                 center : {
88                     xtype: 'LayoutRegion',
89                     xns: Roo
90                 },
91                 east : {
92                     xtype: 'LayoutRegion',
93                     xns: Roo,
94                     collapsed : true,
95                     collapsible : true,
96                     split : true,
97                     title : "Palete",
98                     titlebar : true,
99                     width : 200
100                 }
101             }
102         });
103         this.layout = this.panel.layout;
104
105     }
106 });