requests, errors, dialogs
This commit is contained in:
parent
c9f854061c
commit
1bc0ffdfbd
5 changed files with 24 additions and 34 deletions
|
@ -26,22 +26,14 @@ Dialog
|
|||
|
||||
.OxThemeClassic .OxDialog {
|
||||
background: rgba(224, 224, 224, 0.96);
|
||||
//border: 1px solid rgba(128, 128, 128, 0.5);
|
||||
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.OxThemeClassic .OxDialog .OxTitle {
|
||||
color: rgb(48, 48, 48);
|
||||
}
|
||||
|
||||
.OxThemeClassic .OxDialog > .OxTitleBar {
|
||||
//border-color: rgb(192, 192, 192);
|
||||
//background: rgba(208, 208, 208, 0.96);
|
||||
}
|
||||
|
||||
.OxThemeClassic .OxDialog > .OxButtonsBar {
|
||||
//background: rgba(192, 192, 192, 0.96);
|
||||
}
|
||||
|
||||
/*
|
||||
================================================================================
|
||||
Forms
|
||||
|
|
|
@ -67,8 +67,6 @@ Dialog
|
|||
position: absolute;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.OxDialog > .OxTitleBar {
|
||||
|
|
|
@ -26,13 +26,8 @@ Dialog
|
|||
|
||||
.OxThemeModern .OxDialog {
|
||||
background: rgba(48, 48, 48, 0.96);
|
||||
}
|
||||
.OxThemeModern .OxDialog > .OxTitleBar {
|
||||
//background: rgba(32, 32, 32, 0.96);
|
||||
}
|
||||
|
||||
.OxThemeModern .OxDialog > .OxButtonsBar {
|
||||
//background: rgba(32, 32, 32, 0.96);
|
||||
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 1);
|
||||
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -477,10 +477,12 @@ requires
|
|||
|
||||
function error(request, status, error) {
|
||||
var data;
|
||||
Ox.print("error", request, status, error);
|
||||
if (arguments.length == 1) {
|
||||
data = arguments[0]
|
||||
} else {
|
||||
try {
|
||||
data = JSON.parse(request.responseText);
|
||||
} catch (error) {
|
||||
} catch (err) {
|
||||
data = {
|
||||
status: {
|
||||
code: request.status,
|
||||
|
@ -488,6 +490,7 @@ requires
|
|||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
if (data.status.code < 500) {
|
||||
callback(data);
|
||||
} else {
|
||||
|
@ -516,13 +519,13 @@ requires
|
|||
})
|
||||
.append("Sorry, we have encountered an application error while handling your request. To help us find out what went wrong, you may want to report this error to an administrator. Otherwise, please try again later.")
|
||||
.open();
|
||||
// fixme: change this to Send / Don't Send
|
||||
Ox.print({
|
||||
request: request,
|
||||
status: status,
|
||||
error: error
|
||||
});
|
||||
}
|
||||
|
||||
pending[options.id] = false;
|
||||
}
|
||||
|
||||
|
@ -530,14 +533,15 @@ requires
|
|||
pending[options.id] = false;
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch(error) {
|
||||
data = {
|
||||
} catch (err) {
|
||||
error({
|
||||
status: {
|
||||
code: 500,
|
||||
text: "Internal Server Error"
|
||||
},
|
||||
data: {}
|
||||
};
|
||||
});
|
||||
return;
|
||||
}
|
||||
cache[req] = {
|
||||
data: data,
|
||||
|
@ -1082,7 +1086,6 @@ requires
|
|||
.appendTo(that);
|
||||
that.$buttons = [];
|
||||
$.each(options.buttons, function(i, button) {
|
||||
console.log(button)
|
||||
that.$buttons[i] = new Ox.Button({
|
||||
size: "medium",
|
||||
value: button.value
|
||||
|
|
|
@ -25,6 +25,7 @@ $(function() {
|
|||
});
|
||||
app.request("error");
|
||||
//app.request("hello");
|
||||
/*
|
||||
app.request("login", {"username": "test", "password": "test"}, function(result) {
|
||||
Ox.print(result);
|
||||
if (result.status.code == 200) {
|
||||
|
@ -39,4 +40,5 @@ $(function() {
|
|||
} else if (result.status.code == 500) {
|
||||
}
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue