1
0
Fork 0

Bug fix/internal issue 2785 (#6802)

This commit is contained in:
Heiko 2018-10-11 10:43:04 +02:00 committed by Jan
parent c93b359043
commit 16af0901f1
5 changed files with 51 additions and 23 deletions

View File

@ -1,6 +1,9 @@
devel devel
----- -----
* fix internal issue #2785: web ui's sort dialog sometimes got rendered, even
if it should not.
* fix internal issue #2764: the waitForSync property of a satellite collection * fix internal issue #2764: the waitForSync property of a satellite collection
could not be changed via the Web UI could not be changed via the Web UI

View File

@ -176,14 +176,18 @@
if (!$(element).hasClass('nav-header')) { if (!$(element).hasClass('nav-header')) {
if ($(element).find('input').attr('checked')) { if ($(element).find('input').attr('checked')) {
if ($(element).find('i').hasClass('css-round-label')) { if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').removeClass('fa-circle-o');
$(element).find('i').addClass('fa-dot-circle-o'); $(element).find('i').addClass('fa-dot-circle-o');
} else { } else {
$(element).find('i').removeClass('fa-square-o');
$(element).find('i').addClass('fa-check-square-o'); $(element).find('i').addClass('fa-check-square-o');
} }
} else { } else {
if ($(element).find('i').hasClass('css-round-label')) { if ($(element).find('i').hasClass('css-round-label')) {
$(element).find('i').removeClass('fa-dot-circle-o');
$(element).find('i').addClass('fa-circle-o'); $(element).find('i').addClass('fa-circle-o');
} else { } else {
$(element).find('i').removeClass('fa-check-square-o');
$(element).find('i').addClass('fa-square-o'); $(element).find('i').addClass('fa-square-o');
} }
} }

View File

@ -37,12 +37,7 @@
this.collection.setSortingDesc(false); this.collection.setSortingDesc(false);
} }
if ($('#databaseDropdown').is(':visible')) { this.checkVisibility();
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
this.render(); this.render();
}, },
@ -97,7 +92,7 @@
if (self.dropdownVisible === true) { if (self.dropdownVisible === true) {
$('#dbSortDesc').attr('checked', self.collection.sortOptions.desc); $('#dbSortDesc').attr('checked', self.collection.sortOptions.desc);
$('#databaseToggle').toggleClass('activated'); $('#databaseToggle').addClass('activated');
$('#databaseDropdown2').show(); $('#databaseDropdown2').show();
} }
@ -114,12 +109,24 @@
return this; return this;
}, },
checkVisibility: function () {
if ($('#databaseDropdown').is(':visible')) {
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
arangoHelper.setCheckboxStatus('#databaseDropdown');
},
toggleSettingsDropdown: function () { toggleSettingsDropdown: function () {
var self = this;
// apply sorting to checkboxes // apply sorting to checkboxes
$('#dbSortDesc').attr('checked', this.collection.sortOptions.desc); $('#dbSortDesc').attr('checked', this.collection.sortOptions.desc);
$('#databaseToggle').toggleClass('activated'); $('#databaseToggle').toggleClass('activated');
$('#databaseDropdown2').slideToggle(200); $('#databaseDropdown2').slideToggle(200, function () {
self.checkVisibility();
});
}, },
selectedDatabase: function () { selectedDatabase: function () {

View File

@ -184,12 +184,24 @@
$('#' + clicked).click(); $('#' + clicked).click();
}, },
checkVisibility: function () {
if ($('#graphManagementDropdown').is(':visible')) {
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
arangoHelper.setCheckboxStatus('#graphManagementDropdown');
},
toggleGraphDropdown: function () { toggleGraphDropdown: function () {
var self = this;
// apply sorting to checkboxes // apply sorting to checkboxes
$('#graphSortDesc').attr('checked', this.collection.sortOptions.desc); $('#graphSortDesc').attr('checked', this.collection.sortOptions.desc);
$('#graphManagementToggle').toggleClass('activated'); $('#graphManagementToggle').toggleClass('activated');
$('#graphManagementDropdown2').slideToggle(200); $('#graphManagementDropdown2').slideToggle(200, function () {
self.checkVisibility();
});
}, },
sorting: function () { sorting: function () {
@ -199,12 +211,7 @@
this.collection.setSortingDesc(false); this.collection.setSortingDesc(false);
} }
if ($('#graphManagementDropdown').is(':visible')) { this.checkVisibility();
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
this.render(); this.render();
}, },

View File

@ -36,6 +36,15 @@
'click #viewsSortDesc': 'sorting' 'click #viewsSortDesc': 'sorting'
}, },
checkVisibility: function () {
if ($('#viewsDropdown').is(':visible')) {
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
arangoHelper.setCheckboxStatus('#viewsDropdown');
},
sorting: function () { sorting: function () {
if ($('#viewsSortDesc').is(':checked')) { if ($('#viewsSortDesc').is(':checked')) {
this.setSortingDesc(true); this.setSortingDesc(true);
@ -43,12 +52,7 @@
this.setSortingDesc(false); this.setSortingDesc(false);
} }
if ($('#viewsDropdown').is(':visible')) { this.checkVisibility();
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
this.render(); this.render();
}, },
@ -62,11 +66,14 @@
}, },
toggleSettingsDropdown: function () { toggleSettingsDropdown: function () {
var self = this;
// apply sorting to checkboxes // apply sorting to checkboxes
$('#viewsSortDesc').attr('checked', this.sortOptions.desc); $('#viewsSortDesc').attr('checked', this.sortOptions.desc);
$('#viewsToggle').toggleClass('activated'); $('#viewsToggle').toggleClass('activated');
$('#viewsDropdown2').slideToggle(200); $('#viewsDropdown2').slideToggle(200, function () {
self.checkVisibility();
});
}, },
render: function (data) { render: function (data) {
@ -87,7 +94,7 @@
if (self.dropdownVisible === true) { if (self.dropdownVisible === true) {
$('#viewsSortDesc').attr('checked', self.sortOptions.desc); $('#viewsSortDesc').attr('checked', self.sortOptions.desc);
$('#viewsToggle').toggleClass('activated'); $('#viewsToggle').addClass('activated');
$('#viewsDropdown2').show(); $('#viewsDropdown2').show();
} }