From d821db27ba43966f94222ec36b4d8cbf2a74d91c Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sun, 3 Aug 2014 17:07:48 -0300 Subject: [PATCH] replace last Request by $.ajax --- wise-editor/src/main/webapp/js/editor.js | 34 +++++++++++------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/wise-editor/src/main/webapp/js/editor.js b/wise-editor/src/main/webapp/js/editor.js index 85a742d8..3bc2a242 100644 --- a/wise-editor/src/main/webapp/js/editor.js +++ b/wise-editor/src/main/webapp/js/editor.js @@ -71,18 +71,17 @@ function buildDesigner(options) { } errorMsg = errorMsg.toString(); - new Request({ + $.ajax({ method:'post', url:"/c/restful/logger/editor", headers:{"Content-Type":"application/json", "Accept":"application/json"}, - emulation:false, - urlEncoded:false - }).post(JSON.encode({ - jsErrorMsg:"Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url, - jsStack:window.errorStack, - userAgent:navigator.userAgent, - mapId:options.mapId})); - + data: { + jsErrorMsg: "Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url, + jsStack: window.errorStack, + userAgent: navigator.userAgent, + mapId: options.mapId + } + }); // Close loading dialog ... if (window.waitDialog) { @@ -132,17 +131,16 @@ function buildDesigner(options) { function loadDesignerOptions(jsonConf) { // Load map options ... var result; + var me = this; if (jsonConf) { - var request = new Request.JSON({ - url:jsonConf, - async:false, - onSuccess:function (options) { - this.options = options; - - }.bind(this) + $.ajax({ + url: jsonConf, + async: false, + method: 'get', + success: function (options) { + me.options = options; } - ); - request.get(); + }); result = this.options; } else {