mirror of https://gitee.com/bigwinds/arangodb
Fixed a bug with two identically named check boxes and click events that were not correctly unbound
This commit is contained in:
parent
288f174011
commit
fd8e3783c9
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<li><a href="#">
|
<li><a href="#">
|
||||||
<label class="checkbox checkboxLabel">
|
<label class="checkbox checkboxLabel">
|
||||||
<input class="css-checkbox" type="checkbox" id="checkSystem">
|
<input class="css-checkbox checkSystem" type="checkbox">
|
||||||
<label class="css-label"></label>System applications
|
<label class="css-label"></label>System applications
|
||||||
</label>
|
</label>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
<li class="nav-header">Type</li>
|
<li class="nav-header">Type</li>
|
||||||
<li><a>
|
<li><a>
|
||||||
<label class="checkbox checkboxLabel">
|
<label class="checkbox checkboxLabel">
|
||||||
<input class="css-checkbox" type="checkbox" id="checkSystem">
|
<input class="css-checkbox checkSystemCollections" type="checkbox">
|
||||||
<label class="css-label" id="checkSystem"></label>System
|
<label class="css-label"></label>System
|
||||||
</label>
|
</label>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ window.ApplicationsView = Backbone.View.extend({
|
||||||
events: {
|
events: {
|
||||||
"click #checkDevel" : "toggleDevel",
|
"click #checkDevel" : "toggleDevel",
|
||||||
"click #checkActive" : "toggleActive",
|
"click #checkActive" : "toggleActive",
|
||||||
"click #checkSystem" : "toggleSystem",
|
"click .checkSystem" : "toggleSystem",
|
||||||
"click #foxxToggle" : "slideToggle",
|
"click #foxxToggle" : "slideToggle",
|
||||||
"click #importFoxxToggle" : "slideToggleImport",
|
"click #importFoxxToggle" : "slideToggleImport",
|
||||||
"change #importFoxx" : "uploadSetup",
|
"change #importFoxx" : "uploadSetup",
|
||||||
|
@ -189,6 +189,7 @@ window.ApplicationsView = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleSystem: function() {
|
toggleSystem: function() {
|
||||||
|
console.log("Toggle");
|
||||||
this._showSystem = !this._showSystem;
|
this._showSystem = !this._showSystem;
|
||||||
var self = this;
|
var self = this;
|
||||||
_.each(this._installedSubViews, function(v) {
|
_.each(this._installedSubViews, function(v) {
|
||||||
|
@ -285,7 +286,7 @@ window.ApplicationsView = Backbone.View.extend({
|
||||||
this.delegateEvents();
|
this.delegateEvents();
|
||||||
$('#checkActive').attr('checked', this._showActive);
|
$('#checkActive').attr('checked', this._showActive);
|
||||||
$('#checkDevel').attr('checked', this._showDevel);
|
$('#checkDevel').attr('checked', this._showDevel);
|
||||||
$('#checkSystem').attr('checked', this._showSystem);
|
$('.checkSystem').attr('checked', this._showSystem);
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
_.each(this._installedSubViews, function(v) {
|
_.each(this._installedSubViews, function(v) {
|
||||||
|
|
|
@ -63,20 +63,20 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"click #createCollection" : "createCollection",
|
"click #createCollection" : "createCollection",
|
||||||
"keydown #searchInput" : "restrictToSearchPhraseKey",
|
"keydown #searchInput" : "restrictToSearchPhraseKey",
|
||||||
"change #searchInput" : "restrictToSearchPhrase",
|
"change #searchInput" : "restrictToSearchPhrase",
|
||||||
"click #searchSubmit" : "restrictToSearchPhrase",
|
"click #searchSubmit" : "restrictToSearchPhrase",
|
||||||
"click #checkSystem" : "checkSystem",
|
"click .checkSystemCollections" : "checkSystem",
|
||||||
"click #checkLoaded" : "checkLoaded",
|
"click #checkLoaded" : "checkLoaded",
|
||||||
"click #checkUnloaded" : "checkUnloaded",
|
"click #checkUnloaded" : "checkUnloaded",
|
||||||
"click #checkDocument" : "checkDocument",
|
"click #checkDocument" : "checkDocument",
|
||||||
"click #checkEdge" : "checkEdge",
|
"click #checkEdge" : "checkEdge",
|
||||||
"click #sortName" : "sortName",
|
"click #sortName" : "sortName",
|
||||||
"click #sortType" : "sortType",
|
"click #sortType" : "sortType",
|
||||||
"click #sortOrder" : "sortOrder",
|
"click #sortOrder" : "sortOrder",
|
||||||
"click #collectionsToggle" : "toggleView",
|
"click #collectionsToggle" : "toggleView",
|
||||||
"click .css-label" : "checkBoxes"
|
"click .css-label" : "checkBoxes"
|
||||||
},
|
},
|
||||||
|
|
||||||
updateCollectionsView: function() {
|
updateCollectionsView: function() {
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
var searchOptions = this.collection.searchOptions;
|
var searchOptions = this.collection.searchOptions;
|
||||||
var oldValue = searchOptions.includeSystem;
|
var oldValue = searchOptions.includeSystem;
|
||||||
|
|
||||||
searchOptions.includeSystem = ($('#checkSystem').is(":checked") === true);
|
searchOptions.includeSystem = ($('.checkSystemCollections').is(":checked") === true);
|
||||||
|
|
||||||
if (oldValue !== searchOptions.includeSystem) {
|
if (oldValue !== searchOptions.includeSystem) {
|
||||||
this.render();
|
this.render();
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
var searchOptions = this.collection.searchOptions;
|
var searchOptions = this.collection.searchOptions;
|
||||||
$('#checkLoaded').attr('checked', searchOptions.includeLoaded);
|
$('#checkLoaded').attr('checked', searchOptions.includeLoaded);
|
||||||
$('#checkUnloaded').attr('checked', searchOptions.includeUnloaded);
|
$('#checkUnloaded').attr('checked', searchOptions.includeUnloaded);
|
||||||
$('#checkSystem').attr('checked', searchOptions.includeSystem);
|
$('.checkSystemCollections').attr('checked', searchOptions.includeSystem);
|
||||||
$('#checkEdge').attr('checked', searchOptions.includeEdge);
|
$('#checkEdge').attr('checked', searchOptions.includeEdge);
|
||||||
$('#checkDocument').attr('checked', searchOptions.includeDocument);
|
$('#checkDocument').attr('checked', searchOptions.includeDocument);
|
||||||
$('#sortName').attr('checked', searchOptions.sortBy !== 'type');
|
$('#sortName').attr('checked', searchOptions.sortBy !== 'type');
|
||||||
|
|
Loading…
Reference in New Issue