Pman.Dialog.Image.bjs
[Pman.BAdmin] / Pman.Dialog.Image.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.Dialog');
6
7 Pman.Dialog.Image= function() {}
8 Roo.apply(Pman.Dialog.Image.prototype, {
9
10  _strings : {
11   'ef797d5638c2e1c6b6225b2247541ea5' :"Upload Image or File:",
12   '2859a4ae58ae4e25abdfc530f814e42f' :"Upload an Image or File",
13   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
14   'e635032a5f71d809146d3872389f5b0c' :"Choose File",
15   '91412465ea9169dfd901dd5e7c96dd99' :"Upload"
16  },
17
18  dialog : false,
19  callback:  false,
20
21  show : function(data, cb)
22  {
23   if (!this.dialog) {
24    this.create();
25   }
26
27   this.callback = cb;
28   this.data = data;
29   this.dialog.show(this.data._el);
30   if (this.form) {
31    this.form.reset();
32    this.form.setValues(data);
33    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
34   }
35
36  },
37
38  create : function()
39  {
40   var _this = this;
41   this.dialog = Roo.factory({
42     xtype : 'Modal',
43     title : _this._strings['2859a4ae58ae4e25abdfc530f814e42f'] /* Upload an Image or File */,
44     xns : Roo.bootstrap,
45     '|xns' : 'Roo.bootstrap',
46     buttons : [
47      {
48       xtype : 'Button',
49       html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
50       listeners : {
51        click : function (_self, e)
52         {
53             // do some checks?
54              
55             //_this.dialog.el.mask("Sending");
56             _this.dialog.uploadComplete = false;
57             _this.form.doAction('submit', {
58                 params: {
59                     ts : Math.random()
60                 }
61             });
62             _this.dialog.haveProgress = 0; // set to show..
63             _this.dialog.uploadProgress.defer(1000, _this.dialog);
64         
65         }
66       },
67       xns : Roo.bootstrap,
68       '|xns' : 'Roo.bootstrap'
69      },
70      {
71       xtype : 'Button',
72       html : _this._strings['91412465ea9169dfd901dd5e7c96dd99'] /* Upload */,
73       listeners : {
74        click : function (_self, e)
75         {
76             // do some checks?
77              
78             //_this.dialog.el.mask("Sending");
79             _this.dialog.uploadComplete = false;
80             _this.form.doAction('submit', {
81                 params: {
82                     ts : Math.random()
83                 }
84             });
85             _this.dialog.haveProgress = 0; // set to show..
86             _this.dialog.uploadProgress.defer(1000, _this.dialog);
87         
88         }
89       },
90       xns : Roo.bootstrap,
91       '|xns' : 'Roo.bootstrap'
92      }
93     ],
94     items  : [
95      {
96       xtype : 'Container',
97       style : 'width: 100%',
98       xns : Roo.bootstrap,
99       '|xns' : 'Roo.bootstrap',
100       items  : [
101        {
102         xtype : 'Form',
103         xns : Roo.bootstrap,
104         '|xns' : 'Roo.bootstrap',
105         items  : [
106          {
107           xtype : 'Input',
108           fieldLabel : _this._strings['ef797d5638c2e1c6b6225b2247541ea5'] /* Upload Image or File: */,
109           labelWidth : 4,
110           xns : Roo.bootstrap,
111           '|xns' : 'Roo.bootstrap',
112           before : {
113            xtype : 'Button',
114            html : _this._strings['e635032a5f71d809146d3872389f5b0c'] /* Choose File */,
115            xns : Roo.bootstrap,
116            '|xns' : 'Roo.bootstrap'
117           }
118          },
119          {
120           xtype : 'Input',
121           inputType : 'hidden',
122           name : 'UPLOAD_IDENTIFIER',
123           xns : Roo.bootstrap,
124           '|xns' : 'Roo.bootstrap'
125          },
126          {
127           xtype : 'Input',
128           inputType : 'hidden',
129           name : 'post_max_size',
130           xns : Roo.bootstrap,
131           '|xns' : 'Roo.bootstrap'
132          },
133          {
134           xtype : 'Input',
135           inputType : 'hidden',
136           name : 'upload_max_filesize',
137           xns : Roo.bootstrap,
138           '|xns' : 'Roo.bootstrap'
139          },
140          {
141           xtype : 'Input',
142           inputType : 'hidden',
143           name : 'ontable',
144           xns : Roo.bootstrap,
145           '|xns' : 'Roo.bootstrap'
146          },
147          {
148           xtype : 'Input',
149           inputType : 'hidden',
150           name : 'onid',
151           xns : Roo.bootstrap,
152           '|xns' : 'Roo.bootstrap'
153          },
154          {
155           xtype : 'Input',
156           inputType : 'hidden',
157           name : 'id',
158           xns : Roo.bootstrap,
159           '|xns' : 'Roo.bootstrap'
160          }
161         ]
162        }
163       ]
164      }
165     ]
166    }  );
167  }
168 });
169 Roo.apply(Pman.Dialog.Image, Pman.Dialog.Image.prototype);