Merge pull request #3759 from PiBa-NL/20170618-option-disable-dragging

This commit is contained in:
Steve Beaver 2017-11-29 19:00:57 -05:00
commit dcf0318a9a
6 changed files with 21 additions and 0 deletions

View File

@ -491,6 +491,7 @@ dirty = false;
events.push(function() {
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
// Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
@ -501,6 +502,7 @@ events.push(function() {
dirty = true;
}
});
<?php endif; ?>
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {

View File

@ -271,6 +271,7 @@ display_top_tabs($tab_array);
//<![CDATA[
events.push(function() {
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
// Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
@ -279,6 +280,7 @@ events.push(function() {
dirty = true;
}
});
<?php endif; ?>
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {

View File

@ -241,6 +241,8 @@ endforeach;
<script type="text/javascript">
//<![CDATA[
events.push(function() {
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
// Make rules draggable/sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
@ -249,6 +251,7 @@ events.push(function() {
dirty = true;
}
});
<?php endif; ?>
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {

View File

@ -656,6 +656,7 @@ endif;
//<![CDATA[
events.push(function() {
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
// Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
@ -664,6 +665,7 @@ events.push(function() {
dirty = true;
}
});
<?php endif; ?>
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {

View File

@ -954,6 +954,7 @@ events.push(function() {
$(this).removeClass().addClass("fa fa-anchor");
});
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
// Make rules sortable. Hiding the table before applying sortable, then showing it again is
// a work-around for very slow sorting on FireFox
$('table tbody.user-entries').hide();
@ -971,6 +972,7 @@ events.push(function() {
});
$('table tbody.user-entries').show();
<?php endif; ?>
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {

View File

@ -78,6 +78,7 @@ $pconfig['statusmonitoringsettingspanel'] = isset($config['system']['webgui']['s
$pconfig['webguihostnamemenu'] = $config['system']['webgui']['webguihostnamemenu'];
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
//$pconfig['dashboardperiod'] = isset($config['widgets']['period']) ? $config['widgets']['period']:"10";
$pconfig['roworderdragging'] = isset($config['system']['webgui']['roworderdragging']);
$pconfig['loginshowhost'] = isset($config['system']['webgui']['loginshowhost']);
$pconfig['requirestatefilter'] = isset($config['system']['webgui']['requirestatefilter']);
@ -168,6 +169,8 @@ if ($_POST) {
} else {
unset($config['system']['webgui']['webguicss']);
}
$config['system']['webgui']['roworderdragging'] = $_POST['roworderdragging'] ? true:false;
if ($_POST['logincss']) {
$config['system']['webgui']['logincss'] = $_POST['logincss'];
@ -606,6 +609,13 @@ gen_requirestatefilter_field($section, $pconfig['requirestatefilter']);
gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
gen_disablealiaspopupdetail_field($section, $pconfig['disablealiaspopupdetail']);
$section->addInput(new Form_Checkbox(
'roworderdragging',
'Disable dragging',
'Disable dragging of firewall/nat rules.',
$pconfig['roworderdragging']
))->setHelp('Disables dragging rows to allow selecting and copying row contents and avoid accidental changes.');
$section->addInput(new Form_Select(
'logincss',
'Login page color',