diff --git a/html/style-classic.css b/html/style-classic.css index e1c7c4150..2c7497bdd 100644 --- a/html/style-classic.css +++ b/html/style-classic.css @@ -2247,4 +2247,18 @@ td.selectedmenu { background-color: #5D90CD; padding: 3px 20px 3px 20px; margin-top:20px; +} +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: underline; + cursor: pointer; +} +span.inplace_edit_input +{ + text-decoration: none; + font-size: 110%; + cursor: none; } \ No newline at end of file diff --git a/html/style-light.css b/html/style-light.css index ee66832e1..31228b787 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -2162,4 +2162,18 @@ td.selectedmenu { #gestion_title { float:right; margin-right: 25px; +} +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: underline; + cursor: pointer; +} +span.inplace_edit_input +{ + text-decoration: none; + font-size: 110%; + cursor: none; } \ No newline at end of file diff --git a/html/style-mandarine.css b/html/style-mandarine.css index 8700d599e..1824b98f6 100644 --- a/html/style-mandarine.css +++ b/html/style-mandarine.css @@ -2149,4 +2149,18 @@ td.selectedmenu { position:float; float:left; padding-left: 150px; +} +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: underline; + cursor: pointer; +} +span.inplace_edit_input +{ + text-decoration: none; + font-size: 110%; + cursor: none; } \ No newline at end of file diff --git a/html/style-mobile.css b/html/style-mobile.css index aa916c07d..a3fba80bc 100644 --- a/html/style-mobile.css +++ b/html/style-mobile.css @@ -1997,3 +1997,18 @@ button.cancel { text-decoration: none; color: black; } + +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: underline; + cursor: pointer; +} +span.inplace_edit_input +{ + text-decoration: none; + font-size: 110%; + cursor: none; +} \ No newline at end of file diff --git a/html/style-print.css b/html/style-print.css index 20cfcab72..b78b23574 100644 --- a/html/style-print.css +++ b/html/style-print.css @@ -308,4 +308,15 @@ p#breakhere {page-break-before: always} } .tinybutton { display:none; +} +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: none; +} +span.inplace_edit_input +{ + text-decoration: none; } \ No newline at end of file diff --git a/html/style-r692.css b/html/style-r692.css index 5026e17b3..45a56f9fa 100644 --- a/html/style-r692.css +++ b/html/style-r692.css @@ -2245,4 +2245,18 @@ td.selectedmenu { background-color: #5D90CD; padding: 3px 20px 3px 20px; margin-top:20px; -} \ No newline at end of file +} +/* + * Style for the Inplace Edit element + */ +span.inplace_edit +{ + text-decoration: underline; + cursor: pointer; +} +span.inplace_edit_input +{ + text-decoration: none; + font-size: 110%; + cursor: none; +} diff --git a/include/ajax/ajax_anc_plan.php b/include/ajax/ajax_anc_plan.php index dca03dd30..12e284859 100644 --- a/include/ajax/ajax_anc_plan.php +++ b/include/ajax/ajax_anc_plan.php @@ -56,9 +56,9 @@ if ($action=="ok") { if ( trim($value ) == NULL ) $value=_("Aucune description"); } $answer->set_value($value); - echo $answer->input(); + echo $answer->value(); } } if ($action=="cancel") { - echo $answer->input(); + echo $answer->value(); } \ No newline at end of file diff --git a/include/lib/inplace_edit.class.php b/include/lib/inplace_edit.class.php index 3de0fac34..18414c5b8 100644 --- a/include/lib/inplace_edit.class.php +++ b/include/lib/inplace_edit.class.php @@ -77,6 +77,7 @@ class Inplace_Edit echo ''._('cancel').''; echo << + $('{$this->input->id}edit').addClassName('inplace_edit_input'); {$this->input->id}edit.onclick=null; inplace_edit_ok{$this->input->id}.onclick= function () { var json={$this->json}; @@ -98,7 +99,23 @@ EOF; ob_end_clean(); return $ret; } - + /** + * @brief display only the value , if the action after saving or cancelling + * + */ + function value() + { + echo $this->input->value, + " + + "; + } /*** * @brief display the value with the click event */ @@ -114,7 +131,8 @@ EOF; {$this->input->id}edit.onclick=function() { new Ajax.Updater('{$this->input->id}edit' ,'{$this->callback}', - {parameters: {$this->json} ,evalScripts:true});} + {parameters: {$this->json} ,evalScripts:true}); + } "; $ret= ob_get_contents(); diff --git a/scenario/inplace_edit.test.php b/scenario/inplace_edit.test.php index 5f2acfba8..c9ffd9802 100644 --- a/scenario/inplace_edit.test.php +++ b/scenario/inplace_edit.test.php @@ -62,13 +62,13 @@ if (!isset($_REQUEST["TestAjaxFile"])) { $ajax_hello->add_json_param("gDossier", Dossier::id()); $ajax_hello->set_value($http->request("value")); $ajax_hello->set_callback("ajax_test.php"); - echo $ajax_hello->input(); + echo $ajax_hello->value(); } if ( $action == "cancel") { $ajax_hello = Inplace_Edit::build($input); $ajax_hello->add_json_param("TestAjaxFile", __FILE__); $ajax_hello->add_json_param("gDossier", Dossier::id()); $ajax_hello->set_callback("ajax_test.php"); - echo $ajax_hello->input(); + echo $ajax_hello->value(); } } \ No newline at end of file