XKit.window
: Display message dialogs to the user.
# XKit.window.show(title, msg, icon, buttons)
Show a dialog to the user.
# XKit.window.close()
Close the last window.
The following strings can be passed to the icon
parameter:
.xkit-button
.default
#xkit-close-message
is used internally to close the window// If you run this, you'll notice that the last button, the one
// that has the id "xkit-close-message" will close the window automatically.
var buttons = "<div id=\"my-window-yes\" class=\"xkit-button default\">Yes, please.</div>" +
"<div id=\"my-window-no\" class=\"xkit-button\">Nope!</div>" +
"<div class=\"xkit-button\" id=\"xkit-close-message\">Cancel</div>";
// Show the window!
XKit.window.show("Hello world","You want to continue?","question",m_buttons);
$("#my-window-yes").click(function() {
// To-Do: Proceed.
XKit.window.close();
});
$("#my-window-no").click(function() {
// To-Do: Don't Proceed.
XKit.window.close();
});
buttons
parameter is blank, the window will have no controls and the “darker-gray” area on the bottom.