noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 201/219: Task #0001507: Click sur détail opé


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 201/219: Task #0001507: Click sur détail opérations apparaît trop haut Problem comes from window.onload loaded with detail operation. Move into do.php , recherche.php , popup.php from script.js
Date: Mon, 18 Dec 2017 13:23:03 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit e9d8bd74dedea8327f6b59d97fec9dccbb33393f
Author: Dany De Bontridder <address@hidden>
Date:   Wed Dec 13 00:33:59 2017 +0100

    Task #0001507: Click sur détail opérations apparaît trop haut
    Problem comes from window.onload loaded with detail operation.
    Move into do.php , recherche.php , popup.php from script.js
---
 html/do.php        | 15 ++++++++++++++-
 html/js/scripts.js | 13 ++-----------
 html/popup.php     | 15 ++++++++++++++-
 html/recherche.php | 15 ++++++++++++++-
 4 files changed, 44 insertions(+), 14 deletions(-)

diff --git a/html/do.php b/html/do.php
index 7f123de..bee66ad 100644
--- a/html/do.php
+++ b/html/do.php
@@ -208,7 +208,20 @@ if ($oPeriode->load() == -1)
 
 $module_selected = -1;
 
-
+?>
+<script>
+/**
+ * All the onload must be here otherwise the other will overwritten
+ * @returns {undefined}
+ */
+window.onload=function ()
+{
+    create_anchor_up();
+    init_scroll();
+    sorttable.init
+}
+</script>
+<?php
 
 /*
  * if an action is requested
diff --git a/html/js/scripts.js b/html/js/scripts.js
index b99e9e8..6c9b2c1 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -2832,7 +2832,7 @@ function create_anchor_up()
 {
     if ( document.getElementById('up_top')) return;
     
-    var newElt = new Element('div');
+    var newElt = document.createElement('div');
     newElt.setAttribute('id', 'up_top');
     newElt.innerHTML='<a id="up_top"></a>';
     
@@ -2920,16 +2920,7 @@ function alert_box(p_message)
     smoke.alert(p_message,false , {ok:'ok',classname:"inner_box"});
 }
 
-/**
- * All the onload must be here otherwise the other will overwritten
- * @returns {undefined}
- */
-window.onload=function ()
-{
-    create_anchor_up();
-    init_scroll();
-    sorttable.init
-}
+
 /**
  * @brief Colorize the rows of the table 
  * @param string p_table id of the table
diff --git a/html/popup.php b/html/popup.php
index 9bfdcc7..29002f4 100644
--- a/html/popup.php
+++ b/html/popup.php
@@ -42,7 +42,20 @@ if (  ! isset ($_SESSION['g_user'] ) )
 
 html_page_start($_SESSION['g_theme']);
 echo '<div style="float:left;">';
-
+?>
+<script>
+/**
+ * All the onload must be here otherwise the other will overwritten
+ * @returns {undefined}
+ */
+window.onload=function ()
+{
+    create_anchor_up();
+    init_scroll();
+    sorttable.init
+}
+</script>
+<?php
 global $g_user;
 $cn=Dossier::connect();
 $g_user=new User($cn);
diff --git a/html/recherche.php b/html/recherche.php
index eb1ae08..1e84dd1 100644
--- a/html/recherche.php
+++ b/html/recherche.php
@@ -56,7 +56,20 @@ if ( $act=='X')
      exit();
   }
 // display a search box
-
+?>
+<script>
+/**
+ * All the onload must be here otherwise the other will overwritten
+ * @returns {undefined}
+ */
+window.onload=function ()
+{
+    create_anchor_up();
+    init_scroll();
+    sorttable.init
+}
+</script>
+<?php
 $ledger=new Acc_Ledger_Search('ALL');
 $search_box=$ledger->search_form();
 echo '<div class="content">';



reply via email to

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