remove non changes and use _updateSelectAll3

This commit is contained in:
JenCabral
2015-01-15 07:41:26 -06:00
parent d55964ad60
commit bc2daef9fc
+6
View File
@@ -102,6 +102,7 @@ return Backbone.View.extend({
// add info
this.$el.find('#upload-ftp-content').html($(this._templateInfo()));
}
// hide spinner
this.$el.find('#upload-ftp-wait').hide();
},
@@ -127,14 +128,17 @@ return Backbone.View.extend({
} else {
icon_class = this.options.class_add;
}
// add icon class
$icon.addClass(icon_class);
$it.on('addToUpBox', function() {
// find model
var model_index = self._find(ftp_file);
// update icon
$icon.removeClass();
// add model
if (!model_index) {
// add to uploadbox
@@ -144,11 +148,13 @@ return Backbone.View.extend({
size : ftp_file.size,
path : ftp_file.path
}]);
// add new icon class
$icon.addClass(self.options.class_remove);
} else {
// remove
self.app.collection.remove(model_index);
// add new icon class
$icon.addClass(self.options.class_add);
}