From: Alan Knowles Date: Tue, 15 Oct 2013 07:18:02 +0000 (+0800) Subject: Pman.Dialog.AdminCoreEnum.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=6524bc836a350108248b0884f6484561fba882c9 Pman.Dialog.AdminCoreEnum.bjs Pman.Dialog.AdminCoreEnum.js --- diff --git a/Pman.Dialog.AdminCoreEnum.bjs b/Pman.Dialog.AdminCoreEnum.bjs index c14cb57..3cf7c64 100644 --- a/Pman.Dialog.AdminCoreEnum.bjs +++ b/Pman.Dialog.AdminCoreEnum.bjs @@ -158,29 +158,9 @@ "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", "|xns": "Roo.Toolbar" }, - { - "listeners": { - "|click": "function()\n{\n \n // if we do not have a selected type... - what should we show..?\n var et = _this.etypeCombo.getValue();\n \n if (!et) {\n Roo.MessageBox.alert(\"Error\", \"Select a pulldown\");\n return;\n }\n var sc = _this.grid.getSelectionModel().getSelectedCell();\n Roo.log(sc);\n var ds = _this.grid.ds.getAt(sc[0]);\n if (!ds) {\n Roo.MessageBox.alert(\"Error\", \"Select enum\");\n return;\n }\n \n Roo.log(ds);\n Pman.Dialog.AdminEnumImages.show({onid:ds.data.id}, function(){\n _this.grid.footer.onClick('first');\n });\n \n}\n" - }, - "cls": "x-btn-text-icon", - "text": "Add Images", - "xtype": "Button", - "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", - "|xns": "Roo.Toolbar" - }, { "|xns": "Roo.Toolbar", "xtype": "Fill" - }, - { - "listeners": { - "|click": "function()\n{\n \n Roo.MessageBox.prompt (\"Create a new Enum type\",\n \"Enter the name for a new enum type, \" + \n \"this is only relivant if you know how it is going to be used\",\n function(btn,txt) {\n if (btn != 'ok') {\n return; \n }\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n etype : '',\n name : txt,\n active : 1\n }, \n success : function() {\n Roo.MessageBox.alert(\"Created\", \"You can now select it from the type list on the left\");\n }\n });\n \n \n \n \n }\n ); \n \n \n\n}\n" - }, - "cls": "x-btn-text-icon", - "text": "Add new pulldown list", - "xtype": "Button", - "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", - "|xns": "Roo.Toolbar" } ] }, diff --git a/Pman.Dialog.AdminCoreEnum.js b/Pman.Dialog.AdminCoreEnum.js index 08292b9..7f4621d 100644 --- a/Pman.Dialog.AdminCoreEnum.js +++ b/Pman.Dialog.AdminCoreEnum.js @@ -280,83 +280,9 @@ Pman.Dialog.AdminCoreEnum = { text : "Add Value", icon : Roo.rootURL + 'images/default/dd/drop-add.gif' }, - { - xtype: 'Button', - xns: Roo.Toolbar, - listeners : { - click : function() - { - - // if we do not have a selected type... - what should we show..? - var et = _this.etypeCombo.getValue(); - - if (!et) { - Roo.MessageBox.alert("Error", "Select a pulldown"); - return; - } - var sc = _this.grid.getSelectionModel().getSelectedCell(); - Roo.log(sc); - var ds = _this.grid.ds.getAt(sc[0]); - if (!ds) { - Roo.MessageBox.alert("Error", "Select enum"); - return; - } - - Roo.log(ds); - Pman.Dialog.AdminEnumImages.show({onid:ds.data.id}, function(){ - _this.grid.footer.onClick('first'); - }); - - } - }, - cls : 'x-btn-text-icon', - text : "Add Images", - icon : Roo.rootURL + 'images/default/dd/drop-add.gif' - }, { xtype: 'Fill', xns: Roo.Toolbar - }, - { - xtype: 'Button', - xns: Roo.Toolbar, - listeners : { - click : function() - { - - Roo.MessageBox.prompt ("Create a new Enum type", - "Enter the name for a new enum type, " + - "this is only relivant if you know how it is going to be used", - function(btn,txt) { - if (btn != 'ok') { - return; - } - new Pman.Request({ - url : baseURL + '/Roo/Core_enum.php', - method : 'POST', - params : { - etype : '', - name : txt, - active : 1 - }, - success : function() { - Roo.MessageBox.alert("Created", "You can now select it from the type list on the left"); - } - }); - - - - - } - ); - - - - } - }, - cls : 'x-btn-text-icon', - text : "Add new pulldown list", - icon : Roo.rootURL + 'images/default/dd/drop-add.gif' } ] },