瀏覽代碼

HUE-5967 [search] Create dashboard should work in responsive

Enrico Berti 8 年之前
父節點
當前提交
b0df4a0

+ 1 - 1
desktop/core/src/desktop/templates/responsive.mako

@@ -702,7 +702,7 @@ ${ assist.assistPanel() }
             self.currentApp('editor');
           } else if (href.startsWith('/indexer')){
             self.currentApp('indexes');
-          } else if (href.startsWith('/dashboard/embeddable')){
+          } else if (href.startsWith('/dashboard/embeddable') || href.startsWith('/dashboard/new_search')){
             self.currentApp('dashboard');
           } else if (href.startsWith('/dashboard/admin/collections')){
             self.currentApp('collections');

+ 1 - 1
desktop/libs/dashboard/src/dashboard/templates/common_admin_collections.mako

@@ -75,7 +75,7 @@
 
       <%def name="creation()">
         %if not is_mobile:
-        <a data-bind="visible: collections().length > 0 && !isLoading()" class="btn" href="${ url('dashboard:new_search') }" title="${ _('Create a new dashboard') }">
+        <a data-bind="visible: collections().length > 0 && !isLoading()" class="btn" href="${ is_embeddable and "javascript: huePubSub.publish('open.link', '" + url('dashboard:new_search') + "')" or url('dashboard:new_search') }" title="${ _('Create a new dashboard') }">
           <i class="fa fa-plus-circle"></i> ${ _('Create') }
         </a>
         <a data-bind="visible: !isLoading(), click: function() { $('#import-documents').modal('show'); }" class="btn">