From bd496d34e9e512c488bd6c4fb0c7535757e629ea Mon Sep 17 00:00:00 2001 From: "wade@bindshell.net" Date: Sat, 22 Jan 2011 20:24:55 +0000 Subject: [PATCH] minor refactoring git-svn-id: https://beef.googlecode.com/svn/trunk@709 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- public/javascript/ui/panel/common.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/public/javascript/ui/panel/common.js b/public/javascript/ui/panel/common.js index ea6c42d23..4dfc5c803 100644 --- a/public/javascript/ui/panel/common.js +++ b/public/javascript/ui/panel/common.js @@ -18,10 +18,9 @@ function generate_form_input_field(form, input, value, disabled, zombie) { if (!input['ui_label']) input['ui_label'] = input['name']; if (!input['type']) input['type'] = 'textfield'; if (!input['value']) input['value'] = ''; - - input_id = 'form-zombie-'+zombie.session+'-field-'+input['name']; + input_def = { - id: input_id, + id: 'form-zombie-'+zombie.session+'-field-'+input['name'], name: 'txt_'+input['name'], fieldLabel: input['ui_label'], allowBlank: false, @@ -147,11 +146,6 @@ function genExisingExploitPanel(panel, command_id, zombie, sb) { return; } - if(xhr.command_module_name == 'some specific command module') { - //HERE we will develop specific panels for the command modules that require it. - return; - } - var form = new Ext.form.FormPanel({ url: '/ui/modules/commandmodule/reexecute', id: 'form-command-module-zombie-'+zombie.session, @@ -188,7 +182,7 @@ function genExisingExploitPanel(panel, command_id, zombie, sb) { }); Ext.each(xhr.definition.Data, function(input) { - var value; + var value = null; if(typeof input == 'string') { value = xhr.data[input]; @@ -377,10 +371,10 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi bodyStyle: 'padding:10px;', // we can assign styles to the main div layout : 'form', bodyBorder: false, - height:200, + height: 200, + hidden: true, border: false //we can remove the border of the panel }); - payload_panel.hide(); Ext.each(module.Data, function(input){ generate_form_input_field(form, input, null, false, zombie)}