noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 13/13: Ajax : misc. bugs due to files reorgan


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 13/13: Ajax : misc. bugs due to files reorganizing
Date: Wed, 14 Oct 2015 21:38:34 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 1d95f5116b64fbc44a0bb71cb58301b31a4ea357
Author: Dany De Bontridder <address@hidden>
Date:   Wed Oct 14 22:44:41 2015 +0200

    Ajax : misc. bugs due to files reorganizing
---
 html/js/acc_ledger.js                  |   10 ++++++----
 html/popup.php                         |    2 +-
 include/ajax/ajax_history.php          |    8 +++++---
 include/template/history_top.php       |    2 +-
 include/template/ledger_detail_top.php |    1 +
 5 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 42ba78a..c98f05f 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -693,7 +693,8 @@ function update_history_account(obj)
             "div" :obj.div ,
             "gDossier" : obj.gDossier,
             "pcm_val" : obj.pcm_val ,
-            "ex" : obj.select.options[obj.select.selectedIndex].text
+            "ex" : obj.select.options[obj.select.selectedIndex].text,
+            "op":"history"
         };
         waiting_box();
         var action = new Ajax.Request(
@@ -763,7 +764,8 @@ function update_history_card(obj)
             "div" : obj.div ,
             "gDossier" : obj.gDossier,
             "f_id" : obj.f_id ,
-            "ex" : obj.select.options[obj.select.selectedIndex].text
+            "ex" : obj.select.options[obj.select.selectedIndex].text,
+            "op":"history"
         };
         waiting_box();
         var action = new Ajax.Request(
@@ -863,8 +865,8 @@ function modifyOperation(p_value, dossier)
                     remove_waiting_box();
                     add_div(popup);
                     success_box(xml, txt);
-                    $(id).style.position = "absolute";
-                    $(id).style.top = calcy(100 + (layer * 3)) + "px";
+                    $(id_div).style.position = "absolute";
+                    $(id_div).style.top = calcy(100 + (layer * 3)) + "px";
                 }
             }
     );
diff --git a/html/popup.php b/html/popup.php
index e7b8884..5f019d9 100644
--- a/html/popup.php
+++ b/html/popup.php
@@ -30,7 +30,7 @@ require_once NOALYSS_INCLUDE.'/class/class_periode.php';
 html_page_start($_SESSION['g_theme']);
 echo '<div style="float:left;">';
 global $g_user;
-if ( basename($_GET['ajax']) == 'ajax_history.php' )
+if ( basename($_GET['op']) == 'history' )
   {
     $href=dossier::get();
     $cn=Dossier::connect();
diff --git a/include/ajax/ajax_history.php b/include/ajax/ajax_history.php
index a9d3c66..3fd225e 100644
--- a/include/ajax/ajax_history.php
+++ b/include/ajax/ajax_history.php
@@ -81,7 +81,7 @@ if ( isset($_GET['f_id']))
            $dossier=dossier::id();
            if ( $div != 'popup')
              {
-               
$obj="{div:'$div',f_id:'".$_GET['f_id']."',gDossier:'$dossier',select:this}";
+               
$obj="{op:'history',div:'$div',f_id:'".$_GET['f_id']."',gDossier:'$dossier',select:this}";
                $is=$exercice->select('p_exercice',$default,' 
onchange="update_history_card('.$obj.');"');
                $old=_("Autre exercice")." ".$is->input();
              }
@@ -95,6 +95,7 @@ if ( isset($_GET['f_id']))
                $old.=HtmlInput::hidden('f_id',$_GET['f_id']);
                $old.=HtmlInput::hidden('ajax',$_GET['ajax']);
                $old.=dossier::hidden();
+                $old.=HtmlInput::hidden('op','history');
                $old.='</form>';
              }
          }
@@ -104,7 +105,7 @@ if ( isset($_GET['f_id']))
        
$detail_card=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE),$fiche->getName());
        echo h2(  
$fiche->getName().'['.$fiche->strAttribut(ATTR_DEF_QUICKCODE).']',' 
class="title" ');
        echo '<p style="text-align:center;">'.$detail_card.'</p>';
-
+ 
        if (   $fiche->HtmlTable($array,0,$from_div)==-1){
          echo h2(_("Aucune opération pour l'exercice 
courant"),'class="error"');
        }
@@ -152,7 +153,7 @@ if ( isset($_REQUEST['pcm_val']))
            $dossier=dossier::id();
            if ( $div != 'popup')
              {
-               
$obj="{div:'$div',pcm_val:'".$_GET['pcm_val']."',gDossier:'$dossier',select:this}";
+               
$obj="{op:'history',div:'$div',pcm_val:'".$_GET['pcm_val']."',gDossier:'$dossier',select:this}";
                $is=$exercice->select('p_exercice',$default,' 
onchange="update_history_account('.$obj.');"');
                $old=_("Autre exercice")." ".$is->input();
              }
@@ -166,6 +167,7 @@ if ( isset($_REQUEST['pcm_val']))
                $old.=HtmlInput::hidden('pcm_val',$_GET['pcm_val']);
                $old.=HtmlInput::hidden('ajax',$_GET['ajax']);
                $old.=dossier::hidden();
+                $old.=HtmlInput::hidden('op','history');
                $old.='</form>';
              }
 
diff --git a/include/template/history_top.php b/include/template/history_top.php
index 917d20b..259318c 100644
--- a/include/template/history_top.php
+++ b/include/template/history_top.php
@@ -6,7 +6,7 @@
    if ($div != "popup")
    {
      $callback=$_SERVER['PHP_SELF'];
-     $str=$_SERVER['QUERY_STRING']."&act=de&ajax=$callback";
+     $str=$_SERVER['QUERY_STRING']."&op=history&act=de&ajax=$callback";
      echo '<A id="close_div" HREF="javascript:void(0)" onclick="var 
a=window.open(\'popup.php?'.$str.'\',\'\',\'fullscreen=yes,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,statusbar=no,menubar=no,status=no,location=no\');
 a.focus();removeDiv(\''.$div.'\')">&#11036
 </A>';
 echo '<A id="close_div" HREF="javascript:void(0)" 
onclick="removeDiv(\''.$div.'\');">&#10761;</A>';
diff --git a/include/template/ledger_detail_top.php 
b/include/template/ledger_detail_top.php
index 6be296a..c25fbf1 100644
--- a/include/template/ledger_detail_top.php
+++ b/include/template/ledger_detail_top.php
@@ -11,6 +11,7 @@
              'jr_id'=>$obj->det->jr_id,
              'act'=>'de',
              'div'=>$div,
+             'op'=>'ledger',
             'ajax'=>$callback));
      $msg_close=_('Fermer');
      $msg_pop=_('Ouvrir dans une fenêtre séparée');



reply via email to

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