FSN#51327 back() vanuit notitie.asp werkt niet goed

svn path=/Website/trunk/; revision=38829
This commit is contained in:
Alex Tiehuis
2018-08-16 07:40:10 +00:00
parent 6a16e63e1d
commit e580e577f7
4 changed files with 40 additions and 28 deletions

View File

@@ -44,7 +44,13 @@ var subject = L("lcl_cnt_contract") + " " + cnt_info.nummer_intern+ (cnt_info.ve
<head>
<% FCLTMHeader.Generate({title: subject }); %>
<script type="text/javascript">
<script>
<% if (getQParamInt("notitie", 0) == 1) { %>
$(function() {
jqToast(L("lcl_mobile_data_saved"));
window.setTimeout(function() { window.history.go(-3); }, 2000); // in case of new Note: walk back the history
});
<% } %>
function cnt_goedkeur()
{
if (confirm(L("lcl_cnt_approve").format("<%=safe.jsstring(cnt_info.nummer_intern)%>")))

View File

@@ -428,17 +428,18 @@ var editKostenplaats = (stdm_info.ins_srtdiscipline_kostenklant==1 && stdm_info.
xdisplay: block!important;
}
</style>
<script type="text/javascript">
<script>
<% if (getQParamInt("notitie", 0) == 1) { %>
$(function() {
jqToast(L("lcl_mobile_data_saved"));
window.setTimeout(function() { window.history.go(-3); }, 2000); // in case of new Note: walk back the history
});
<% } %>
<% if (getQParamInt("melding", 0) == 1) { %>
$(function() {
jqToast(L("lcl_mobile_data_saved"));
$("a[data-rel=back]").on("click", function(event) {
if (window.location.hash == "") {
event.preventDefault();
window.history.go(-3);
}
});
}); // ' onder nummer ... '
window.setTimeout(function() { window.history.go(-2); }, 2000); // in case of accepted/canceled Notification: walk back the history
});
<% } %>
var timerID=null;
function delayed(delay, fn)
@@ -617,7 +618,7 @@ var editKostenplaats = (stdm_info.ins_srtdiscipline_kostenklant==1 && stdm_info.
$("#time_from_enddate").val(endTime);
}
function mld_close_submit(mld_key)
function mld_close_submit()
{
if (!validateForm("u2"))
return false;
@@ -625,7 +626,7 @@ var editKostenplaats = (stdm_info.ins_srtdiscipline_kostenklant==1 && stdm_info.
$.post($("form[name=closeform]")[0].action,
$("[name=closeform]").serialize(),
McltCallbackAndThenAlways(function() {
window.location.href = "<%=rooturl%>/appl/pda/melding.asp?melding=1&mld_key=" + mld_key;
window.location.href = "<%=rooturl%>/appl/pda/melding.asp?melding=1&mld_key=" + "<%=mld_key%>";
}), "json");
return true; // disable button
}
@@ -1167,8 +1168,6 @@ if (mld_key > -1 && this_mld.canClose)
CONTENT_START();
%>
<form id="closeform" name="closeform" action="<%=rooturl%>/appl/mld/mld_close_save.asp?mld_key=<%=mld_key%>" method="post">
<input type="hidden" id="mld_key" name="mld_key" value="<%=mld_key%>">
<%
if (mldRequireCnt == 1)
{ %>
@@ -1332,7 +1331,7 @@ if (mld_key > -1 && this_mld.canClose)
}
CONTROLGROUP_START();
BUTTON(L("lcl_submit"), {click: "mld_close_submit("+mld_key+");", dataicon: "refresh"});
BUTTON(L("lcl_submit"), {click: "mld_close_submit();", dataicon: "refresh"});
BUTTON(L("lcl_cancel"), {datarel: "back", dataicon: "back"} );
CONTROLGROUP_END();
IFACE.FORM_END();
@@ -1387,7 +1386,7 @@ if (mld_key > -1 && this_mld.canAccept)
PAGE_START({id: "accp-4-" + mld_key, dialog: true})
HEADER({title: L("lcl_accept") + " " + subject, back: false, nohome:true});
%>
<script type="text/javascript">
<script>
$(function()
{
@@ -1397,14 +1396,14 @@ if (mld_key > -1 && this_mld.canAccept)
$("#opmerk").focus();
});
function mld_accept_submit(mld_key)
function mld_accept_submit()
{
if (!validateForm("u2"))
return false;
$.post($("form[name=acceptform]")[0].action, $("[name=acceptform]").serialize() + "<%=TransitParam%>",
McltCallbackAndThenAlways(function() {
window.location.href = "<%=rooturl%>/appl/pda/melding.asp?melding=1&mld_key=" + mld_key;
window.location.href = "<%=rooturl%>/appl/pda/melding.asp?melding=1&mld_key=" + "<%=mld_key%>";
}), "json");
return true; // disable button
}
@@ -1465,7 +1464,6 @@ if (mld_key > -1 && this_mld.canAccept)
if (this_mld.canBOwrite || this_mld.canFOwrite)
{
%>
<input type="hidden" id="mld_key" name="mld_key" value="<%=mld_key%>">
<input type="hidden" id="prs_key" name="prs_key" value="<%=mld_info.melder_key%>">
<input type="hidden" id="disc_key" name="disc_key" value="<%=mld_info.disc%>">
<input type="hidden" id="loc_key" name="loc_key" value="<%=mld_info.loc_key%>">
@@ -1495,7 +1493,7 @@ if (mld_key > -1 && this_mld.canAccept)
RWFIELD("opmerk", (S("mld_note_mode") == 2 ? L("lcl_mld_note") : L("lcl_mld_inf_Opmerking")), "", {multi: true, disabled: false, pclass: "fldremark" + (req?" required":"")});
CONTROLGROUP_START();
BUTTON(L("lcl_accept"), {click: "mld_accept_submit("+mld_key+");", dataicon: "refresh"});
BUTTON(L("lcl_accept"), {click: "mld_accept_submit();", dataicon: "refresh"});
BUTTON(L("lcl_cancel"), {datarel: "back", dataicon: "back"} );
CONTROLGROUP_END();
IFACE.FORM_END();

View File

@@ -186,9 +186,9 @@ var sql = "";
var url = "";
switch (pnode)
{
case "melding": url = "melding.asp?mld_key=" + pkey; break; // Terug naar de melding.
case "opdracht": url = "order.asp?opdr_key=" + pkey; break; // Terug naar de opdracht.
case "contract": url = "contract.asp?cnt_key=" + pkey; break; // Terug naar het contract.
case "melding": url = "melding.asp?notitie=1&mld_key=" + pkey; break; // Terug naar de melding.
case "opdracht": url = "order.asp?notitie=1&opdr_key=" + pkey; break; // Terug naar de opdracht.
case "contract": url = "contract.asp?notitie=1&cnt_key=" + pkey; break; // Terug naar het contract.
}
return url;
@@ -205,7 +205,7 @@ var sql = "";
PAGE_START({id: "note-1-"+pkey});
%>
<script type="text/javascript" >
<script>
function note_add()
{
$("#note").val("");
@@ -224,8 +224,9 @@ var sql = "";
}
</script>
<%
var p_useraction = {icon: "back", action: "note_back()", label: L("lcl_back")};
HEADER({title: L("lcl_mobile_notes")+" " + pnote.subject, useraction: p_useraction, nohome: true});
// var p_useraction = {icon: "back", action: "note_back()", label: L("lcl_back")};
// HEADER({title: L("lcl_mobile_notes")+" " + pnote.subject, useraction: p_useraction, nohome: true});
HEADER({title: L("lcl_mobile_notes")+" " + pnote.subject, back: true, nohome: true});
CONTENT_START();
CONTAINER_START()
if (pnote.canwritenotes)
@@ -255,7 +256,7 @@ var sql = "";
PAGE_START({id: "note-2-"+pkey});
%>
<script type="text/javascript">
<script>
function note_submit()
{
if (!validateForm("note_edit"))
@@ -320,7 +321,8 @@ var sql = "";
CONTROLGROUP_START();
BUTTON(L("lcl_submit"), {click: "note_submit()", dataicon: "check", singlepress: true});
BUTTON(L("lcl_cancel"), {linkid: "#note-1-"+pkey, dataicon: "back"});
BUTTON(L("lcl_cancel"), {datarel: "back", dataicon: "back"} );
// BUTTON(L("lcl_cancel"), {linkid: "#note-1-"+pkey, dataicon: "back"});
CONTROLGROUP_END();
IFACE.FORM_END();
%>

View File

@@ -131,7 +131,13 @@ if (mld_opdr.uitv_type == "B")
<head>
<% FCLTMHeader.Generate(); %>
<script type="text/javascript">
<script>
<% if (getQParamInt("notitie", 0) == 1) { %>
$(function() {
jqToast(L("lcl_mobile_data_saved"));
window.setTimeout(function() { window.history.go(-3); }, 2000); // in case of new Note: walk back the history
});
<% } %>
var timerID=null;
var typeopdr_matchtype = <%=mld_opdr.typeopdr_matchtype || -1%>; // voor als readonly
var mld_ord_show_cost = <%=S("mld_ord_show_cost")? 1 : 0%> == 1;