Skip to content

Commit

Permalink
Fix formatting in bulk tagging code
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 committed Jul 23, 2021
1 parent 8f9588f commit dcc0786
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1129,15 +1129,16 @@
var commonTags = [];

var selectedFiles = _.pluck(this.getSelectedFiles(),'id')
var tagCollections=[];
var tagCollections = [];
var fetchTagPromises = [];


selectedFiles.forEach(function(fileId) {
var deferred = new $.Deferred();
var tagCollection = new OC.SystemTags.SystemTagsMappingCollection([], {
var tagCollection = new OC.SystemTags.SystemTagsMappingCollection([], {
objectType: 'files',
objectId: fileId});
objectId: fileId
});
tagCollections.push(tagCollection);
tagCollection.fetch({
success: function(){
Expand Down Expand Up @@ -1190,11 +1191,10 @@

_onClickDocument: function(ev) {
if(!$(ev.target).closest('#editor_container').length) {
this._inputView.setValues([]);
this.tagsContainer.hide();
this._inputView.setValues([]);
this.tagsContainer.hide();
$(document).unbind('click', this._onClickDocument);
}

},

/**
Expand Down Expand Up @@ -1227,9 +1227,8 @@
return;
}
selectedFiles.forEach(function(fileId) {
console.log('remove tag route',OC.linkToRemote('dav') + '/systemtags-relations/files/' +fileId + '/'+ tagId)
$.ajax({
url: OC.linkToRemote('dav') + '/systemtags-relations/files/' +fileId + '/'+ tagId,
url: OC.linkToRemote('dav') + '/systemtags-relations/files/' + fileId + '/'+ tagId,
type: 'DELETE'
});
});
Expand Down

0 comments on commit dcc0786

Please sign in to comment.