Move mod/lockview to Module\PermissionTooltip
- Add explicit type parameter to lockview() in main.js
This commit is contained in:
parent
639e2b3892
commit
d7b5674476
20 changed files with 158 additions and 45 deletions
|
@ -750,26 +750,23 @@ function getPosition(e) {
|
|||
|
||||
var lockvisible = false;
|
||||
|
||||
function lockview(event,id) {
|
||||
function lockview(event, type, id) {
|
||||
event = event || window.event;
|
||||
cursor = getPosition(event);
|
||||
if (lockvisible) {
|
||||
lockviewhide();
|
||||
lockvisible = false;
|
||||
$('#panel').hide();
|
||||
} else {
|
||||
lockvisible = true;
|
||||
$.get('lockview/' + id, function(data) {
|
||||
$('#panel').html(data);
|
||||
$('#panel').css({'left': cursor.x + 5 , 'top': cursor.y + 5});
|
||||
$('#panel').show();
|
||||
$.get('permission/tooltip/' + type + '/' + id, function(data) {
|
||||
$('#panel')
|
||||
.html(data)
|
||||
.css({'left': cursor.x + 5 , 'top': cursor.y + 5})
|
||||
.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function lockviewhide() {
|
||||
lockvisible = false;
|
||||
$('#panel').hide();
|
||||
}
|
||||
|
||||
function post_comment(id) {
|
||||
unpause();
|
||||
commentBusy = true;
|
||||
|
@ -940,14 +937,6 @@ function groupChangeMember(gid, cid, sec_token) {
|
|||
});
|
||||
}
|
||||
|
||||
function profChangeMember(gid,cid) {
|
||||
$('body .fakelink').css('cursor', 'wait');
|
||||
$.get('profperm/' + gid + '/' + cid, function(data) {
|
||||
$('#prof-update-wrapper').html(data);
|
||||
$('body .fakelink').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
function contactgroupChangeMember(checkbox, gid, cid) {
|
||||
let url;
|
||||
// checkbox.checked is the checkbox state after the click
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
| <a id="photo-toprofile-link" href="{{$tools.profile.0}}">{{$tools.profile.1}}</a>
|
||||
{{/if}}
|
||||
{{if $tools.lock}}
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event,'photo/{{$id}}');" />
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event, 'photo', {{$id}});" />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="wall-item-photo-end"></div>
|
||||
<div class="wall-item-wrapper" id="wall-item-wrapper-{{$item.id}}" >
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" /></div>
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" /></div>
|
||||
{{else}}<div class="wall-item-lock"></div>{{/if}}
|
||||
<div class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location nofilter}}</div>
|
||||
</div>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<div class="wall-item-photo-end"></div>
|
||||
<div class="wall-item-wrapper" id="wall-item-wrapper-{{$item.id}}" >
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" /></div>
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" /></div>
|
||||
{{else}}<div class="wall-item-lock"></div>{{/if}}
|
||||
<div class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location nofilter}}</div>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{{/if}}
|
||||
{{if $tools.lock}}
|
||||
<span class="icon-padding"> </span>
|
||||
<a id="photo-lock-link" onclick="lockview(event,'photo/{{$id}}');" title="{{$tools.lock}}" data-toggle="tooltip">
|
||||
<a id="photo-lock-link" onclick="lockview(event, 'photo', {{$id}});" title="{{$tools.lock}}" data-toggle="tooltip">
|
||||
<i class="page-action faded-icon fa fa-lock"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- TODO => Unknow block -->
|
||||
<div class="wall-item-decor" style="display:none;">
|
||||
<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
|
||||
{{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock" aria-hidden="true"></span>{{/if}}
|
||||
{{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock" aria-hidden="true"></span>{{/if}}
|
||||
</div>
|
||||
<!-- ./TODO => Unknow block -->
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
|||
</a>
|
||||
{{/if}}
|
||||
{{if $item.lock}}
|
||||
<span class="navicon lock fakelink" onClick="lockview(event, {{$item.id}});" title="{{$item.lock}}">
|
||||
<span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">
|
||||
<small><i class="fa fa-lock" aria-hidden="true"></i></small>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -63,7 +63,7 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
{{if $item.star}}
|
||||
<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
|
||||
{{/if}}
|
||||
{{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
|
||||
{{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
|
||||
</div>
|
||||
{{* /TODO => Unknown block *}}
|
||||
|
||||
|
@ -138,7 +138,7 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
</a>
|
||||
{{/if}}
|
||||
{{if $item.lock}}
|
||||
<span class="navicon lock fakelink" onClick="lockview(event,{{$item.id}});" title="{{$item.lock}}" data-toggle="tooltip">
|
||||
<span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}" data-toggle="tooltip">
|
||||
<small><i class="fa fa-lock" aria-hidden="true"></i></small>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
| <a id="photo-toprofile-link" href="{{$tools.profile.0}}">{{$tools.profile.1}}</a>
|
||||
{{/if}}
|
||||
{{if $tools.lock}}
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event,'photo/{{$id}}');" />
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event, 'photo', {{$id}});" />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="wall-item-decor">
|
||||
{{if $item.star}}<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon s22 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon s22 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<div class="wall-item-decor">
|
||||
{{if $item.star}}<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon s22 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon s22 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div class="wall-item-location" id="wall-item-location-{{$item.id}}">{{if $item.location}}<span class="icon globe"></span>{{$item.location nofilter}} {{/if}}</div>
|
||||
</div>
|
||||
<div class="wall-item-lock-wrapper">
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" /></div>
|
||||
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" /></div>
|
||||
{{else}}<div class="wall-item-lock"></div>{{/if}}
|
||||
</div>
|
||||
<div class="wall-item-tools" id="wall-item-tools-{{$item.id}}">
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="wall-item-lock-wrapper">
|
||||
{{if $item.lock}}
|
||||
<div class="wall-item-lock">
|
||||
<img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" />
|
||||
<img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" />
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="wall-item-lock"></div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$sparkle}}">{{$name}}</span></a>
|
||||
<span class="wall-item-ago">
|
||||
{{if $plink}}<a class="link" title="{{$plink.title}}" href="{{$plink.href}}" style="color: #999">{{$ago}}</a>{{else}} {{$ago}} {{/if}}
|
||||
{{if $lock}}<span class="fakelink" style="color: #999" onclick="lockview(event,{{$id}});">{{$lock}}</span> {{/if}}
|
||||
{{if $lock}}<span class="fakelink" style="color: #999" onclick="lockview(event, 'item', {{$id}});">{{$lock}}</span> {{/if}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="wall-item-content">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
| <a id="photo-toprofile-link" href="{{$tools.profile.0}}">{{$tools.profile.1}}</a>
|
||||
{{/if}}
|
||||
{{if $tools.lock}}
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event,'photo/{{$id}}');" />
|
||||
| <img src="images/lock_icon.gif" class="lockview" alt="{{$tools.lock}}" onclick="lockview(event, 'photo', {{$id}});" />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="wall-item-decor">
|
||||
{{if $item.star}}<span class="icon star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
|
||||
</div>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
<a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a>
|
||||
<span class="wall-item-ago">
|
||||
{{if $item.plink}}<a class="link" title="{{$item.plink.title}}" href="{{$item.plink.href}}" style="color: #999">{{$item.ago}}</a>{{else}} {{$item.ago}} {{/if}}
|
||||
{{if $item.lock}}<span class="fakelink" style="color: #999" onclick="lockview(event,{{$item.id}});">{{$item.lock}}</span> {{/if}}
|
||||
{{if $item.lock}}<span class="fakelink" style="color: #999" onclick="lockview(event, 'item', {{$item.id}});">{{$item.lock}}</span> {{/if}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="wall-item-content">
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
{{/if}}
|
||||
<span class="pinned">{{$item.pinned}}</span>
|
||||
</span>
|
||||
{{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
{{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
<span class="wall-item-network" title="{{$item.app}}">
|
||||
{{$item.network_name}}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue