forked from 0x2620/oxjs
requests, errors, dialogs
This commit is contained in:
parent
68a09563cb
commit
06852ed89c
3 changed files with 96 additions and 69 deletions
|
|
@ -3,24 +3,24 @@ $(function() {
|
|||
requestURL: "http://blackbook.local:8000/api/"
|
||||
}),
|
||||
$dialog = new Ox.Dialog({
|
||||
title: "Login failed",
|
||||
title: "Application Error",
|
||||
buttons: [
|
||||
new Ox.Button({
|
||||
size: "medium",
|
||||
value: "Change Title"
|
||||
}).click(function() {
|
||||
console.log("click to change title")
|
||||
$dialog.options({
|
||||
title: "New Title"
|
||||
});
|
||||
$dialog.$buttons[0].toggleDisabled();
|
||||
}),
|
||||
new Ox.Button({
|
||||
size: "medium",
|
||||
{
|
||||
value: "Change Title",
|
||||
click: function() {
|
||||
console.log("click to change title")
|
||||
$dialog.options({
|
||||
title: "New Title"
|
||||
});
|
||||
$dialog.$buttons[0].toggleDisabled();
|
||||
}
|
||||
},
|
||||
{
|
||||
value: "Close",
|
||||
}).click(function() {
|
||||
$dialog.close();
|
||||
})
|
||||
click: function() {
|
||||
$dialog.close();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
app.request("error");
|
||||
|
|
@ -34,9 +34,9 @@ $(function() {
|
|||
});
|
||||
}
|
||||
else if (result.status.code == 403) {
|
||||
$dialog.open();
|
||||
} else {
|
||||
Ox.print("broken");
|
||||
alert(403);
|
||||
//$dialog.open();
|
||||
} else if (result.status.code == 500) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue