diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index c3d93e46db..93e2bd8c0c 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -135,7 +135,7 @@ class addressbook_ui extends addressbook_bo $content['nm']['action'] = 'document'; $content['nm']['selected'] = array($id); } - if ($content['nm']['action'] !== '') + if ($content['nm']['action'] !== '' && $content['nm']['action'] !== null) { if (!count($content['nm']['selected']) && !$content['nm']['select_all'] && $content['nm']['action'] != 'delete_list') { diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index ca3c4b395a..2dd3d72e8f 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -1053,7 +1053,17 @@ class etemplate_widget_nextmatch extends etemplate_widget { $pref_name = 'nextmatch-' . (isset($content_value['columnselection_pref']) ? $content_value['columnselection_pref'] : $this->attrs['template']); $refresh_pref_name = $pref_name.'-autorefresh'; - $pref_level = $value['nm_col_preference'] == 'force' ? 'forced' : 'default'; + switch($value['nm_col_preference']) { + case 'force': + $pref_level = 'forced'; + break; + case 'reset': + case 'default': + $pref_level = 'default'; + break; + default: + $pref_level = 'user'; + } // Clear forced pref before setting default if($pref_level != 'forced') diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 7bac21bb0b..5206104fb5 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1421,15 +1421,13 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin // Auto refresh self._set_autorefresh(autoRefresh.get_value()); - // Set default or clear forced? - if(defaultCheck.get_value()) + // Set default or clear forced + if(show_letters) { - if(show_letters) - { - self.activeFilters.selectcols.push('lettersearch'); - } - self.getInstanceManager().submit(); + self.activeFilters.selectcols.push('lettersearch'); } + self.getInstanceManager().submit(); + self.selectPopup = null; };