toggle visibility of detailed cruds permissions
This commit is contained in:
parent
d4bbc062be
commit
c7453b4db1
2 changed files with 7 additions and 6 deletions
|
@ -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') {
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
@ -244,6 +245,11 @@
|
|||
|
||||
view.model.removeShare(shareType, shareWith);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
onCrudsToggle: function() {
|
||||
$(this).siblings('.cruds').toggleClass('hidden');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue