From b1407e7fe25c7af5313586958e0240dc53305fd1 Mon Sep 17 00:00:00 2001 From: john Date: Tue, 5 Dec 2017 10:21:51 +0800 Subject: [PATCH] Pman.Dialog.CoreImportUrl.bjs Pman.Dialog.CoreImportUrl.js --- Pman.Dialog.CoreImportUrl.bjs | 149 ++++++++++---------- Pman.Dialog.CoreImportUrl.js | 256 ++++++++++++++++++---------------- 2 files changed, 213 insertions(+), 192 deletions(-) diff --git a/Pman.Dialog.CoreImportUrl.bjs b/Pman.Dialog.CoreImportUrl.bjs index 3e874c22..68f2756e 100644 --- a/Pman.Dialog.CoreImportUrl.bjs +++ b/Pman.Dialog.CoreImportUrl.bjs @@ -1,76 +1,81 @@ { - "id": "roo-file-316", - "name": "Pman.Dialog.CoreImportUrl", - "parent": "", - "title": "", - "path": "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreImportUrl.bjs", - "items": [ + "name" : "Pman.Dialog.CoreImportUrl", + "parent" : "", + "title" : "", + "path" : "/home/johns/gitlive/Pman.Core/Pman.Dialog.CoreImportUrl.bjs", + "permname" : "", + "modOrder" : "001", + "strings" : { + "ea4788705e6873b424c65e91c2846b19" : "Cancel", + "c8c55f55be8cbe3141db7e26ab0a8b4e" : "Import URL", + "e0aa021e21dddbd6d8cecec71e9cf564" : "OK", + "e6b391a8d2c4d45902a23a8b6585703d" : "URL" + }, + "items" : [ + { + "modal" : true, + "collapsible" : false, + "title" : "Import URL", + "xtype" : "LayoutDialog", + "width" : 500, + "$ xns" : "Roo", + "closable" : false, + "resizable" : false, + "height" : 140, + "draggable" : false, + "items" : [ + { + "xtype" : "LayoutRegion", + "$ xns" : "Roo", + "* prop" : "center" + }, + { + "region" : "center", + "xtype" : "ContentPanel", + "$ xns" : "Roo", + "items" : [ + { + "listeners" : { + "rendered" : "function (form)\n{\n _this.form= form;\n}", + "actioncomplete" : "function (_self, action)\n{\n if (action.type == 'setdata') {\n if(_this.data.target){\n _this.form.url = baseURL + _this.data.target;\n }\r\n // _this.dialog.el.mask(\"Loading\");\r\n // if(_this.data.id*1 > 0)\r\n // this.load({ method: 'GET', params: { '_id' : _this.data.id }});\r\n \r\n return;\r\n }\r\n if (action.type == 'load') {\r\n \r\n return;\r\n }\r\n if (action.type =='submit') {\r\n \r\n //action.result.data\r\n _this.dialog.hide();\r\n // Roo.log(_this.callback);\r\n if (_this.callback) {\r\n _this.callback.call(_this, action.result.data);\r\n }\r\n _this.form.reset();\r\n return;\r\n }\n}" + }, + "$ url" : "baseURL", + "xtype" : "Form", + "method" : "POST", + "style" : "margin:10px;", + "$ xns" : "Roo.form", + "items" : [ { - "closable": false, - "collapsible": false, - "draggable": false, - "height": 140, - "modal": true, - "resizable": false, - "title": "Import URL", - "width": 500, - "xtype": "LayoutDialog", - "|xns": "Roo", - "items": [ - { - "|xns": "Roo", - "xtype": "LayoutRegion", - "*prop": "center" - }, - { - "region": "center", - "xtype": "ContentPanel", - "|xns": "Roo", - "items": [ - { - "listeners": { - "actioncomplete": "function (_self, action)\n{\n if (action.type == 'setdata') {\n if(_this.data.target){\n _this.form.url = baseURL + _this.data.target;\n }\r\n // _this.dialog.el.mask(\"Loading\");\r\n // if(_this.data.id*1 > 0)\r\n // this.load({ method: 'GET', params: { '_id' : _this.data.id }});\r\n \r\n return;\r\n }\r\n if (action.type == 'load') {\r\n \r\n return;\r\n }\r\n if (action.type =='submit') {\r\n \r\n //action.result.data\r\n _this.dialog.hide();\r\n // Roo.log(_this.callback);\r\n if (_this.callback) {\r\n _this.callback.call(_this, action.result.data);\r\n }\r\n _this.form.reset();\r\n return;\r\n }\n}", - "rendered": "function (form)\n{\n _this.form= form;\n}" - }, - "method": "POST", - "style": "margin:10px;", - "xtype": "Form", - "|url": "baseURL", - "|xns": "Roo.form", - "items": [ - { - "fieldLabel": "URL", - "name": "importUrl", - "vtype": "url", - "width": 250, - "xtype": "TextField", - "|xns": "Roo.form" - } - ] - } - ] - }, - { - "listeners": { - "click": "function (_self, e)\n{\n _this.dialog.hide();\n}" - }, - "*prop": "buttons[]", - "text": "Cancel", - "xtype": "Button", - "|xns": "Roo" - }, - { - "listeners": { - "click": "function (_self, e)\n{\n _this.form.doAction(\"submit\");\n}" - }, - "*prop": "buttons[]", - "text": "OK", - "xtype": "Button", - "|xns": "Roo" - } - ] + "fieldLabel" : "URL", + "vtype" : "url", + "xtype" : "TextField", + "width" : 250, + "$ xns" : "Roo.form", + "name" : "importUrl" } - ], - "permname": "", - "modOrder": "001" + ] + } + ] + }, + { + "listeners" : { + "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}" + }, + "text" : "Cancel", + "xtype" : "Button", + "$ xns" : "Roo", + "* prop" : "buttons[]" + }, + { + "listeners" : { + "click" : "function (_self, e)\n{\n _this.form.doAction(\"submit\");\n}" + }, + "text" : "OK", + "xtype" : "Button", + "$ xns" : "Roo", + "* prop" : "buttons[]" + } + ] + } + ] } \ No newline at end of file diff --git a/Pman.Dialog.CoreImportUrl.js b/Pman.Dialog.CoreImportUrl.js index 60b45f99..f9d67035 100644 --- a/Pman.Dialog.CoreImportUrl.js +++ b/Pman.Dialog.CoreImportUrl.js @@ -2,130 +2,146 @@ // Auto generated file - created by app.Builder.js- do not edit directly (at present!) +Roo.namespace('Pman.Dialog'); + Pman.Dialog.CoreImportUrl = { - dialog : false, - callback: false, + _strings : { + 'ea4788705e6873b424c65e91c2846b19' :"Cancel", + 'c8c55f55be8cbe3141db7e26ab0a8b4e' :"Import URL", + 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK", + 'e6b391a8d2c4d45902a23a8b6585703d' :"URL" + }, - show : function(data, cb) - { - if (!this.dialog) { - this.create(); - } + dialog : false, + callback: false, - this.callback = cb; - this.data = data; - this.dialog.show(this.data._el); - if (this.form) { - this.form.reset(); - this.form.setValues(data); - this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data }); - } + show : function(data, cb) + { + if (!this.dialog) { + this.create(); + } - }, + this.callback = cb; + this.data = data; + this.dialog.show(this.data._el); + if (this.form) { + this.form.reset(); + this.form.setValues(data); + this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data }); + } - create : function() - { - var _this = this; - this.dialog = Roo.factory({ - xtype: 'LayoutDialog', - xns: Roo, - closable : false, - collapsible : false, - draggable : false, - height : 140, - modal : true, - resizable : false, - title : "Import URL", - width : 500, - items : [ - { - xtype: 'ContentPanel', - xns: Roo, - region : 'center', - items : [ - { - xtype: 'Form', - xns: Roo.form, - listeners : { - actioncomplete : function (_self, action) - { - if (action.type == 'setdata') { - if(_this.data.target){ - _this.form.url = baseURL + _this.data.target; - } - // _this.dialog.el.mask("Loading"); - // if(_this.data.id*1 > 0) - // this.load({ method: 'GET', params: { '_id' : _this.data.id }}); - - return; - } - if (action.type == 'load') { - - return; - } - if (action.type =='submit') { - - //action.result.data - _this.dialog.hide(); - // Roo.log(_this.callback); - if (_this.callback) { - _this.callback.call(_this, action.result.data); - } - _this.form.reset(); - return; - } - }, - rendered : function (form) - { - _this.form= form; - } - }, - method : 'POST', - style : 'margin:10px;', - url : baseURL, - items : [ - { - xtype: 'TextField', - xns: Roo.form, - fieldLabel : 'URL', - name : 'importUrl', - vtype : 'url', - width : 250 - } - ] - } - ] - } - ], - center : { - xtype: 'LayoutRegion', - xns: Roo - }, - buttons : [ - { - xtype: 'Button', - xns: Roo, - listeners : { - click : function (_self, e) - { - _this.dialog.hide(); - } - }, - text : "Cancel" - }, - { - xtype: 'Button', - xns: Roo, - listeners : { - click : function (_self, e) - { - _this.form.doAction("submit"); - } - }, - text : "OK" - } - ] - }); - } + }, + + create : function() + { + var _this = this; + this.dialog = Roo.factory({ + xtype : 'LayoutDialog', + closable : false, + collapsible : false, + draggable : false, + height : 140, + modal : true, + resizable : false, + title : _this._strings['c8c55f55be8cbe3141db7e26ab0a8b4e'] /* Import URL */, + width : 500, + xns : Roo, + '|xns' : 'Roo', + center : { + xtype : 'LayoutRegion', + xns : Roo, + '|xns' : 'Roo' + }, + buttons : [ + { + xtype : 'Button', + text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */, + listeners : { + click : function (_self, e) + { + _this.dialog.hide(); + } + }, + xns : Roo, + '|xns' : 'Roo' + }, + { + xtype : 'Button', + text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */, + listeners : { + click : function (_self, e) + { + _this.form.doAction("submit"); + } + }, + xns : Roo, + '|xns' : 'Roo' + } + ], + items : [ + { + xtype : 'ContentPanel', + region : 'center', + xns : Roo, + '|xns' : 'Roo', + items : [ + { + xtype : 'Form', + method : 'POST', + style : 'margin:10px;', + url : baseURL, + listeners : { + actioncomplete : function (_self, action) + { + if (action.type == 'setdata') { + if(_this.data.target){ + _this.form.url = baseURL + _this.data.target; + } + // _this.dialog.el.mask("Loading"); + // if(_this.data.id*1 > 0) + // this.load({ method: 'GET', params: { '_id' : _this.data.id }}); + + return; + } + if (action.type == 'load') { + + return; + } + if (action.type =='submit') { + + //action.result.data + _this.dialog.hide(); + // Roo.log(_this.callback); + if (_this.callback) { + _this.callback.call(_this, action.result.data); + } + _this.form.reset(); + return; + } + }, + rendered : function (form) + { + _this.form= form; + } + }, + xns : Roo.form, + '|xns' : 'Roo.form', + items : [ + { + xtype : 'TextField', + fieldLabel : _this._strings['e6b391a8d2c4d45902a23a8b6585703d'] /* URL */, + name : 'importUrl', + vtype : 'url', + width : 250, + xns : Roo.form, + '|xns' : 'Roo.form' + } + ] + } + ] + } + ] + }); + } }; -- 2.39.2