diff --git a/admin/ajax/disableapp.php b/admin/ajax/disableapp.php index dce62fa11d46feb17b813b9a6fe3231e2a19763b..0cf66a553f8b715a4a59fd727be195a77ae79b13 100644 --- a/admin/ajax/disableapp.php +++ b/admin/ajax/disableapp.php @@ -1,5 +1,4 @@ <?php - // Init owncloud require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); diff --git a/admin/js/apps.js b/admin/js/apps.js index ee9d814eb0bcc51aaaa7b3af629542f219fade43..4def5ed5553aae28f111e8f77a788fa69efb2213 100644 --- a/admin/js/apps.js +++ b/admin/js/apps.js @@ -1,18 +1,17 @@ $("input[x-use='appenablebutton']").live( "click", function(){ - appid = $(this).parent().parent().attr("x-uid"); + appid = $(this).parent().data("uid"); //alert("dsfsdfsdf"); if($(this).val() == "enabled"){ $(this).attr("value","disabled"); $(this).removeClass( "enabled" ); $(this).addClass( "disabled" ); - //$.post( "ajax/disableapp.php", $(appid).serialize(), function(data){} ); - $.post( "ajax/disableapp.php", { appid: appid }, function(data){ alert(data.status);}); + $.post( "ajax/disableapp.php", 'appid='+appid); } else if($(this).val() == "disabled"){ $(this).attr("value","enabled"); $(this).removeClass( "disabled" ); $(this).addClass( "enabled" ); - $.post( "ajax/enableapp.php", { appid: appid }, function(data){ alert(data.status);} ); + $.post( "ajax/enableapp.php", 'appid='+appid); } }); \ No newline at end of file diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php index e845cb451fd3be5285e9bc0b5a0fa0161a4a74b7..035a75c9e8d997fb1bad3986ad0268fc9ecd534b 100644 --- a/admin/templates/appsinst.php +++ b/admin/templates/appsinst.php @@ -1,6 +1,6 @@ <ul id="apps"> <?php foreach($_["apps"] as $app): ?> - <li x-uid="<?php echo($app['id']); ?>"><strong><?php echo($app['name']); ?></strong> <?php echo($app['version']); ?> <em>by <?php echo($app['author']); ?></em> + <li data-uid="<?php echo($app['id']); ?>"><strong><?php echo($app['name']); ?></strong> <?php echo($app['version']); ?> <em>by <?php echo($app['author']); ?></em> <input x-use="appenablebutton" type="submit" value="<?php echo $l->t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>" class="appbutton <?php echo( $app['enabled'] ? 'enabled' : 'disabled' ); ?>" /> </li> <?php endforeach; ?>