diff --git a/.gitignore b/.gitignore index 111c201670d..33cde11b9c4 100755 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ default.properties dolibarr_install.log doxygen_warnings.log /.project +.DS_Store diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index eb9c16a3088..639bd5ca5ca 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -50,6 +50,12 @@ if((isset($_GET['field']) && ! empty($_GET['field'])) $fk_element = GETPOST('fk_element'); $type = GETPOST('type'); + if (preg_match('/^([^_]+)_([^_]+)/i',$element,$regs)) + { + $element = $regs[1]; + $subelement = $regs[2]; + } + if ($element == 'fichinter') $element = 'ficheinter'; if ($user->rights->$element->lire || $user->rights->$element->read) diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 097266bcc88..3f4c3d07560 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -56,6 +56,12 @@ if((isset($_POST['field']) && ! empty($_POST['field'])) $return=array(); $error=0; + if (preg_match('/^([^_]+)_([^_]+)/i',$element,$regs)) + { + $element = $regs[1]; + $subelement = $regs[2]; + } + if ($element == 'fichinter') $element = 'ficheinter'; if ($user->rights->$element->creer || $user->rights->$element->write) diff --git a/htdocs/core/js/editinplace.js b/htdocs/core/js/editinplace.js index 5ff7ca6cd25..c3ee9146565 100644 --- a/htdocs/core/js/editinplace.js +++ b/htdocs/core/js/editinplace.js @@ -7,9 +7,9 @@ $(document).ready(function() { - var element = $('#element').html(); - var table_element = $('#table_element').html(); - var fk_element = $('#fk_element').html(); + var element = $('#jeditable_element').html(); + var table_element = $('#jeditable_table_element').html(); + var fk_element = $('#jeditable_fk_element').html(); $('.edit_textarea').editable(urlSaveInPlace, { type : 'textarea', @@ -131,7 +131,7 @@ $(document).ready(function() { id : 'field', onblur : 'ignore', tooltip : tooltipInPlace, - placeholder : placeholderInPlace, + placeholder : ' ', cancel : cancelInPlace, submit : submitInPlace, indicator : indicatorInPlace, diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3ec4c3933a1..f86d3494132 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -594,9 +594,9 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p // Parameters for edit in place if (! empty($GLOBALS['object'])) { - $out.=''."\n"; - $out.=''."\n"; - $out.=''."\n"; + $out.=''."\n"; + $out.=''."\n"; + $out.=''."\n"; } return $out;