aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js10
-rw-r--r--apps/files/js/tagsplugin.js11
2 files changed, 16 insertions, 5 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index d6d5bcf912e..1d7252220bf 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1674,7 +1674,9 @@
setFilter:function(filter) {
this._filter = filter;
this.fileSummary.setFilter(filter, this.files);
- this.hideIrrelevantUIWhenNoFilesMatch();
+ if (!this.$el.find('.mask').exists()) {
+ this.hideIrrelevantUIWhenNoFilesMatch();
+ }
var that = this;
this.$fileList.find('tr').each(function(i,e) {
var $e = $(e);
@@ -1690,13 +1692,15 @@
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {
this.$el.find('#filestable thead th').addClass('hidden');
this.$el.find('#emptycontent').addClass('hidden');
- if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden')) {
+ if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) {
this.$el.find('.nofilterresults').removeClass('hidden').
find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false}));
}
} else {
this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
- this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
+ if (!this.$el.find('.mask').exists()) {
+ this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
+ }
this.$el.find('.nofilterresults').addClass('hidden');
}
},
diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js
index a6757431ffa..dec6063aa9b 100644
--- a/apps/files/js/tagsplugin.js
+++ b/apps/files/js/tagsplugin.js
@@ -110,10 +110,17 @@
dir + '/' + fileName,
tags
).then(function(result) {
+ // response from server should contain updated tags
+ var newTags = result.tags;
+ if (_.isUndefined(newTags)) {
+ newTags = tags;
+ }
+ var fileInfo = context.fileList.files[$file.index()];
// read latest state from result
- toggleStar($actionEl, (result.tags.indexOf(OC.TAG_FAVORITE) >= 0));
- $file.attr('data-tags', tags.join('|'));
+ toggleStar($actionEl, (newTags.indexOf(OC.TAG_FAVORITE) >= 0));
+ $file.attr('data-tags', newTags.join('|'));
$file.attr('data-favorite', !isFavorite);
+ fileInfo.tags = newTags;
});
}
});