Fixed jasmine test cases and added some missing messages for disabled menus.

This commit is contained in:
Pramod Ahire
2021-02-03 12:15:37 +05:30
committed by Akshay Joshi
parent 65d9f88c63
commit 9e90350e44
18 changed files with 64 additions and 37 deletions

View File

@@ -150,7 +150,7 @@ define('pgadmin.browser.node', [
label: (self.dropAsRemove) ? gettext('Remove %s', self.label) : gettext('Delete/Drop'),
data: {
'url': 'drop',
'data_disabled': gettext('The selected tree node does not support this option.'),
data_disabled: gettext('The selected tree node does not support this option.'),
},
icon: 'fa fa-trash-alt',
enable: _.isFunction(self.canDrop) ?
@@ -233,7 +233,7 @@ define('pgadmin.browser.node', [
category: gettext('Scripts'),
data: {
'script': stype,
'data_disabled': gettext('The selected tree node does not support this option.'),
data_disabled: gettext('The selected tree node does not support this option.'),
},
icon: 'fa fa-pencil-alt',
enable: self.check_user_permission,

View File

@@ -167,6 +167,9 @@ export function Search() {
function handleClickOutside(event) {
if (ref.current && !ref.current.contains(event.target)) {
let input_element = document.getElementById('live-search-field');
if(input_element == null){
return;
}
let input_value = input_element.value;
if(input_value && input_value.length > 0){
toggleDropdownMenu();