diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 28542f20f..57fb48df1 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -778,7 +778,7 @@ function go_next_concerned() { * @returns {undefined} */ function view_history_account(p_value, dossier, p_exercice) { - layer++; + var layer=get_next_layer(); var idbox = 'det' + layer; var popup = {'id': idbox, 'cssclass': 'inner_box', 'html': loading(), 'drag': false}; @@ -806,6 +806,8 @@ function view_history_account(p_value, dossier, p_exercice) { add_div(popup); success_box(req, xml); id$(idbox).style.top = calcy(140 + (layer * 3)) + "px"; + $id$(idbox).setStyle({top:calcy(140 + (layer * 3)) + "px" + ,"z-index":layer}) } } ); @@ -819,7 +821,7 @@ function view_history_account(p_value, dossier, p_exercice) { * @returns {undefined} */ function view_history_anc_account(p_value, dossier, p_exercice) { - layer++; + var layer=get_next_layer(); var idbox = 'det' + layer; var popup = {'id': idbox, 'cssclass': 'inner_box', 'html': loading(), 'drag': false}; @@ -845,8 +847,12 @@ function view_history_anc_account(p_value, dossier, p_exercice) { if (req.responseText === 'NOCONX') { reconnect();return;} add_div(popup); - id$(idbox).innerHTML = req.responseText; - id$(idbox).style.top = calcy(140 + (layer * 3)) + "px"; + id$(idbox).setStyle( + { + top:calcy(140 + (layer * 3)) + "px" + ,"z-index":get_next_layer() + } + ) } } ); @@ -881,7 +887,12 @@ function update_history_account(obj) { if (req.responseText === 'NOCONX') { reconnect();return;} success_box(req, xml); - id$(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; + id$(obj.div).setStyle( + { + top:calcy(140 + (layer * 3)) + "px" + ,"z-index":get_next_layer() + } + ) } }); } catch (e) { @@ -895,7 +906,7 @@ function update_history_account(obj) { * \param p_value f_id of the card */ function view_history_card(p_value, dossier, p_exercice) { - layer++; + var layer=get_next_layer(); var idbox = 'det' + layer; var popup = { 'id': idbox, @@ -925,7 +936,12 @@ function view_history_card(p_value, dossier, p_exercice) { add_div(popup); success_box(req, xml); - id$(idbox).style.top = calcy(140 + (layer * 3)) + "px"; + id$(idbox).setStyle( + { + top:calcy(140 + (layer * 3)) + "px" + ,"z-index":get_next_layer() + } + ) } } ); @@ -935,7 +951,7 @@ function view_history_card(p_value, dossier, p_exercice) { * \param p_value int fiche.f_id of the card */ function view_followup_card(p_value, dossier) { - layer++; + var layer=get_next_layer(); var idbox = 'detfu' + layer; var popup = { 'id': idbox, @@ -963,7 +979,12 @@ function view_followup_card(p_value, dossier) { add_div(popup); id$(idbox).update(req.responseText); - id$(idbox).style.top = calcy(140 + (layer * 3)) + "px"; + id$(idbox).setStyle( + { + top:calcy(140 + (layer * 3)) + "px" + ,"z-index":get_next_layer() + } + ) } } ); @@ -997,7 +1018,12 @@ function update_history_card(obj) { remove_waiting_box(); success_box(req, xml); - id$(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; + id$(obj.div).setStyle( + { + top:calcy(140 + (layer * 3)) + "px" + ,"z-index":get_next_layer() + } + ) } }); } catch (e) { @@ -1084,7 +1110,7 @@ function reverseOperation(obj) { * \param dossier dossier id */ function modifyOperation(p_value, dossier) { - layer++; + var layer=get_next_layer(); var id_div = 'det' + layer; waiting_box(); var querystring = { @@ -1112,9 +1138,12 @@ function modifyOperation(p_value, dossier) { remove_waiting_box(); add_div(popup); success_box(xml, txt); - id$(id_div).style.position = "absolute"; - id$(id_div).style.top = calcy(100 + (layer * 3)) + "px"; - } + id$(id_div).setStyle({ + top:calcy(100 + (layer * 3)) + "px" + ,"z-index":layer + ,position:"absolute" + }); + } } ); } @@ -1723,7 +1752,7 @@ function duplicate_operation(p_dossier, p_jr_id) { add_div(duplicate_div); duplicate_div.setStyle({ - "position": "fixed", "top": "15%", "z-index": "999", + "position": "fixed", "top": "15%", "z-index": get_next_layer(), "min-width": "30rem", "left": "30%", "width": "40%" @@ -1772,7 +1801,7 @@ function tax_detail_view (dossier_id,date_from,date_to,nLedger_id,nTva_id) return; } var y=calcy(15); - var div_style="position:absolute;"+";top:"+y+"px"; + var div_style="position:absolute;"+";top:"+y+"px"+";z-index:"+get_next_layer(); add_div({id:dgbox,cssclass:'inner_box',html:loading(),style:div_style,drag:true}); id$(dgbox).update(req.responseText); @@ -1846,7 +1875,7 @@ var operation_exercice = { return; } var y = calcy(15); - var div_style = "position:absolute;" + ";top:" + y + "px"; + var div_style = "position:absolute;" + ";top:" + y + "px"+";z-index:"+get_next_layer(); add_div({id: dgbox, cssclass: 'inner_box', html: loading(), style: div_style, drag: true}); id$(dgbox).update(req.responseText); } diff --git a/html/js/anc_script.js b/html/js/anc_script.js index 1dfbaca36..e4c5688b6 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -230,7 +230,7 @@ function search_ca(p_dossier, p_target, p_source) onSuccess: function(req) { try { remove_waiting_box(); - var pos = fixed_position(250, 150) + ";width:30%;height:50%"; + var pos = fixed_position(250, 150) + ";width:30%;height:50%;z-index:"+get_next_layer(); add_div({ id: "searchanc", drag: 1, @@ -489,7 +489,7 @@ function anc_key_choice(p_dossier, p_table, p_amount,p_ledger) var code_html = getNodeText(html[0]); // Firefox ne prend que les 4096 car. code_html = unescape_xml(code_html); - var position=fixed_position(50,120); + var position=fixed_position(50,120)+";z-index:"+get_next_layer(); add_div({id: name_ctl, cssclass: 'inner_box', style: position, drag: 1}); id$(name_ctl).innerHTML = code_html; } catch (e) @@ -626,7 +626,7 @@ function anc_detail_op(p_oa_group,gDossier) { method:"get", parameters:{"gDossier":gDossier,"op":"anc_detail_op","oa_group":p_oa_group}, onSuccess:function (req) { - add_div({"id":"anc_detail_op_div","cssclass":"inner_box","style":"position:fixed;top:5%"}); + add_div({"id":"anc_detail_op_div","cssclass":"inner_box","style":"position:fixed;top:5%;z-index:"+get_next_layer()}); id$('anc_detail_op_div').update(req.responseText); remove_waiting_box(); } diff --git a/html/js/card.js b/html/js/card.js index 7fd6a5499..f82a039a4 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -24,7 +24,6 @@ * javascript for searching a card */ -var card_layer=1; /** * search a card an display the result into a inner box */ @@ -577,7 +576,7 @@ function fill_fin_data(text,li) function fill_ipopcard(obj) { - card_layer++; + var card_layer=get_next_layer(); var content='card_'+card_layer; var nTop=170+card_layer; @@ -586,7 +585,7 @@ function fill_ipopcard(obj) } var str_top="top:"+calcy(nTop)+"px"; - var str_style=str_top+";height:auto;position:absolute"; + var str_style=str_top+";height:auto;position:absolute;z-index:"+get_next_layer(); waiting_box(); var popup={'id': content,'cssclass':'inner_box2','style':str_style,'html':"",'drag':false}; @@ -1208,7 +1207,7 @@ function delete_card(obj) { function modify_card(p_fiche_id) { /* window with result */ - card_layer++; + var card_layer=get_next_layer(); var content = 'card_' + card_layer; var nTop = 170 + card_layer; diff --git a/html/js/infobulle.js b/html/js/infobulle.js index 2ab0cfd96..b91744b65 100644 --- a/html/js/infobulle.js +++ b/html/js/infobulle.js @@ -101,7 +101,7 @@ function displaySelectBox(p_name) { newDiv.style.top=locPosY+"px"; newDiv.style.left=document.getElementById(p_name+"_bt").offsetLeft+"px"; - card_layer++; + var card_layer=get_next_layer(); newDiv.setStyle({display:"block",position:"absolute","z-index":card_layer}); if ( id$("search_"+p_name+"_list") ) { diff --git a/html/js/modele_document.js b/html/js/modele_document.js index 6872f2e6e..3813caf9e 100644 --- a/html/js/modele_document.js +++ b/html/js/modele_document.js @@ -21,7 +21,7 @@ */ function modifyModeleDocument(p_value,dossier) { - layer++; + var layer=get_next_layer(); id='det'+layer; var pos_y=posY+offsetY-20; var pos_x=posX+offsetX+40; diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js index 05e9a2441..e3bac1486 100644 --- a/html/js/noalyss_script.js +++ b/html/js/noalyss_script.js @@ -30,7 +30,7 @@ var ask_reload = 0; var tag_choose = ''; var aDraggableElement = new Array(); // Layer for z-index , see function get_next_layer , must be used in PHP and JS -var layer=0; +var global_layer=10; // document.viewport depends of prototype.js var viewport = document.viewport.getDimensions(); // Gets the viewport as an object literal var width = viewport.width; // Usable window width @@ -168,7 +168,8 @@ function g(ID) { return id$(ID); } function get_next_layer(){ - return layer++; + console.debug(`layer is ${global_layer}`); + return global_layer++; } /** * enable the type of periode @@ -938,7 +939,7 @@ function show_ledger_choice(json_obj) { var obj = { id: json_obj.div + 'jrn_search', cssclass: 'inner_box', - style: ';position:absolute;width:auto;z-index:20;margin-left:20%', + style: ';position:absolute;width:auto;z-index:'+get_next_layer()+';margin-left:20%', drag: 1 }; //var y=calcy(posY); @@ -1147,7 +1148,7 @@ function show_calc() { var obj = { id: sid, html: shtml, - drag: false, style: 'z-index:98' + drag: false, style: 'z-index:'+get_next_layer() }; add_div(obj); this.document.getElementById('inp').focus(); @@ -2140,7 +2141,7 @@ function check_date_id(p_id_date) { */ function view_action(ag_id, dossier, modify) { waiting_box(); - layer++; + var layer=get_next_layer(); id = 'action' + layer; querystring = 'gDossier=' + dossier + '&op=vw_action&ag_id=' + ag_id + '&div=' + id + '&mod=' + modify; @@ -2170,7 +2171,7 @@ function view_action(ag_id, dossier, modify) { } var code_html = getNodeText(html[0]); code_html = unescape_xml(code_html); - var pos = fixed_position(0, 50) + ";width:90%;left:5%;z-index:"+layer; + var pos = fixed_position(0, 50) + ";width:90%;left:5%;z-index:"+layer+";"; add_div({ id: id, cssclass: "inner_box", @@ -3712,7 +3713,7 @@ function progress_bar_start(p_taskid, p_message) { add_div({ id: "message" + progressIdx, cssclass: "inner_box", - style: "z-index:1000;position:fixed;top:30%;width:40%;left:30%" + style: "z-index:"+get_next_layer()+";position:fixed;top:30%;width:40%;left:30%" }); id$("message" + progressIdx).update('

' + content[65] + '

' + message); // Create a div @@ -4721,7 +4722,7 @@ Widget.prototype.toggle_full_size=function (widget_domid) { } else { id$(widget_domid).addClassName('widget-full_size'); - layer++; + var layer=get_next_layer(); id$(widget_domid).style.zIndex=layer; } @@ -4991,18 +4992,45 @@ Noalyss.prototype.parameter_test_smtp = function () } /** - * Display a dialog box to search + * Display a dialog box to search the PEPPOL ID of someone */ -Noalyss.prototype.display_search_peppol(p_domid) +Noalyss.prototype.display_search_peppol=function (p_domid) { - try + try { - - }catch(e) + var dgbox = "peppol_id_search_div"; + waiting_box(); + removeDiv(dgbox); + var queryString = { + + } + var action = new Ajax.Request( + "ajax_misc.php", + { + method: 'GET', + parameters: queryString, + onFailure: ajax_misc_failure, + onSuccess: function (req) { + remove_waiting_box(); + if (req.responseText == 'NOCONX') { + reconnect(); + return; + } + var y = calcy(15); + var div_style = "position:absolute;" + ";top:" + y + "px"+"z-index:"+get_next_layer(); + add_div({id: dgbox, cssclass: 'inner_box', html: loading(), style: div_style, drag: true}); + $(dgbox).innerHTML = req.responseText; + + } + } + ); + } catch (e) { - console.error(e) + alert_box(e.message); } + + } noalyss=new Noalyss(); diff --git a/html/js/todo_list.js b/html/js/todo_list.js index 45c701433..3952d0d07 100644 --- a/html/js/todo_list.js +++ b/html/js/todo_list.js @@ -187,7 +187,7 @@ function zoom_todo () { var clonetodo=$('todo_list').clone(); clonetodo.setAttribute('id','clone_todo_list') - clonetodo.setStyle({'z-index':1,'position':'fixed','width':'95%','height':'95%','top':'2%','right':'2%','left':'2%'}) + clonetodo.setStyle({'z-index':get_next_layer(),'position':'fixed','width':'95%','height':'95%','top':'2%','right':'2%','left':'2%'}) clonetodo.innerHTML=$('todo_list').innerHTML; $('todo_list').innerHTML=""; clonetodo.addClassName('inner_box');