1
0
Fork 0

css/bug fixes + localstorage for dashboard

This commit is contained in:
Heiko Kernbach 2013-08-05 14:47:53 +02:00
parent 3669b316c6
commit 00243d18d0
6 changed files with 18 additions and 8 deletions

View File

@ -62,7 +62,7 @@
.statSingleClient {
height: 300px;
width: 100%;
margin-top: 0px;
margin-top: 10px;
margin-left: 9px !important;
margin-right: 9px;
margin-bottom: 0px !important;

View File

@ -131,7 +131,7 @@ table.dataTable thead th {
#documentsTableID .even,
#logContent .odd,
#logContent .even {
margin-bottom: 5px;
margin-bottom: 2px;
border:1px solid #c1bdba;
background-color: #F9F9F9;
}

View File

@ -244,3 +244,7 @@ table .sorting {
.marginRight10 {
padding-right: 33px !important;
}
.form-actions {
margin-top: -10px !important;
}

View File

@ -104,4 +104,6 @@
width: 100%;
}
.modal {
border-radius: 0 !important;
}

View File

@ -23,6 +23,7 @@ var dashboardView = Backbone.View.extend({
detailGraph: "userTime",
initialize: function () {
this.loadGraphState();
this.arangoReplication = new window.ArangoReplication();
var self = this;
@ -254,6 +255,7 @@ var dashboardView = Backbone.View.extend({
self.renderCharts();
}
this.loadGraphState();
return this;
},
@ -396,6 +398,7 @@ var dashboardView = Backbone.View.extend({
var figure = $(a.target).attr("value");
$('#'+figure+'Checkbox').prop('checked', false);
$('#'+figure).hide();
this.saveGraphState();
},
renderDetailChart: function (a) {
@ -609,18 +612,17 @@ var dashboardView = Backbone.View.extend({
self.graphState[identifier] = false;
}
});
console.log("after");
console.log(this.graphState);
localStorage.setItem("dbGraphState", this.graphState);
},
loadGraphState: function () {
localStorage.getItem("dbGraphState");
console.log(this.graphState);
$.each(this.graphState, function(k,v) {
if (v === true) {
$("#"+k).show();
}
else {
console.log("tohide");
$("#"+k).hide();
}
});
@ -649,7 +651,6 @@ var dashboardView = Backbone.View.extend({
$('.db-info').tooltip({
placement: "top"
});
this.saveGraphState(figure);
}
});

View File

@ -8,13 +8,14 @@ var navigationView = Backbone.View.extend({
$(window).resize(function() {
self.handleResize();
});
self.handleResize();
this.handleResize();
},
template: new EJS({url: 'js/templates/navigationView.ejs'}),
render: function() {
$(this.el).html(this.template.text);
this.handleResize();
return this;
},
@ -32,6 +33,8 @@ var navigationView = Backbone.View.extend({
$('#content').width(newWidth);
$('#content').css('margin-left', marginWidth);
$('#content').css('margin-right', marginWidth);
$('.arango-logo').css('margin-left', marginWidth -20);
console.log(marginWidth);
},
selectMenuItem: function (menuItem) {