diff --git a/admin/css/apps.css b/admin/css/apps.css index fbbd4fce4b5f68ae90884956ef41eaff064d21c7..cd427a3c536128e5abc7916fb05e04f5536c2990 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 4d8c68171bdd26901cabed1abe3fa44e2ce0c589..ee9d814eb0bcc51aaaa7b3af629542f219fade43 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 482273da1df6ae526d2a44e52b588930a9e8e375..0e97df6add811b51c086dc663dbb289a1d16ff00 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>