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
}
+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
-$("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
<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>