🚧 show refresh button
This commit is contained in:
@@ -476,6 +476,11 @@ $(window).on("load", function() {
|
|||||||
|
|
||||||
// --- INICIALIZAR EL RESIZE MANUAL ---
|
// --- INICIALIZAR EL RESIZE MANUAL ---
|
||||||
initSimpleResize();
|
initSimpleResize();
|
||||||
|
|
||||||
|
// --- VISIBILIDAD CONTROLES REFRESH ---
|
||||||
|
if (localStorage.getItem('bastille_show_refresh_button') === 'true') {
|
||||||
|
$("#refresh-controls").show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function disableactionbuttons(ab_disable) {
|
function disableactionbuttons(ab_disable) {
|
||||||
@@ -685,7 +690,7 @@ $document->render();
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div style="text-align: right;">
|
<div id="refresh-controls" style="text-align: right; display: none;">
|
||||||
<span id="refresh-status" style="font-style: italic; margin-right: 15px; color: #666;">Last update: just now</span>
|
<span id="refresh-status" style="font-style: italic; margin-right: 15px; color: #666;">Last update: just now</span>
|
||||||
<button type="button" id="refresh-now" class="formbtn">Refresh</button>
|
<button type="button" id="refresh-now" class="formbtn">Refresh</button>
|
||||||
<select id="refresh-interval" class="formfld">
|
<select id="refresh-interval" class="formfld">
|
||||||
|
|||||||
@@ -306,6 +306,23 @@ $(document).ready(function(){
|
|||||||
$('#getinfo_bastille').html(data.bastille);
|
$('#getinfo_bastille').html(data.bastille);
|
||||||
$('#getinfo_ext').html(data.ext);
|
$('#getinfo_ext').html(data.ext);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// --- LOGICA DEL CHECKBOX REFRESH (LocalStorage) ---
|
||||||
|
var $chk = $("#show_refresh_button");
|
||||||
|
|
||||||
|
// 1. Leer estado inicial desde LocalStorage
|
||||||
|
var savedState = localStorage.getItem('bastille_show_refresh_button');
|
||||||
|
if (savedState === 'true') {
|
||||||
|
$chk.prop('checked', true);
|
||||||
|
} else {
|
||||||
|
$chk.prop('checked', false); // Por defecto deshabilitado
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Guardar cambios al hacer click
|
||||||
|
$chk.change(function() {
|
||||||
|
var isChecked = $(this).is(':checked');
|
||||||
|
localStorage.setItem('bastille_show_refresh_button', isChecked);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
@@ -376,6 +393,9 @@ $(document).ready(function(){
|
|||||||
<?php html_titleline(gtext("Uninstall"));?>
|
<?php html_titleline(gtext("Uninstall"));?>
|
||||||
<?php html_checkbox2('delete_confirm',gtext('Uninstall confirm'),'' ? true : false,gtext('Check to confirm extension uninstall. Note: Jail related content will be preserved by default.'),'',false);?>
|
<?php html_checkbox2('delete_confirm',gtext('Uninstall confirm'),'' ? true : false,gtext('Check to confirm extension uninstall. Note: Jail related content will be preserved by default.'),'',false);?>
|
||||||
<?php html_separator();?>
|
<?php html_separator();?>
|
||||||
|
<?php html_titleline(gtext("Refresh"));?>
|
||||||
|
<?php html_checkbox2('show_refresh_button',gtext('Show refresh button'),'' ? true : false,gtext('This will display a refresh button in the containers tab.'),'',false);?>
|
||||||
|
<?php html_separator();?>
|
||||||
</table>
|
</table>
|
||||||
<div id="submit1">
|
<div id="submit1">
|
||||||
<input name="uninstall" type="submit" class="formbtn" title="<?=gtext("Uninstall Extension");?>" value="<?=gtext("Uninstall");?>" onclick="return confirm('<?=gtext("Bastille Extension and packages will be completely removed, Bastille containers and child directories will not be touched, really to proceed?");?>')" />
|
<input name="uninstall" type="submit" class="formbtn" title="<?=gtext("Uninstall Extension");?>" value="<?=gtext("Uninstall");?>" onclick="return confirm('<?=gtext("Bastille Extension and packages will be completely removed, Bastille containers and child directories will not be touched, really to proceed?");?>')" />
|
||||||
|
|||||||
Reference in New Issue
Block a user