mirror of
https://github.com/friendica/friendica
synced 2024-11-18 05:03:40 +00:00
fix indetation and removed some calls.
This commit is contained in:
parent
d6fc00c743
commit
0dffe65d64
1 changed files with 17 additions and 21 deletions
|
@ -785,9 +785,9 @@ function doActivityItemAction(ident, verb, un) {
|
|||
if ($('img[id^=waitfor-' + verb + '-' + ident.toString() + ']').length == 0) {
|
||||
// append rotator to the shareMenu-button for small media
|
||||
$('<img>')
|
||||
.attr('id', 'waitfor-' + verb + '-' + ident.toString())
|
||||
.attr({id: 'waitfor-' + verb + '-' + ident.toString(), src: 'images/rotator.gif'})
|
||||
.addClass('fa')
|
||||
.appendTo($('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child' )).show();
|
||||
.appendTo($('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child' ));
|
||||
} else {
|
||||
$('<img>').attr({id: 'waitfor-' + verb + '-' + ident.toString(), src: 'images/rotator.gif'})
|
||||
}
|
||||
|
@ -796,19 +796,17 @@ function doActivityItemAction(ident, verb, un) {
|
|||
// if verb is announce, then one rotator is added above to the shareMedia-dropdown button
|
||||
if ($('button:not(button.dropdown-toggle) img#waitfor-' + verb + '-' + ident.toString()).length == 0) {
|
||||
$('<img>')
|
||||
.attr('id', 'waitfor-' + verb + '-' + ident.toString())
|
||||
.attr('src', 'images/rotator.gif')
|
||||
.attr({id: 'waitfor-' + verb + '-' + ident.toString(), src: 'images/rotator.gif'})
|
||||
.addClass('fa')
|
||||
.appendTo($('button[id^=' + verb + '-' + ident.toString() + '] i:first-child')).show();
|
||||
.appendTo($('button[id^=' + verb + '-' + ident.toString() + '] i:first-child'));
|
||||
} else {
|
||||
// show existing rotator for activity
|
||||
$('img[id^=waitfor-' + verb + '-' + ident.toString() + ']').show()
|
||||
$('img[id^=waitfor-' + verb + '-' + ident.toString() + ']')
|
||||
}
|
||||
|
||||
// do request for activity
|
||||
$.post('item/' + ident.toString() + '/activity/' + _verb)
|
||||
.success(function(data){
|
||||
//$('#like-rotator-' + ident.toString()).hide();
|
||||
$('img[id^=waitfor-' + verb + '-' + ident.toString() + ']').remove();
|
||||
if (data.status == 'ok') {
|
||||
// response from server was ok
|
||||
|
@ -816,22 +814,21 @@ function doActivityItemAction(ident, verb, un) {
|
|||
// like/dislike buttons
|
||||
$('button[id^=' + verb + '-' + ident.toString() + ']' )
|
||||
.removeClass('active')
|
||||
.attr('onclick', 'doActivityItemAction(' + ident +', "' + verb + '",false )').change();
|
||||
.attr('onclick', 'doActivityItemAction(' + ident +', "' + verb + '",false )');
|
||||
// link in share-menu
|
||||
$('a[id^=' + verb + '-' + ident.toString() + ']' )
|
||||
.removeClass('active')
|
||||
.attr('href', 'javascript:doActivityItemAction(' + ident +', "' + verb + '",false )')
|
||||
.change();
|
||||
.attr('href', 'javascript:doActivityItemAction(' + ident +', "' + verb + '",false )');
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child' ).addClass('fa-retweet').removeClass('fa-ban');
|
||||
} else {
|
||||
// like/dislike buttons
|
||||
$('button[id^=' + verb + '-' + ident.toString() + ']' )
|
||||
.addClass('active')
|
||||
.attr('onclick', 'doActivityItemAction(' + ident + ', "' + verb + '", true )').change();
|
||||
.attr('onclick', 'doActivityItemAction(' + ident + ', "' + verb + '", true )');
|
||||
// link in share-menu
|
||||
$('a[id^=' + verb + '-' + ident.toString() + ']' )
|
||||
.addClass('active')
|
||||
.attr('href', 'javascript:doActivityItemAction(' + ident + ', "' + verb + '", true )').change();
|
||||
.attr('href', 'javascript:doActivityItemAction(' + ident + ', "' + verb + '", true )');
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child' ).removeClass('fa-retweet').addClass('fa-ban');
|
||||
}
|
||||
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass).show();
|
||||
|
@ -853,12 +850,11 @@ function doActivityItemAction(ident, verb, un) {
|
|||
$('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child').addClass('fa-share');
|
||||
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$('a[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
$.jGrowl(aActErr[verb] + '<br>(' + aErrType['srvErr'] + ')', {sticky: false, theme: 'info', life: 5000});
|
||||
}
|
||||
})
|
||||
.error(function(data){
|
||||
/* Server could not be reaches successfully */
|
||||
// Server could not be reached successfully
|
||||
$('img[id^=waitfor-' + verb + '-' + ident.toString() + ']').remove();
|
||||
$('button[id^=shareMenuOptions-' + ident.toString() + '] i:first-child').addClass('fa-share');
|
||||
$('button[id^=' + verb + '-' + ident.toString() + '] i:first-child').addClass(thumbsClass);
|
||||
|
|
Loading…
Reference in a new issue