noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 03/03: Task #1127 - Ajout évenement depuis t


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/03: Task #1127 - Ajout évenement depuis tableau de bord ou agenda Zoom on last actions and allows to go directly to FOLLOW
Date: Wed, 12 Aug 2015 21:36:16 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit e01ea0955657b832006c01c17d98c04a7228795b
Author: Dany De Bontridder <address@hidden>
Date:   Wed Aug 12 23:31:11 2015 +0200

    Task #1127 - Ajout évenement depuis tableau de bord ou agenda
    Zoom on last actions and allows to go directly to FOLLOW
---
 html/ajax_misc.php               |    5 ++-
 html/js/gestion.js               |   24 ++++++++++++++++
 html/style-classic.css           |    9 ++++++
 include/ajax_gestion.php         |   36 ++++++++++++++++++++++++
 include/template/action_show.php |   57 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 130 insertions(+), 1 deletions(-)

diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 3048504..ec952b5 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -720,7 +720,10 @@ EOF;
         case 'modele_modify':
             require_once NOALYSS_INCLUDE.'/ajax_admin.php';
             break;
-            
+        // From dashboard, display detail about last operation 
+        case 'action_show':
+            require_once NOALYSS_INCLUDE.'/ajax_gestion.php';
+            break;
        default:
                var_dump($_GET);
 }
diff --git a/html/js/gestion.js b/html/js/gestion.js
index 4fcfc2a..27b0da2 100644
--- a/html/js/gestion.js
+++ b/html/js/gestion.js
@@ -265,3 +265,27 @@ function successRemoveStock(request,json)
                alert("success_box"+e.message);
        }
 }
+/**
+ * @brief display details of the last actions in management
+ * called from dashboard
+ * @param p_dossier : dossier id
+ */
+function action_show(p_dossier)
+{
+    try {
+        waiting_box();
+        var action = new Ajax.Request('ajax_misc.php',
+        {
+            method:'get',
+            parameters : {gDossier:p_dossier,'op':'action_show'},
+            onSuccess : function(p_xml, p_text) {
+                        remove_waiting_box();
+                        add_div({id: 'action_list_div', 
style:"top:1%;width:90%;margin-left:5%" , cssclass: 'inner_box'});
+                        $('action_list_div').innerHTML=p_xml.responseText;
+            }
+        });
+    } catch (e)
+    {
+        alert('action_show '+e.message);
+    }
+}
\ No newline at end of file
diff --git a/html/style-classic.css b/html/style-classic.css
index 97610f1..bf47e6f 100644
--- a/html/style-classic.css
+++ b/html/style-classic.css
@@ -1951,3 +1951,12 @@ ul.aligned-block li {
     background: snow;
     margin-top: 50px;
 }
+td.cut {
+    max-width: 25%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+td.box {
+    border-left: #9999ff solid 1px;
+}
\ No newline at end of file
diff --git a/include/ajax_gestion.php b/include/ajax_gestion.php
new file mode 100644
index 0000000..f5be0a8
--- /dev/null
+++ b/include/ajax_gestion.php
@@ -0,0 +1,36 @@
+<?php
+/*
+ *   This file is part of NOALYSS.
+ *
+ *   NOALYSS is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   NOALYSS is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with NOALYSS; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+// Copyright 2015 Author Dany De Bontridder address@hidden
+/**
+ * @file
+ * @brief display a box containing last actions
+ */
+if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+if ( $op == 'action_show')
+{
+    /** 
+     * display action
+     */
+    require_once NOALYSS_INCLUDE.'/class_follow_up.php';
+    $gestion=new Follow_Up($cn);
+    $array=$gestion->get_last(25);
+    $len_array=count($array);
+    require_once NOALYSS_INCLUDE.'/template/action_show.php';
+}
\ No newline at end of file
diff --git a/include/template/action_show.php b/include/template/action_show.php
new file mode 100644
index 0000000..a4ddb5e
--- /dev/null
+++ b/include/template/action_show.php
@@ -0,0 +1,57 @@
+<?php
+/*
+ * * Copyright (C) 2015 Dany De Bontridder <address@hidden>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+ * 
+ */
+
+
+/**
+ * @file
+ * @brief display the last action
+ * inherited parameter  : $cn database connection, $array
+ */
+require_once NOALYSS_INCLUDE.'/class_default_menu.php';
+$a_default=new Default_Menu();
+
+echo HtmlInput::title_box(_('Suivi'), 'action_list_div');
+?>
+<table style="width: 100%">
+    <?php
+    for ($i=0;$i < $len_array;$i++) :
+    ?>
+        <tr class=" <?php echo ($i%2==0)?'even':'odd'?>">
+            <td class="box">
+                <?php echo smaller_date($array[$i]['ag_timestamp_fmt']) ;?>
+            </td>
+            <td class="box">
+                <?php echo HtmlInput::detail_action($array[$i]['ag_id'], 
$array[$i]['ag_ref'], 1)  ?>
+            </td>
+            <td class="box">
+                <?php echo mb_substr(h($array[$i]['vw_name']),0,15)?>
+            </td>
+            <td class="box cut">
+                <?php echo h($array[$i]['ag_title'])?>
+            </td>
+        </tr>
+    <?php
+    endfor;
+    ?>
+    </table>
+<p style="text-align: center">
+<a class="smallbutton" target="_blank" href="?gDossier=<?php echo 
Dossier::id()?>&ac=<?php echo $a_default->get('code_follow')?>"><?php echo 
_('Gestion')?></a>
+</p>
\ No newline at end of file



reply via email to

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