Project

General

Profile

« Previous | Next » 

Revision 1d770fc7

Added by Stephen Beaver almost 10 years ago

Partial fix for #5181
P2 entries now drag/dropable

View differences:

src/usr/local/www/vpn_ipsec.php
305 305
						<th></th>
306 306
					</tr>
307 307
				</thead>
308
				<tbody>
308
				<tbody class="p1-entries">
309 309
<?php $i = 0; foreach ($a_phase1 as $ph1ent): ?>
310 310
<?php
311 311
	$iconfn = "pass";
......
390 390
						</td>
391 391
						<td>
392 392
					<?php // TODO: add mouseover behaviour which indicates insert position when moving ?>
393
					<button class="btn btn-xs btn-default" type="submit" name="move_<?=$i?>" value="move_<?=$i?>"><?=gettext("move selected entries before this")?></button>
393
					<button class="btn btn-xs btn-default" type="submit" name="move_<?=$i?>" value="move_<?=$i?>"><?=gettext("Move checked entries to here")?></button>
394 394
							<a class="btn btn-xs btn-primary" href="vpn_ipsec_phase1.php?p1index=<?=$i?>" title="<?=gettext("edit phase1 entry"); ?>">edit</a>
395 395
							<button class="btn btn-xs btn-danger" type="submit" name="del_<?=$i?>" value="del_<?=$i?>" title="<?=gettext('delete phase1 entry'); ?>">delete</button>
396 396
		<?php if (!isset($ph1ent['mobile'])): ?>
......
437 437
									<th>&nbsp;</th>
438 438
								</tr>
439 439
							</thead>
440
							<tbody>
440
							<tbody class="p2-entries">
441 441
<?php $j = 0; foreach ($a_phase2 as $ph2index => $ph2ent): ?>
442 442
<?php
443 443
						if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
......
504 504
									</td>
505 505
									<td>
506 506
										<?php // TODO: add mouseover behaviour which indicates insert position when moving ?>
507
										<button class="btn btn-xs btn-default" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>"><?=gettext("move selected entries before this")?></button>
507
										<button class="btn btn-xs btn-default" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>"><?=gettext("Move checked P2s here")?></button>
508 508
										<a class="btn btn-xs btn-primary" href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>" title="<?=gettext("edit phase2 entry"); ?>">edit</a>
509 509
										<button class="btn btn-xs btn-danger" type="submit" name="delp2_<?=$ph2index?>" value="delp2_<?=$ph2index?>" title="<?=gettext('delete phase2 entry'); ?>">delete</button>
510 510
										<a class="btn btn-xs btn-success" href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']?>" title="<?=gettext("add a new Phase 2 based on this one"); ?>">copy</a>
......
582 582
	var visible = id + '-visible';
583 583
	document.getElementById(visible).value = "1";
584 584
}
585

  
586
events.push(function() {
587
	// Make rules sortable
588
	$('table tbody.p2-entries').sortable({
589
		cursor: 'grabbing',
590
		update: function(event, ui) {
591
			$('#order-store').removeAttr('disabled');
592
		}
593
	});
594
});
585 595
//]]>
586 596
</script>

Also available in: Unified diff