PHRAS-46 #fix

PHRAS-16 #time 40h
This commit is contained in:
Jean-Yves Gaulier
2014-05-06 12:08:04 +02:00
committed by Nicolas Le Goff
parent 5563c34b8c
commit 192c2fbb55
17 changed files with 253 additions and 49 deletions

View File

@@ -82,9 +82,15 @@ $(document).ready(function () {
}
});
set_notif_position();
$(document).ajaxError(function( event, jqxhr, settings, exception ) {
if(jqxhr.status == 403 && jqxhr.getResponseHeader("X-Phraseanet-End-Session") == "1") {
disconnected();
}
});
set_notif_position();
});
@@ -334,6 +340,7 @@ function infoDialog(el) {
}
}).dialog('open').css({'overflow-x': 'auto', 'overflow-y': 'auto'});
}
function manageSession(data, showMessages) {
if (typeof(showMessages) == "undefined")
showMessages = false;
@@ -438,15 +445,20 @@ function showModal(cas, options) {
content = language.serverDisconnected;
escape = false;
callback = function (e) {
self.location.replace(self.location.href)
self.location.replace(self.location.href);
};
break;
default:
break;
}
p4.Alerts(options.title, content, callback);
if(typeof(p4.Alerts) == "undefined") {
alert("disconnected");
self.location.replace(self.location.href);
}
else {
p4.Alerts(options.title, content, callback);
}
return;
}