phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5416 - in phpcompta/trunk: . html html/js include sql


From: phpcompta-dev
Subject: [Phpcompta-dev] r5416 - in phpcompta/trunk: . html html/js include sql
Date: Mon, 23 Sep 2013 20:09:12 +0200 (CEST)

Author: danydb
Date: 2013-09-23 20:09:12 +0200 (Mon, 23 Sep 2013)
New Revision: 5416

Modified:
   phpcompta/trunk/html/ajax_misc.php
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/html/style.css
   phpcompta/trunk/include/class_tag.php
   phpcompta/trunk/release-note
   phpcompta/trunk/sql/upgrade.sql
Log:
Tag : gestion 
Tag dans document : ajout, enlever

Modified: phpcompta/trunk/html/ajax_misc.php
===================================================================
--- phpcompta/trunk/html/ajax_misc.php  2013-09-23 16:54:19 UTC (rev 5415)
+++ phpcompta/trunk/html/ajax_misc.php  2013-09-23 18:09:12 UTC (rev 5416)
@@ -585,6 +585,21 @@
         case 'bookmark':
             require_once 'ajax_bookmark.php';
             break;
+        case 'tag_detail':
+            require_once 'ajax_tag_detail.php';
+            break;
+        case 'save_tag':
+            require_once 'ajax_tag_save.php';
+            break;
+        case 'tag_list':
+            require_once 'ajax_tag_list.php';
+            break;
+        case 'tag_add':
+            require_once 'ajax_tag_add_action.php';
+            break;
+        case 'tag_remove':
+            require_once 'ajax_tag_remove_action.php';
+            break;
        default:
                var_dump($_GET);
 }

