shamelessly steal, and cut/paste from the settings page to get mod_photos edit permissions working - and it looks like we still have some other fancybox instances (yet another lightbox) which haven't yet been converted to colorbox and will need to be fixed. Way too many lightboxes.

This commit is contained in:
friendica 2014-02-11 18:45:50 -08:00
parent b5728fa42e
commit 95a45a119d
3 changed files with 25 additions and 12 deletions

View File

@ -281,6 +281,7 @@ function photos_post(&$a) {
);
if(count($p)) {
$ext = $phototypes[$p[0]['type']];
$r = q("UPDATE `photo` SET `description` = '%s', `album` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `resource_id` = '%s' AND `uid` = %d",
dbesc($desc),
dbesc($albname),
@ -504,6 +505,9 @@ function photos_content(&$a) {
$o = "";
$o .= "<script> var profile_uid = " . $a->profile['profile_uid']
. "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
// tabs
$_is_owner = (local_user() && (local_user() == $owner_uid));

View File

@ -1,5 +1,13 @@
var ispublic = aStr['everybody'];
$(document).ready(function() {
$("a#settings-default-perms-menu").colorbox({
'inline' : true,
'transition' : 'elastic'
});
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {

View File

@ -1,4 +1,4 @@
<div id="live-display"></div>
<div id="live-photos"></div>
<h3><a href="{{$album.0}}">{{$album.1}}</a></h3>
<div id="photo-edit-link-wrap">
@ -52,19 +52,20 @@
</div>
<div id="photo-edit-rotate-end"></div>
<div id="photo-edit-perms" class="photo-edit-perms" >
<a href="#photo-edit-perms-select" id="photo-edit-perms-menu" class="button popupbox" title="{{$edit.permissions}}"/>
<span id="jot-perms-icon" class="icon {{$edit.lockstate}}" ></span>{{$edit.permissions}}
</a>
<div id="photo-edit-perms-menu-end"></div>
<div style="display: none;">
<div id="photo-edit-perms-select" >
{{$edit.aclselect}}
<div id="settings-default-perms" class="settings-default-perms" >
<span id="jot-perms-icon" class="icon {{$edit.lockstate}}" ></span>
<a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" >{{$edit.permissions}}</a>
<div id="settings-default-perms-menu-end"></div>
<div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >
<div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
{{$edit.aclselect}}
</div>
</div>
</div>
</div>
<div id="photo-edit-perms-end"></div>
</div>
<br/>
<div id="settings-default-perms-end"></div>
<input id="photo-edit-submit-button" type="submit" name="submit" value="{{$edit.submit}}" />
<input id="photo-edit-delete-button" type="submit" name="delete" value="{{$edit.delete}}" onclick="return confirmDelete()"; />