Skip to content

Commit

Permalink
Merge pull request #8574 from elastic/jasper/backport/8571/5.0
Browse files Browse the repository at this point in the history
[backport] PR #8571 to 5.0
  • Loading branch information
thomasneirynck authored Oct 6, 2016
2 parents 583ff7d + 373cbff commit 3f8cab6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useResizeCheckerProvider } from '../sense_editor_resize';
import $ from 'jquery';
import { initializeInput } from '../input';
import { initializeOutput } from '../output';
import es from '../es';
import init from '../app';
import { SenseTopNavController } from './sense_top_nav_controller';

Expand All @@ -20,7 +19,7 @@ module.run(function (Private, $rootScope) {
module.controller('SenseController', function SenseController(Private, $scope, $timeout, $location, docTitle) {
docTitle.change('Console');

$scope.topNavController = Private(SenseTopNavController)
$scope.topNavController = Private(SenseTopNavController);

// We need to wait for these elements to be rendered before we can select them with jQuery
// and then initialize this app
Expand Down
12 changes: 11 additions & 1 deletion src/core_plugins/console/public/src/directives/sense_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require('ui/modules')
restrict: 'E',
template: require('./settings.html'),
controllerAs: 'settings',
controller: function ($scope) {
controller: function ($scope, $element) {
const settings = require('../settings');

this.vals = settings.getCurrentSettings();
Expand All @@ -16,6 +16,16 @@ require('ui/modules')
$scope.kbnTopNav.close();
};

const self = this;

function onEnter(event) {
if (event.which === 13) {
self.apply();
}
}

const boundElement = $element.bind('keydown', onEnter);
$scope.$on('$destroy', () => boundElement.unbind('keydown', onEnter));
},
};
});
1 change: 0 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import _ from 'lodash';
import 'ui/watch_multi';
import angular from 'angular';
import 'ui/directives/input_focus';
import uiModules from 'ui/modules';
import template from './kbn_top_nav.html';
Expand Down
1 change: 0 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { capitalize, isArray, isFunction } from 'lodash';

import chrome from 'ui/chrome';
import uiModules from 'ui/modules';
import filterTemplate from 'ui/chrome/config/filter.html';
import intervalTemplate from 'ui/chrome/config/interval.html';

Expand Down

0 comments on commit 3f8cab6

Please sign in to comment.