diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-09-14 02:29:22 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:28 +0200 |
commit | a0fa7186f55b16ddccbd3780f61433e977cbefd2 (patch) | |
tree | ffe9f121aa20bd58bc5810f0729d0cbb61ed288d /core/js/share.js | |
parent | c7453b4db1c31884f798b8aa826bb25560e9551e (diff) | |
download | nextcloud-server-a0fa7186f55b16ddccbd3780f61433e977cbefd2.tar.gz nextcloud-server-a0fa7186f55b16ddccbd3780f61433e977cbefd2.zip |
make permission/cruds checkboxes work
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/core/js/share.js b/core/js/share.js index e3c4d3d91af..c05f3602dd7 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -856,43 +856,6 @@ $(document).ready(function() { } }); - $(document).on('change', '#dropdown .permissions', function() { - var li = $(this).closest('li'); - if ($(this).attr('name') == 'edit') { - var checkboxes = $('.permissions', li); - var checked = $(this).is(':checked'); - // Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck - $(checkboxes).filter('input[name="create"]').attr('checked', checked); - $(checkboxes).filter('input[name="update"]').attr('checked', checked); - $(checkboxes).filter('input[name="delete"]').attr('checked', checked); - } else { - var checkboxes = $('.permissions', li); - // Uncheck Edit if Create, Update, and Delete are not checked - if (!$(this).is(':checked') - && !$(checkboxes).filter('input[name="create"]').is(':checked') - && !$(checkboxes).filter('input[name="update"]').is(':checked') - && !$(checkboxes).filter('input[name="delete"]').is(':checked')) - { - $(checkboxes).filter('input[name="edit"]').attr('checked', false); - // Check Edit if Create, Update, or Delete is checked - } else if (($(this).attr('name') == 'create' - || $(this).attr('name') == 'update' - || $(this).attr('name') == 'delete')) - { - $(checkboxes).filter('input[name="edit"]').attr('checked', true); - } - } - var permissions = OC.PERMISSION_READ; - $(checkboxes).filter(':not(input[name="edit"])').filter(':checked').each(function(index, checkbox) { - permissions |= $(checkbox).data('permissions'); - }); - OC.Share.setPermissions($('#dropdown').data('item-type'), - $('#dropdown').data('item-source'), - li.data('share-type'), - li.attr('data-share-with'), - permissions); - }); - $(document).on('click', '#dropdown #expirationCheckbox', function() { if (this.checked) { OC.Share.showExpirationDate(''); |