replace last Request by $.ajax

This commit is contained in:
Ezequiel Bergamaschi 2014-08-03 17:07:48 -03:00
parent 8cb45c587f
commit d821db27ba

View File

@ -71,18 +71,17 @@ function buildDesigner(options) {
} }
errorMsg = errorMsg.toString(); errorMsg = errorMsg.toString();
new Request({ $.ajax({
method:'post', method:'post',
url:"/c/restful/logger/editor", url:"/c/restful/logger/editor",
headers:{"Content-Type":"application/json", "Accept":"application/json"}, headers:{"Content-Type":"application/json", "Accept":"application/json"},
emulation:false, data: {
urlEncoded:false
}).post(JSON.encode({
jsErrorMsg: "Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url, jsErrorMsg: "Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url,
jsStack: window.errorStack, jsStack: window.errorStack,
userAgent: navigator.userAgent, userAgent: navigator.userAgent,
mapId:options.mapId})); mapId: options.mapId
}
});
// Close loading dialog ... // Close loading dialog ...
if (window.waitDialog) { if (window.waitDialog) {
@ -132,17 +131,16 @@ function buildDesigner(options) {
function loadDesignerOptions(jsonConf) { function loadDesignerOptions(jsonConf) {
// Load map options ... // Load map options ...
var result; var result;
var me = this;
if (jsonConf) { if (jsonConf) {
var request = new Request.JSON({ $.ajax({
url: jsonConf, url: jsonConf,
async: false, async: false,
onSuccess:function (options) { method: 'get',
this.options = options; success: function (options) {
me.options = options;
}.bind(this)
} }
); });
request.get();
result = this.options; result = this.options;
} }
else { else {