{ "name" : "Pman.Dialog.XtuplePriceList", "parent" : "", "title" : "", "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtuplePriceList.bjs", "permname" : "", "modOrder" : "001", "items" : [ { "modal" : true, "collapsible" : false, "title" : "Edit / Create Price List", "xtype" : "LayoutDialog", "width" : 400, "$ xns" : "Roo", "closable" : false, "resizable" : false, "height" : 300, "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "region" : "center", "xtype" : "ContentPanel", "$ xns" : "Roo", "items" : [ { "listeners" : { "|actioncomplete" : "function(_self,action)\n{\n if (action.type == 'setdata') {\n //_this.dialog.el.mask(\"Loading\");\n\n \n if (_this.data.ipshead_id) { \n this.load({ method: 'GET', params: { '_id' : _this.data.ipshead_id }});\n return;\n }\n this.setValues({\n ipshead_effective : new Date(1970,1,1),\n ipshead_expires :new Date(2100,1,1)\n\n });\n \n \n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n", "|rendered" : "function (form)\n{\n _this.form= form;\n}\n" }, "$ url" : "baseURL + '/Roo/ipshead.php'", "method" : "POST", "xtype" : "Form", "style" : "margin:10px;", "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Name", "xtype" : "TextField", "allowBlank" : false, "width" : 250, "$ xns" : "Roo.form", "name" : "ipshead_name" }, { "fieldLabel" : "Description", "xtype" : "TextArea", "width" : 250, "$ xns" : "Roo.form", "name" : "ipshead_descrip", "height" : 80 }, { "listWidth" : 250, "triggerAction" : "all", "fieldLabel" : "Currency", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "curr_name", "emptyText" : "Select currency", "hiddenName" : "ipshead_curr_id", "minChars" : 2, "valueField" : "curr_id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 250, "$ xns" : "Roo.form", "name" : "ipshead_curr_id_curr_name", "qtip" : "Select curr_symbol", "queryParam" : "query[curr_name]", "tpl" : "
{curr_name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ xns" : "Roo.data", "$ sortInfo" : "{ direction : 'ASC', field: 'id' }", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/curr_symbol.php'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"curr_name\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "fieldLabel" : "Effective", "format" : "d/M/Y", "xtype" : "DateField", "useIso" : true, "allowBlank" : false, "width" : 250, "$ xns" : "Roo.form", "altFormats" : "Y-m-d", "name" : "ipshead_effective" }, { "fieldLabel" : "Expires", "format" : "d/M/Y", "xtype" : "DateField", "useIso" : true, "allowBlank" : false, "width" : 250, "$ xns" : "Roo.form", "altFormats" : "Y-m-d", "name" : "ipshead_expires" }, { "String name" : "ipshead_id", "xtype" : "Hidden", "$ xns" : "Roo.form" } ] } ] }, { "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 // do some checks?\n \n \n //_this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}" }, "text" : "Save", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" } ] } ] }