toggle visibility of detailed cruds permissions
This commit is contained in:
parent
d4bbc062be
commit
c7453b4db1
|
@ -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() {
|
$(document).on('change', '#dropdown .permissions', function() {
|
||||||
var li = $(this).closest('li');
|
var li = $(this).closest('li');
|
||||||
if ($(this).attr('name') == 'edit') {
|
if ($(this).attr('name') == 'edit') {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
' {{/if}}' +
|
' {{/if}}' +
|
||||||
' {{#unless isRemoteShare}}' +
|
' {{#unless isRemoteShare}}' +
|
||||||
' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
||||||
' <div class="cruds" class="hidden">' +
|
' <div class="cruds hidden">' +
|
||||||
' {{#if createPermissionPossible}}' +
|
' {{#if createPermissionPossible}}' +
|
||||||
' <label><input id="canCreate-{{shareWith}}" type="checkbox" name="create" class="permissions" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>{{createPermissionLabel}}</label>' +
|
' <label><input id="canCreate-{{shareWith}}" type="checkbox" name="create" class="permissions" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>{{createPermissionLabel}}</label>' +
|
||||||
' {{/if}}' +
|
' {{/if}}' +
|
||||||
|
@ -214,6 +214,7 @@
|
||||||
|
|
||||||
var view = this;
|
var view = this;
|
||||||
this.$el.find('.unshare').click(function() { view.onUnshare(this, view); });
|
this.$el.find('.unshare').click(function() { view.onUnshare(this, view); });
|
||||||
|
this.$el.find('.showCruds').click(this.onCrudsToggle);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -244,6 +245,11 @@
|
||||||
|
|
||||||
view.model.removeShare(shareType, shareWith);
|
view.model.removeShare(shareType, shareWith);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
onCrudsToggle: function() {
|
||||||
|
$(this).siblings('.cruds').toggleClass('hidden');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue