diff --git a/src/app/directives/dashEditLink.js b/src/app/directives/dashEditLink.js index 70aaf897538..46fb51d1342 100644 --- a/src/app/directives/dashEditLink.js +++ b/src/app/directives/dashEditLink.js @@ -42,26 +42,23 @@ function (angular, $) { } } - scope.onAppEvent('hide-dash-editor', function() { - if (editorScope) { - editorScope.dismiss(); - } - }); + function hideEditorPane() { + if (editorScope) { editorScope.dismiss(); } + } + + scope.onAppEvent("dashboard-loaded", hideEditorPane); + scope.onAppEvent('hide-dash-editor', hideEditorPane); scope.onAppEvent('show-dash-editor', function(evt, payload) { - if (lastEditor === payload.src) { - editorScope.dismiss(); - return; - } + hideEditorPane(); - if (editorScope) { - editorScope.dismiss(); - } + if (lastEditor === payload.src) { return; } scope.exitFullscreen(); lastEditor = payload.src; editorScope = payload.scope ? payload.scope.$new() : scope.$new(); + editorScope.dismiss = function() { editorScope.$destroy(); elem.empty(); diff --git a/src/app/directives/dashUpload.js b/src/app/directives/dashUpload.js index ad76cb5e780..1d7c4ec405e 100644 --- a/src/app/directives/dashUpload.js +++ b/src/app/directives/dashUpload.js @@ -15,8 +15,9 @@ function (angular) { var readerOnload = function() { return function(e) { var dashboard = JSON.parse(e.target.result); - scope.emitAppEvent('setup-dashboard', dashboard); - scope.$apply(); + scope.$apply(function() { + scope.emitAppEvent('setup-dashboard', dashboard); + }); }; }; for (var i = 0, f; f = files[i]; i++) { diff --git a/src/app/partials/search.html b/src/app/partials/search.html index c6785b9ceb8..a414d7bfff1 100644 --- a/src/app/partials/search.html +++ b/src/app/partials/search.html @@ -1,105 +1,84 @@ - -
-
-
- - Search -
+
-
-
- - - - - - tags - -
-
- -
No dashboards matching your query were found.
- - - - - -
- - -
  • -
    -
    -
    -
    Local File Load dashboard JSON layout from file
    -
    -
    -
    -
    -
    -
    -
  • +
    +
    + + Search
    + +
    +
    + + + + + + tags + +
    +
    +
    + +
    +
    No dashboards matching your query were found.
    + + + +
    + +
    +
    +
    +
    Local File Load dashboard JSON layout from file
    +
    +
    +
    +
    +
    +
    + +