noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 110/323: Correction couleur pour Inswitch_pl


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 110/323: Correction couleur pour Inswitch_place Correction couleur pour Module sécurité
Date: Wed, 14 Mar 2018 17:38:34 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit cd78ed2a4a4b1ee27445c330eb6ac2a2d5e6f036
Author: Dany De Bontridder <address@hidden>
Date:   Wed Jan 31 07:27:28 2018 +0100

    Correction couleur pour Inswitch_place
    Correction couleur pour Module sécurité
---
 include/lib/inplace_switch.class.php | 10 +++++++---
 include/param_sec.inc.php            |  4 +++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/lib/inplace_switch.class.php 
b/include/lib/inplace_switch.class.php
index 558ffda..8120a8f 100644
--- a/include/lib/inplace_switch.class.php
+++ b/include/lib/inplace_switch.class.php
@@ -55,19 +55,23 @@ class Inplace_Switch
 
     function input()
     {
-        printf('<span style="text-decoration: none" class="inplace_edit icon" 
id="%s">', $this->name);
         if ($this->value==1)
         {
-            echo $this->iconon;
+            $icon=$this->iconon;
+            $color="green";
         }
         elseif ($this->value==0)
         {
-            echo $this->iconoff;
+            $icon=$this->iconoff;
+            $color="red";
         }
         else
         {
             throw new Exception(_("Invalide value"));
         }
+        
+        printf('<span style="text-decoration: none;color:%s" 
class="inplace_edit icon" id="%s">', $color,$this->name);
+        echo $icon;
         echo '</span>';
         echo <<<EOF
         <script>
diff --git a/include/param_sec.inc.php b/include/param_sec.inc.php
index 73b43b4..43d7af7 100644
--- a/include/param_sec.inc.php
+++ b/include/param_sec.inc.php
@@ -360,9 +360,11 @@ if ( $action == "view" )
         for (i = 0;i < a_select.length;i++) {
           str_id = new String( a_select[i].id);
            if ( str_id.search(/action/) > -1 ) {
-             if ( p_value == 1 ) {
+             if ( p_value == 0 ) {
+                 a_select[i].setStyle("color:red");
                  a_select[i].innerHTML='&#xf204';
              } else {
+                 a_select[i].setStyle("color:green");
                  a_select[i].innerHTML='&#xf205';
              } 
            }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]