UWVA#51618 Volgorde van verplaatsen van de button balk veranderd tot na alle ajax calls

svn path=/Website/branches/v2017.2/; revision=36445
This commit is contained in:
2017-12-22 09:51:54 +00:00
parent c7f4d57f2e
commit bd2e4e9c4d
2 changed files with 25 additions and 11 deletions

View File

@@ -153,7 +153,7 @@ else
<body id="editbody">
<% var buttons = [ {title: L("lcl_submit"), icon: "opslaan.png", action:"bez_submit()", singlepress: true, id:"btn_bez_submit"},
{title: L("lcl_cancel"), icon: "undo.png", action:"bez_cancel()"} ];
IFRAMER_HEADER(L("lcl_bez_frame"),buttons);
IFRAMER_HEADER(L("lcl_bez_frame"), buttons);
%> <div id="edit">
<%
maxPast = ((urole == "fe")? 0 : S("vis_afspraak_limiet"));

View File

@@ -179,22 +179,36 @@ function IFRAMER(id, url, params)
function IFRAMER_HEADER(titel, buttons, params)
{
params = params || {};
var iscoll = getQParamInt("collapsed",0)==1;
%>
<script>
// in een 2de ready() want deze moet worden uitgevoerd na andere $(document).ready()'s
$(function()
function moveHeaderToFooter()
{
headertofooter();
<% if (iscoll) { %>
$(".fcltframeheader").next().toggle();
<% } %>
}
$(function()
{
if ($.active > 0) // Has active ajax calls?
{
$(function()
// Then await those calls first (UWVA#51618)
$(document).ajaxStop(function()
{
headertofooter();
<% if (iscoll) { %>
$(".fcltframeheader").next().toggle(); <%
}
%>
})
});
$(this).unbind("ajaxStop");
moveHeaderToFooter();
});
}
else
moveHeaderToFooter();
});
</script>
<div class="fcltframeheader <%= iscoll && !(params && params.nocollaps) ? ' collapsed' : ''%>" <%=params && params.nocollaps? "" : "onclick=\"$(this).nextAll('#collapseblock').eq(0).toggle();$(this).toggleClass('collapsed');FcltMgr.resized(window);updateTableHeaders()\""%>>
<span style="float:left"><nobr><%=titel %>&nbsp;<span id="iframerextratitle"></span></nobr></span><%
if (buttons) {