mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-14 02:37:57 +01:00
replace last Request by $.ajax
This commit is contained in:
parent
4ac182f0d9
commit
75739389cc
@ -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
|
jsErrorMsg: "Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url,
|
||||||
}).post(JSON.encode({
|
jsStack: window.errorStack,
|
||||||
jsErrorMsg:"Message: '" + errorMsg + "', line:'" + lineNo + "', url: :" + url,
|
userAgent: navigator.userAgent,
|
||||||
jsStack:window.errorStack,
|
mapId: options.mapId
|
||||||
userAgent:navigator.userAgent,
|
}
|
||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user