Skip to content

Commit 121860d

Browse files
authored
Update Exports.bones
Change Exports Delete All to only delete within current project.
1 parent 3245e78 commit 121860d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

views/Exports.bones

+7-3
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,18 @@ view.prototype.exportDelete = function(ev) {
130130
return false;
131131
};
132132

133-
// Delete all the exports, regardless of Project
133+
// Delete all the exports for the current Project
134134
view.prototype.exportDeleteAll = function(ev) {
135+
var projectModel = this.project
135136
var col = this.collection;
136137
new views.Modal({
137-
content: 'Are you sure you want to delete ALL the Exports for EVERY project?',
138+
content: 'Are you sure you want to delete ALL the Exports for the project: ' + projectModel.id + '?',
138139
callback: function() {
139140
col.each(function(model) {
140-
model.destroy({ error: function(m, e) { new views.Modal(e) }});
141+
if(model.get('project') == projectModel.id) {
142+
model.destroy({ error: function(m, e) { new views.Modal(e) }});
143+
//console.log("Deleted: " + model.get('filename'));
144+
}
141145
})},
142146
affirmative: 'Delete'
143147
});

0 commit comments

Comments
 (0)