{ "name" : "Pman.Dialog.MTrackTicket", "parent" : "", "title" : "", "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackTicket.bjs", "permname" : "", "modOrder" : "001", "strings" : { "a02a8093b46b8e647c29727fb50d67e4" : "Select milestone", "672caf27f5363dc833bda5099775e891" : "Developer", "9e727fdd3aec8274f46685441900280d" : "Project", "6a58f977f2b623b695a340766f2a6843" : "Select Project", "a5ffb2a210f259195a75e5abca8db4a2" : "Select mtrack_milestone", "6c768695a8efb18436d5b7b4374cdb45" : "Select core_enum", "007cc9547ae8884ad597cd92ba505422" : "Severity", "86e9400686e8e080ef3c8995afb5eb86" : "Select Priority", "ddcf50c29294d4414f3f7c1bbc892cb5" : "Resources", "290612199861c31d1036b185b4e69b75" : "Summary", "1cb251ec0d568de6a929b520c4aed8d1" : "text", "5c9335b28e6277ddbe0137f04e5e58a7" : "Classification", "3c311fbd0f9e51ce27b984f55164cf83" : "Estimated", "1243daf593fa297e07ab03bf06d925af" : "Searching...", "c4ca4238a0b923820dcc509a6f75849b" : "1", "ea4788705e6873b424c65e91c2846b19" : "Cancel", "502996d9790340c5fd7b86a5b93b1c9f" : "Priority", "b6f4a2ec6356bbd56d49f2096bf9d3d3" : "Owner", "ff18c41b7689060c39934dbb74de1e9c" : "Edit or Create Ticket", "24f27bda5dd2c488aa9bc7700ba98c34" : "Select Projects", "340c2ee497b85d5954b01c64de7f44f6" : "Select Person", "23e6bcd09b259e6de4cd972516cb4214" : "View as", "590fc197fe73db0aa2ec03687a372eea" : "markdown", "e9c626b8a8b62de7562dfbf51a576ae5" : "Milestone", "43371ce8259ba854b1ae3543fd477874" : "Select Severity", "a8dbd02aaca3948002718aeb2babeefe" : "Summary / Details", "9fc2d28c05ed9eb1d75ba4465abf15a9" : "Properties", "b5a7adde1af5c87d7fd797b6245c2a39" : "Description", "c9cc8cce247e49bae79f15173ce97354" : "Save", "fcb17935fd52e65b8f223778c9e70313" : "Select Classification" }, "named_strings" : { "view_as_markdown_value" : "c4ca4238a0b923820dcc509a6f75849b", "estimated_fieldLabel" : "3c311fbd0f9e51ce27b984f55164cf83", "severity_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "developer_id_name_qtip" : "340c2ee497b85d5954b01c64de7f44f6", "milestone_id_name_fieldLabel" : "e9c626b8a8b62de7562dfbf51a576ae5", "priority_id_name_qtip" : "6c768695a8efb18436d5b7b4374cdb45", "view_as_text_boxLabel" : "1cb251ec0d568de6a929b520c4aed8d1", "developer_id_name_fieldLabel" : "672caf27f5363dc833bda5099775e891", "severity_id_name_fieldLabel" : "007cc9547ae8884ad597cd92ba505422", "developer_id_name_emptyText" : "340c2ee497b85d5954b01c64de7f44f6", "summary_fieldLabel" : "290612199861c31d1036b185b4e69b75", "classification_id_name_emptyText" : "fcb17935fd52e65b8f223778c9e70313", "severity_id_name_qtip" : "6c768695a8efb18436d5b7b4374cdb45", "description_fieldLabel" : "b5a7adde1af5c87d7fd797b6245c2a39", "owner_id_name_emptyText" : "340c2ee497b85d5954b01c64de7f44f6", "project_id_name_qtip" : "24f27bda5dd2c488aa9bc7700ba98c34", "severity_id_name_emptyText" : "43371ce8259ba854b1ae3543fd477874", "milestone_id_name_qtip" : "a5ffb2a210f259195a75e5abca8db4a2", "priority_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "classification_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "milestone_id_name_emptyText" : "a02a8093b46b8e647c29727fb50d67e4", "priority_id_name_emptyText" : "86e9400686e8e080ef3c8995afb5eb86", "developer_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "milestone_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "project_id_name_emptyText" : "6a58f977f2b623b695a340766f2a6843", "owner_id_name_qtip" : "340c2ee497b85d5954b01c64de7f44f6", "view_as_text_fieldLabel" : "23e6bcd09b259e6de4cd972516cb4214", "priority_id_name_fieldLabel" : "502996d9790340c5fd7b86a5b93b1c9f", "project_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "owner_id_name_fieldLabel" : "b6f4a2ec6356bbd56d49f2096bf9d3d3", "view_as_text_value" : "c4ca4238a0b923820dcc509a6f75849b", "owner_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af", "view_as_markdown_boxLabel" : "590fc197fe73db0aa2ec03687a372eea", "project_id_name_fieldLabel" : "9e727fdd3aec8274f46685441900280d", "classification_id_name_fieldLabel" : "5c9335b28e6277ddbe0137f04e5e58a7", "classification_id_name_qtip" : "6c768695a8efb18436d5b7b4374cdb45" }, "items" : [ { "listeners" : { "resize" : "function (_self, width, height)\n{\n var bw = width - 320;\n _this.form.findField('description').el.setWidth(bw);\n _this.summaryBox.el.setWidth(bw+30);\n _this.summaryCol.el.setWidth(bw+45);\n _this.descCol.el.setWidth(bw+35);\n \n}" }, "modal" : true, "collapsible" : false, "title" : "Edit or Create Ticket", "xtype" : "LayoutDialog", "width" : 700, "$ xns" : "Roo", "closable" : false, "resizable" : true, "height" : 450, "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 \n this.load({ method: 'GET', params: { '_id' : _this.data.id || 0}});\n \n return;\n }\n if (action.type == 'load') {\n if (!_this.data.id) {\n this.setValues(_this.data);\n }\n return;\n }\n \n \n if (action.type =='submit') {\n \n if (!_this.data.id * 1) {\n Roo.MessageBox.confirm(\"Close?\", \n \"The new ticket id is #\" + action.result.data.id + \", Press yes to close, or no to keep editing\",\n function (res) {\n if (res == 'yes') {\n \n \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 _this.data.id = action.result.data.id;\n _this.form.fireEvent('actioncomplete', _this.form, { type : 'setdata', data : {}});\n return;\n }\n );\n \n \n \n \n return;\n }\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset(); \n\n return;\n }\n}\n", "|rendered" : "function (form)\n{\n _this.form= form;\n}\n" }, "$ url" : "baseURL + '/Roo/mtrack_ticket.php'", "method" : "POST", "xtype" : "Form", "style" : "margin:10px;width:1000px;margin-top:0px;", "$ xns" : "Roo.form", "items" : [ { "xtype" : "Column", "width" : 210, "$ xns" : "Roo.form", "items" : [ { "labelAlign" : "top", "legend" : "Properties", "style" : "width:190px;", "xtype" : "FieldSet", "$ xns" : "Roo.form", "items" : [ { "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Project", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Project", "hiddenName" : "project_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "project_id_name", "qtip" : "Select Projects", "queryParam" : "query[name]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'name' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_project'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Milestone", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select milestone", "hiddenName" : "milestone_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "milestone_id_name", "qtip" : "Select mtrack_milestone", "queryParam" : "query[name]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'milestone';\n o.params.project_id = _this.form.findField('project_id').getValue();\n if (!o.params.project_id) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'startdate' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/mtrack_milestone.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\":\"name\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Priority", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Priority", "hiddenName" : "priority_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "priority_id_name", "qtip" : "Select core_enum", "queryParam" : "query[etype]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'priority';\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.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\":\"etype\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Severity", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Severity", "hiddenName" : "severity_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "severity_id_name", "qtip" : "Select core_enum", "queryParam" : "query[etype]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'severity';\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.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\":\"etype\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Classification", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Classification", "hiddenName" : "classification_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "classification_id_name", "qtip" : "Select core_enum", "queryParam" : "query[etype]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.etype = 'classification';\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.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\":\"etype\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] } ] }, { "style" : "width: 190px", "xtype" : "FieldSet", "legend" : "Resources", "$ xns" : "Roo.form", "items" : [ { "labelAlign" : "top", "xtype" : "Column", "width" : 190, "$ xns" : "Roo.form", "items" : [ { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Developer", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Person", "hiddenName" : "developer_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : true, "width" : 180, "$ xns" : "Roo.form", "name" : "developer_id_name", "qtip" : "Select Person", "queryParam" : "query[name]", "tpl" : "
{name} <{email}>
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n \n // set more here\n o.params['query[project_id]'] = _this.form.findField('project_id').getValue();\n if (!o.params['query[project_id]']) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n o.params['query[role]'] = 'DEVELOPER';\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'name' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_person'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] }, { "alwaysQuery" : true, "listWidth" : 400, "triggerAction" : "all", "fieldLabel" : "Owner", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "name", "emptyText" : "Select Person", "hiddenName" : "owner_id", "minChars" : 2, "valueField" : "id", "xtype" : "ComboBox", "allowBlank" : false, "typeAhead" : true, "editable" : false, "width" : 180, "$ xns" : "Roo.form", "name" : "owner_id_name", "qtip" : "Select Person", "queryParam" : "query[name]", "tpl" : "
{name}
", "loadingText" : "Searching...", "items" : [ { "listeners" : { "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params['query[project_id]']= _this.form.findField('project_id').getValue();\n if (!o.params['query[project_id]']) {\n Roo.MessageBox.alert(\"Error\", \"Select Project\");\n return false;\n }\n}\n" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ direction : 'ASC', field: 'name' }", "$ xns" : "Roo.data", "* prop" : "store", "items" : [ { "$ url" : "baseURL + '/Roo/core_person'", "xtype" : "HttpProxy", "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]", "* prop" : "reader", "totalProperty" : "total" } ] } ] } ] }, { "labelAlign" : "right", "xtype" : "Column", "labelWidth" : 100, "width" : 190, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Estimated", "xtype" : "NumberField", "style" : "align:right;", "width" : 75, "$ xns" : "Roo.form", "name" : "estimated" } ] } ] } ] }, { "listeners" : { "show" : "function (_self)\n{\n\n}", "render" : "function (_self)\n{\n _this.summaryCol = _self;\n}" }, "xtype" : "Column", "style" : "margin-left:10px", "width" : 430, "$ xns" : "Roo.form", "items" : [ { "listeners" : { "show" : "function (_self)\n{\n\n}", "render" : "function (_self)\n{\n _this.summaryBox = _self;\n}" }, "style" : "width:410px", "xtype" : "FieldSet", "legend" : "Summary / Details", "$ xns" : "Roo.form", "items" : [ { "labelAlign" : "top", "xtype" : "Column", "width" : 400, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Summary", "xtype" : "TextField", "width" : 400, "$ xns" : "Roo.form", "name" : "summary" } ] }, { "style" : "float:left; width:400px", "xtype" : "Row", "labelWidth" : 70, "width" : 400, "$ xns" : "Roo.form", "items" : [ { "listeners" : { "check" : "function (_self, checked)\n{\n\n if (!_this.form) {\n return;\n }\n if (checked) {\n \n _this.form.findField('view_as').setValue('text');\n }\n \n \n \n if (this.radio) {\n return;\n }\n var md = _this.form.findField('view_as_markdown');\n\n md.radio = true;\n md.setValue(checked ? 0 : 1);\n \n md.radio = false;\n}" }, "fieldLabel" : "View as", "xtype" : "Checkbox", "value" : 1, "boxLabel" : "text", "width" : 100, "$ xns" : "Roo.form", "name" : "view_as_text" }, { "hideLabels" : true, "xtype" : "Row", "style" : "float: left", "width" : 100, "$ xns" : "Roo.form", "items" : [ { "listeners" : { "check" : "function (_self, checked)\n{\n if (!_this.form) {\n return;\n }\n \n if (checked) {\n \n _this.form.findField('view_as').setValue('markdown');\n }\n \n if (this.radio) {\n return;\n }\n var md = _this.form.findField('view_as_text');\n\n md.radio = true;\n md.setValue(checked ? 0 : 1);\n md.radio = false;\n}" }, "value" : 1, "xtype" : "Checkbox", "boxLabel" : "markdown", "$ xns" : "Roo.form", "name" : "view_as_markdown" } ] } ] }, { "listeners" : { "show" : "function (_self)\n{\n\n}", "render" : "function (_self)\n{\n _this.descCol = _self;\n}" }, "labelAlign" : "top", "xtype" : "Column", "width" : 400, "$ xns" : "Roo.form", "items" : [ { "fieldLabel" : "Description", "xtype" : "TextArea", "width" : 400, "$ xns" : "Roo.form", "name" : "description", "height" : 250 } ] } ] } ] }, { "xtype" : "Hidden", "$ xns" : "Roo.form", "name" : "id" }, { "xtype" : "Hidden", "$ xns" : "Roo.form", "name" : "view_as" } ] } ] }, { "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 \n _this.form.doAction(\"submit\");\n\n}" }, "text" : "Save", "xtype" : "Button", "$ xns" : "Roo", "* prop" : "buttons[]" } ] } ] }