Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-12 10:56:46 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-12 17:49:39 +0300
commitae86845062e6bf303799c8ff52fd997db6cd22ab (patch)
tree5ac103df2b7eb4e5087886790c3a75469c58f627 /apps/files/js/navigation.js
parent5bac9693511ca0e9e5f0553ecc8791cccf05c935 (diff)
Fixed favorite folder view display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/navigation.js')
-rw-r--r--apps/files/js/navigation.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/files/js/navigation.js b/apps/files/js/navigation.js
index 207f9b1c206..d783fcc2156 100644
--- a/apps/files/js/navigation.js
+++ b/apps/files/js/navigation.js
@@ -111,33 +111,40 @@
* @param array options "silent" to not trigger event
*/
setActiveItem: function (itemId, options) {
+ var currentItem = this.$el.find('li[data-id=' + itemId + ']');
+ var itemDir = currentItem.data('dir');
+ var itemView = currentItem.data('view');
var oldItemId = this._activeItem;
if (itemId === this._activeItem) {
if (!options || !options.silent) {
this.$el.trigger(
new $.Event('itemChanged', {
itemId: itemId,
- previousItemId: oldItemId
+ previousItemId: oldItemId,
+ dir: itemDir,
+ view: itemView
})
);
}
return;
}
- this.$el.find('li').removeClass('active');
+ this.$el.find('li a').removeClass('active');
if (this.$currentContent) {
this.$currentContent.addClass('hidden');
this.$currentContent.trigger(jQuery.Event('hide'));
}
this._activeItem = itemId;
- this.$el.find('li[data-id=' + itemId + ']').addClass('active');
- this.$currentContent = $('#app-content-' + itemId);
+ currentItem.children('a').addClass('active');
+ this.$currentContent = $('#app-content-' + (itemView !== '' ? itemView : itemId));
this.$currentContent.removeClass('hidden');
if (!options || !options.silent) {
this.$currentContent.trigger(jQuery.Event('show'));
this.$el.trigger(
new $.Event('itemChanged', {
itemId: itemId,
- previousItemId: oldItemId
+ previousItemId: oldItemId,
+ dir: itemDir,
+ view: itemView
})
);
}