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) {
|
success: function(data) {
|
||||||
//var disableRegistration=data.disableRegistration;
|
//var disableRegistration=data.disableRegistration;
|
||||||
var topbarMenu=$("#topbar-menu");
|
var topbarMenu=$("#topbar-menu");
|
||||||
|
var organisationLogo=topbarMenu.find("#organisation-logo");
|
||||||
if( data){
|
if( data){
|
||||||
$.log("disableRegistration");
|
$.log("disableRegistration");
|
||||||
topbarMenu.find("#register-link" ).hide();
|
topbarMenu.find("#register-link" ).hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
$.ajax("restServices/archivaServices/archivaAdministrationService/getOrganisationInformation", {
|
$.ajax("restServices/archivaServices/archivaAdministrationService/getOrganisationInformation", {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var organisationLogo=topbarMenu.find("#organisation-logo");
|
|
||||||
if(data.url){
|
if(data.url){
|
||||||
var url = data.url.startsWith("http://") || data.url.startsWith("https://") ? data.url : "http://"+data.url;
|
var url = data.url.startsWith("http://") || data.url.startsWith("https://") ? data.url : "http://"+data.url;
|
||||||
var link="<a href='"+url+"' class='brand'>";
|
var link="<a href='"+url+"' class='brand'>";
|
||||||
|
@ -769,6 +771,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
|
||||||
};
|
};
|
||||||
|
|
||||||
checkSecurityLinks=function(){
|
checkSecurityLinks=function(){
|
||||||
|
$.log("checkSecurityLinks");
|
||||||
userLogged(userLoggedCallbackFn);
|
userLogged(userLoggedCallbackFn);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
|
||||||
$.ajax("restServices/redbackServices/loginService/isLogged", {
|
$.ajax("restServices/redbackServices/loginService/isLogged", {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$.log("isLogged:"+data);
|
||||||
var user = data ? mapUser(data):null;
|
var user = data ? mapUser(data):null;
|
||||||
window.user=user;
|
window.user=user;
|
||||||
if(user){
|
if(user){
|
||||||
|
@ -57,6 +58,16 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
|
||||||
notLoggedFn();
|
notLoggedFn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
statusCode: {
|
||||||
|
204: function() {
|
||||||
|
if (successFn){
|
||||||
|
successFn(null);
|
||||||
|
}
|
||||||
|
if(notLoggedFn){
|
||||||
|
notLoggedFn();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue