aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filemultiselectmenu.js
diff options
context:
space:
mode:
authorAbijeet <abijeetpatro@gmail.com>2018-06-06 23:31:25 +0530
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-18 07:39:44 +0200
commit0c77b93b8674db71df7d6ca24a8de600818175f6 (patch)
tree4a6e33e6e258055cce18a5bcbe6541a21928aadd /apps/files/js/filemultiselectmenu.js
parente89f6590e2983c55b1a15f700eb3258554f36197 (diff)
downloadnextcloud-server-0c77b93b8674db71df7d6ca24a8de600818175f6.tar.gz
nextcloud-server-0c77b93b8674db71df7d6ca24a8de600818175f6.zip
Fixes issues found during running of test cases.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Diffstat (limited to 'apps/files/js/filemultiselectmenu.js')
-rw-r--r--apps/files/js/filemultiselectmenu.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/js/filemultiselectmenu.js b/apps/files/js/filemultiselectmenu.js
index 767166b06c3..d587d1fbdb2 100644
--- a/apps/files/js/filemultiselectmenu.js
+++ b/apps/files/js/filemultiselectmenu.js
@@ -51,8 +51,6 @@
*/
show: function(context) {
this._context = context;
-
- this.render();
this.$el.removeClass('hidden');
if (window.innerWidth < 480) {
this.$el.removeClass('menu-center').addClass('menu-right');
@@ -62,11 +60,15 @@
OC.showMenu(null, this.$el);
return false;
},
- toggleItemVisibility: function (itemName, hide) {
- this.$el.find('.item-' + itemName).toggleClass('hidden', hide);
+ toggleItemVisibility: function (itemName, show) {
+ if (show) {
+ this.$el.find('.item-' + itemName).removeClass('hidden');
+ } else {
+ this.$el.find('.item-' + itemName).addClass('hidden');
+ }
},
updateItemText: function (itemName, translation) {
- this.$el.find('.item-' + itemName).find('label').text(translation);
+ this.$el.find('.item-' + itemName).find('.label').text(translation);
},
toggleLoading: function (itemName, showLoading) {
var $actionElement = this.$el.find('.item-' + itemName);