summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-09-14 01:40:16 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commitc7453b4db1c31884f798b8aa826bb25560e9551e (patch)
tree2f8f6e22a1524bdddaf626aeeef18ec3dda7249d /core/js
parentd4bbc062be79f48633f047e142800f37efa04e1f (diff)
downloadnextcloud-server-c7453b4db1c31884f798b8aa826bb25560e9551e.tar.gz
nextcloud-server-c7453b4db1c31884f798b8aa826bb25560e9551e.zip
toggle visibility of detailed cruds permissions
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js5
-rw-r--r--core/js/sharedialogshareelistview.js8
2 files changed, 7 insertions, 6 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 7c87fb88cfd..e3c4d3d91af 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -856,11 +856,6 @@ $(document).ready(function() {
}
});
- $(document).on('click', '#dropdown .showCruds', function() {
- $(this).closest('li').find('.cruds').toggle();
- return false;
- });
-
$(document).on('change', '#dropdown .permissions', function() {
var li = $(this).closest('li');
if ($(this).attr('name') == 'edit') {
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index dda2fe949ac..f078ab8a06b 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -37,7 +37,7 @@
' {{/if}}' +
' {{#unless isRemoteShare}}' +
' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
- ' <div class="cruds" class="hidden">' +
+ ' <div class="cruds hidden">' +
' {{#if createPermissionPossible}}' +
' <label><input id="canCreate-{{shareWith}}" type="checkbox" name="create" class="permissions" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>{{createPermissionLabel}}</label>' +
' {{/if}}' +
@@ -214,6 +214,7 @@
var view = this;
this.$el.find('.unshare').click(function() { view.onUnshare(this, view); });
+ this.$el.find('.showCruds').click(this.onCrudsToggle);
return this;
},
@@ -245,6 +246,11 @@
view.model.removeShare(shareType, shareWith);
return false;
+ },
+
+ onCrudsToggle: function() {
+ $(this).siblings('.cruds').toggleClass('hidden');
+ return false;
}
});