[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [owncloud] admin: fix disableing/enabling apps
From:       Robin Appelman <icewind1991 () gmail ! com>
Date:       2011-08-08 14:34:04
Message-ID: 20110808143404.2F920A60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 2f95b829340369accb8b3f38034ecd38cfdf9c52 by Robin Appelman.
Committed on 08/08/2011 at 16:33.
Pushed by rappelman into branch 'master'.

fix disableing/enabling apps

M  +1    -1    admin/templates/appsinst.php
M  +3    -4    admin/js/apps.js
M  +0    -1    admin/ajax/disableapp.php

http://commits.kde.org/owncloud/2f95b829340369accb8b3f38034ecd38cfdf9c52

diff --git a/admin/ajax/disableapp.php b/admin/ajax/disableapp.php
index dce62fa..0cf66a5 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 ee9d814..4def5ed 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 e845cb4..035a75c 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; ?>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic