noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 06/46: Move function to the noalyss_script.js


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 06/46: Move function to the noalyss_script.js
Date: Tue, 13 Jul 2021 05:01:49 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 8f1e6a0b01c179f6540dfd86f3b12a170eb34920
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon Jun 7 15:01:21 2021 +0200

    Move function to the noalyss_script.js
---
 html/js/accounting_item.js | 41 +++++++++++++++++++++++++++++++++--------
 html/js/noalyss_script.js  | 36 ++++++++----------------------------
 2 files changed, 41 insertions(+), 36 deletions(-)

diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js
index c58b0e6..c2c0792 100644
--- a/html/js/accounting_item.js
+++ b/html/js/accounting_item.js
@@ -241,13 +241,7 @@ function errorPoste()
 {
     alert_box(content[53]);
 }
-function pausecomp(millis)
- {
-  var date = new Date();
-  var curDate = null;
-  do { curDate = new Date(); }
-  while(curDate-date < millis);
-}
+
 /**
  * Display the list of card using a given accounting
  * @param dossier
@@ -272,4 +266,35 @@ function display_all_card(p_dossier,p_accounting)
                                         }
                                       }
                                     );
-}
\ No newline at end of file
+}
+
+/**
+ * Search an account or an analytic account or a card, used in REPORT
+ * @param {json} p_obj , 
+ *          property : - op for ajax_misc  , 
+ *                     - gDossier, 
+ *                     - target DOM element to update with the result
+ *                     - query  for the search
+ * @returns {void}
+ */
+function search_account_card(p_obj)
+{
+    p_obj['op']=p_obj['op']||"search_account_card";
+    var query=p_obj;
+    if (p_obj.tagName && p_obj.tagName=='FORM') {
+        query=p_obj.serialize(true);
+    }
+    
+    waiting_box();
+    new Ajax.Request("ajax_misc.php",{method:"get",parameters:query,
+        onSuccess: function (req){
+            
+            var pos=calcy(50);
+            var 
obj={id:"search_account_div",cssclass:"inner_box",style:"top:"+pos+"px",
+            html:req.responseText};
+            add_div(obj);
+            remove_waiting_box();
+        }
+    });
+    return false;
+}
diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 2db4bbf..a4dc33d 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -4061,32 +4061,12 @@ function download_document_form(p_form_id)
    return false;
 }
 /**
- * Search an account or an analytic account or a card, used in REPORT
- * @param {json} p_obj , 
- *          property : - op for ajax_misc  , 
- *                     - gDossier, 
- *                     - target DOM element to update with the result
- *                     - query  for the search
- * @returns {void}
+ * @brief Pause a javascript
  */
-function search_account_card(p_obj)
-{
-    p_obj['op']=p_obj['op']||"search_account_card";
-    var query=p_obj;
-    if (p_obj.tagName && p_obj.tagName=='FORM') {
-        query=p_obj.serialize(true);
-    }
-    
-    waiting_box();
-    new Ajax.Request("ajax_misc.php",{method:"get",parameters:query,
-        onSuccess: function (req){
-            
-            var pos=calcy(50);
-            var 
obj={id:"search_account_div",cssclass:"inner_box",style:"top:"+pos+"px",
-            html:req.responseText};
-            add_div(obj);
-            remove_waiting_box();
-        }
-    });
-    return false;
-}
\ No newline at end of file
+function pausecomp(millis)
+ {
+  var date = new Date();
+  var curDate = null;
+  do { curDate = new Date(); }
+  while(curDate-date < millis);
+}



reply via email to

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