/*
SintPro - 2007
Takes as arguments the title, the message, the names of the two buttons and the names of the methods to execute
SmartClient: the dialog stop other code execution and when finished it returns the status:
first button = 1
Second button = 2
Dialog closed without pushing buttons = 0
WebClient: the dialog doesn't stop other code execution and does not return anything.
Example call (SmartClient):
var choice = globals.mod_webdialog_showDialog('Confirmation Request','Delete this record only or all the displayed records?',
'Only this record','All records','globals.delete()','globals.deleteAll()');
Example call (WebClient):
globals.mod_webdialog_showDialog('Confirmation Request','Delete this record only or all the displayed records?',
'Only this record','All records','globals.delete()','globals.deleteAll()');
*/
var title = arguments[0]
var message = arguments[1]
var btn1 = arguments[2]
var btn2 = arguments[3]
var mtd1 = arguments[4]
var mtd2 = arguments[5]
// Init the global vars for storing the methods names
mod_webdialog_mtd1 = mtd1
mod_webdialog_mtd2 = mtd2
if(title && message && btn1 && btn2)
{
// Set the buttons
forms.sintpro_webdialog_dialog.elements.btn1.text = btn1
forms.sintpro_webdialog_dialog.elements.btn2.text = btn2
// Set the message
globals.g_webdialog_text = message
// Reset the status
globals.g_webdialog_status = null
// Show the dialog
application.showFormInDialog(forms.sintpro_webdialog_dialog,-1,-1,-1,-1,title,false,false,'webdialog_mod',true)
}
else
{
return null;
}
pbakker:
That is currently how it works, allthough that beahvior might be changed in a future release so teh webclient behaves just as the smart client.