FSN#36132 Alerts en confirm via jQuery dialoog
svn path=/Website/trunk/; revision=31594
This commit is contained in:
@@ -1091,8 +1091,9 @@ var FcltMgr =
|
||||
try { document.documentElement.focus(); }
|
||||
catch(e) {/* soms met IE8 op 'remembered' tabbladen */}
|
||||
},
|
||||
mydialog: function (tekst, params, fncallback)
|
||||
mydialog: function (tekst, params)
|
||||
{
|
||||
var ditwindow = window;
|
||||
var buttons = // Ok is er altijd
|
||||
[
|
||||
{
|
||||
@@ -1101,7 +1102,7 @@ var FcltMgr =
|
||||
{
|
||||
if (params.fncallback)
|
||||
params.fncallback();
|
||||
$(this).dialog("close");
|
||||
ditwindow.$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -1120,12 +1121,13 @@ var FcltMgr =
|
||||
resizable: false,
|
||||
buttons: buttons,
|
||||
close: function (event, ui) {
|
||||
$(this).remove();
|
||||
ditwindow.$(this).remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm: function (tekst, params, fncallback)
|
||||
{
|
||||
var ditwindow = window;
|
||||
if (typeof params == "function")
|
||||
{ // shift
|
||||
fncallback = params;
|
||||
@@ -1157,7 +1159,7 @@ var FcltMgr =
|
||||
{
|
||||
if (params.fncancel)
|
||||
params.fncancel();
|
||||
$(this).dialog("close");
|
||||
ditwindow.$(this).dialog("close");
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
@@ -540,61 +540,78 @@ function __rsProcessResultset(processParams) // processParams wordt blind aan al
|
||||
{
|
||||
%>
|
||||
<script>
|
||||
function doPrint(poutputmode)
|
||||
{
|
||||
var autosortby = "";
|
||||
var xx = $("th.sorttable_sorted,th.sorttable_sorted_reverse");
|
||||
if (xx.length)
|
||||
{
|
||||
if (xx.html().split("<br>").length > 1)
|
||||
{
|
||||
autosortby = xx.html().split("<br>")[0];// Bij combined alleen de eerste
|
||||
}
|
||||
else // moeten we complexer strippen
|
||||
{
|
||||
autosortby = xx.text();
|
||||
autosortby = autosortby.substring(0, autosortby.length - 2); // indicator er af
|
||||
}
|
||||
}
|
||||
if (xx.hasClass("sorttable_sorted_reverse"))
|
||||
{
|
||||
autosortby = "-" + autosortby;
|
||||
}
|
||||
|
||||
<% if (Request.ServerVariables("REQUEST_METHOD") == "POST")
|
||||
{ %>
|
||||
document.printform.autosortby.value = autosortby;
|
||||
document.printform.outputmode.value = poutputmode;
|
||||
document.printform.submit();
|
||||
<% }
|
||||
else
|
||||
{ %>
|
||||
window.open("<%=Request.ServerVariables("SCRIPT_NAME")%>?outputmode=" + poutputmode + "&autosortby=" + escape(autosortby) + "<%=safe.jsstring(transitQS())%>");
|
||||
<% } %>
|
||||
}
|
||||
|
||||
function doOutput(poutputmode)
|
||||
{
|
||||
var autosortby = "";
|
||||
var xx = $("th.sorttable_sorted,th.sorttable_sorted_reverse");
|
||||
if (xx.length)
|
||||
{
|
||||
if (xx.html().split("<br>").length > 1)
|
||||
{
|
||||
autosortby = xx.html().split("<br>")[0];// Bij combined alleen de eerste
|
||||
}
|
||||
else // moeten we complexer strippen
|
||||
{
|
||||
autosortby = xx.text();
|
||||
autosortby = autosortby.substring(0, autosortby.length - 2); // indicator er af
|
||||
}
|
||||
}
|
||||
if (xx.hasClass("sorttable_sorted_reverse"))
|
||||
{
|
||||
autosortby = "-" + autosortby;
|
||||
}
|
||||
|
||||
<% if (Request.ServerVariables("REQUEST_METHOD") == "POST")
|
||||
{ %>
|
||||
// Alle parameters zijn in een formulier gestopt als request methode POST is.
|
||||
if (poutputmode == 0)
|
||||
document.printform.target = "_self";
|
||||
|
||||
document.printform.autosortby.value = autosortby;
|
||||
<% } %>
|
||||
|
||||
FcltMgr.confirm(L("lcl_print_properties"), { fncancel: function()
|
||||
<% }
|
||||
var hasFlex = this.flexModule && this.flexId;
|
||||
%>
|
||||
if (!<%=hasFlex?"true":"false"%> || !(poutputmode == 1 || (poutputmode == 2 && "<%=S("excel_mode")%>" == "0")))
|
||||
{
|
||||
doPrint(poutputmode);
|
||||
return;
|
||||
}
|
||||
params = { oktekst: L("lcl_outputzonderkenmerken") };
|
||||
params.fncallback = function()
|
||||
{
|
||||
poutputmode += 4; // poutputmode wordt 5 (printer zonder flex) of 6 (excel zonder flex);
|
||||
<% if (Request.ServerVariables("REQUEST_METHOD") == "POST")
|
||||
{ %>
|
||||
document.printform.outputmode.value = poutputmode;
|
||||
document.printform.submit();
|
||||
<% }
|
||||
else
|
||||
{ %>
|
||||
window.open("<%=Request.ServerVariables("SCRIPT_NAME")%>?outputmode=" + poutputmode + "&autosortby=" + escape(autosortby) + "<%=safe.jsstring(transitQS())%>");
|
||||
<% } %>
|
||||
doPrint(poutputmode + 4);
|
||||
}
|
||||
},
|
||||
function() {
|
||||
<% if (Request.ServerVariables("REQUEST_METHOD") == "POST")
|
||||
{ %>
|
||||
document.printform.outputmode.value = poutputmode;
|
||||
document.printform.submit();
|
||||
<% }
|
||||
else
|
||||
{ %>
|
||||
window.open("<%=Request.ServerVariables("SCRIPT_NAME")%>?outputmode=" + poutputmode + "&autosortby=" + escape(autosortby) + "<%=safe.jsstring(transitQS())%>");
|
||||
<% } %>
|
||||
});
|
||||
|
||||
params.buttons = [
|
||||
{
|
||||
text: L("lcl_outputmetkenmerken"),
|
||||
click: function ()
|
||||
{
|
||||
doPrint(poutputmode); // poutputmode wordt 5 (printer zonder flex) of 6 (excel zonder flex);
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
{
|
||||
text: L("lcl_cancel"),
|
||||
click: function ()
|
||||
{
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}];
|
||||
FcltMgr.mydialog(L("lcl_print_properties"), params);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
|
||||
Reference in New Issue
Block a user