diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 84ea0bf90a..eb77834aaa 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -108,7 +108,7 @@ class ui_resources $content['nm']['no_filter'] = False; $content['nm']['filter_label'] = 'Category'; $content['nm']['filter_help'] = lang('Select a category'); // is this used??? - $content['nm']['options-filter']= array('0'=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ); + $content['nm']['options-filter']= array(''=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ); $content['nm']['no_filter2'] = true; $content['nm']['filter_no_lang'] = true; $content['nm']['no_cat'] = true; @@ -307,22 +307,17 @@ class ui_resources */ function select($content='') { - if($content['btn_close']) - { - echo "\n"; - $GLOBALS['egw']->common->egw_exit(); - } - - if (isset($_GET['name'])) $name = $_GET['name']; - $content=array('js_id' => $name); - $content['js'] = ""; + + if (!is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->set_onload("copyOptions('exec[resources][selectbox]');"); $content['nm']['header_left'] = 'resources.resource_select.header'; $content['nm']['show_bookable'] = true; @@ -412,14 +410,14 @@ class ui_resources $content['nm']['no_filter'] = False; $content['nm']['filter_label'] = 'Category'; $content['nm']['filter_help'] = lang('Select a category'); // is this used??? - $content['nm']['options-filter']= array('0'=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ); + $content['nm']['options-filter']= array(''=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ); $content['nm']['no_filter2'] = true; $content['nm']['filter_no_lang'] = true; $content['nm']['no_cat'] = true; - + $content['nm']['rows']['js_id'] = 1; + $sel_options = array(); $no_button = array(); - $preserv = $content; $this->tmpl->read('resources.resource_select'); $this->tmpl->exec('resources.ui_resources.select',$content,$sel_options,$no_button,$preserv,2); }