Project

General

Profile

« Previous | Next » 

Revision 6dc83d52

Added by Scott Ullrich almost 15 years ago

Show a loading ajax widget when the page is refreshing the order

View differences:

usr/local/www/firewall_rules.php
122 122
	$config['filter']['rule'] = $a_filter_order;
123 123
	foreach($a_filter_unorder as $aa) 
124 124
		$config['filter']['rule'][] = $aa;
125
	// Identifty what changed
126
	for ($i = 0; $i<count($drag_order); $i++) {
127
		if(array_diff($a_filter_order[$i], $a_filter_order_tmp[$i])) 
128
			$changed_item[] = $i;
129
	}
130 125
	// Write configuration
131 126
	$config = write_config("Drag and drop firewall rules ordering update.");
132 127
	// Redirect back to page
......
285 280
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
286 281
<?php include("fbegin.inc"); ?>
287 282
<form action="firewall_rules.php" method="post">
283

  
288 284
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
289 285
</script>
290 286
<?php if ($savemsg) print_info_box($savemsg); ?>
291 287
<?php if (is_subsystem_dirty('filter')): ?><p>
292 288
<?php print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
293 289
<?php endif; ?>
290
<div id="loading">
291
	<img src="/themes/<?=$g['theme']?>/images/misc/loader.gif"> Loading, please wait...
292
	<p/>&nbsp;
293
</div>
294 294
<table width="100%" border="0" cellpadding="0" cellspacing="0">
295 295
  <tr><td class="tabnavtbl">
296 296
  <?php
......
768 768
	});
769 769
<?php endfor; ?>
770 770
	function updateOrder(order) {
771
		if(document.getElementById("redboxtable"))
772
			$('redboxtable').hide();
773
		$('loading').show();
771 774
		document.body.style.cursor = 'wait';
772 775
		document.location = 'firewall_rules.php?if=<?=$if?>&dragdroporder=true&' + Sortable.serialize('dragtable', 'tr');
773 776
		return;
774 777
	}
778
	$('loading').hide();
775 779
  </script>
776 780
</form>
777 781
<?php include("fend.inc"); ?>

Also available in: Unified diff