[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 78/219: InPlace_Switch : add a supplemental j
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 78/219: InPlace_Switch : add a supplemental javascript command |
Date: |
Mon, 18 Dec 2017 13:22:41 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 2c96ce0c68518ce6a1411c4bb48b81932252a7af
Author: Dany De Bontridder <address@hidden>
Date: Tue Oct 10 15:31:15 2017 +0200
InPlace_Switch : add a supplemental javascript command
---
include/lib/inplace_switch.class.php | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/include/lib/inplace_switch.class.php
b/include/lib/inplace_switch.class.php
index ab3401f..96bae13 100644
--- a/include/lib/inplace_switch.class.php
+++ b/include/lib/inplace_switch.class.php
@@ -39,7 +39,9 @@ class Inplace_Switch
private $json;
/// callback
private $callback;
-
+ /// Supplemental javascript command, execute after the ajax script
+ private $jscript;
+
function __construct($p_name, $p_value)
{
$this->name=$p_name;
@@ -48,6 +50,7 @@ class Inplace_Switch
$this->iconoff='<img src="image/icon-off.png"/>';
$this->json=json_encode(['name'=>$p_name,"value"=>$p_value],
JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK);
$this->callback="ajax.php";
+ $this->jscript="";
}
function input()
@@ -68,12 +71,23 @@ class Inplace_Switch
echo '</span>';
echo <<<EOF
<script>
-{$this->name}.onclick=function() {new
Ajax.Updater({$this->name},'{$this->callback}',{method:"get",parameters:{$this->json},evalScripts:true}
);}
+{$this->name}.onclick=function() {new
Ajax.Updater({$this->name},'{$this->callback}',{method:"get",parameters:{$this->json},evalScripts:true}
);
+ {$this->jscript}
+ }
</script>
EOF;
}
+ public function get_jscript()
+ {
+ return $this->jscript;
+ }
+
+ public function set_jscript($jscript)
+ {
+ $this->jscript=$jscript;
+ }
- public function get_json()
+ public function get_json()
{
return $this->json;
}
- [Noalyss-commit] [noalyss] 106/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., (continued)
- [Noalyss-commit] [noalyss] 106/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 59/219: ManageTable : Correct bug for the sort, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 76/219: Extourne : correct reverse operation for autoliquidation, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 135/219: Template operation : message if there is no template, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 192/219: Select_box : add a new type of value and fix a problem with the position of the div, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 112/219: Task #0001481: Encodage Vente, Achat, Fin ou OD Task #0001485: possibilité de clouer une fenetre, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 125/219: Rewriting : Use of Noalyss_CSV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 175/219: Change autocomplete and adapt Icard setWidth is false + indicator icon for ICard, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 81/219: PRINTPOSTE : esthetic, Dany De Bontridder, 2017/12/18
- [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 <=
- [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, 2017/12/18
- [Noalyss-commit] [noalyss] 137/219: Infobulle : avoid that the info balloon exceed limit of the display, Dany De Bontridder, 2017/12/18