2 "name" : "Pman.Dialog.BAdminImage",
4 "title" : "Pman.Dialog.BAdminImage",
5 "path" : "/home/benny/gitlive/web.coba/Pman.BAdmin/Pman.Dialog.BAdminImage.bjs",
9 "ef797d5638c2e1c6b6225b2247541ea5" : "Upload Image or File:",
10 "2859a4ae58ae4e25abdfc530f814e42f" : "Upload an Image or File",
11 "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12 "91412465ea9169dfd901dd5e7c96dd99" : "Upload"
16 "string haveProgress" : false,
18 "string uploadComplete" : false,
19 "$ string uploadProgress" : "function()\n{\n var dlg = this;\n if (!dlg.haveProgress) {\n Roo.MessageBox.progress(\"Uploading\", \"Uploading\");\n }\n \n if (dlg.haveProgress == 2) {\n // it's been closed elsewhere..\n return;\n }\n if (dlg.uploadComplete) {\n Roo.MessageBox.hide();\n return;\n }\n \n dlg.haveProgress = 1;\n\n var uid = _this.form.findField('UPLOAD_IDENTIFIER').getValue();\n new Pman.Request({\n url : baseURL + '/Core/UploadProgress.php',\n params: {\n id : uid\n },\n method: 'GET',\n success : function(res){\n var data = res.data;\n if (dlg.haveProgress == 2) {\n return;\n }\n \n if (dlg.uploadComplete) {\n Roo.MessageBox.hide();\n return;\n }\n \n if (data){\n Roo.MessageBox.updateProgress(data.bytes_uploaded/data.bytes_total,\n Math.floor((data.bytes_total - data.bytes_uploaded)/1000) + 'k remaining'\n );\n } else {\n Roo.MessageBox.updateProgress(1,\n \"Upload Complete - processing\"\n );\n return;\n }\n dlg.uploadProgress.defer(2000,dlg);\n },\n failure: function(data) {\n }\n })\n \n}\n",
20 "$ xns" : "Roo.bootstrap",
21 "String title" : "Upload an Image or File",
24 "xtype" : "Container",
25 "$ xns" : "Roo.bootstrap",
26 "String style" : "width: 100%",
30 "actionfailed" : "function (_self, action)\n{\n _this.dialog.uploadComplete = true;\n \n _this.dialog.haveProgress = 2;\n \n if (action.type == 'submit') {\n Roo.log(\"Upload error\");\n Roo.log(action);\n \n try {\n \n Roo.MessageBox.alert(\"Error\", action.result.errorMsg.split(/\\n/).join('<BR/>'));\n \n } catch(e) {\n \n Roo.MessageBox.alert(\"Error\", \"Saving failed = fix errors and try again\");\n }\n return;\n }\n \n Roo.MessageBox.alert(\"Error\", \"Error loading details\"); \n}",
31 "actioncomplete" : "function(_self,action)\n{\n _this.dialog.uploadComplete = true;\n \n _this.dialog.haveProgress = 2;\n \n Roo.MessageBox.hide();\n \n if (action.type == 'setdata') { \n \n /*\n _this.form.findField('imgtype').hide();\n \n if(_this.data._show_image_type){\n _this.form.findField('imgtype').show();\n }\n */\n \n this.url = _this.data._url ? baseURL + _this.data._url : baseURL + '/Roo/Images.php';\n this.el.dom.action = this.url;\n if (typeof(_this.data.timeout) != 'undefined') {\n this.timeout = _this.data.timeout;\n }\n \n this.findField('UPLOAD_IDENTIFIER').setValue(\n (new Date() * 1) + '' + Math.random());\n \n return;\n }\n \n \n if (action.type == 'load') {\n \n _this.data = action.result.data;\n \n return;\n }\n \n \n if (action.type == 'submit') { // only submitted here if we are \n _this.dialog.hide();\n Roo.log(\"Upload success\");\n Roo.log(action);\n if (_this.callback) {\n _this.callback.call(this, action.result.data, action.result.extra);\n }\n return; \n }\n \n\n \n}\n",
32 "render" : "function (_self)\n{\n _this.form = this;\n}"
35 "Number timeout" : 300,
36 "$ xns" : "Roo.bootstrap",
37 "Boolean fileUpload" : true,
38 "String method" : "POST",
39 "$ String url" : "baseURL + '/Roo/Images.php'",
42 "String name" : "imageUpload",
44 "string fieldLabel" : "Upload Image or File:",
45 "String inputType" : "file",
46 "$ xns" : "Roo.bootstrap",
47 "Number labelWidth" : 4
50 "String name" : "UPLOAD_IDENTIFIER",
52 "String inputType" : "hidden",
53 "$ xns" : "Roo.bootstrap"
56 "String name" : "post_max_size",
58 "String inputType" : "hidden",
59 "$ xns" : "Roo.bootstrap"
62 "String name" : "upload_max_filesize",
64 "String inputType" : "hidden",
65 "$ xns" : "Roo.bootstrap"
68 "String name" : "ontable",
70 "String inputType" : "hidden",
71 "$ xns" : "Roo.bootstrap"
74 "String name" : "onid",
76 "String inputType" : "hidden",
77 "$ xns" : "Roo.bootstrap"
82 "String inputType" : "hidden",
83 "$ xns" : "Roo.bootstrap"
91 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
95 "$ string weight" : "'default'",
96 "$ xns" : "Roo.bootstrap",
97 "* prop" : "buttons[]"
101 "click" : "function (_self, e)\n{\n // do some checks?\n \n //_this.dialog.el.mask(\"Sending\");\n \n _this.dialog.uploadComplete = false;\n _this.form.doAction('submit', {\n params: {\n ts : Math.random()\n }\n });\n \n _this.dialog.haveProgress = 0; // set to show..\n _this.dialog.uploadProgress.defer(1000, _this.dialog);\n}"
105 "$ string weight" : "'primary'",
106 "$ xns" : "Roo.bootstrap",
107 "* prop" : "buttons[]"