1
0
Fork 0

ui changes frontend

This commit is contained in:
Heiko Kernbach 2015-07-31 17:55:47 +02:00
parent a85ffc14b1
commit f9e9aa1ddf
15 changed files with 93 additions and 56 deletions

View File

@ -14724,6 +14724,29 @@ nv.models.stackedAreaChart = function() {
};
},
setCheckboxStatus: function(id) {
$.each($(id).find('ul').find('li'), function(key, element) {
if (!$(element).hasClass("nav-header")) {
if ($(element).find('input').attr('checked')) {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-dot-circle-o');
}
else {
$(element).find('i').addClass('fa-check-circle-o');
}
}
else {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-circle-o');
}
else {
$(element).find('i').addClass('fa-circle-o');
}
}
}
});
},
calculateCenterDivHeight: function() {
var navigation = $('.navbar').height();
var footer = $('.footer').height();

File diff suppressed because one or more lines are too long

View File

@ -4603,9 +4603,7 @@ div.dropdownInner {
div.dropdownInner ul li .fa {
margin-right: 5px;
color: #8c8a89; }
div.dropdownInner ul li .fa.fa-square-0 {
margin-left: 1px; }
div.dropdownInner ul li .fa.fa-check-square-o, div.dropdownInner ul li .fa.fa-check-circle-o {
div.dropdownInner ul li .fa.fa-check-circle-o, div.dropdownInner ul li .fa.fa-dot-circle-o {
color: #8aa051; }
div.queryline {

View File

@ -54,6 +54,29 @@
};
},
setCheckboxStatus: function(id) {
$.each($(id).find('ul').find('li'), function(key, element) {
if (!$(element).hasClass("nav-header")) {
if ($(element).find('input').attr('checked')) {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-dot-circle-o');
}
else {
$(element).find('i').addClass('fa-check-circle-o');
}
}
else {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-circle-o');
}
else {
$(element).find('i').addClass('fa-circle-o');
}
}
}
});
},
calculateCenterDivHeight: function() {
var navigation = $('.navbar').height();
var footer = $('.footer').height();

View File

@ -18,22 +18,25 @@
<li class="nav-header">Type</li>
<li><a href="#applications">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkProduction">
<label class="css-label"></label>Production
<input class="css-checkbox" type="checkbox" id="checkProduction"/>
<i class="fa"></i>
Production
</label>
</a></li>
<li><a href="#applications">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="checkDevel">
<label class="css-label"></label>Development
<input class="css-checkbox" type="checkbox" id="checkDevel"/>
<i class="fa"></i>
Development
</label>
</a></li>
<li><a href="#applications">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" id="checkSystem" type="checkbox">
<label class="css-label"></label>System applications
<input class="css-checkbox" id="checkSystem" type="checkbox"/>
<i class="fa"></i>
System applications
</label>
</a></li>
</ul>

View File

@ -28,7 +28,8 @@
<li><a>
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="graphSortDesc">
<label class="css-label" id="graphSortDesc"></label>Sort descending
<i class="fa"></i>
Sort descending
</label>
</a></li>
</ul>

View File

@ -44,7 +44,8 @@
<li><a href="#">
<label class="checkbox checkboxLabel">
<input class="css-checkbox" type="checkbox" id="userSortDesc">
<label class="css-label"></label>Sort descending
<i class="fa"></i>
Sort descending
</label>
</a></li>
</ul>

View File

@ -13,26 +13,34 @@
"click #foxxToggle" : "slideToggle",
"click #checkDevel" : "toggleDevel",
"click #checkProduction" : "toggleProduction",
"click #checkSystem" : "toggleSystem",
"click .css-label" : "checkBoxes"
"click #checkSystem" : "toggleSystem"
},
fixCheckboxes: function() {
var checkboxIds = ['#checkDevel', '#checkSystem', '#checkProduction'];
checkBoxes: function (e) {
//chrome bugfix
var isChromium = window.chrome,
vendorName = window.navigator.vendor,
clicked = e.currentTarget;
if (clicked.id === '' || clicked.id === undefined) {
if(isChromium !== null && isChromium !== undefined && vendorName === "Google Inc.") {
$(clicked).prev().click();
}
if (this._showDevel) {
$('#checkDevel').attr('checked', 'checked');
}
else {
$('#'+clicked.id).click();
$('#checkDevel').removeAttr('checked');
}
if (this._showSystem) {
$('#checkSystem').attr('checked', 'checked');
 }
else {
$('#checkSystem').removeAttr('checked');
}
if (this._showProd) {
$('#checkProduction').attr('checked', 'checked');
}
else {
$('#checkProduction').removeAttr('checked');
}
$('#checkDevel').next().removeClass('fa fa-check-circle-o fa-circle-o').addClass('fa');
$('#checkSystem').next().removeClass('fa fa-check-circle-o fa-circle-o').addClass('fa');
$('#checkProduction').next().removeClass('fa fa-check-circle-o fa-circle-o').addClass('fa');
arangoHelper.setCheckboxStatus('#foxxDropdown');
},
toggleDevel: function() {
@ -41,6 +49,7 @@
_.each(this._installedSubViews, function(v) {
v.toggle("devel", self._showDevel);
});
this.fixCheckboxes();
},
toggleProduction: function() {
@ -49,6 +58,7 @@
_.each(this._installedSubViews, function(v) {
v.toggle("production", self._showProd);
});
this.fixCheckboxes();
},
toggleSystem: function() {
@ -57,6 +67,7 @@
_.each(this._installedSubViews, function(v) {
v.toggle("system", self._showSystem);
});
this.fixCheckboxes();
},
reload: function() {
@ -117,6 +128,7 @@
$('#checkDevel').attr('checked', this._showDevel);
$('#checkProduction').attr('checked', this._showProd);
$('#checkSystem').attr('checked', this._showSystem);
arangoHelper.setCheckboxStatus("#foxxDropdown");
var self = this;
_.each(this._installedSubViews, function(v) {

View File

@ -47,7 +47,7 @@
}
var length;
this.setCheckboxStatus("#collectionsDropdown");
arangoHelper.setCheckboxStatus("#collectionsDropdown");
try {
length = searchOptions.searchPhrase.length;
@ -64,29 +64,6 @@
return this;
},
setCheckboxStatus: function(id) {
$.each($(id).find('ul').find('li'), function(key, element) {
if (!$(element).hasClass("nav-header")) {
if ($(element).find('input').attr('checked')) {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-dot-circle-o');
}
else {
$(element).find('i').addClass('fa-check-circle-o');
}
}
else {
if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').addClass('fa-circle-o');
}
else {
$(element).find('i').addClass('fa-circle-o');
}
}
}
});
},
events: {
"click #createCollection" : "createCollection",
"keydown #searchInput" : "restrictToSearchPhraseKey",

View File

@ -147,6 +147,7 @@
this.events["click .tableRow"] = this.showHideDefinition.bind(this);
this.events['change tr[id*="newEdgeDefinitions"]'] = this.setFromAndTo.bind(this);
this.events["click .graphViewer-icon-button"] = this.addRemoveDefinition.bind(this);
arangoHelper.setCheckboxStatus("#graphManagementDropdown");
return this;
},

View File

@ -103,6 +103,8 @@
this.editCurrentUser();
}
arangoHelper.setCheckboxStatus('#userManagementDropdown');
return this;
},

View File

@ -74,12 +74,8 @@ div.dropdownInner {
margin-right: 5px;
color: #8c8a89;
&.fa-square-0 {
margin-left: 1px;
}
&.fa-check-square-o,
&.fa-check-circle-o {
&.fa-check-circle-o,
&.fa-dot-circle-o {
color: $c-positive;
}
}