Arquivos
2014-11-19 20:16:09 -03:00

88 linhas
3.1 KiB
JavaScript
Arquivo Executável

/*
* Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco
*
* Este arquivo parte do programa Amadeus Sistema de Gesto de Aprendizagem, ou simplesmente Amadeus LMS
*
* O Amadeus LMS um software livre; voc pode redistribui-lo e/ou modifica-lo dentro dos termos da Licena Pblica Geral GNU como
* publicada pela Fundao do Software Livre (FSF); na verso 2 da Licena.
*
* Este programa distribudo na esperana que possa ser til, mas SEM NENHUMA GARANTIA; sem uma garantia implcita de ADEQUAO a qualquer MERCADO ou APLICAO EM PARTICULAR. Veja a Licena Pblica Geral GNU para maiores detalhes.
*
* Voc deve ter recebido uma cpia da Licena Pblica Geral GNU, sob o ttulo "LICENCA.txt", junto com este programa, se no, escreva para a Fundao do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
function saveWebSecuritySettings(){
var url = "/settingsActions.do?method=saveWebSecuritySettings&"
var autoSigning = dwr.util.getValue("autoSigning");
UtilDWR.getInclude(url+"autoSigning="+autoSigning ,
function(data) {
if (data.indexOf(keyUserNotLogged) != -1){
window.open(urlUserNotLogged, "_self");
} else if (data.indexOf(keyAccessDenied) != -1) {
window.open(urlAccessDenied, "_self");
} else {
execScript(data);
dwr.util.setValue("security", data, { escapeHtml:false });
}
});
}
function saveWebMailSenderSettings(){
var url = "/webSettingMailSender.do?method=saveWebMailSenderSettings&"+$("#formWebSettingMailSender").serialize();
UtilDWR.getInclude(url,
function(data) {
if (data.indexOf(keyUserNotLogged) != -1){
window.open(urlUserNotLogged, "_self");
} else if (data.indexOf(keyAccessDenied) != -1) {
window.open(urlAccessDenied, "_self");
} else {
execScript(data);
dwr.util.setValue("mailSender", data, { escapeHtml:false });
}
});
}
function saveSystemSettings(){
var url = "/webSettingSystem.do?method=saveSystemSettings&"+$("#formWebSettingSystem").serialize();
$("#imgMobile").show();
UtilDWR.getInclude(url,
function(data) {
if (data.indexOf(keyUserNotLogged) != -1){
window.open(urlUserNotLogged, "_self");
} else if (data.indexOf(keyAccessDenied) != -1) {
window.open(urlAccessDenied, "_self");
} else {
execScript(data);
dwr.util.setValue("system", data, { escapeHtml:false });
}
$("#imgMobile").hide();
});
}
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
function saveMobileSettings(){
var url = "/settingsActions.do?method=saveMobileSettings&"+$("#formMobileSetting").serialize();
$("#imgMobile").show();
UtilDWR.getInclude(url,
function(data) {
if (data.indexOf(keyUserNotLogged) != -1){
window.open(urlUserNotLogged, "_self");
} else if (data.indexOf(keyAccessDenied) != -1) {
window.open(urlAccessDenied, "_self");
} else {
execScript(data);
}
$("#imgMobile").hide();
});
}