Pman.Dialog.Image.bjs
[Pman.Core] / Pman.Dialog.Image.bjs
index 46d1190..272c168 100644 (file)
@@ -2,14 +2,16 @@
  "name" : "Pman.Dialog.Image",
  "parent" : "",
  "title" : "",
- "path" : "/home/edward/gitlive/Pman.Core/Pman.Dialog.Image.bjs",
+ "path" : "/home/alan/gitlive/Pman.Core/Pman.Dialog.Image.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
   "eb5d45750c7ab13aa8e6bacc80315a30" : "32M",
   "2859a4ae58ae4e25abdfc530f814e42f" : "Upload an Image or File",
+  "c4ca4238a0b923820dcc509a6f75849b" : "1",
   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
-  "91412465ea9169dfd901dd5e7c96dd99" : "Upload"
+  "91412465ea9169dfd901dd5e7c96dd99" : "Upload",
+  "ea72bacd2fdfa818907bb9559e6905a1" : "Upload Image or File"
  },
  "items" : [
   {
@@ -17,7 +19,7 @@
     "show" : "function (_self)\n{\n\n    // this does not really work - escape on the borders works..\n    // resize to fit.. if we have styled stuff...\n    \n    \n    \n    \n    var d = this;\n    \n    var pad =     d.el.getSize().height - (d.header.getSize().height +\n        d.footer.getSize().height +        \n        d.layout.getRegion('center').getPanel(0).el.getSize().height\n        );\n    \n    var height = (\n        pad + \n        d.header.getSize().height +\n        d.footer.getSize().height +        \n        d.layout.getRegion('center').getPanel(0).el.child('div').getSize().height\n    );\n    this.resizeTo(d.el.getSize().width, height);\n    \n    if (this.keylistener) {\n        return;\n    }\n    this.keylistener = this.addKeyListener(27, this.hide, this);\n    \n}"
    },
    "modal" : true,
-   "shadow" : true,
+   "shadow" : true,
    "collapsible" : false,
    "title" : "Upload an Image or File",
    "xtype" : "LayoutDialog",
@@ -27,7 +29,7 @@
    "closable" : false,
    "resizable" : false,
    "haveProgress" : false,
-   "height" : 140,
+   "height" : 200,
    "$ 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            //console.log(data);\n            var data = res.data;\n            if (dlg.haveProgress == 2) {\n                // it's been closed elsewhere..\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          //  console.log('fail');\n         //   console.log(data);\n        }\n    })\n    \n}\n",
    "items" : [
     {
          "$ xns" : "Roo.form",
          "name" : "id"
         },
+        {
+         "String name" : "fred",
+         "xtype" : "TextField",
+         "Mixed value" : 1,
+         "$ xns" : "Roo.form"
+        },
         {
          "xtype" : "Hidden",
          "$ xns" : "Roo.form",