1
0
Fork 0
forked from 0x2620/oxjs

updating dialog

This commit is contained in:
Rolux 2010-02-20 09:12:03 +05:30
commit 6c2304022d
4 changed files with 71 additions and 29 deletions

View file

@ -226,6 +226,11 @@
type: "text",
value: "Switch Theme"
}).addClass("margin").click(switchTheme).appendTo($toolbars[0]);
Ox.Button({
size: "large",
type: "text",
value: "Open Dialog"
}).addClass("margin").click(openDialog).appendTo($toolbars[0]);
Ox.Button({
size: size,
type: "text",
@ -448,6 +453,27 @@
selected: 1
}).addClass("margin").width(160).appendTo(mainPanel);
//*/
function openDialog() {
var $dialog = new Ox.Dialog({
title: "Dialog",
buttons: [
{
value: "Do Nothing",
click: function() {}
},
{
value: "Close",
click: function() {
$dialog.close();
}
}
]
})
.append($.map(Ox.range(100), function(v, i) {
return "Line #" + (i + 1)
}).join("<br/>"))
.open();
}
function switchTheme() {
if (Ox.theme() == "classic") {
Ox.theme("modern");