Преглед изворни кода

Dashboard: fixed scroll isssue in firefox after dashboard import, Closes #1391

Torkel Ödegaard пре 11 година
родитељ
комит
9fa0a4c973
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 1
      src/app/directives/dashEditLink.js
  2. 0 1
      src/app/features/graphite/datasource.js

+ 2 - 1
src/app/directives/dashEditLink.js

@@ -48,7 +48,7 @@ function (angular, $) {
             if (editorScope) { editorScope.dismiss(); }
           }
 
-          scope.onAppEvent("dashboard-loaded", hideEditorPane);
+          scope.$on("$destroy", hideEditorPane);
           scope.onAppEvent('hide-dash-editor', hideEditorPane);
 
           scope.onAppEvent('show-dash-editor', function(evt, payload) {
@@ -65,6 +65,7 @@ function (angular, $) {
             editorScope = payload.scope ? payload.scope.$new() : scope.$new();
 
             editorScope.dismiss = function() {
+              console.log('dismiss: ');
               editorScope.$destroy();
               elem.empty();
               lastEditor = null;

+ 0 - 1
src/app/features/graphite/datasource.js

@@ -158,7 +158,6 @@ function (angular, _, $, config, kbn, moment) {
           date = date.replace('M', 'mon');
           return date;
         }
-
         date = kbn.parseDate(date);
       }