Small fixes for firefox

This commit is contained in:
Torkel Ödegaard 2014-08-20 22:34:51 +02:00
parent 019d077f5a
commit 17ffb167e2
6 changed files with 17 additions and 15 deletions

View File

@ -19,7 +19,7 @@ function (_, crypto) {
default_route : '/dashboard/file/default.json',
playlist_timespan : "1m",
unsaved_changes_warning : true,
search : { max_results: 20 },
search : { max_results: 16 },
admin : {}
};

View File

@ -13,7 +13,7 @@ function (angular, $, config, _) {
module.controller('DashboardCtrl', function(
$scope, $rootScope, dashboardKeybindings,
filterSrv, dashboardSrv, dashboardViewStateSrv,
panelMoveSrv, timer) {
panelMoveSrv, timer, $timeout) {
$scope.editor = { index: 0 };
$scope.panelNames = config.panels;
@ -21,6 +21,13 @@ function (angular, $, config, _) {
$scope.init = function() {
$scope.availablePanels = config.panels;
$scope.onAppEvent('setup-dashboard', $scope.setupDashboard);
angular.element(window).bind('resize', function() {
$timeout(function() {
$scope.$broadcast('render');
});
});
};
$scope.setupDashboard = function(event, dashboardData) {

View File

@ -46,11 +46,6 @@ function (angular, $, kbn, moment, _) {
render_panel();
});
// Re-render if the window is resized
angular.element(window).bind('resize', function() {
render_panel();
});
function setElementHeight() {
try {
var height = scope.height || scope.panel.height || scope.row.height;

View File

@ -64,11 +64,6 @@
bindonce ng-repeat="row in results.dashboards"
ng-class="{'selected': $index === selectedIndex }" ng-click="goToDashboard(row.id)">
<a class="search-result-link" href="#/dashboard/db/{{row.id}}">
<i class="icon icon-th-large"></i>
<span bo-text="row.id"></span>
</a>
<div class="search-result-actions">
<a ng-click="shareDashboard(row.id, row.id, $event)" config-modal="app/partials/dashLoaderShare.html">
<i class="icon-share"></i> share &nbsp;&nbsp;&nbsp;
@ -84,6 +79,11 @@
</a>
</div>
<a class="search-result-link" href="#/dashboard/db/{{row.id}}">
<i class="icon icon-th-large"></i>
<span bo-text="row.id"></span>
</a>
</div>
</div>

View File

@ -150,7 +150,7 @@ function (angular, _, $, config, kbn, moment) {
if (rounding === 'round-up') {
if (date.get('s')) {
date.add('m', 1);
date.add(1, 'm');
}
}
else if (rounding === 'round-down') {
@ -159,7 +159,7 @@ function (angular, _, $, config, kbn, moment) {
// to guarantee that we get all the data that
// exists for the specified range
if (date.get('s')) {
date.subtract('m', 1);
date.subtract(1, 'm');
}
}

View File

@ -52,7 +52,7 @@
}
.search-results-container {
max-height: 570px;
max-height: 600px;
overflow: auto;
display: block;
.search-result-item a {