浏览代码

HUE-4407 [assist] Tables and views checkboxes can't be clicked

Enrico Berti 9 年之前
父节点
当前提交
840b261

+ 2 - 4
desktop/core/src/desktop/static/desktop/js/assist/assistDbEntry.js

@@ -138,10 +138,8 @@
 
   AssistDbEntry.prototype.toggleSearch = function () {
     var self = this;
-    if (!self.isSearchVisible()) {
-      self.isSearchVisible(true);
-      self.editingSearch(self.isSearchVisible());
-    }
+    self.isSearchVisible(!self.isSearchVisible());
+    self.editingSearch(self.isSearchVisible());
   };
 
   AssistDbEntry.prototype.triggerRefresh = function () {

+ 2 - 4
desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

@@ -201,10 +201,8 @@
 
   AssistDbSource.prototype.toggleSearch = function () {
     var self = this;
-    if (!self.isSearchVisible()) {
-      self.isSearchVisible(true);
-      self.editingSearch(self.isSearchVisible());
-    }
+    self.isSearchVisible(!self.isSearchVisible());
+    self.editingSearch(self.isSearchVisible());
   };
 
   AssistDbSource.prototype.triggerRefresh = function () {

+ 2 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -733,7 +733,7 @@ from metadata.conf import has_navigator
       </div>
     </div>
     <div class="assist-flex-search" data-bind="visible: hasEntries() && isSearchVisible() && ! hasErrors()">
-      <div><input id="searchInput" class="clearable" type="text" placeholder="${ _('Database name...') }" style="margin-top:3px;width:90%;" data-bind="hasFocus: editingSearch, blurHide: isSearchVisible, clearable: filter.query, value: filter.query, valueUpdate: 'afterkeydown'"/></div>
+      <div><input id="searchInput" class="clearable" type="text" placeholder="${ _('Database name...') }" style="margin-top:3px;width:90%;" data-bind="hasFocus: editingSearch, clearable: filter.query, value: filter.query, valueUpdate: 'afterkeydown'"/></div>
     </div>
     <div class="assist-flex-fill assist-db-scrollable" data-bind="visible: ! hasErrors() && ! loading() && hasEntries()" style="display: none;">
       <!-- ko if: ! loading() && filteredEntries().length == 0 -->
@@ -768,7 +768,7 @@ from metadata.conf import has_navigator
     </div>
     <div class="assist-flex-table-search" data-bind="visible: hasEntries() && isSearchVisible() && !$parent.loading() && !$parent.hasErrors()">
       <div><label class="checkbox inline-block margin-left-5"><input type="checkbox" data-bind="checked: filter.showTables" />Tables</label><label class="checkbox inline-block margin-left-10"><input type="checkbox" data-bind="checked: filter.showViews" />Views</label></div>
-      <div><input id="searchInput" class="clearable" type="text" placeholder="${ _('Table name...') }" style="width:90%;" data-bind="hasFocus: editingSearch, blurHide: isSearchVisible, clearable: filter.query, value: filter.query, valueUpdate: 'afterkeydown'"/></div>
+      <div><input id="searchInput" class="clearable" type="text" placeholder="${ _('Table name...') }" style="width:90%;" data-bind="hasFocus: editingSearch, clearable: filter.query, value: filter.query, valueUpdate: 'afterkeydown'"/></div>
     </div>
     <div class="assist-flex-fill assist-db-scrollable" data-bind="visible: ! hasErrors() && ! loading() && ! $parent.loading()" style="display: none;">
       <!-- ko template: 'assist-db-entries' --><!-- /ko -->