noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 04/65: Event : fix position of the modal wind


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 04/65: Event : fix position of the modal window + filter on the last event
Date: Wed, 09 Sep 2015 08:27:00 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit e3db0d318ac8714e44620cdd5ceb5439053c2ae1
Author: Dany De Bontridder <address@hidden>
Date:   Sat Aug 29 23:31:50 2015 +0200

    Event : fix position of the modal window + filter on the last event
---
 include/ac_common.php          |    2 +-
 include/class_follow_up.php    |   13 +++++++++----
 include/template/dashboard.php |   26 ++++++++++++++++----------
 3 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/include/ac_common.php b/include/ac_common.php
index e14b504..c45eb8e 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -1143,7 +1143,7 @@ EOF;
 function display_dashboard_operation($p_array,$p_title,$p_div)
 {
        ?>
-<div id="<?php echo $p_div;?>" class="inner_box" 
style="display:none;top:250px;left:12%;width: 
75%;min-height:50%;overflow:auto;">
+<div id="<?php echo $p_div;?>" class="inner_box" 
style="display:none;position:fixed;top:250px;left:12%;width: 
75%;min-height:50%;overflow:auto;">
        <?php
        echo HtmlInput::title_box($p_title, $p_div, "hide");
        ?>
diff --git a/include/class_follow_up.php b/include/class_follow_up.php
index 77d580d..229784e 100644
--- a/include/class_follow_up.php
+++ b/include/class_follow_up.php
@@ -109,7 +109,8 @@ class Follow_Up
      * @global type $g_user Connected user
      * @param type $cn Database connection
      * @param type $p_mode Mode is R (for Read) or W (for write)
-     * @return type
+     * @return string SQL where clause to include in the SQL 
+     * example: (ag_dest in (select p_granted from user_sec_action_profile 
where p_id=x)
      */
     static function sql_security_filter($cn, $p_mode)
     {
@@ -1102,8 +1103,12 @@ class Follow_Up
     {
         $sql="select ag_ref,coalesce(vw_name,'Interne') as 
vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_remind_date,'DD.MM.YYYY') as 
ag_timestamp_fmt,ag_timestamp ".
                 " from action_gestion join document_type ".
-                " on (ag_type=dt_id) left join vw_fiche_attr on 
(f_id=f_id_dest) where ag_state not in (1,4)
-                                       and 
to_char(ag_remind_date,'DDMMYYYY')=to_char(now(),'DDMMYYYY') ";
+                " on (ag_type=dt_id) 
+                  left join vw_fiche_attr on (f_id=f_id_dest) 
+                  where 
+                  ag_state not in (1,4)
+                  and 
to_char(ag_remind_date,'DDMMYYYY')=to_char(now(),'DDMMYYYY')
+                  and ". self::sql_security_filter($this->db,'R');
         $array=$this->db->get_array($sql);
         return $array;
     }
@@ -1117,7 +1122,7 @@ class Follow_Up
         $sql="select ag_ref,coalesce(vw_name,'Interne') as 
vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_remind_date,'DD.MM.YYYY') as 
ag_timestamp_fmt,ag_timestamp ".
                 " from action_gestion join document_type ".
                 " on (ag_type=dt_id) left join vw_fiche_attr on 
(f_id=f_id_dest) where ag_state not in  (1,4)
-                               and ag_remind_date < now() ";
+                               and ag_remind_date < now()  and 
".self::sql_security_filter($this->db,'R');
         $array=$this->db->get_array($sql);
         return $array;
     }
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index 8973731..b182c67 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -158,17 +158,22 @@ if ( $report != 0 ) : ?>
 
     $result=$rapport->get_row($limit['start'],$limit['end'],'periode');
     $ix=0;
-    echo '<table border="0" width="100%">';
-    foreach ($result as $row) {
-      $ix++;
-         $class=($ix%2==0)?' class="even" ':' class="odd" ';
-      echo '<tr '.$class.'>';
+    if ( count ($result) >  0)
+    {
+        echo '<table border="0" width="100%">';
+        foreach ($result as $row) {
+          $ix++;
+              $class=($ix%2==0)?' class="even" ':' class="odd" ';
+          echo '<tr '.$class.'>';
 
-      echo '<td> '.$row['desc'].'</td>'.
-       '<td style="text-align:right">'.nbm($row['montant'])." &euro;</td>";
-      echo '</tr>';
+          echo '<td> '.$row['desc'].'</td>'.
+            '<td style="text-align:right">'.nbm($row['montant'])." 
&euro;</td>";
+          echo '</tr>';
+        }
+        echo '</table>';
+    } else {
+        echo _('Aucun résultat');
     }
-    echo '</table>';
   }
   ?>
   </div>
@@ -185,7 +190,7 @@ endif;
 ?>
 
     
-<div id="action_late_div"  class="inner_box" 
style="display:none;margin-left:12%;top:25%;width:75%;min-height:50%;overflow: 
auto;">
+<div id="action_late_div"  class="inner_box" 
style="position:fixed;display:none;margin-left:12%;top:25%;width:75%;min-height:50%;overflow:
 auto;">
        <?php
                echo HtmlInput::title_box(_("Action en retard"), 
"action_late_div","hide")
        ?>
@@ -344,6 +349,7 @@ echo 
HtmlInput::button('hide',_('Annuler'),'onClick="Effect.Fold(\'add_todo_list
 <script type="text/javascript" language="javascript" charset="utf-8">
 function display_detail(div) {
        $(div).style.display="block";
+       // $(div).style.top=calcy('150')+'px';
        //Effect.Grow(div,{});
 }
 try {



reply via email to

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