Modified: phpcompta/trunk/html/js/scripts.js
===================================================================
--- phpcompta/trunk/html/js/scripts.js  2013-09-23 16:54:19 UTC (rev 5415)
+++ phpcompta/trunk/html/js/scripts.js  2013-09-23 18:09:12 UTC (rev 5416)
@@ -602,7 +602,11 @@
     try
     {
         var top=document;
-        var elt=top.createElement('div');
+        
+        if ( ! $(obj.id) )  { var elt=top.createElement('div');}
+        else {
+            var elt=$(obj.id);
+        }
         if (obj.id )
         {
             elt.setAttribute('id',obj.id);
@@ -1771,8 +1775,8 @@
 {
        new Draggable(p_id,{starteffect:function()
                                   {
-                                                                        new 
Effect.Highlight(obj.id,{scroll:window,queue:'end'});
-                                  }}
+                       new 
Effect.Highlight(obj.id,{scroll:window,queue:'end'});
+                           }}
                          );
     $(p_id).style.top=posY;
     $(p_id).style.left=posX;
@@ -1918,7 +1922,7 @@
                                      onSuccess:function(req){
                                                remove_waiting_box();
                                                 // removeDiv('bookmark_div');
-                                                // 
add_div({id:'bookmark_div',cssclass:'inner_box',drag:1});
+                                                // 
                                                
$('bookmark_div').innerHTML=req.responseText;
                                                 try
                                                 {
@@ -1951,8 +1955,6 @@
                                      onFailure:ajax_misc_failure,
                                      onSuccess:function(req){
                                                remove_waiting_box();
-                                                // removeDiv('bookmark_div');
-                                               // 
add_div({id:'bookmark_div',cssclass:'inner_box',drag:1});
                                                
$('bookmark_div').innerHTML=req.responseText;
                                                 try
                                                 {
@@ -1980,4 +1982,201 @@
 {
     $('error_content_div').innerHTML=message;
     $('error_div').style.visibility='visible';
+}
+/**
+ * @brief show the detail of a tag
+ */
+function show_tag(p_dossier,p_ac,p_tag_id)
+{
+    try {
+        waiting_box();
+        var 
queryString="op=tag_detail&tag="+p_tag_id+"&gDossier="+p_dossier+"&ac="+p_ac;
+       var action = new Ajax.Request(
+                                 "ajax_misc.php" ,
+                                 {
+                                     method:'get', parameters:queryString,
+                                     onFailure:ajax_misc_failure,
+                                     onSuccess:function(req){
+                                               var answer=req.responseXML;
+                                                var 
html=answer.getElementsByTagName('code');
+                                                if ( html.length == 0 )
+                                                {
+                                                    var rec=req.responseText;
+                                                    alert ('erreur :'+rec);
+                                                }
+                                                var 
code_html=getNodeText(html[0]);
+                                                
code_html=unescape_xml(code_html);
+                                               remove_waiting_box();
+                                                
add_div({id:'tag_div',cssclass:'inner_box',drag:1});
+                                               
$('tag_div').innerHTML=code_html;
+                                                try
+                                                {
+                                                    code_html.evalScripts();
+                                                }
+                                                catch(e)
+                                                {
+                                                    alert("answer_box 
Impossible executer script de la reponse\n"+e.message);
+                                                }
+
+                                     }
+                                 }
+                                 );
+    } catch (e) {
+        error_message(e.getMessage);
+    }
+}
+
+/** 
+ * @brief save the modified tag
+ */
+function save_tag()
+{
+    try {
+        waiting_box();
+        var queryString="op=tag_save&"+$("tag_detail_frm").serialize();
+       var action = new Ajax.Request(
+                                 "ajax_misc.php" ,
+                                 {
+                                     method:'get', parameters:queryString,
+                                     onFailure:ajax_misc_failure,
+                                     onSuccess:function(req,j){
+                                              var answer=req.responseXML;
+                                                var 
html=answer.getElementsByTagName('code');
+                                                if ( html.length == 0 )
+                                                {
+                                                    var rec=req.responseText;
+                                                    alert ('erreur :'+rec);
+                                                }
+                                                var 
code_html=getNodeText(html[0]);
+                                                
code_html=unescape_xml(code_html);
+                                               remove_waiting_box();
+                                                
add_div({id:'tag_div',cssclass:'inner_box',drag:1});
+                                               
$('tag_div').innerHTML=code_html;
+                                                try
+                                                {
+                                                    code_html.evalScripts();
+                                                }
+                                                catch(e)
+                                                {
+                                                    alert("answer_box 
Impossible executer script de la reponse\n"+e.message);
+                                                }
+
+                                     }
+                                 }
+                                 );
+    } catch (e) {
+        error_message(e.getMessage);
+    }
+    
+}
+/**
+ * Show a list of tag which can be added to the current followup document
+ * @param {type} p_dossier
+ * @param {type} ag_id
+ * @returns {undefined}
+ */
+function action_tag_select(p_dossier,ag_id)
+{
+    try {
+        waiting_box();
+        var queryString="ag_id="+ag_id+"&op=tag_list&gDossier="+p_dossier;
+        var action = new Ajax.Request(
+                                      "ajax_misc.php" ,
+                                      {
+                                          method:'get', parameters:queryString,
+                                          onFailure:ajax_misc_failure,
+                                          onSuccess:function(req,j){
+                                                  var answer=req.responseXML;
+                                                    var 
html=answer.getElementsByTagName('code');
+                                                    if ( html.length == 0 )
+                                                    {
+                                                        var 
rec=unescape_xml(req.responseText);
+                                                        error_message ('erreur 
:'+rec);
+                                                    }
+                                                    var 
code_html=getNodeText(html[0]);
+                                                    
code_html=unescape_xml(code_html);
+                                                    
add_div({id:'tag_div',cssclass:'inner_box',drag:1});
+                                                    
$('tag_div').style.top=posY-70;
+                                                    
$('tag_div').style.left=posX-70;
+                                                    remove_waiting_box();
+                                                    
$('tag_div').innerHTML=code_html;
+                                          }
+                                      }
+                                      );
+    } catch (e) {
+        error_message(e.getMessage);
+    }
+}
+/**
+ * @brief Add the current tag to the current ag_id
+ * @param {type} p_dossier
+ * @param {type} ag_id
+ * @returns {undefined}
+ */
+function action_tag_add(p_dossier,ag_id,t_id)
+{
+    try {
+        waiting_box();
+        var 
queryString="t_id="+t_id+"&ag_id="+ag_id+"&op=tag_add&gDossier="+p_dossier;
+        var action = new Ajax.Request(
+                                      "ajax_misc.php" ,
+                                      {
+                                          method:'get', parameters:queryString,
+                                          onFailure:ajax_misc_failure,
+                                          onSuccess:function(req,j){
+                                                  var answer=req.responseXML;
+                                                    var 
html=answer.getElementsByTagName('code');
+                                                    if ( html.length == 0 )
+                                                    {
+                                                        var 
rec=unescape_xml(req.responseText);
+                                                        error_message ('erreur 
:'+rec);
+                                                    }
+                                                    var 
code_html=getNodeText(html[0]);
+                                                    
code_html=unescape_xml(code_html);
+                                                    remove_waiting_box();
+                                                    
$('action_tag_td').innerHTML=code_html;
+                                                    removeDiv('tag_div');
+                                          }
+                                      }
+                                      );
+    } catch (e) {
+        error_message(e.getMessage);
+    }
+}
+/**
+ * @brief remove the current tag to the current ag_id
+ * @param {type} p_dossier
+ * @param {type} ag_id
+ * @returns {undefined}
+ */
+function action_tag_remove(p_dossier,ag_id,t_id)
+{
+    if ( confirm ('Enlevez ce tags ?')== false ) return;
+    try {
+        waiting_box();
+        var 
queryString="t_id="+t_id+"&ag_id="+ag_id+"&op=tag_remove&gDossier="+p_dossier;
+        var action = new Ajax.Request(
+                                      "ajax_misc.php" ,
+                                      {
+                                          method:'get', parameters:queryString,
+                                          onFailure:ajax_misc_failure,
+                                          onSuccess:function(req,j){
+                                                  var answer=req.responseXML;
+                                                    var 
html=answer.getElementsByTagName('code');
+                                                    if ( html.length == 0 )
+                                                    {
+                                                        var 
rec=unescape_xml(req.responseText);
+                                                        error_message ('erreur 
:'+rec);
+                                                    }
+                                                    var 
code_html=getNodeText(html[0]);
+                                                    
code_html=unescape_xml(code_html);
+                                                    remove_waiting_box();
+                                                    
$('action_tag_td').innerHTML=code_html;
+
+                                          }
+                                      }
+                                      );
+    } catch (e) {
+        error_message(e.getMessage);
+    }
 }
\ No newline at end of file

Modified: phpcompta/trunk/html/style.css
===================================================================
--- phpcompta/trunk/html/style.css      2013-09-23 16:54:19 UTC (rev 5415)
+++ phpcompta/trunk/html/style.css      2013-09-23 18:09:12 UTC (rev 5416)
@@ -1103,7 +1103,7 @@
     margin-left: 2px;
     margin-right:2px;
     margin-top:0px;
-    font-size:0.75em;
+    font-size:0.90em;
 }
 #close_div:hover
 {
@@ -1117,7 +1117,7 @@
     border:1px solid blue;
     margin-left: 2px;
     margin-right:18px;
-    font-size:0.75em;
+    font-size:0.90em;
 }
 #popmeout:hover
 {

Modified: phpcompta/trunk/include/class_tag.php
===================================================================
--- phpcompta/trunk/include/class_tag.php       2013-09-23 16:54:19 UTC (rev 
5415)
+++ phpcompta/trunk/include/class_tag.php       2013-09-23 18:09:12 UTC (rev 
5416)
@@ -36,7 +36,6 @@
     function select()
     {
         $ret=$this->data->seek(' order by t_tag');
-        if ( $this->cn->count($ret) == 0) return "aucun tag trouvé";
         require_once 'template/tag_select.php';
     }
     function form_add()

Modified: phpcompta/trunk/release-note
===================================================================
--- phpcompta/trunk/release-note        2013-09-23 16:54:19 UTC (rev 5415)
+++ phpcompta/trunk/release-note        2013-09-23 18:09:12 UTC (rev 5416)
@@ -1,23 +1,70 @@
+===================================================================
+|| Done
+===================================================================
 Favori
 ======
+Dans fenetre interne
 
 Navigateur
 ==========
+Dans fenetre interne
 
-
 Impression journaux 
 ===================
 Anciennement appelé impression - historique -> changer dans menu_ref
-Permet impression des journaux vente et achat
+Permet impression des journaux vente et achat avec détail pour la TVA, la 
partie
+non déductible et la partie privée
 
+Modéle d'opération
+==================
+Fenêtre interne avec recherche
+
+Protection fichier include
+==========================
+Ajout d'une sécurité supplémentaire
+
+Préférence 
+==========
+Dans fenêtre interne
+
 Action - Suivi
 ===============
 1. Ajout de tags (table tag et action_tag) (v)
 2. changement présentation liste (x)
 3. Ajout menu : CFGTAG pour gèrer les tags : description, nom ...
 4. Ajout d'un ou plusieurs tags par action, un tag n'est pas un type de 
document
+ Sécurité : vérifier que l'utilisateur peut ajouter ou enlever des tags à une 
action 
+
+===================================================================
+|| A faire
+===================================================================
+
+Action - Suivi
+===============
 5. Changement : les documents sont-ils liés au commentaire ou à l'action ?
 6. Action - Suivi devient Document (donc FOLLOW devient DOCUMENT)
 7. Création d'un nouveau menu Dossier (ou Liste tags) AD = ???
-8. Création d'un tag lors de la création d'un document (??)
+Changement présentation Détail action : les détails (qui/quand) sont à mettre 
dans la colonne de gauche
 
+Document à générer
+=================
+Par journal
+ou par profil
+
+Fiche
+=====
+Si aucun quickcode donné, un calculé un en se basant sur 3 première lettres 
des fiche_def + Nom, préfixe à une chaîne vide par défaut
+nom par défaut
+par défaut
+MRC      1 | 604           | Marchandises            | t                 |     
 2 | Achats de marchandises
+CLN      2 | 400           | Client                  | t                 |     
 9 | Catégorie qui contient la liste des clients
+BNQ      3 | 5500          | Banque                  | t                 |     
 4 | Catégorie qui contient la liste des comptes financiers: banque, caisse,...
+FRN      4 | 440           | Fournisseur             | t                 |     
 8 | Catégorie qui contient la liste des fournisseurs
+SBD      5 | 61            | Services & Biens Divers | t                 |     
 3 | Catégorie qui contient la liste des charges diverses
+VNT      6 | 700           | Vente                   | t                 |     
 1 | Catégorie qui contient la liste des prestations, marchandises... que l'on 
vend 
+STO 500000 |               | Stock                   | f                 |     
15 | 
+SQL
+Modification table fiche_def ajout colonne fd_prefix
+
+code php 
+fiche_def.inc.php

Modified: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql     2013-09-23 16:54:19 UTC (rev 5415)
+++ phpcompta/trunk/sql/upgrade.sql     2013-09-23 18:09:12 UTC (rev 5416)
@@ -127,9 +127,10 @@
 
 update menu_ref set me_menu='Impression Journaux' where me_code='PRINTJRN';
 update menu_ref set me_description='Impression des journaux' where 
me_code='PRINTJRN';
-update menu_ref set me_description='Liste du Suivi' where me_code='FOLLOW';
+update menu_ref set me_menu='Liste Suivi' where me_code='FOLLOW';
+update menu_ref set me_description='Document de suivi sous forme de liste' 
where me_code='FOLLOW';
 update menu_ref set me_javascript='popup_recherche(<DOSSIER>)' where 
me_code='SEARCH';
-update menu_ref set where 
me_file=null,me_javascript='set_preference(<DOSSIER>)' , 
me_description_etendue='Préférence de l''utilisateur, apparence de 
l''application pour l''utilisateur, période par défaut et mot de passe' where 
me_code='PREFERENCE';
+update menu_ref set me_file=null,me_javascript='set_preference(<DOSSIER>)' , 
me_description_etendue='Préférence de l''utilisateur, apparence de 
l''application pour l''utilisateur, période par défaut et mot de passe' where 
me_code='PREFERENCE';
 /*
  * Vue montrant toutes les possibilités
  */
@@ -168,9 +169,6 @@
 login text 
 );
 comment on table bookmark is 'Bookmark of the connected user';
-/*
- * Missing update for preference !!!
- */
 
 create table tags (
     t_id serial primary key, 



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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