1
0
Fork 0

fixed save action of edit collection

This commit is contained in:
gschwab 2014-03-12 15:09:59 +01:00
parent 306f9674de
commit 0bae26d890
1 changed files with 3 additions and 7 deletions

View File

@ -24,7 +24,7 @@
return this; return this;
}, },
events: { events: {
"click #save-modified-collection" : "saveModifiedCollection(true)", "click #save-modified-collection" : "saveModifiedCollection",
"hidden #change-collection" : "hidden", "hidden #change-collection" : "hidden",
"click #delete-modified-collection" : "deleteCollection", "click #delete-modified-collection" : "deleteCollection",
"click #load-modified-collection" : "loadCollection", "click #load-modified-collection" : "loadCollection",
@ -36,7 +36,7 @@
}, },
listenKey: function(e) { listenKey: function(e) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
this.saveModifiedCollection(true); this.saveModifiedCollection();
} }
}, },
hidden: function () { hidden: function () {
@ -97,11 +97,7 @@
$('#change-collection-size').val(calculatedSize); $('#change-collection-size').val(calculatedSize);
$('#change-collection').modal('show'); $('#change-collection').modal('show');
}, },
saveModifiedCollection: function(run) { saveModifiedCollection: function() {
if (run !== true) {
return 0;
}
var newname = $('#change-collection-name').val(); var newname = $('#change-collection-name').val();
if (newname === '') { if (newname === '') {