diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index d4c17b3c13b..2c0ac3da05c 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -362,7 +362,8 @@ else if ($id)
print '';
// Km/Price
- print '
| '.$langs->trans("FeesKilometersOrAmout").' | '.$object->km.' |
';
+ print '| '.$langs->trans("FeesKilometersOrAmout").' | ';
+ print ''.$object->km.' |
';
// Where
print '| '.$langs->trans("CompanyVisited").' | ';
diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php
index 5e0ff2b6b42..3f620a1778c 100644
--- a/htdocs/core/ajax/saveinplace.php
+++ b/htdocs/core/ajax/saveinplace.php
@@ -25,7 +25,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
-if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
+//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
require('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/class/genericobject.class.php");
@@ -46,6 +46,13 @@ if((isset($_POST['field']) && ! empty($_POST['field'])) && (isset($_POST['table_
// Clean parameters
$value = trim($_POST['value']);
+ if ($_POST['type'] == 'numeric')
+ {
+ $value = price2num($value);
+
+ // Check parameters
+ if (! is_numeric($value)) $value = 0;
+ }
$ret=$object->setValueFrom($_POST['table_element'], $_POST['fk_element'], $_POST['field'], $value);
if ($ret > 0) echo (! empty($value) ? dol_nl2br($value) : ' ');
diff --git a/htdocs/core/tpl/ajaxeditinplace.tpl.php b/htdocs/core/tpl/ajaxeditinplace.tpl.php
index 89c8ff27fe2..9b55edaaa6d 100644
--- a/htdocs/core/tpl/ajaxeditinplace.tpl.php
+++ b/htdocs/core/tpl/ajaxeditinplace.tpl.php
@@ -30,11 +30,51 @@ $(document).ready(function() {
submit : 'trans('Ok'); ?>',
indicator : '
theme."/img/working.gif"; ?>">',
loadurl : '',
- loaddata : {
+ loaddata : {
+ type: 'textarea',
table_element: "table_element; ?>",
fk_element: "id; ?>"
},
- submitdata : {
+ submitdata : {
+ type: 'textarea',
+ table_element: "table_element; ?>",
+ fk_element: "id; ?>"
+ }
+ });
+ $('.edit_text').editable('', {
+ type : 'text',
+ id : 'field',
+ tooltip : 'trans('ClickToEdit'); ?>',
+ cancel : 'trans('Cancel'); ?>',
+ submit : 'trans('Ok'); ?>',
+ indicator : '
theme."/img/working.gif"; ?>">',
+ loadurl : '',
+ loaddata : {
+ type: 'text',
+ table_element: "table_element; ?>",
+ fk_element: "id; ?>"
+ },
+ submitdata : {
+ type: 'text',
+ table_element: "table_element; ?>",
+ fk_element: "id; ?>"
+ }
+ });
+ $('.edit_numeric').editable('', {
+ type : 'text',
+ id : 'field',
+ tooltip : 'trans('ClickToEdit'); ?>',
+ cancel : 'trans('Cancel'); ?>',
+ submit : 'trans('Ok'); ?>',
+ indicator : '
theme."/img/working.gif"; ?>">',
+ loadurl : '',
+ loaddata : {
+ type: 'numeric',
+ table_element: "table_element; ?>",
+ fk_element: "id; ?>"
+ },
+ submitdata : {
+ type: 'numeric',
table_element: "table_element; ?>",
fk_element: "id; ?>"
}
diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php
index 2951fdcfecb..9295cc69887 100644
--- a/htdocs/theme/auguria/style.css.php
+++ b/htdocs/theme/auguria/style.css.php
@@ -1657,7 +1657,7 @@ table.cal_event td { border: 0px; padding-: 0px; padding-
/* jQuery - jeditable */
/* ============================================================================== */
-.edit_area:hover {
+.edit_area:hover, .edit_text:hover, .edit_numeric:hover {
background: white url() right center no-repeat;
cursor: pointer;
}
diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php
index a4eea5e32b6..e2f23269f12 100644
--- a/htdocs/theme/bureau2crea/style.css.php
+++ b/htdocs/theme/bureau2crea/style.css.php
@@ -1863,7 +1863,7 @@ table.cal_event td { border: 0px; padding-: 0px; padding-
/* jQuery - jeditable */
/* ============================================================================== */
-.edit_area:hover {
+.edit_area:hover, .edit_text:hover, .edit_numeric:hover {
background: white url() right center no-repeat;
cursor: pointer;
}
diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php
index 9b0f897cfa6..4162be90a4f 100644
--- a/htdocs/theme/cameleo/style.css.php
+++ b/htdocs/theme/cameleo/style.css.php
@@ -1813,7 +1813,7 @@ table.cal_event td { border: 0px; padding-: 0px; padding-
/* jQuery - jeditable */
/* ============================================================================== */
-.edit_area:hover {
+.edit_area:hover, .edit_text:hover, .edit_numeric:hover {
background: white url() right center no-repeat;
cursor: pointer;
}
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 8c98d4b3218..fe833d978cb 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -1713,8 +1713,8 @@ table.cal_event td { border: 0px; padding-: 0px; padding-
/* jQuery - jeditable */
/* ============================================================================== */
-.edit_area:hover {
- background: white url() right center no-repeat;
+.edit_area:hover, .edit_text:hover, .edit_numeric:hover {
+ background: white url() right top no-repeat;
cursor: pointer;
}