forked from 0x2620/oxjs
updating dialog
This commit is contained in:
parent
0aec06616b
commit
6c2304022d
4 changed files with 71 additions and 29 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue