make dropItem more universal and move delete up in the dropdown menu
This commit is contained in:
parent
962fdf08c0
commit
70b109702e
@ -832,7 +832,7 @@ function attach_delete($channel_id, $resource) {
|
|||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
file_activity($channel_id, $object, $object['allow_cid'], $object['allow_gid'], $object['deny_cid'], $object['deny_gid'], 'update', $no_activity=false);
|
file_activity($channel_id, $object, $object['allow_cid'], $object['allow_gid'], $object['deny_cid'], $object['deny_gid'], 'update', $notify=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -819,13 +819,12 @@ function doprofilelike(ident, verb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function dropItem(ident) {
|
function dropItem(url, object) {
|
||||||
var object = '#thread-wrapper-' + ident;
|
|
||||||
var confirm = confirmDelete();
|
var confirm = confirmDelete();
|
||||||
if(confirm) {
|
if(confirm) {
|
||||||
$('body').css('cursor', 'wait');
|
$('body').css('cursor', 'wait');
|
||||||
$(object).fadeTo('fast', 0.33, function () {
|
$(object).fadeTo('fast', 0.33, function () {
|
||||||
$.get('item/drop/' + ident).done(function() {
|
$.get(url).done(function() {
|
||||||
$(object).remove();
|
$(object).remove();
|
||||||
$('body').css('cursor', 'auto');
|
$('body').css('cursor', 'auto');
|
||||||
});
|
});
|
||||||
|
@ -117,14 +117,13 @@
|
|||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="presentation"><a role="menuitem" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="icon-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i> {{$item.star.toggle}}</a></li>
|
<li role="presentation"><a role="menuitem" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="icon-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i> {{$item.star.toggle}}</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{if $item.drop.dropping}}
|
||||||
|
<li role="presentation"><a role="menuitem" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
|
||||||
|
{{/if}}
|
||||||
{{if $item.item_photo_menu}}
|
{{if $item.item_photo_menu}}
|
||||||
<li role="presentation" class="divider"></li>
|
<li role="presentation" class="divider"></li>
|
||||||
{{$item.item_photo_menu}}
|
{{$item.item_photo_menu}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.drop.dropping}}
|
|
||||||
<li role="presentation" class="divider"></li>
|
|
||||||
<li role="presentation"><a role="menuitem" href="#" onclick="dropItem({{$item.id}}); return false;" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
|
|
||||||
{{/if}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
|
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
|
||||||
|
@ -118,14 +118,14 @@
|
|||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="presentation"><a role="menuitem" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="icon-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i> {{$item.star.toggle}}</a></li>
|
<li role="presentation"><a role="menuitem" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="icon-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i> {{$item.star.toggle}}</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{if $item.drop.dropping}}
|
||||||
|
<li role="presentation"><a role="menuitem" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
|
||||||
|
{{/if}}
|
||||||
{{if $item.item_photo_menu}}
|
{{if $item.item_photo_menu}}
|
||||||
<li role="presentation" class="divider"></li>
|
<li role="presentation" class="divider"></li>
|
||||||
{{$item.item_photo_menu}}
|
{{$item.item_photo_menu}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.drop.dropping}}
|
|
||||||
<li role="presentation" class="divider"></li>
|
|
||||||
<li role="presentation"><a role="menuitem" href="#" onclick="dropItem({{$item.id}}); return false;" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
|
|
||||||
{{/if}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
|
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
|
||||||
|
Reference in New Issue
Block a user