aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorKamil Domanski <kdomanski@kdemail.net>2011-06-21 22:35:36 +0200
committerKamil Domanski <kdomanski@kdemail.net>2011-06-21 22:36:13 +0200
commit6a726e2488092b58d9e773f2771c4452ff337a63 (patch)
treee00622f816e2213f490d4a6549c4176d03d4d290 /admin
parente047feb2ad90c3b103c92d35f794988767b2ba21 (diff)
downloadnextcloud-server-6a726e2488092b58d9e773f2771c4452ff337a63.tar.gz
nextcloud-server-6a726e2488092b58d9e773f2771c4452ff337a63.zip
changed app enable status to buttons
Diffstat (limited to 'admin')
-rw-r--r--admin/css/apps.css9
-rw-r--r--admin/js/apps.js19
-rw-r--r--admin/templates/appsinst.php2
3 files changed, 16 insertions, 14 deletions
diff --git a/admin/css/apps.css b/admin/css/apps.css
index fbbd4fce4b5..cd427a3c536 100644
--- a/admin/css/apps.css
+++ b/admin/css/apps.css
@@ -13,16 +13,14 @@ table td.version, table td.enabled, table td.disabled
text-align: center;
}
-table td.enabled
+input[type="button"].enabled
{
color: #006600;
- font-weight: bold;
}
-table td.disabled
+input[type="button"].disabled
{
color: #660000;
- font-weight: bold;
}
.preview
@@ -65,3 +63,6 @@ table td.name a
}
+input[type="button"].appbutton { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; }
+input[type="button"]:hover.appbutton, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; }
+input[type="button"]:active.appbutton { outline:0; } \ No newline at end of file
diff --git a/admin/js/apps.js b/admin/js/apps.js
index 4d8c68171bd..ee9d814eb0b 100644
--- a/admin/js/apps.js
+++ b/admin/js/apps.js
@@ -1,17 +1,18 @@
-$("div[x-use='appenableddiv']").live( "click", function(){
+$("input[x-use='appenablebutton']").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" );
+ //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);});
}
- else if($(this).text() == "disabled"){
- $(this).html( "enabled" );
- $(this).parent().removeClass( "disabled" );
- $(this).parent().addClass( "enabled" );
+ 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);} );
}
}); \ No newline at end of file
diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php
index 482273da1df..0e97df6add8 100644
--- a/admin/templates/appsinst.php
+++ b/admin/templates/appsinst.php
@@ -20,7 +20,7 @@
<td class="name" width="200"><?php echo($app['name']); ?></td>
<td class="version"><?php echo($app['version']); ?></td>
<td><?php echo($app['author']); ?></td>
- <td class="<?php echo $app['enabled'] ? 'enabled' : 'disabled' ?>"><div x-use="appenableddiv"><?php echo $l->t( $app['enabled'] ? 'enabled' : 'disabled' ); ?></div></td>
+ <td><input x-use="appenablebutton" type='button' value='<?php echo $l->t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>' class='appbutton prettybutton <?php echo( $app['enabled'] ? 'enabled' : 'disabled' ); ?>'/></td>
</tr>
<?php endforeach; ?>
</tbody>