File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,18 @@ view.prototype.exportDelete = function(ev) {
130
130
return false ;
131
131
} ;
132
132
133
- // Delete all the exports, regardless of Project
133
+ // Delete all the exports for the current Project
134
134
view . prototype . exportDeleteAll = function ( ev ) {
135
+ var projectModel = this . project
135
136
var col = this . collection ;
136
137
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 + ' ?',
138
139
callback : function ( ) {
139
140
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
+ }
141
145
} ) } ,
142
146
affirmative : 'Delete'
143
147
} ) ;
You can’t perform that action at this time.
0 commit comments