Skip to content

Instantly share code, notes, and snippets.

@danielo515
Created July 28, 2015 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielo515/11488482d586b91be3f7 to your computer and use it in GitHub Desktop.
Save danielo515/11488482d586b91be3f7 to your computer and use it in GitHub Desktop.
Problem with global popups in cloudwall
({
data: {
popup:{}
},
init: function ($form, form) {
$form.html(this.html);
$.my.modal.parent("#globalPopup");
},
ui: {
"#btn-html": function (d,v,$o){
if (v!=null) {
// Modal with HTML
$.my.modal(
'<h3>Carta Marina</h3>'
).then(_updateMe,_updateMe);
function _updateMe(){
$o.my().root.trigger("change");
}
}
}
}
})
<h3>Modal dialogs</h3>
<div>
<input id="btn-html" type="button" value="Global popup with HTML"/>
<div id="globalPopup"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment