FSN#36132 Alerts en confirm via jQuery dialoog
svn path=/Website/trunk/; revision=31597
This commit is contained in:
@@ -1092,26 +1092,37 @@ var FcltMgr =
|
||||
catch(e) {/* soms met IE8 op 'remembered' tabbladen */}
|
||||
},
|
||||
mydialog: function (tekst, params)
|
||||
{
|
||||
this.topmanager()._mydialog(tekst, params);
|
||||
},
|
||||
_mydialog: function (tekst, params)
|
||||
{
|
||||
var ditwindow = window;
|
||||
var buttons = // Ok is er altijd
|
||||
[
|
||||
var dia = $('<div>' + tekst + '</div>');
|
||||
params.buttons = params.buttons || [];
|
||||
params.buttons.unshift( // Ok is er altijd
|
||||
{
|
||||
text: params.oktekst || L("lcl_ok"),
|
||||
click: function ()
|
||||
{
|
||||
if (params.fncallback)
|
||||
params.fncallback();
|
||||
ditwindow.$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
];
|
||||
if (params.buttons)
|
||||
});
|
||||
for (var i = 0; i < params.buttons.length; i++)
|
||||
{
|
||||
buttons = buttons.concat(params.buttons);
|
||||
var button = params.buttons[i];
|
||||
button.click = function (wasclick)
|
||||
{
|
||||
return function ()
|
||||
{
|
||||
if (wasclick)
|
||||
wasclick.apply(this, arguments);
|
||||
dia.dialog("close");
|
||||
}
|
||||
}(button.click);
|
||||
}
|
||||
$('<div></div>').appendTo('body')
|
||||
.html('<div>' + tekst + '</div>')
|
||||
dia.appendTo('body')
|
||||
.dialog({
|
||||
modal: true,
|
||||
title: params.title,
|
||||
@@ -1119,15 +1130,14 @@ var FcltMgr =
|
||||
autoOpen: true,
|
||||
width: 'auto',
|
||||
resizable: false,
|
||||
buttons: buttons,
|
||||
buttons: params.buttons,
|
||||
close: function (event, ui) {
|
||||
ditwindow.$(this).remove();
|
||||
dia.remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm: function (tekst, params, fncallback)
|
||||
{
|
||||
var ditwindow = window;
|
||||
if (typeof params == "function")
|
||||
{ // shift
|
||||
fncallback = params;
|
||||
@@ -1159,7 +1169,6 @@ var FcltMgr =
|
||||
{
|
||||
if (params.fncancel)
|
||||
params.fncancel();
|
||||
ditwindow.$(this).dialog("close");
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
@@ -601,15 +601,11 @@ function __rsProcessResultset(processParams) // processParams wordt blind aan al
|
||||
click: function ()
|
||||
{
|
||||
doPrint(poutputmode); // poutputmode wordt 5 (printer zonder flex) of 6 (excel zonder flex);
|
||||
$(this).dialog("close");
|
||||
// close gaat vanzelf;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: L("lcl_cancel"),
|
||||
click: function ()
|
||||
{
|
||||
$(this).dialog("close");
|
||||
}
|
||||
text: L("lcl_cancel")
|
||||
}];
|
||||
FcltMgr.mydialog(L("lcl_print_properties"), params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user