diff --git a/doc/developper/create_doc.sh b/doc/developper/create_doc.sh index e42aed8ac..23418cb8a 100755 --- a/doc/developper/create_doc.sh +++ b/doc/developper/create_doc.sh @@ -1,6 +1,6 @@ -#doxygen -#cd html; sed -i "s/utf-8/utf-8/g" * -#cd .. +doxygen +cd html; sed -i "s/utf-8/utf-8/g" * +cd .. if [ ! -z "$PGUSER" ] ; then echo "DOMAINE = $DOMAIN" postgresql_autodoc -u $PGUSER --password=$PGPASSWORD -h localhost -d ${DOMAIN}mod1 diff --git a/html/ajax_card.php b/html/ajax_card.php index 83fe43567..103b80cd5 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -241,6 +241,11 @@ case 'sc': case 'fs': require_once('class_acc_ledger.php'); $r=''; + $r.='
'; + $r.= 'Fermer'; + $r.='
'; + $r.='
'.h2info(_('Recherche de fiche')).'
'; + $r.='
'; $q=new IText('query'); $q->value=(isset($query))?$query:''; @@ -293,8 +298,7 @@ case 'fs': $price,$a[$i]['vw_sell']); $array[$i]['javascript'].=sprintf("set_value('%s','%s');", $tvaid,$a[$i]['tva_id']); - $array[$i]['javascript'].=sprintf("hideIPopup('%s')", - $ctl); + $array[$i]['javascript'].="removeDiv('search_card');"; }//foreach @@ -406,9 +410,8 @@ $html=escape_xml($html); header('Content-type: text/xml; charset=UTF-8'); echo << - - $ctl - $html - - + +$ctl +$html + EOF; diff --git a/html/ajax_poste.php b/html/ajax_poste.php index 4e44c6f99..78fdf0058 100644 --- a/html/ajax_poste.php +++ b/html/ajax_poste.php @@ -76,8 +76,13 @@ case "sf": $it->value=(isset($q))?$q:''; $str_poste=$it->input(); $str_submit=HtmlInput::submit('sf',_('Recherche')); + $r=''; + $r.='
'; + $r.= 'Fermer'; + $r.='
'; + $r.='
'.h2info(_('Poste Comptable')).'
'; - $r=''; + $r.=''; ob_start(); require_once('template/account_search.php'); $r.=ob_get_contents(); @@ -149,7 +154,7 @@ case "sf": $l,"lib$i"); } - $str.="hideIPopup('$ipopup');"; + $str.="removeDiv('search_account');"; $array[$i]['javascript']=$str; } ob_start(); diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js index 4fb2902fb..d914386db 100644 --- a/html/js/accounting_item.js +++ b/html/js/accounting_item.js @@ -65,7 +65,19 @@ function PcmnUpdate(p_value,p_lib,p_parent,p_type,p_dossier) */ function search_poste(obj) { - showIPopup(obj.ipopup); + var sx=0; + if ( window.scrollY) + { + sx=window.scrollY+40; + } + else + { + sx=document.body.scrollTop+60; + } + + var div_style="top:"+sx; + add_div({id:'search_account',cssclass:'op_detail',html:loading(),style:div_style}); + var dossier=$('gDossier').value; var queryString="?gDossier="+dossier; @@ -118,7 +130,7 @@ function search_poste(obj) } } - queryString+="&ctl="+obj.ipopup; + queryString+="&ctl="+'search_account'; queryString=encodeURI(queryString); var action=new Ajax.Request ( 'ajax_poste.php', { @@ -212,7 +224,7 @@ function result_poste_search(req) var nodeXml=html[0]; var code_html=getNodeText(nodeXml); code_html=unescape_xml(code_html); - $(name_ctl).innerHTML=code_html; + $('search_account').innerHTML=code_html; } catch (e) { diff --git a/html/js/card.js b/html/js/card.js index 10ebb7e77..9bc5f0a52 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -48,16 +48,34 @@ function search_card(obj) var jrn=obj.jrn; if ( jrn==undefined) { - if ( g('p_jrn')) jrn=$('p_jrn').value; - else jrn=-1; + if ( g('p_jrn')) { + jrn=$('p_jrn').value; + } + else { + jrn=-1; + } } -var query=encodeJSON({'gDossier':gDossier, + var query=encodeJSON({'gDossier':gDossier, 'inp':inp,'label':label,'price':price,'tvaid':tvaid, - 'ctl':obj.popup,'op':'fs','jrn':jrn, + 'ctl':'search_card','op':'fs','jrn':jrn, 'typecard':typecard,'query':string_to_search }); - showIPopup(obj.popup); + if ( $('search_card') ) { + removeDiv('search_card'); + } + var sx=0; + if ( window.scrollY) + { + sx=window.scrollY+40; + } + else + { + sx=document.body.scrollTop+60; + } + var div_style="top:"+sx; + add_div({id:'search_card',cssclass:'op_detail',html:loading(),style:div_style,drag:0}); + var action=new Ajax.Request ( 'ajax_card.php', { method:'get', @@ -148,7 +166,7 @@ function result_card_search(req) var nodeXml=html[0]; var code_html=getNodeText(nodeXml); code_html=unescape_xml(code_html); - $(name_ctl).innerHTML=code_html; + $('search_card').innerHTML=code_html; } catch (e) { diff --git a/html/style-light.css b/html/style-light.css index 0211b1cd4..e24966f41 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -594,10 +594,11 @@ div.popup_back{ top:0px; left:0px; width:100%; - height:100%; +height: 150%; + z-index:1; /*background-color:lightgrey;*/ - +background-color: rgba(165, 213,195, 0.5); display:none; } @@ -606,7 +607,7 @@ div.popup_border_title { top:20%; left:10%; width:60%; - height:80%; + height:80%; /*background:lightgrey;*/ z-index:10; /*border:dotted 1px black;*/ @@ -653,9 +654,9 @@ div.popup_content { left:0; right:0; width:100%; - height:96%; + height:96%; overflow: auto; - background-color:#DFE7FF; + background-color:#e4e7ed; font-size:10px ; font-family: helvetica,arial,sans-serif; font-style: normal; diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 8499becbe..5852f24b9 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -1488,7 +1488,7 @@ class Acc_Ledger // name of the field to update with the name of the card $quick_code->set_attribute('typecard','filter'); - $quick_code->extra='filter'; + // Add the callback function to filter the card on the jrn $quick_code->set_callback('filter_card'); $quick_code->set_function('fill_data'); @@ -2190,7 +2190,7 @@ class Acc_Ledger /* input quick code */ $f_qcode=new ICard('qcode'); - $f_qcode->extra='filter'; + $f_qcode->set_attribute('typecard','all'); $f_qcode->set_callback('filter_card'); $f_txt_qcode=new IText('qcode'); diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 9727d95e8..065b8db37 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -975,7 +975,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger $W1->set_attribute('label','e_client_label'); // name of the field to update with the name of the card $W1->set_attribute('typecard','cred'); - $W1->extra='cred'; + // Add the callback function to filter the card on the jrn $W1->set_callback('filter_card'); $W1->set_function('fill_data'); @@ -1039,7 +1039,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger $W1->set_attribute('ipopup','ipopcard'); $W1->set_attribute('typecard','deb'); - $W1->extra='deb'; // debits + // name of the field to update with the name of the card $W1->set_attribute('label','e_march'.$i.'_label'); // name of the field with the price diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index e447a51fa..1f9817b50 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -1108,7 +1108,7 @@ class Acc_Ledger_Sold extends Acc_Ledger $W1->set_attribute('label','e_client_label'); // name of the field to update with the name of the card $W1->set_attribute('typecard','deb'); - $W1->extra='deb'; + // Add the callback function to filter the card on the jrn $W1->set_callback('filter_card'); $W1->set_function('fill_data'); @@ -1173,7 +1173,6 @@ class Acc_Ledger_Sold extends Acc_Ledger $W1->set_dblclick("fill_ipopcard(this);"); $W1->set_attribute('ipopup','ipopcard'); - $W1->extra='cred'; // credits // name of the field to update with the name of the card $W1->set_attribute('label','e_march'.$i.'_label'); // name of the field with the price diff --git a/include/class_acc_payment.php b/include/class_acc_payment.php index 87a821453..29634f819 100644 --- a/include/class_acc_payment.php +++ b/include/class_acc_payment.php @@ -332,7 +332,7 @@ class Acc_Payment { $a=new ICard(); $a->jrn=$row->mp_jrn_def_id; - $a->extra=$row->mp_fd_id; + $a->set_attribute('typecard',$row->mp_fd_id); $a->name='e_mp_qcode_'.$row->mp_id; $a->set_dblclick("fill_ipopcard(this);"); $a->set_callback('filter_card'); diff --git a/include/class_icard.php b/include/class_icard.php index 1238993d7..a0bf1825f 100644 --- a/include/class_icard.php +++ b/include/class_icard.php @@ -177,7 +177,7 @@ class ICard extends HtmlInput { $ip_card=new IPopup ($p_name); $ip_card->drag=true; - $ip_card->set_width('45%'); + $ip_card->set_width('45%'); $ip_card->title='Fiche '; $ip_card->value=''; return $ip_card->input(); @@ -220,17 +220,17 @@ class ICard extends HtmlInput $this->javascript ); - $ind=sprintf('