mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:10:12 +00:00
reload the acl if a new event edit or copy modal is opened
This commit is contained in:
parent
74d813042f
commit
c1699364ae
5 changed files with 110 additions and 86 deletions
|
@ -50,6 +50,24 @@ $(document).ready(function() {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Construct a new ACL. We need this everytime the 'event-edit-form' is loaded
|
||||
// without page reloading (e.g. closing an old modal and open a new modal).
|
||||
// Otherwise we wouldn't get the ACL data.
|
||||
/// @todo: Try to implement some kind of ACL reloading in acl.js.
|
||||
if (typeof acl !== "undefined") {
|
||||
var eventPerms = document.getElementById('event-edit-form');
|
||||
|
||||
acl = new ACL(
|
||||
baseurl + "/acl",
|
||||
[
|
||||
eventPerms.dataset.allow_cid,
|
||||
eventPerms.dataset.allow_gid,
|
||||
eventPerms.dataset.deny_cid,
|
||||
eventPerms.dataset.deny_gid
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Load the html of the actual event and incect the output to the
|
||||
|
@ -63,19 +81,6 @@ function doEventPreview() {
|
|||
}
|
||||
|
||||
|
||||
// This function load the content of the edit url into a modal.
|
||||
function eventEdit(url) {
|
||||
var char = qOrAmp(url);
|
||||
url = url + char + 'mode=none';
|
||||
|
||||
$.get(url, function(data) {
|
||||
$("#modal-body").empty();
|
||||
$("#modal-body").append(data);
|
||||
}).done(function() {
|
||||
loadModalTitle();
|
||||
});
|
||||
}
|
||||
|
||||
// The following functions show/hide the specific event-edit content
|
||||
// in dependence of the selected nav.
|
||||
function eventAclActive() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue