noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 08/30: #1118 : partage de note Ne peut parta


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 08/30: #1118 : partage de note Ne peut partager note non sauvée
Date: Tue, 02 Jun 2015 22:29:06 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 44b4dec1b6f7974caebf5af321e46206e7196e0b
Author: Dany De Bontridder <address@hidden>
Date:   Sat May 30 14:32:41 2015 +0200

    #1118 : partage de note
    Ne peut partager note non sauvée
---
 html/ajax_todo_list.php |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/html/ajax_todo_list.php b/html/ajax_todo_list.php
index df23aa5..0dd7e20 100644
--- a/html/ajax_todo_list.php
+++ b/html/ajax_todo_list.php
@@ -131,9 +131,9 @@ if ($ac == 'save')
 
////////////////////////////////////////////////////////////////////////////////
 if ($ac=='shared_note')
 {
-    $id=HtmlInput::default_value_get("todo_id", 0);
+    $id=HtmlInput::default_value_get("todo_id", -1);
     // If note_id is not correct then give an error
-    if ($id==0||isNumber($id)==0)
+    if ($id==-1||isNumber($id)==0)
     {
         header('Content-type: text/xml; charset=UTF-8');
         $dom=new DOMDocument('1.0', 'UTF-8');
@@ -142,6 +142,26 @@ if ($ac=='shared_note')
         echo $dom->saveXML();
         return;
     }
+    if ($id==0)
+    {
+        ob_start();
+        echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_{$id}");
+        echo '<p class="notice">';
+        echo _("Vous devez d'abord sauver");
+        echo '</p>';
+        echo '<p style="text-align:center">';
+        echo HtmlInput::submit('close'.$id, 'Ferme'," 
onclick=\"\$('shared_{$id}').remove();\"");
+        echo '</p>';
+        $result=ob_get_clean();
+    // 
+    // output the XML
+    header('Content-type: text/xml; charset=UTF-8');
+    $dom=new DOMDocument('1.0', 'UTF-8');
+    $tl_id=$dom->createElement('content',  escape_xml($result));
+    $dom->appendChild($tl_id);
+    echo $dom->saveXML();
+        return;
+    }
     $todo=new Todo_List($cn);
     $todo->set_parameter("id", $id);
     $todo->load();



reply via email to

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