PHP8
[Pman.BAdmin] / Pman.Dialog.BAdminCoreImportUrl.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.BAdminCoreImportUrl= function() {}
8 Roo.apply(Pman.Dialog.BAdminCoreImportUrl.prototype, {
9
10  _strings : {
11   'c8c55f55be8cbe3141db7e26ab0a8b4e' :"Import URL",
12   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
13   'e0aa021e21dddbd6d8cecec71e9cf564' :"OK",
14   'e6b391a8d2c4d45902a23a8b6585703d' :"URL"
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 : 'Modal',
42     title : _this._strings['c8c55f55be8cbe3141db7e26ab0a8b4e'] /* Import URL */,
43     xns : Roo.bootstrap,
44     '|xns' : 'Roo.bootstrap',
45     buttons : [
46      {
47       xtype : 'Button',
48       html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
49       weight : 'default',
50       listeners : {
51        click : function (_self, e)
52         {
53             _this.dialog.hide();
54         }
55       },
56       xns : Roo.bootstrap,
57       '|xns' : 'Roo.bootstrap'
58      },
59      {
60       xtype : 'Button',
61       html : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
62       weight : 'primary',
63       listeners : {
64        click : function (_self, e)
65         {
66             _this.form.doAction("submit");
67         }
68       },
69       xns : Roo.bootstrap,
70       '|xns' : 'Roo.bootstrap'
71      }
72     ],
73     items  : [
74      {
75       xtype : 'Form',
76       method : 'POST',
77       url : baseURL,
78       listeners : {
79        actioncomplete : function (_self, action)
80         {
81              if (action.type == 'setdata') {
82                 if(_this.data.target){
83                     _this.form.url = baseURL + _this.data.target;
84                 }\r
85                // _this.dialog.el.mask("Loading");\r
86                // if(_this.data.id*1 > 0)\r
87                //     this.load({ method: 'GET', params: { '_id' : _this.data.id }});\r
88                \r
89                return;\r
90             }\r
91             if (action.type == 'load') {\r
92          \r
93                 return;\r
94             }\r
95             if (action.type =='submit') {\r
96             \r
97                 //action.result.data\r
98                 _this.dialog.hide();\r
99             //    Roo.log(_this.callback);\r
100                  if (_this.callback) {\r
101                     _this.callback.call(_this, action.result.data);\r
102                  }\r
103                  _this.form.reset();\r
104                  return;\r
105             }
106         },
107        render : function (_self)
108         {
109             _this.form = this;
110         }
111       },
112       xns : Roo.bootstrap,
113       '|xns' : 'Roo.bootstrap',
114       items  : [
115        {
116         xtype : 'Input',
117         fieldLabel : _this._strings['e6b391a8d2c4d45902a23a8b6585703d'] /* URL */,
118         labelAlign : 'left',
119         labelWidth : 1,
120         name : 'importUrl',
121         xns : Roo.bootstrap,
122         '|xns' : 'Roo.bootstrap'
123        }
124       ]
125      }
126     ]
127    }  );
128  }
129 });
130 Roo.apply(Pman.Dialog.BAdminCoreImportUrl, Pman.Dialog.BAdminCoreImportUrl.prototype);