HSLE#39714 nieuwe bulkaktie (Print) toevoegen
svn path=/Website/trunk/; revision=38672
This commit is contained in:
@@ -25,36 +25,14 @@ function inlineVoorzieningUrl(row)
|
||||
|
||||
function resMultiPrint(rowArray)
|
||||
{
|
||||
var index=0;
|
||||
var callbackCount = 0;
|
||||
var thisWindow = window;
|
||||
var win = window.open("");
|
||||
$(win.document.head).append("<style>@media print {div.pagebreak {page-break-after: always;}}</style>");
|
||||
|
||||
for (index=0; index<rowArray.length; index++)
|
||||
{
|
||||
var resData = JSON.parse(rowArray[index].getAttribute("rowdata"));
|
||||
if (resData)
|
||||
var res_ruimte_key = [];
|
||||
var res_key = []
|
||||
rowArray.forEach(function(row, index)
|
||||
{
|
||||
var url = '../res/res_xml.asp?res_key='+resData.resKey+'&print_rsv_ruimte_key='+resData.resRsvRuimteKey;
|
||||
url += "&fac_id=" + customerId + "&userauth=" + user_key + "&userhmac=" + userhmac;
|
||||
$(win.document.body).append($("<div class='pagebreak'>").load(url, function() { callbackCount++; }));
|
||||
}
|
||||
}
|
||||
var startPrintDialog = function()
|
||||
{
|
||||
if (callbackCount == rowArray.length)
|
||||
{
|
||||
win.print();
|
||||
win.close();
|
||||
thisWindow.reloadList();
|
||||
}
|
||||
else
|
||||
{
|
||||
win.setTimeout(startPrintDialog, 50);
|
||||
}
|
||||
}
|
||||
startPrintDialog();
|
||||
res_ruimte_key.push(JSON.parse(row.getAttribute("rowdata")).resRsvRuimteKey);
|
||||
res_key.push(JSON.parse(row.getAttribute("rowdata")).resKey);
|
||||
});
|
||||
FcltMgr.windowopen('../res/res_xml.asp?res_key='+res_key+'&print_rsv_ruimte_key='+res_ruimte_key);
|
||||
}
|
||||
|
||||
function resMultiDelete(rowArray)
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
<!-- #include file="./res.inc" -->
|
||||
|
||||
<%
|
||||
var res_key = getQParamInt("res_key", -1);
|
||||
var res_key = getQParamIntArray("res_key", []);
|
||||
|
||||
// when print_rsv_ruimte_key == null, print whole reservation otherwise print part reservation with that specific res_rsv_ruimte_key
|
||||
var print_rsv_ruimte_key = getQParamInt("print_rsv_ruimte_key", null);
|
||||
if (print_rsv_ruimte_key)
|
||||
var print_rsv_ruimte_key = getQParamIntArray("print_rsv_ruimte_key", []);
|
||||
if (print_rsv_ruimte_key.length)
|
||||
{
|
||||
chk_key = print_rsv_ruimte_key
|
||||
chk_key = print_rsv_ruimte_key[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -33,12 +33,25 @@
|
||||
// In de praktijk controleren we alleen of je de eerste mag lezen
|
||||
var sql = "SELECT MIN(res_rsv_ruimte_key) res_rsv_ruimte_key"
|
||||
+ " FROM res_v_aanwezigrsv_ruimte"
|
||||
+ " WHERE res_reservering_key = " + res_key;
|
||||
+ " WHERE res_reservering_key = " + res_key[0];
|
||||
var oRs = Oracle.Execute(sql);
|
||||
chk_key = oRs("res_rsv_ruimte_key");
|
||||
}
|
||||
var this_res = res.func_enabled(chk_key);
|
||||
user.auth_required_or_abort(this_res.canReadAny);
|
||||
|
||||
FCLT2XMLResponse({xmlnode: 'reservering', key: res_key, xtrakey: print_rsv_ruimte_key});
|
||||
if (print_rsv_ruimte_key.length)
|
||||
{
|
||||
Response.Write("<style>@media print {div.pagebreak {page-break-after: always;}}</style>");
|
||||
for (var index=0; index<print_rsv_ruimte_key.length; index++ )
|
||||
{
|
||||
Response.Write("<div class='"+(index==print_rsv_ruimte_key.length ? "" : "pagebreak")+"'>");
|
||||
FCLT2XMLResponse({xmlnode: 'reservering', key: res_key[index], xtrakey: print_rsv_ruimte_key[index]});
|
||||
Response.Write("</div>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FCLT2XMLResponse({xmlnode: 'reservering', key: res_key[0]});
|
||||
}
|
||||
%>
|
||||
|
||||
Reference in New Issue
Block a user