[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 64/219: Inplace_Edit : cosmetic
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 64/219: Inplace_Edit : cosmetic |
Date: |
Mon, 18 Dec 2017 13:22:39 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 0187848d5649ebef8d5cf7707772c0f320fae3ab
Author: Dany De Bontridder <address@hidden>
Date: Wed Sep 27 22:34:06 2017 +0200
Inplace_Edit : cosmetic
---
html/style-classic.css | 14 ++++++++++++++
html/style-light.css | 14 ++++++++++++++
html/style-mandarine.css | 14 ++++++++++++++
html/style-mobile.css | 15 +++++++++++++++
html/style-print.css | 11 +++++++++++
html/style-r692.css | 16 +++++++++++++++-
include/ajax/ajax_anc_plan.php | 4 ++--
include/lib/inplace_edit.class.php | 22 ++++++++++++++++++++--
scenario/inplace_edit.test.php | 4 ++--
9 files changed, 107 insertions(+), 7 deletions(-)
diff --git a/html/style-classic.css b/html/style-classic.css
index e1c7c41..2c7497b 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 ee66832..31228b7 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 8700d59..1824b98 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 aa916c0..a3fba80 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 20cfcab..b78b235 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 5026e17..45a56f9 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 dca03dd..12e2848 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 3de0fac..18414c5 100644
--- a/include/lib/inplace_edit.class.php
+++ b/include/lib/inplace_edit.class.php
@@ -77,6 +77,7 @@ class Inplace_Edit
echo '<a style="display:inline" class="smallbutton"
id="inplace_edit_cancel'.$this->input->id.'">'._('cancel').'</a>';
echo <<<EOF
<script>
+ $('{$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,
+ "
+ <script>
+ $('{$this->input->id}edit').removeClassName('inplace_edit_input');
+ {$this->input->id}edit.onclick=function() {
+ new Ajax.Updater('{$this->input->id}edit'
+ ,'{$this->callback}',
+ {parameters: {$this->json} ,evalScripts:true});}
+ </script>
+ ";
+ }
/***
* @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});
+ }
</script>
";
$ret= ob_get_contents();
diff --git a/scenario/inplace_edit.test.php b/scenario/inplace_edit.test.php
index 5f2acfb..c9ffd98 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
- [Noalyss-commit] [noalyss] 121/219: correct js : getMessage instead of message, (continued)
- [Noalyss-commit] [noalyss] 121/219: correct js : getMessage instead of message, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 78/219: InPlace_Switch : add a supplemental javascript command, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 10/219: GESTION -> CUST, MANAGER, ADM ... esthetic move the name of the tiers to the right, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 50/219: task #0001467: Journaux VENTES - inversion D/C dans liste de catégorie de fiches, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 169/219: For MSIE, force to unicode (still problem with MSIE11) !, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 94/219: Fix background color for button 'modele operation', Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 139/219: Javascript : small error, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 42/219: SQL : protection injection, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 75/219: PRINTJRN Use new class http_input, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 82/219: Fix Doxygen issue : @example must be in a function otherwise the detailed section of Doxygen disappear, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 64/219: Inplace_Edit : cosmetic,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 137/219: Infobulle : avoid that the info balloon exceed limit of the display, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 193/219: SansationLight add the readme.txt file with license, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 85/219: Task #1349 : si une seule catégorie de fiche , alors on ne doit pas la choisir, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 07/219: Bug : cannot print action in profil Cannot add a export / printing in profile, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 79/219: PRINTGL : do not print accounting without operation, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 182/219: Icon move / fix, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 111/219: Comment Table, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 92/219: Esthetic : hide some columns when screen too small, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 39/219: Acc_Reconciliation : improve function get_amount_noautovat, set the prepare query inside the function, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 172/219: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/12/18