From 9990fe45d6484e098d87b4bed621e31a6ad96e9b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 27 Dec 2011 16:47:57 +0000 Subject: [PATCH] Filter definitions by selected application / plugin --- importexport/inc/class.importexport_schedule_ui.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/importexport/inc/class.importexport_schedule_ui.inc.php b/importexport/inc/class.importexport_schedule_ui.inc.php index f0a5861c58..2851f868fe 100644 --- a/importexport/inc/class.importexport_schedule_ui.inc.php +++ b/importexport/inc/class.importexport_schedule_ui.inc.php @@ -276,6 +276,7 @@ } } if(count($options['plugin']) == 1) { + $this->ajax_get_definitions($appname, $value, $response); $response->assign('exec[plugin]','value',$value); } else { $response->addScript("xajax_doXMLHTTP('importexport.importexport_schedule_ui.ajax_get_definitions', '$appname', document.getElementById('exec[plugin]').value);"); @@ -287,9 +288,13 @@ /** * Get definitions via ajax */ - public function ajax_get_definitions($appname, $plugin) { + public function ajax_get_definitions($appname, $plugin, &$response = null) { $options = self::get_select_options(array('appname'=>$appname, 'plugin'=>$plugin)); - $response = new xajaxResponse(); + if($response) { + $return = false; + } else { + $response = new xajaxResponse(); + } $response->addScript("clear_options('exec[definition]');"); $response->addScript("selectbox_add_option('exec[definition]','".lang('Select...')."', '',false);"); if(is_array($options['definition'])) {