changed app enable status to buttons
This commit is contained in:
parent
e047feb2ad
commit
6a726e2488
|
@ -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; }
|
|
@ -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);} );
|
||||
}
|
||||
});
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue