a423df882707f4392ec295c5817b9046e56d3ade
[roojs1] / examples / bootstrap / popover.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Popover');
6
7 Pman.Popover.FileTest= function() {}
8 Roo.apply(Pman.Popover.FileTest.prototype, {
9
10  _strings : {
11   '897356954c2cd3d41b221e3f24f99bba' :"Key",
12   '689202409e48743b914713f96d93947c' :"Value",
13   '5a105e8b9d40e1329780d62ea2265d8a' :"test1",
14   'd1e2284f2f77494e8ed6bcb990bf6072' :"Brand here"
15  },
16
17  dialog : false,
18  callback:  false,
19
20  show : function(data, cb, opts)
21  {
22   if (!this.dialog) {
23    this.create();
24   }
25
26   this.callback = cb;
27   this.data = data;
28   this.dialog.show(this.data._el, opts);
29   if (this.form) {
30    this.form.reset();
31    this.form.setValues(data);
32    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
33   }
34
35  },
36
37  create : function()
38  {
39   var _this = this;
40   this.dialog = Roo.factory({
41     xtype : 'Popover',
42     modal : false,
43     placement : 'right',
44     style : 'width:500px',
45     listeners : {
46      show : function (_self)
47       {
48           _this.grid.ds.load({});
49            this.updatePosition.defer(100,this);
50       }
51     },
52     xns : Roo.bootstrap,
53     '|xns' : 'Roo.bootstrap',
54     items  : [
55      {
56       xtype : 'Table',
57       listeners : {
58        render : function (_self)
59         {
60             _this.grid = this;
61         }
62       },
63       xns : Roo.bootstrap,
64       '|xns' : 'Roo.bootstrap',
65       store : {
66        xtype : 'SimpleStore',
67        data : [
68            [ 'NG1234:', 'Wanchai' ],
69            [ 'NG1234:', 'Central' ],
70            [ 'NG1234:', 'North Point' ],
71            [ 'NG1234:', 'Causeway Bay' ],
72            [ 'NG1234:', 'Eastern' ]
73        ],
74        fields : [ 'code' , 'name' ],
75        isLocal : true,
76        listeners : {
77         load : function (_self, records, options)
78          {
79           
80          }
81        },
82        xns : Roo.data,
83        '|xns' : 'Roo.data'
84       },
85       cm : [
86        {
87         xtype : 'ColumnModel',
88         header : _this._strings['897356954c2cd3d41b221e3f24f99bba'] /* Key */,
89         xns : Roo.grid,
90         '|xns' : 'Roo.grid'
91        },
92        {
93         xtype : 'ColumnModel',
94         header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
95         xns : Roo.grid,
96         '|xns' : 'Roo.grid'
97        }
98       ]
99      },
100      {
101       xtype : 'PopoverNav',
102       style : 'flex-direction: row;',
103       type : 'pills',
104       xns : Roo.bootstrap,
105       '|xns' : 'Roo.bootstrap',
106       items  : [
107        {
108         xtype : 'Element',
109         cls : 'navbar-brand',
110         html : _this._strings['d1e2284f2f77494e8ed6bcb990bf6072'] /* Brand here */,
111         xns : Roo.bootstrap,
112         '|xns' : 'Roo.bootstrap'
113        },
114        {
115         xtype : 'NavGroup',
116         align : 'right',
117         pilltype : false,
118         type : 'pills',
119         xns : Roo.bootstrap,
120         '|xns' : 'Roo.bootstrap',
121         items  : [
122          {
123           xtype : 'NavItem',
124           button_outline : true,
125           button_weight : 'primary',
126           fa : 'download',
127           html : _this._strings['5a105e8b9d40e1329780d62ea2265d8a'] /* test1 */,
128           xns : Roo.bootstrap,
129           '|xns' : 'Roo.bootstrap'
130          },
131          {
132           xtype : 'NavItem',
133           fa : 'times',
134           linkcls : 'pr-0',
135           listeners : {
136            click : function (e)
137             {
138                 _this.dialog.hide();
139             }
140           },
141           xns : Roo.bootstrap,
142           '|xns' : 'Roo.bootstrap'
143          }
144         ]
145        }
146       ]
147      }
148     ]
149    }  );
150  }
151 });
152 Roo.apply(Pman.Popover.FileTest, Pman.Popover.FileTest.prototype);