2011-06-22 00:35:36 +04:00
|
|
|
$("input[x-use='appenablebutton']").live( "click", function(){
|
2011-06-20 21:21:42 +04:00
|
|
|
appid = $(this).parent().parent().attr("x-uid");
|
|
|
|
|
2011-06-22 00:35:36 +04:00
|
|
|
//alert("dsfsdfsdf");
|
|
|
|
if($(this).val() == "enabled"){
|
|
|
|
$(this).attr("value","disabled");
|
|
|
|
$(this).removeClass( "enabled" );
|
|
|
|
$(this).addClass( "disabled" );
|
2011-06-20 21:21:42 +04:00
|
|
|
//$.post( "ajax/disableapp.php", $(appid).serialize(), function(data){} );
|
|
|
|
$.post( "ajax/disableapp.php", { appid: appid }, function(data){ alert(data.status);});
|
|
|
|
}
|
2011-06-22 00:35:36 +04:00
|
|
|
else if($(this).val() == "disabled"){
|
|
|
|
$(this).attr("value","enabled");
|
|
|
|
$(this).removeClass( "disabled" );
|
|
|
|
$(this).addClass( "enabled" );
|
2011-06-20 21:21:42 +04:00
|
|
|
$.post( "ajax/enableapp.php", { appid: appid }, function(data){ alert(data.status);} );
|
|
|
|
}
|
|
|
|
});
|