FW.Lazy.Popup()
Function
This function generates a modal pop-up dialog without reloading the page. Theย uri
is often specified as this
when data-href
contains the URI.
return FW.Lazy.Popup(this);
FW.Lazy.Popup(uri, options)
uri = '/manage/lookup/school?cmd=edit&record=<guid>&id=<guid>'
options = {
css: { height: 400 },
width: 600,
activeElement: 'my_element',
key: 'my_key_for_caching',
method: 'GET',
data: {...},
error: my_error_handler,
replace: true,
html: '<div>...</div>',
callback: my_callback_function
}
Tip: Use CSS or JavaScript to unset height from 500px when using a Slate form inside a popup.
#form_<guid>_container div.content {
ย height: unset !important;
}
$('#form_<guid>_container div.content').css('height', '');
Popup Structure
Typically, your returned content will be AJAX/No Branding. Using div's with Slate's built-in classes easily yields functional, if plain, styling.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div class="header">
My Popup
</div>
<div class="content">
Some Juicy Content
</div>
<div class="action">
<button class="default" onclick="FW.Dialog.Unload();">Cancel</button>
</div>
</body>
</html>
ย
No Comments