Split rest authentication into two. For web apps integration url is /c/restful/

This commit is contained in:
Paulo Gustavo Veiga
2012-11-10 17:19:28 -03:00
parent 6a9d1c684e
commit a228ea6ed5
39 changed files with 178 additions and 113 deletions

View File

@@ -50,14 +50,20 @@ mindplot.RESTPersistenceManager = new Class({
url:this.saveUrl.replace("{id}", mapId) + "?" + query,
method:'put',
async:!sync,
onSuccess:function (responseText, responseXML) {
events.onSuccess();
persistence.timestamp = responseText;
},
onException:function (headerName, value) {
console.log("onException....");
events.onError(persistence._buildError());
},
onFailure:function (xhr) {
console.log("onFailure....");
var responseText = xhr.responseText;
var error = null;
@@ -70,8 +76,16 @@ mindplot.RESTPersistenceManager = new Class({
events.onError(persistence._buildError());
throw new Error("Unexpected error saving. Error response is not json object:" + responseText);
}
} else {
var msg = {severity:"ERROR", message:$msg('SAVE_COULD_NOT_BE_COMPLETED')};
if (this.status == 405) {
msg = {severity:"ERROR", message:$msg('SESSION_EXPIRED')};
}
events.onError(msg);
}
},
headers:{"Content-Type":"application/json", "Accept":"application/json"},
emulation:false,
urlEncoded:false

View File

@@ -629,6 +629,7 @@ mindplot.Topic = new Class({
fade.addEvent('complete', function () {
});
fade.start();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeShrinkEvent, model);
},

View File

@@ -36,7 +36,7 @@ ZOOM_ERROR=No more zoom can be applied.
ONLY_ONE_TOPIC_MUST_BE_SELECTED=Could not create a topic. Only one topic must be selected.
ONE_TOPIC_MUST_BE_SELECTED=Could not create a topic. One topic must be selected.
ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE=Children can not be collapsed. One topic must be selected.
SAVE_COULD_NOT_BE_COMPLETED=Save could not be completed. Try latter.
SAVE_COULD_NOT_BE_COMPLETED=Save could not be completed, please try again latter.
UNEXPECTED_ERROR_LOADING=We're sorry, an unexpected error has occurred.\nTry again reloading the editor.If the problem persists, contact us to support@wisemapping.com.
MAIN_TOPIC=Main Topic
SUB_TOPIC=Sub Topic
@@ -56,4 +56,5 @@ ACCEPT=Accept
CANCEL=Cancel
LINK=Link
OPEN_LINK=Open URL
SESSION_EXPIRED=Your session has expired, please log-in again.

View File

@@ -56,4 +56,5 @@ REMOVE=Borrar
ACCEPT=Aceptar
CANCEL=Cancelar
LINK=Enlace
OPEN_LINK=Abrir Enlace
OPEN_LINK=Abrir Enlace
SESSION_EXPIRED=Su session ha expirado. Por favor, ingrese nuevamente.