[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4385 - in phpcompta/trunk: html html/js include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4385 - in phpcompta/trunk: html html/js include |
Date: |
Fri, 18 Nov 2011 10:50:19 +0100 (CET) |
Author: danydb
Date: 2011-11-18 10:50:18 +0100 (Fri, 18 Nov 2011)
New Revision: 4385
Modified:
phpcompta/trunk/html/ajax_misc.php
phpcompta/trunk/html/js/anc_script.js
phpcompta/trunk/include/ajax_anc_search.php
Log:
#168 recherche imp. analytique anc
Modified: phpcompta/trunk/html/ajax_misc.php
===================================================================
--- phpcompta/trunk/html/ajax_misc.php 2011-11-18 09:40:49 UTC (rev 4384)
+++ phpcompta/trunk/html/ajax_misc.php 2011-11-18 09:50:18 UTC (rev 4385)
@@ -530,4 +530,7 @@
case 'up_pay_method':
require_once 'ajax_update_payment.php';
break;
+ case 'openancsearch':
+ require_once('ajax_anc_search.php');
+ break;
}
\ No newline at end of file
Modified: phpcompta/trunk/html/js/anc_script.js
===================================================================
--- phpcompta/trunk/html/js/anc_script.js 2011-11-18 09:40:49 UTC (rev
4384)
+++ phpcompta/trunk/html/js/anc_script.js 2011-11-18 09:50:18 UTC (rev
4385)
@@ -182,10 +182,35 @@
{
var pa_id=g(p_source).value;
var url="gDossier="+p_dossier+"&c1="+p_target+"&c2="+pa_id;
- var a=window.open("search_ca.php"+url,"CA
recherche",'statusbar=no,scrollbars=yes,toolbar=no');
- a.focus();
+ waiting_box();
+ removeDiv('search_anc');
+ var qs="op=openancsearch&gDossier="+p_dossier+"&ctl=searchanc";
+
+ var action=new Ajax.Request ( 'ajax_misc.php',
+ {
+ method:'get',
+ parameters:qs,
+ onFailure:null,
+ onSuccess:function(req){
+ try{
+ remove_waiting_box();
+ var pos=fixed_position(250,150)+";width:30%";
+ add_div({
+ id:"searchanc",
+ drag:1,
+ cssclass:"inner_box",
+ style:pos
+ });
+ $('searchanc').innerHTML=req.responseText;
+
+ } catch(e){
+ alert(e.message);
+ }
+ }
+ }
+ );
+
}
-
function caod_checkTotal()
{
var ie4=false;
Modified: phpcompta/trunk/include/ajax_anc_search.php
===================================================================
--- phpcompta/trunk/include/ajax_anc_search.php 2011-11-18 09:40:49 UTC (rev
4384)
+++ phpcompta/trunk/include/ajax_anc_search.php 2011-11-18 09:50:18 UTC (rev
4385)
@@ -38,13 +38,8 @@
require_once ('class_anc_plan.php');
require_once('function_javascript.php');
-/*!\todo add security here : check user and access to CA
- */
-
-html_page_start();
-load_all_script();
//------------- FORM ----------------------------------
-echo '<FORM METHOD="GET">';
+echo '<FORM METHOD="GET" onsubmit="search_anc_form(this);return false">';
$texte=new IText();
echo '<span>'._('Recherche').':';
echo $texte->input('label');
@@ -59,7 +54,7 @@
//------------- FORM ----------------------------------
if ( isset($_REQUEST['go']))
{
- $cn=new Database(dossier::id());
+ $cn=Dossier::connect();
$plan=new Anc_Plan($cn,$_REQUEST['c2']);
$plan->pa_id=$_REQUEST['c2'];
if ( $plan->exist()==false)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4385 - in phpcompta/trunk: html html/js include,
phpcompta-dev <=