Project

General

Profile

« Previous | Next » 

Revision 52e91f70

Added by Pi Ba over 7 years ago

webgui, option to disable dragging of rules

View differences:

src/usr/local/www/firewall_nat.php
491 491

  
492 492
events.push(function() {
493 493

  
494
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
494 495
	// Make rules sortable
495 496
	$('table tbody.user-entries').sortable({
496 497
		cursor: 'grabbing',
......
501 502
			dirty = true;
502 503
		}
503 504
	});
505
<?php endif; ?>
504 506

  
505 507
	// Check all of the rule checkboxes so that their values are posted
506 508
	$('#order-store').click(function () {
src/usr/local/www/firewall_nat_1to1.php
271 271
//<![CDATA[
272 272
events.push(function() {
273 273

  
274
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
274 275
	// Make rules sortable
275 276
	$('table tbody.user-entries').sortable({
276 277
		cursor: 'grabbing',
......
279 280
			dirty = true;
280 281
		}
281 282
	});
283
<?php endif; ?>
282 284

  
283 285
	// Check all of the rule checkboxes so that their values are posted
284 286
	$('#order-store').click(function () {
src/usr/local/www/firewall_nat_npt.php
241 241
<script type="text/javascript">
242 242
//<![CDATA[
243 243
events.push(function() {
244

  
245
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
244 246
	// Make rules draggable/sortable
245 247
	$('table tbody.user-entries').sortable({
246 248
		cursor: 'grabbing',
......
249 251
			dirty = true;
250 252
		}
251 253
	});
254
<?php endif; ?>
252 255

  
253 256
	// Check all of the rule checkboxes so that their values are posted
254 257
	$('#order-store').click(function () {
src/usr/local/www/firewall_nat_out.php
656 656
//<![CDATA[
657 657
events.push(function() {
658 658

  
659
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
659 660
	// Make rules sortable
660 661
	$('table tbody.user-entries').sortable({
661 662
		cursor: 'grabbing',
......
664 665
			dirty = true;
665 666
		}
666 667
	});
668
<?php endif; ?>
667 669

  
668 670
	// Check all of the rule checkboxes so that their values are posted
669 671
	$('#order-store').click(function () {
src/usr/local/www/firewall_rules.php
954 954
		$(this).removeClass().addClass("fa fa-anchor");
955 955
	});
956 956

  
957
<?php if(!isset($config['system']['webgui']['roworderdragging'])): ?>
957 958
	// Make rules sortable. Hiding the table before applying sortable, then showing it again is
958 959
	// a work-around for very slow sorting on FireFox
959 960
	$('table tbody.user-entries').hide();
......
971 972
	});
972 973

  
973 974
	$('table tbody.user-entries').show();
975
<?php endif; ?>
974 976

  
975 977
	// Check all of the rule checkboxes so that their values are posted
976 978
	$('#order-store').click(function () {
src/usr/local/www/system.php
78 78
$pconfig['webguihostnamemenu'] = $config['system']['webgui']['webguihostnamemenu'];
79 79
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
80 80
//$pconfig['dashboardperiod'] = isset($config['widgets']['period']) ? $config['widgets']['period']:"10";
81
$pconfig['roworderdragging'] = isset($config['system']['webgui']['roworderdragging']);
81 82
$pconfig['loginshowhost'] = isset($config['system']['webgui']['loginshowhost']);
82 83
$pconfig['requirestatefilter'] = isset($config['system']['webgui']['requirestatefilter']);
83 84

  
......
168 169
	} else {
169 170
		unset($config['system']['webgui']['webguicss']);
170 171
	}
172
	
173
	$config['system']['webgui']['roworderdragging'] = $_POST['roworderdragging'] ? true:false;
171 174

  
172 175
	if ($_POST['logincss']) {
173 176
		$config['system']['webgui']['logincss'] = $_POST['logincss'];
......
606 609
gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
607 610
gen_disablealiaspopupdetail_field($section, $pconfig['disablealiaspopupdetail']);
608 611

  
612
$section->addInput(new Form_Checkbox(
613
	'roworderdragging',
614
	'Disable dragging',
615
	'Disable dragging of firewall/nat rules.',
616
	$pconfig['roworderdragging']
617
))->setHelp('Disables dragging rows to allow selecting and copying row contents and avoid accidental changes.');
618

  
609 619
$section->addInput(new Form_Select(
610 620
	'logincss',
611 621
	'Login page color',

Also available in: Unified diff