diff options
Diffstat (limited to 'admin/js/apps.js')
-rw-r--r-- | admin/js/apps.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/admin/js/apps.js b/admin/js/apps.js new file mode 100644 index 00000000000..4d8c68171bd --- /dev/null +++ b/admin/js/apps.js @@ -0,0 +1,17 @@ +$("div[x-use='appenableddiv']").live( "click", function(){ + appid = $(this).parent().parent().attr("x-uid"); + + if($(this).text() == "enabled"){ + $(this).html( "disabled" ); + $(this).parent().removeClass( "enabled" ); + $(this).parent().addClass( "disabled" ); + //$.post( "ajax/disableapp.php", $(appid).serialize(), function(data){} ); + $.post( "ajax/disableapp.php", { appid: appid }, function(data){ alert(data.status);}); + } + else if($(this).text() == "disabled"){ + $(this).html( "enabled" ); + $(this).parent().removeClass( "disabled" ); + $(this).parent().addClass( "enabled" ); + $.post( "ajax/enableapp.php", { appid: appid }, function(data){ alert(data.status);} ); + } +});
\ No newline at end of file |