Test: reorder lines with jquery

This commit is contained in:
Regis Houssin 2010-09-13 19:00:49 +00:00
parent f116c45725
commit 8cc8717b39
3 changed files with 22 additions and 3 deletions

View File

@ -1367,16 +1367,27 @@ if ($id > 0 || ! empty($ref))
/*
* Lines
*/
print '<table class="noborder" width="100%">';
$result = $propal->getLinesArray();
if (!empty($propal->lines))
{
print '<table class="noborder" width="100%">';
$propal->print_title_list();
print '</table>';
print '<script>
jQuery(document).ready(function(){
jQuery("#sortable").sortable();
jQuery("#sortable").disableSelection();
});
</script>';
print '<div id="sortable">';
$propal->printLinesList();
print '</div>';
}
print '<table class="noborder" width="100%">';
/*
* Form to add new line

View File

@ -21,6 +21,8 @@
<!-- BEGIN PHP TEMPLATE freeproductline_view.tpl.php -->
<div>
<table class="noborder" width="100%">
<tr <?php echo $bc[$var]; ?>>
<td><a name="<?php echo $line->rowid; ?>"></a>
<?php if (($line->info_bits & 2) == 2) { ?>
@ -101,5 +103,7 @@
<?php } ?>
</tr>
</table>
</div>
<!-- END PHP TEMPLATE freeproductline_view.tpl.php -->

View File

@ -21,6 +21,8 @@
<!-- BEGIN PHP TEMPLATE predefinedproductline_view.tpl.php -->
<div>
<table class="noborder" width="100%">
<tr <?php echo $bc[$var]; ?>>
<td>
<a name="<?php echo $line->id; ?>"></a>
@ -94,5 +96,7 @@
<?php } ?>
</tr>
</table>
</div>
<!-- END PHP TEMPLATE predefinedproductline_view.tpl.php -->