mirror of https://github.com/apache/archiva.git
doh wtf jquery 1.9.0 do not call success if ajax call return 204 not content
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1436693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dfbe84c418
commit
fc0b17de62
|
@ -173,15 +173,17 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
|
|||
success: function(data) {
|
||||
//var disableRegistration=data.disableRegistration;
|
||||
var topbarMenu=$("#topbar-menu");
|
||||
var organisationLogo=topbarMenu.find("#organisation-logo");
|
||||
if( data){
|
||||
$.log("disableRegistration");
|
||||
topbarMenu.find("#register-link" ).hide();
|
||||
|
||||
}
|
||||
$.ajax("restServices/archivaServices/archivaAdministrationService/getOrganisationInformation", {
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var organisationLogo=topbarMenu.find("#organisation-logo");
|
||||
|
||||
if(data.url){
|
||||
var url = data.url.startsWith("http://") || data.url.startsWith("https://") ? data.url : "http://"+data.url;
|
||||
var link="<a href='"+url+"' class='brand'>";
|
||||
|
@ -769,6 +771,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
|
|||
};
|
||||
|
||||
checkSecurityLinks=function(){
|
||||
$.log("checkSecurityLinks");
|
||||
userLogged(userLoggedCallbackFn);
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
|
|||
$.ajax("restServices/redbackServices/loginService/isLogged", {
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
$.log("isLogged:"+data);
|
||||
var user = data ? mapUser(data):null;
|
||||
window.user=user;
|
||||
if(user){
|
||||
|
@ -57,6 +58,16 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
|
|||
notLoggedFn();
|
||||
}
|
||||
}
|
||||
},
|
||||
statusCode: {
|
||||
204: function() {
|
||||
if (successFn){
|
||||
successFn(null);
|
||||
}
|
||||
if(notLoggedFn){
|
||||
notLoggedFn();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue