162554712c8cc6690c87d3a91ccc01a125efe443
[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)
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);
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 : true,
43     placement : 'right',
44     style : 'width:500px',
45     xns : Roo.bootstrap,
46     '|xns' : 'Roo.bootstrap',
47     items  : [
48      {
49       xtype : 'Table',
50       xns : Roo.bootstrap,
51       '|xns' : 'Roo.bootstrap',
52       store : {
53        xtype : 'Store',
54        xns : Roo.data,
55        '|xns' : 'Roo.data',
56        proxy : {
57         xtype : 'HttpProxy',
58         url : rootURL + '/Roo/Files_keytypes',
59         xns : Roo.data,
60         '|xns' : 'Roo.data'
61        },
62        reader : {
63         xtype : 'JsonReader',
64         xns : Roo.data,
65         '|xns' : 'Roo.data'
66        }
67       },
68       cm : [
69        {
70         xtype : 'ColumnModel',
71         header : _this._strings['897356954c2cd3d41b221e3f24f99bba'] /* Key */,
72         xns : Roo.grid,
73         '|xns' : 'Roo.grid'
74        },
75        {
76         xtype : 'ColumnModel',
77         header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
78         xns : Roo.grid,
79         '|xns' : 'Roo.grid'
80        }
81       ]
82      },
83      {
84       xtype : 'PopoverNav',
85       style : 'flex-direction: row;',
86       type : 'pills',
87       xns : Roo.bootstrap,
88       '|xns' : 'Roo.bootstrap',
89       items  : [
90        {
91         xtype : 'Element',
92         cls : 'navbar-brand',
93         html : _this._strings['d1e2284f2f77494e8ed6bcb990bf6072'] /* Brand here */,
94         xns : Roo.bootstrap,
95         '|xns' : 'Roo.bootstrap'
96        },
97        {
98         xtype : 'NavGroup',
99         align : 'right',
100         pilltype : false,
101         type : 'pills',
102         xns : Roo.bootstrap,
103         '|xns' : 'Roo.bootstrap',
104         items  : [
105          {
106           xtype : 'NavItem',
107           button_outline : true,
108           button_weight : 'primary',
109           fa : 'download',
110           html : _this._strings['5a105e8b9d40e1329780d62ea2265d8a'] /* test1 */,
111           xns : Roo.bootstrap,
112           '|xns' : 'Roo.bootstrap'
113          },
114          {
115           xtype : 'NavItem',
116           fa : 'times',
117           linkcls : 'pr-0',
118           listeners : {
119            click : function (e)
120             {
121                 _this.dialog.hide();
122             }
123           },
124           xns : Roo.bootstrap,
125           '|xns' : 'Roo.bootstrap'
126          }
127         ]
128        }
129       ]
130      }
131     ]
132    }  );
133  }
134 });
135 Roo.apply(Pman.Popover.FileTest, Pman.Popover.FileTest.prototype);