From 9e93042302e8185bdb3abff57ba6447e07d369f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Sat, 18 Sep 2010 15:34:06 +0000 Subject: [PATCH] Add style dragHandle --- htdocs/core/tpl/ajaxrow.tpl.php | 15 +++++++++++---- htdocs/core/tpl/freeproductline_view.tpl.php | 2 +- .../core/tpl/predefinedproductline_view.tpl.php | 2 +- htdocs/theme/auguria/style.css.php | 3 +++ htdocs/theme/eldy/style.css.php | 4 +++- htdocs/theme/freelug/style.css.php | 3 +++ htdocs/theme/yellow/style.css.php | 3 +++ 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 852452eb267..f0b75716a60 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -18,20 +18,27 @@ * $Id$ */ ?> - + <!-- BEGIN PHP TEMPLATE --> <script> jQuery(document).ready(function(){ - jQuery(".imgup").hide(); - jQuery(".imgdown").hide(); +/* jQuery(".imgup").hide(); */ +/* jQuery(".imgdown").hide(); */ + jQuery(".lineupdown").removeAttr('href'); jQuery("#objectline").tableDnD({ onDrop: function(table, row) { var roworder = cleanSerialize(jQuery("#objectline").tableDnDSerialize()); var element = "<?php echo $object->table_element_line; ?>"; jQuery.get("<?php echo DOL_URL_ROOT; ?>/core/ajaxrow.php?roworder="+roworder+"&element="+element); - } + }, + dragHandle: "tdlineupdown" }); + jQuery(".tdlineupdown").hover(function() { + jQuery(this).addClass('showDragHandle'); + }, function() { + jQuery(this).removeClass('showDragHandle'); + }); }); </script> diff --git a/htdocs/core/tpl/freeproductline_view.tpl.php b/htdocs/core/tpl/freeproductline_view.tpl.php index ec68342c872..b1b44ffe06b 100644 --- a/htdocs/core/tpl/freeproductline_view.tpl.php +++ b/htdocs/core/tpl/freeproductline_view.tpl.php @@ -87,7 +87,7 @@ </td> <?php if ($num > 1) { ?> - <td align="center"> + <td align="center" class="tdlineupdown"> <?php if ($i > 0) { ?> <a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>"> <?php echo img_up(); ?> diff --git a/htdocs/core/tpl/predefinedproductline_view.tpl.php b/htdocs/core/tpl/predefinedproductline_view.tpl.php index 6494a43ccb5..009b0d1b129 100644 --- a/htdocs/core/tpl/predefinedproductline_view.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_view.tpl.php @@ -76,7 +76,7 @@ </td> <?php if ($num > 1) { ?> - <td align="center"> + <td align="center" class="tdlineupdown"> <?php if ($i > 0) { ?> <a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>"> <?php echo img_up(); ?> diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 42fa190ff17..cdfb366355e 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -151,6 +151,9 @@ form { padding: 0em 0em 0em 0em; margin: 0em 0em 0em 0em; } +.showDragHandle { + cursor: move; +} /* ============================================================================== */ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f7d58e916a6..343591b843f 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -154,7 +154,9 @@ form { padding: 0em 0em 0em 0em; margin: 0em 0em 0em 0em; } - +.showDragHandle { + cursor: move; +} /* ============================================================================== */ /* Styles de positionnement des zones */ diff --git a/htdocs/theme/freelug/style.css.php b/htdocs/theme/freelug/style.css.php index 78e63f2b231..2dd09391b0a 100644 --- a/htdocs/theme/freelug/style.css.php +++ b/htdocs/theme/freelug/style.css.php @@ -153,6 +153,9 @@ form padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; } +.showDragHandle { + cursor: move; +} /* ============================================================================== */ diff --git a/htdocs/theme/yellow/style.css.php b/htdocs/theme/yellow/style.css.php index 9c4a08c2d23..cc8c628f2b0 100644 --- a/htdocs/theme/yellow/style.css.php +++ b/htdocs/theme/yellow/style.css.php @@ -141,6 +141,9 @@ form padding: 0em 0em 0em 0em; margin: 0em 0em 0em 0em; } +.showDragHandle { + cursor: move; +} /* ============================================================================== */ -- GitLab