1
1
Fork 0

make indentation as tabs

This commit is contained in:
Jakobus Schürz 2023-03-09 14:55:43 +01:00
parent 4244670f1c
commit a1b9f27545

View file

@ -769,45 +769,44 @@ function doActivityItemAction(ident, verb, un) {
$.post('item/' + ident.toString() + '/activity/' + _verb) $.post('item/' + ident.toString() + '/activity/' + _verb)
.success( .success(
function(data){ function(data){
if (data.status == "ok") { if (data.status == "ok") {
$('#like-rotator-' + ident.toString()).hide(); $('#like-rotator-' + ident.toString()).hide();
if (verb.indexOf("announce") === 0 ) { if (verb.indexOf("announce") === 0 ) {
if (data.verb == "un" + verb) { if (data.verb == "un" + verb) {
$("button[id^=shareMenuOptions-" + ident.toString() + "]" ) $("button[id^=shareMenuOptions-" + ident.toString() + "]" )
.removeClass("active") .removeClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change();
$("button[id^=" + verb + "-" + ident.toString() + "]" ) $("button[id^=" + verb + "-" + ident.toString() + "]" )
.removeClass("active") .removeClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change();
} else { } else {
$("button[id^=shareMenuOptions-" + ident.toString() + "]" ) $("button[id^=shareMenuOptions-" + ident.toString() + "]" )
.addClass("active") .addClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change();
$("button[id^=" + verb + "-" + ident.toString() + "]" ) $("button[id^=" + verb + "-" + ident.toString() + "]" )
.addClass("active") .addClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change();
} }
} else { } else {
if (data.verb == "un" + verb) { if (data.verb == "un" + verb) {
$("button[id^=" + verb + "-" + ident.toString() + "]" ) $("button[id^=" + verb + "-" + ident.toString() + "]" )
.removeClass("active") .removeClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + false + ")").change();
} else { } else {
$("button[id^=" + verb + "-" + ident.toString() + "]" ) $("button[id^=" + verb + "-" + ident.toString() + "]" )
.addClass("active") .addClass("active")
.attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change(); .attr("onclick", "doActivityItemAction(" + ident +", '" + verb + "', " + true + ")").change();
} }
// $("button[id^=" + verb + "-" + ident.toString() + "]" ).button('refresh'); // $("button[id^=" + verb + "-" + ident.toString() + "]" ).button('refresh');
} }
} else { } else {
$.jGrowl("No connection to host for " + verb, {sticky: false, theme: 'info', life: 5000}); $.jGrowl("No connection to host for " + verb, {sticky: false, theme: 'info', life: 5000});
} }
}) })
.error( .error(
function(data){ function(data){
$.jGrowl("Activity " + verb + "unsuccessful", {sticky: false, theme: 'info', life: 5000}); $.jGrowl("Activity " + verb + "unsuccessful", {sticky: false, theme: 'info', life: 5000});
}); });
} }
// Decodes a hexadecimally encoded binary string // Decodes a hexadecimally encoded binary string