Remove inline JS (#1037)
This commit is contained in:
parent
b70dac9f3a
commit
3db58b34f8
25
lemonldap-ng-portal/site/coffee/info.coffee
Normal file
25
lemonldap-ng-portal/site/coffee/info.coffee
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Timer for information page
|
||||||
|
|
||||||
|
i = 30
|
||||||
|
_go = 1
|
||||||
|
|
||||||
|
stop = () ->
|
||||||
|
_go = 0
|
||||||
|
$('#timer').html("...");
|
||||||
|
|
||||||
|
go = () ->
|
||||||
|
$("#form").submit() if _go
|
||||||
|
|
||||||
|
timer = () ->
|
||||||
|
h = $('#timer').html()
|
||||||
|
i-- if i>0
|
||||||
|
h = h.replace /\d+/, i
|
||||||
|
$('#timer').html(h)
|
||||||
|
window.setTimeout timer, 1000
|
||||||
|
|
||||||
|
$(document).ready ->
|
||||||
|
if window.datas['activeTimer']
|
||||||
|
window.setTimeout go, 10000
|
||||||
|
window.setTimeout timer, 1000
|
||||||
|
else
|
||||||
|
stop
|
22
lemonldap-ng-portal/site/coffee/oidcchecksession.coffee
Normal file
22
lemonldap-ng-portal/site/coffee/oidcchecksession.coffee
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
values = {}
|
||||||
|
$(document).ready ->
|
||||||
|
$("script[type='application/init']").each ->
|
||||||
|
try
|
||||||
|
tmp = JSON.parse $(this).text
|
||||||
|
for k of tmp
|
||||||
|
values[k] = tmp[k]
|
||||||
|
catch e
|
||||||
|
console.log 'Parsing error', e
|
||||||
|
window.addEventListener "message", receiveMessage, false
|
||||||
|
|
||||||
|
receiveMessage (e) ->
|
||||||
|
message = e.data
|
||||||
|
client_id = decodeURIComponent message.split(' ')[0]
|
||||||
|
session_state = decodeURIComponent message.split(' ')[1]
|
||||||
|
salt = decodeURIComponent session_state.split('.')[1]
|
||||||
|
ss = hash.toString(CryptoJS.enc.Base64) + '.' + salt
|
||||||
|
if session_state == ss
|
||||||
|
stat = 'unchanged'
|
||||||
|
else
|
||||||
|
stat = 'changed'
|
||||||
|
e.source.postMessage stat, e.origin
|
@ -1,12 +1,5 @@
|
|||||||
###
|
###
|
||||||
LemonLDAP::NG Portal jQuery scripts
|
LemonLDAP::NG Portal jQuery scripts
|
||||||
|
|
||||||
Used variables:
|
|
||||||
- displaytab
|
|
||||||
- choicetab
|
|
||||||
- login
|
|
||||||
- newwindow
|
|
||||||
- antiframe
|
|
||||||
###
|
###
|
||||||
|
|
||||||
# Translation mechanism
|
# Translation mechanism
|
||||||
@ -24,6 +17,7 @@ translatePage = (lang) ->
|
|||||||
translate = (str) ->
|
translate = (str) ->
|
||||||
return if translationFields[str] then translationFields[str] else str
|
return if translationFields[str] then translationFields[str] else str
|
||||||
|
|
||||||
|
# Initialization variables
|
||||||
getValues = () ->
|
getValues = () ->
|
||||||
values = {}
|
values = {}
|
||||||
$("script[type='application/init']").each ->
|
$("script[type='application/init']").each ->
|
||||||
@ -36,9 +30,6 @@ getValues = () ->
|
|||||||
values
|
values
|
||||||
|
|
||||||
# Set default values
|
# Set default values
|
||||||
newwindow = if window.newwindow.match('1') then true else false
|
|
||||||
antiframe = if window.antiframe.match('0') then false else true
|
|
||||||
activeTimer = if window.activeTimer.match('0') then false else true
|
|
||||||
|
|
||||||
# Code from http://snipplr.com/view/29434/
|
# Code from http://snipplr.com/view/29434/
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
@ -48,7 +39,7 @@ setSelector = "#appslist"
|
|||||||
getOrder = ->
|
getOrder = ->
|
||||||
$.ajax
|
$.ajax
|
||||||
type: "POST"
|
type: "POST"
|
||||||
url: scriptname
|
url: datas['scriptname']
|
||||||
data:
|
data:
|
||||||
storeAppsListOrder: $(setSelector).sortable("toArray").join()
|
storeAppsListOrder: $(setSelector).sortable("toArray").join()
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
@ -56,10 +47,10 @@ getOrder = ->
|
|||||||
# function that restores the list order from session
|
# function that restores the list order from session
|
||||||
restoreOrder = ->
|
restoreOrder = ->
|
||||||
list = $(setSelector)
|
list = $(setSelector)
|
||||||
return null unless list? and appslistorder
|
return null unless list? and datas['appslistorder']
|
||||||
|
|
||||||
# make array from saved order
|
# make array from saved order
|
||||||
IDs = appslistorder.split ','
|
IDs = datas['appslistorder'].split ','
|
||||||
|
|
||||||
# fetch current order
|
# fetch current order
|
||||||
items = list.sortable "toArray"
|
items = list.sortable "toArray"
|
||||||
@ -105,21 +96,25 @@ isHiddenFormValueSet = (option) ->
|
|||||||
ping = ->
|
ping = ->
|
||||||
$.ajax
|
$.ajax
|
||||||
type: "POST"
|
type: "POST"
|
||||||
url: scriptname
|
url: datas['scriptname']
|
||||||
data:
|
data:
|
||||||
ping: 1
|
ping: 1
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
success: (data) ->
|
success: (data) ->
|
||||||
if data.auth
|
if data.auth
|
||||||
setTimeout ping, pingInterval
|
setTimeout ping, datas['pingInterval']
|
||||||
else
|
else
|
||||||
location.reload true
|
location.reload true
|
||||||
|
|
||||||
window.ping = ping
|
window.ping = ping
|
||||||
|
|
||||||
# Initialization
|
# Initialization
|
||||||
|
datas = {}
|
||||||
$(document).ready ->
|
$(document).ready ->
|
||||||
if antiframe and top != self
|
datas = getValues()
|
||||||
|
# Export datas for other scripts
|
||||||
|
window.datas = datas
|
||||||
|
if datas['antiframe'] and top != self
|
||||||
top.location.href = location.href
|
top.location.href = location.href
|
||||||
|
|
||||||
$("#appslist").sortable
|
$("#appslist").sortable
|
||||||
@ -141,7 +136,7 @@ $(document).ready ->
|
|||||||
# Menu tabs
|
# Menu tabs
|
||||||
menuTabs = $("#menu").tabs
|
menuTabs = $("#menu").tabs
|
||||||
active: 0
|
active: 0
|
||||||
menuIndex = $('#menu a[href="#' + displaytab + '"]').parent().index()
|
menuIndex = $('#menu a[href="#' + datas['displaytab'] + '"]').parent().index()
|
||||||
menuIndex = 0 if menuIndex < 0
|
menuIndex = 0 if menuIndex < 0
|
||||||
menuTabs.tabs "option", "active", menuIndex
|
menuTabs.tabs "option", "active", menuIndex
|
||||||
|
|
||||||
@ -153,17 +148,17 @@ $(document).ready ->
|
|||||||
# $("#authMenu").tabs
|
# $("#authMenu").tabs
|
||||||
# cookie:
|
# cookie:
|
||||||
# name: 'lemonldapauthchoice'
|
# name: 'lemonldapauthchoice'
|
||||||
if choicetab
|
if datas['choicetab']
|
||||||
authMenuTabs.tabs "option", "active", $('#authMenu a[href="#' + choicetab + '"]').parent().index()
|
authMenuTabs.tabs "option", "active", $('#authMenu a[href="#' + datas['choicetab'] + '"]').parent().index()
|
||||||
|
|
||||||
if login
|
if datas['login']
|
||||||
$("input[type=password]:first").focus()
|
$("input[type=password]:first").focus()
|
||||||
else
|
else
|
||||||
# Focus on first visible input
|
# Focus on first visible input
|
||||||
$("input[type!=hidden]:first").focus()
|
$("input[type!=hidden]:first").focus()
|
||||||
|
|
||||||
# Open links in new windows
|
# Open links in new windows
|
||||||
if newwindow
|
if datas['newwindow']
|
||||||
$('#appslist a').attr "target", "_blank"
|
$('#appslist a').attr "target", "_blank"
|
||||||
|
|
||||||
# Complete removeOther link
|
# Complete removeOther link
|
||||||
@ -199,5 +194,9 @@ $(document).ready ->
|
|||||||
lang = if langs[0] then langs[0] else if langs2[0] then langs2[0] else 'en';
|
lang = if langs[0] then langs[0] else if langs2[0] then langs2[0] else 'en';
|
||||||
else
|
else
|
||||||
lang = 'en'
|
lang = 'en'
|
||||||
|
|
||||||
|
# Ping if asked
|
||||||
|
if datas['pingInterval'] and datas['pingInterval'] > 0
|
||||||
|
window.setTimeout ping, datas['pingInterval']
|
||||||
translatePage(lang)
|
translatePage(lang)
|
||||||
|
|
||||||
|
@ -1,34 +1,40 @@
|
|||||||
/* Timer for information page */
|
// Generated by CoffeeScript 1.10.0
|
||||||
|
(function() {
|
||||||
|
var _go, go, i, stop, timer;
|
||||||
|
|
||||||
var i = 30;
|
i = 30;
|
||||||
var _go = 1;
|
|
||||||
|
|
||||||
function stop() {
|
_go = 1;
|
||||||
_go = 0;
|
|
||||||
$('#timer').html("...");
|
|
||||||
}
|
|
||||||
|
|
||||||
function go() {
|
stop = function() {
|
||||||
if (_go) {
|
_go = 0;
|
||||||
$("#form").submit();
|
return $('#timer').html("...");
|
||||||
}
|
};
|
||||||
}
|
|
||||||
|
|
||||||
function timer() {
|
go = function() {
|
||||||
var h = $('#timer').html();
|
if (_go) {
|
||||||
if (i > 0) {
|
return $("#form").submit();
|
||||||
i--;
|
}
|
||||||
}
|
};
|
||||||
h = h.replace(/\d+/, i);
|
|
||||||
$('#timer').html(h);
|
|
||||||
window.setTimeout(timer, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
timer = function() {
|
||||||
if (activeTimer) {
|
var h;
|
||||||
window.setTimeout(go, 10000);
|
h = $('#timer').html();
|
||||||
window.setTimeout(timer, 1000);
|
if (i > 0) {
|
||||||
} else {
|
i--;
|
||||||
stop();
|
}
|
||||||
}
|
h = h.replace(/\d+/, i);
|
||||||
});
|
$('#timer').html(h);
|
||||||
|
return window.setTimeout(timer, 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
if (window.datas['activeTimer']) {
|
||||||
|
window.setTimeout(go, 10000);
|
||||||
|
return window.setTimeout(timer, 1000);
|
||||||
|
} else {
|
||||||
|
return stop;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
@ -1 +1 @@
|
|||||||
var i=30;var _go=1;function stop(){_go=0;$("#timer").html("...")}function go(){if(_go){$("#form").submit()}}function timer(){var a=$("#timer").html();if(i>0){i--}a=a.replace(/\d+/,i);$("#timer").html(a);window.setTimeout(timer,1000)}$(document).ready(function(){if(activeTimer){window.setTimeout(go,10000);window.setTimeout(timer,1000)}else{stop()}});
|
(function(){var a,d,c,b,e;c=30;a=1;b=function(){a=0;return $("#timer").html("...")};d=function(){if(a){return $("#form").submit()}};e=function(){var f;f=$("#timer").html();if(c>0){c--}f=f.replace(/\d+/,c);$("#timer").html(f);return window.setTimeout(e,1000)};$(document).ready(function(){if(window.datas.activeTimer){window.setTimeout(d,10000);return window.setTimeout(e,1000)}else{return b}})}).call(this);
|
@ -0,0 +1,40 @@
|
|||||||
|
// Generated by CoffeeScript 1.10.0
|
||||||
|
(function() {
|
||||||
|
var values;
|
||||||
|
|
||||||
|
values = {};
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("script[type='application/init']").each(function() {
|
||||||
|
var e, error, k, results, tmp;
|
||||||
|
try {
|
||||||
|
tmp = JSON.parse($(this).text);
|
||||||
|
results = [];
|
||||||
|
for (k in tmp) {
|
||||||
|
results.push(values[k] = tmp[k]);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
} catch (error) {
|
||||||
|
e = error;
|
||||||
|
return console.log('Parsing error', e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return window.addEventListener("message", receiveMessage, false);
|
||||||
|
});
|
||||||
|
|
||||||
|
receiveMessage(function(e) {
|
||||||
|
var client_id, message, salt, session_state, ss, stat;
|
||||||
|
message = e.data;
|
||||||
|
client_id = decodeURIComponent(message.split(' ')[0]);
|
||||||
|
session_state = decodeURIComponent(message.split(' ')[1]);
|
||||||
|
salt = decodeURIComponent(session_state.split('.')[1]);
|
||||||
|
ss = hash.toString(CryptoJS.enc.Base64) + '.' + salt;
|
||||||
|
if (session_state === ss) {
|
||||||
|
stat = 'unchanged';
|
||||||
|
} else {
|
||||||
|
stat = 'changed';
|
||||||
|
}
|
||||||
|
return e.source.postMessage(stat, e.origin);
|
||||||
|
});
|
||||||
|
|
||||||
|
}).call(this);
|
1
lemonldap-ng-portal/site/htdocs/static/common/js/oidcchecksession.min.js
vendored
Normal file
1
lemonldap-ng-portal/site/htdocs/static/common/js/oidcchecksession.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
(function(){var a;a={};$(document).ready(function(){$("script[type='application/init']").each(function(){var g,c,b,f,d;try{d=JSON.parse($(this).text);f=[];for(b in d){f.push(a[b]=d[b])}return f}catch(c){g=c;return console.log("Parsing error",g)}});return window.addEventListener("message",receiveMessage,false)});receiveMessage(function(h){var i,f,c,g,b,d;f=h.data;i=decodeURIComponent(f.split(" ")[0]);g=decodeURIComponent(f.split(" ")[1]);c=decodeURIComponent(g.split(".")[1]);b=hash.toString(CryptoJS.enc.Base64)+"."+c;if(g===b){d="unchanged"}else{d="changed"}return h.source.postMessage(d,h.origin)})}).call(this);
|
@ -2,17 +2,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
LemonLDAP::NG Portal jQuery scripts
|
LemonLDAP::NG Portal jQuery scripts
|
||||||
|
|
||||||
Used variables:
|
|
||||||
- displaytab
|
|
||||||
- choicetab
|
|
||||||
- login
|
|
||||||
- newwindow
|
|
||||||
- antiframe
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var activeTimer, antiframe, getOrder, getValues, isHiddenFormValueSet, newwindow, ping, restoreOrder, setSelector, translate, translatePage, translationFields,
|
var datas, getOrder, getValues, isHiddenFormValueSet, ping, restoreOrder, setSelector, translate, translatePage, translationFields,
|
||||||
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||||
|
|
||||||
translationFields = {};
|
translationFields = {};
|
||||||
@ -57,18 +50,12 @@ Used variables:
|
|||||||
return values;
|
return values;
|
||||||
};
|
};
|
||||||
|
|
||||||
newwindow = window.newwindow.match('1') ? true : false;
|
|
||||||
|
|
||||||
antiframe = window.antiframe.match('0') ? false : true;
|
|
||||||
|
|
||||||
activeTimer = window.activeTimer.match('0') ? false : true;
|
|
||||||
|
|
||||||
setSelector = "#appslist";
|
setSelector = "#appslist";
|
||||||
|
|
||||||
getOrder = function() {
|
getOrder = function() {
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: scriptname,
|
url: datas['scriptname'],
|
||||||
data: {
|
data: {
|
||||||
storeAppsListOrder: $(setSelector).sortable("toArray").join()
|
storeAppsListOrder: $(setSelector).sortable("toArray").join()
|
||||||
},
|
},
|
||||||
@ -79,10 +66,10 @@ Used variables:
|
|||||||
restoreOrder = function() {
|
restoreOrder = function() {
|
||||||
var IDs, child, i, item, itemID, items, j, len, len1, list, rebuild, savedOrd, v;
|
var IDs, child, i, item, itemID, items, j, len, len1, list, rebuild, savedOrd, v;
|
||||||
list = $(setSelector);
|
list = $(setSelector);
|
||||||
if (!((list != null) && appslistorder)) {
|
if (!((list != null) && datas['appslistorder'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
IDs = appslistorder.split(',');
|
IDs = datas['appslistorder'].split(',');
|
||||||
items = list.sortable("toArray");
|
items = list.sortable("toArray");
|
||||||
rebuild = [];
|
rebuild = [];
|
||||||
for (i = 0, len = items.length; i < len; i++) {
|
for (i = 0, len = items.length; i < len; i++) {
|
||||||
@ -109,14 +96,14 @@ Used variables:
|
|||||||
ping = function() {
|
ping = function() {
|
||||||
return $.ajax({
|
return $.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: scriptname,
|
url: datas['scriptname'],
|
||||||
data: {
|
data: {
|
||||||
ping: 1
|
ping: 1
|
||||||
},
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data.auth) {
|
if (data.auth) {
|
||||||
return setTimeout(ping, pingInterval);
|
return setTimeout(ping, datas['pingInterval']);
|
||||||
} else {
|
} else {
|
||||||
return location.reload(true);
|
return location.reload(true);
|
||||||
}
|
}
|
||||||
@ -126,9 +113,13 @@ Used variables:
|
|||||||
|
|
||||||
window.ping = ping;
|
window.ping = ping;
|
||||||
|
|
||||||
|
datas = {};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var action, al, authMenuTabs, back_url, i, j, lang, langs, langs2, len, len1, link, menuIndex, menuTabs, method, nl, nlangs, ref;
|
var action, al, authMenuTabs, back_url, i, j, lang, langs, langs2, len, len1, link, menuIndex, menuTabs, method, nl, nlangs, ref;
|
||||||
if (antiframe && top !== self) {
|
datas = getValues();
|
||||||
|
window.datas = datas;
|
||||||
|
if (datas['antiframe'] && top !== self) {
|
||||||
top.location.href = location.href;
|
top.location.href = location.href;
|
||||||
}
|
}
|
||||||
$("#appslist").sortable({
|
$("#appslist").sortable({
|
||||||
@ -147,7 +138,7 @@ Used variables:
|
|||||||
menuTabs = $("#menu").tabs({
|
menuTabs = $("#menu").tabs({
|
||||||
active: 0
|
active: 0
|
||||||
});
|
});
|
||||||
menuIndex = $('#menu a[href="#' + displaytab + '"]').parent().index();
|
menuIndex = $('#menu a[href="#' + datas['displaytab'] + '"]').parent().index();
|
||||||
if (menuIndex < 0) {
|
if (menuIndex < 0) {
|
||||||
menuIndex = 0;
|
menuIndex = 0;
|
||||||
}
|
}
|
||||||
@ -155,15 +146,15 @@ Used variables:
|
|||||||
authMenuTabs = $("#authMenu").tabs({
|
authMenuTabs = $("#authMenu").tabs({
|
||||||
active: 0
|
active: 0
|
||||||
});
|
});
|
||||||
if (choicetab) {
|
if (datas['choicetab']) {
|
||||||
authMenuTabs.tabs("option", "active", $('#authMenu a[href="#' + choicetab + '"]').parent().index());
|
authMenuTabs.tabs("option", "active", $('#authMenu a[href="#' + datas['choicetab'] + '"]').parent().index());
|
||||||
}
|
}
|
||||||
if (login) {
|
if (datas['login']) {
|
||||||
$("input[type=password]:first").focus();
|
$("input[type=password]:first").focus();
|
||||||
} else {
|
} else {
|
||||||
$("input[type!=hidden]:first").focus();
|
$("input[type!=hidden]:first").focus();
|
||||||
}
|
}
|
||||||
if (newwindow) {
|
if (datas['newwindow']) {
|
||||||
$('#appslist a').attr("target", "_blank");
|
$('#appslist a').attr("target", "_blank");
|
||||||
}
|
}
|
||||||
if ($("p.removeOther").length) {
|
if ($("p.removeOther").length) {
|
||||||
@ -204,6 +195,9 @@ Used variables:
|
|||||||
} else {
|
} else {
|
||||||
lang = 'en';
|
lang = 'en';
|
||||||
}
|
}
|
||||||
|
if (datas['pingInterval'] && datas['pingInterval'] > 0) {
|
||||||
|
window.setTimeout(ping, datas['pingInterval']);
|
||||||
|
}
|
||||||
return translatePage(lang);
|
return translatePage(lang);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
(function(){var e,g,k,d,a,i,l,j,f,b,m,c,h=[].indexOf||function(p){for(var o=0,n=this.length;o<n;o++){if(o in this&&this[o]===p){return o}}return -1};c={};m=function(n){return $.getJSON(window.staticPrefix+"languages/"+n+".json",function(o){c=o;$("[trspan]").each(function(){return $(this).text(b($(this).attr("trspan")))});return $("[trmsg]").each(function(){return $(this).text(b("PE"+($(this).attr("trmsg"))))})})};b=function(n){if(c[n]){return c[n]}else{return n}};d=function(){var n;n={};$("script[type='application/init']").each(function(){var s,p,o,r,q;try{q=JSON.parse($(this).text);r=[];for(o in q){r.push(n[o]=q[o])}return r}catch(p){s=p;return console.log("Parsing error",s)}});return n};i=window.newwindow.match("1")?true:false;g=window.antiframe.match("0")?false:true;e=window.activeTimer.match("0")?false:true;f="#appslist";k=function(){return $.ajax({type:"POST",url:scriptname,data:{storeAppsListOrder:$(f).sortable("toArray").join()},dataType:"json"})};j=function(){var p,o,s,A,n,x,r,t,q,w,y,u,z;w=$(f);if(!((w!=null)&&appslistorder)){return null}p=appslistorder.split(",");x=w.sortable("toArray");y=[];for(s=0,t=x.length;s<t;s++){z=x[s];y[z]=z}for(r=0,q=p.length;r<q;r++){n=p[r];if(h.call(y,n)>=0){A=y[n];o=$(f+".ui-sortable").children("#"+A);u=$(f+".ui-sortable").children("#"+n);o.remove();$(f+".ui-sortable").filter(":first").append(u)}}return 1};a=function(n){return $("#lmhidden_"+n).length};l=function(){return $.ajax({type:"POST",url:scriptname,data:{ping:1},dataType:"json",success:function(n){if(n.auth){return setTimeout(l,pingInterval)}else{return location.reload(true)}}})};window.ping=l;$(document).ready(function(){var z,y,B,x,C,A,E,v,u,D,t,s,w,q,o,p,n,r;if(g&&top!==self){top.location.href=location.href}$("#appslist").sortable({axis:"y",cursor:"move",opacity:0.5,revert:true,items:"> div.category",update:function(){return k()}});j();$("div.message").fadeIn("slow");$("input[name=timezone]").val(-(new Date().getTimezoneOffset()/60));q=$("#menu").tabs({active:0});w=$('#menu a[href="#'+displaytab+'"]').parent().index();if(w<0){w=0}q.tabs("option","active",w);B=$("#authMenu").tabs({active:0});if(choicetab){B.tabs("option","active",$('#authMenu a[href="#'+choicetab+'"]').parent().index())}if(login){$("input[type=password]:first").focus()}else{$("input[type!=hidden]:first").focus()}if(i){$("#appslist a").attr("target","_blank")}if($("p.removeOther").length){z=$("form.login").attr("action");o=$("form.login").attr("method");x="";if(z.indexOf("?")!==-1){z.substring(0,z.indexOf("?"))+"?"}else{x=z+"?"}$("form.login input[type=hidden]").each(function(F){return x+="&"+$(this).attr("name")+"="+$(this).val()});s=$("p.removeOther a").attr("href")+"&method="+o+"&url="+btoa(x);$("p.removeOther a").attr("href",s)}if(navigator){v=[];u=[];n=[navigator.language];if(navigator.languages){n=navigator.languages}for(C=0,D=n.length;C<D;C++){p=n[C];r=window.availableLanguages;for(A=0,t=r.length;A<t;A++){y=r[A];if(y===p){v.push(y)}else{if(y.substring(0,1)===p.substring(0,1)){u.push(y)}}}}E=v[0]?v[0]:u[0]?u[0]:"en"}else{E="en"}return m(E)})}).call(this);
|
(function(){var e,i,d,a,j,h,f,b,k,c,g=[].indexOf||function(o){for(var n=0,m=this.length;n<m;n++){if(n in this&&this[n]===o){return n}}return -1};c={};k=function(l){return $.getJSON(window.staticPrefix+"languages/"+l+".json",function(m){c=m;$("[trspan]").each(function(){return $(this).text(b($(this).attr("trspan")))});return $("[trmsg]").each(function(){return $(this).text(b("PE"+($(this).attr("trmsg"))))})})};b=function(l){if(c[l]){return c[l]}else{return l}};d=function(){var l;l={};$("script[type='application/init']").each(function(){var q,n,m,p,o;try{o=JSON.parse($(this).text);p=[];for(m in o){p.push(l[m]=o[m])}return p}catch(n){q=n;return console.log("Parsing error",q)}});return l};f="#appslist";i=function(){return $.ajax({type:"POST",url:e.scriptname,data:{storeAppsListOrder:$(f).sortable("toArray").join()},dataType:"json"})};h=function(){var n,m,q,y,l,u,p,r,o,t,w,s,x;t=$(f);if(!((t!=null)&&e.appslistorder)){return null}n=e.appslistorder.split(",");u=t.sortable("toArray");w=[];for(q=0,r=u.length;q<r;q++){x=u[q];w[x]=x}for(p=0,o=n.length;p<o;p++){l=n[p];if(g.call(w,l)>=0){y=w[l];m=$(f+".ui-sortable").children("#"+y);s=$(f+".ui-sortable").children("#"+l);m.remove();$(f+".ui-sortable").filter(":first").append(s)}}return 1};a=function(l){return $("#lmhidden_"+l).length};j=function(){return $.ajax({type:"POST",url:e.scriptname,data:{ping:1},dataType:"json",success:function(l){if(l.auth){return setTimeout(j,e.pingInterval)}else{return location.reload(true)}}})};window.ping=j;e={};$(document).ready(function(){var x,w,z,v,A,y,C,t,s,B,r,q,u,o,m,n,l,p;e=d();window.datas=e;if(e.antiframe&&top!==self){top.location.href=location.href}$("#appslist").sortable({axis:"y",cursor:"move",opacity:0.5,revert:true,items:"> div.category",update:function(){return i()}});h();$("div.message").fadeIn("slow");$("input[name=timezone]").val(-(new Date().getTimezoneOffset()/60));o=$("#menu").tabs({active:0});u=$('#menu a[href="#'+e.displaytab+'"]').parent().index();if(u<0){u=0}o.tabs("option","active",u);z=$("#authMenu").tabs({active:0});if(e.choicetab){z.tabs("option","active",$('#authMenu a[href="#'+e.choicetab+'"]').parent().index())}if(e.login){$("input[type=password]:first").focus()}else{$("input[type!=hidden]:first").focus()}if(e.newwindow){$("#appslist a").attr("target","_blank")}if($("p.removeOther").length){x=$("form.login").attr("action");m=$("form.login").attr("method");v="";if(x.indexOf("?")!==-1){x.substring(0,x.indexOf("?"))+"?"}else{v=x+"?"}$("form.login input[type=hidden]").each(function(D){return v+="&"+$(this).attr("name")+"="+$(this).val()});q=$("p.removeOther a").attr("href")+"&method="+m+"&url="+btoa(v);$("p.removeOther a").attr("href",q)}if(navigator){t=[];s=[];l=[navigator.language];if(navigator.languages){l=navigator.languages}for(A=0,B=l.length;A<B;A++){n=l[A];p=window.availableLanguages;for(y=0,r=p.length;y<r;y++){w=p[y];if(w===n){t.push(w)}else{if(w.substring(0,1)===n.substring(0,1)){s.push(w)}}}}C=t[0]?t[0]:s[0]?s[0]:"en"}else{C="en"}if(e.pingInterval&&e.pingInterval>0){window.setTimeout(j,e.pingInterval)}return k(C)})}).call(this);
|
@ -210,9 +210,6 @@
|
|||||||
|
|
||||||
<TMPL_IF NAME="PING">
|
<TMPL_IF NAME="PING">
|
||||||
<!-- Keep session alive -->
|
<!-- Keep session alive -->
|
||||||
<script type="text/javascript">
|
|
||||||
setTimeout(ping,pingInterval);
|
|
||||||
</script>
|
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_INCLUDE NAME="footer.tpl">
|
<TMPL_INCLUDE NAME="footer.tpl">
|
||||||
|
@ -1,34 +1,25 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Check Session</title>
|
<title>Check Session</title>
|
||||||
|
<script type="application/init">
|
||||||
|
{"cookiename":"<TMPL_VAR NAME="COOKIENAME">"}
|
||||||
|
</script>
|
||||||
<!-- //if:usedebianlibs
|
<!-- //if:usedebianlibs
|
||||||
<script type="text/javascript" src="/javascript/cryptojs/components/sha256-min.js"></script>
|
<script type="text/javascript" src="/javascript/cryptojs/components/sha256-min.js"></script>
|
||||||
<script type="text/javascript" src="/javascript/cryptojs/components/enc-base64-min.js"></script>
|
<script type="text/javascript" src="/javascript/cryptojs/components/enc-base64-min.js"></script>
|
||||||
//elsif:jsminified
|
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/oidcchecksession.min.js"></script>
|
||||||
|
//elsif:jsminified
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/sha256.min.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/sha256.min.js"></script>
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/enc-base64.min.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/enc-base64.min.js"></script>
|
||||||
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/jquery/dist/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/oidcchecksession.min.js"></script>
|
||||||
//else -->
|
//else -->
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/sha256.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/sha256.js"></script>
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/enc-base64.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/crypto-js/enc-base64.js"></script>
|
||||||
<!-- //endif -->
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/jquery/dist/jquery.js"></script>
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/oidcchecksession.js"></script>
|
||||||
function receiveMessage(e){
|
<!-- //endif -->
|
||||||
var message = e.data;
|
|
||||||
client_id = decodeURIComponent(message.split(' ')[0]);
|
|
||||||
session_state = decodeURIComponent(message.split(' ')[1]);
|
|
||||||
var salt = decodeURIComponent(session_state.split('.')[1]);
|
|
||||||
var opbs = document.cookie.replace(/(?:(?:^|.*;\s*)<TMPL_VAR NAME="COOKIENAME">\s*\=\s*([^;]*).*$)|^.*$/, "$1");
|
|
||||||
var hash = CryptoJS.SHA256(client_id + ' ' + opbs + ' ' + salt);
|
|
||||||
var ss = hash.toString(CryptoJS.enc.Base64) + '.' + salt;
|
|
||||||
if (session_state == ss) {
|
|
||||||
stat = 'unchanged';
|
|
||||||
} else {
|
|
||||||
stat = 'changed';
|
|
||||||
}
|
|
||||||
e.source.postMessage(stat,e.origin);
|
|
||||||
}@;
|
|
||||||
window.addEventListener("message", receiveMessage, false);
|
|
||||||
//]]></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
|
@ -21,12 +21,14 @@
|
|||||||
<!-- //endif -->
|
<!-- //endif -->
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
<TMPL_IF NAME="browserIdLoadLoginScript">
|
<TMPL_IF NAME="browserIdLoadLoginScript">
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="application/init">
|
||||||
var browserIdSiteName="<TMPL_VAR NAME="browserIdSiteName">";
|
{
|
||||||
var browserIdSiteLogo="<TMPL_VAR NAME="browserIdSiteLogo">";
|
"browserIdSiteName":"<TMPL_VAR NAME="browserIdSiteName">",
|
||||||
var browserIdBackgroundColor="<TMPL_VAR NAME="browserIdBackgroundColor">";
|
"browserIdSiteLogo":"<TMPL_VAR NAME="browserIdSiteLogo">",
|
||||||
var browserIdAutoLogin="<TMPL_VAR NAME="browserIdAutoLogin">";
|
"browserIdBackgroundColor":"<TMPL_VAR NAME="browserIdBackgroundColor">",
|
||||||
//]]></script>
|
"browserIdAutoLogin":"<TMPL_VAR NAME="browserIdAutoLogin">"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<!-- //if:jsminified
|
<!-- //if:jsminified
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browserid.min.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browserid.min.js"></script>
|
||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browseridlogin.min.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browseridlogin.min.js"></script>
|
||||||
@ -44,15 +46,17 @@
|
|||||||
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browseridlogout.js"></script>
|
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/browseridlogout.js"></script>
|
||||||
<!-- //endif -->
|
<!-- //endif -->
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="application/init">
|
||||||
var displaytab="<TMPL_VAR NAME="DISPLAY_TAB">";
|
{
|
||||||
var choicetab="<TMPL_VAR NAME="CHOICE_VALUE">";
|
"displaytab":"<TMPL_VAR NAME="DISPLAY_TAB">",
|
||||||
var login="<TMPL_VAR NAME="LOGIN">";
|
"choicetab":"<TMPL_VAR NAME="CHOICE_VALUE">",
|
||||||
var newwindow="<TMPL_VAR NAME="NEWWINDOW">";
|
"login":"<TMPL_VAR NAME="LOGIN">",
|
||||||
var antiframe="<TMPL_VAR NAME="ANTIFRAME">";
|
"newwindow":"<TMPL_VAR NAME="NEWWINDOW">",
|
||||||
var appslistorder="<TMPL_VAR NAME="APPSLIST_ORDER">";
|
"antiframe":"<TMPL_VAR NAME="ANTIFRAME">",
|
||||||
var scriptname="<TMPL_VAR NAME="SCRIPT_NAME">";
|
"appslistorder":"<TMPL_VAR NAME="APPSLIST_ORDER">",
|
||||||
var activeTimer="<TMPL_VAR NAME="ACTIVE_TIMER">";
|
"scriptname":"<TMPL_VAR NAME="SCRIPT_NAME">",
|
||||||
var pingInterval=parseInt("<TMPL_VAR NAME="PING">");
|
"activeTimer":"<TMPL_VAR NAME="ACTIVE_TIMER">",
|
||||||
//]]></script>
|
"pingInterval":<TMPL_VAR NAME="PING">
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Constants -->
|
<!-- Constants -->
|
||||||
<script type="text/JavaScript">
|
<script type="text/JavaScript" src="<TMPL_VAR NAME="SCRIPTNAME">?js"></script>
|
||||||
var staticPrefix = '<TMPL_VAR NAME="STATIC_PREFIX">'.replace(/\/*$/,'/');
|
|
||||||
var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">'.replace(/^$/,'.').replace(/\/*$/,'/');
|
|
||||||
var availableLanguages='<TMPL_VAR NAME="AVAILABLE_LANGUAGES">'.split(/[,;] */);
|
|
||||||
var portal ='<TMPL_VAR NAME="PORTAL">';
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -194,9 +194,6 @@
|
|||||||
|
|
||||||
<TMPL_IF NAME="PING">
|
<TMPL_IF NAME="PING">
|
||||||
<!-- Keep session alive -->
|
<!-- Keep session alive -->
|
||||||
<script type="text/javascript">
|
|
||||||
setTimeout(ping,pingInterval);
|
|
||||||
</script>
|
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_INCLUDE NAME="footer.tpl">
|
<TMPL_INCLUDE NAME="footer.tpl">
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
<div id="footer"><TMPL_INCLUDE NAME="customfooter.tpl"></div>
|
<div id="footer"><TMPL_INCLUDE NAME="customfooter.tpl"></div>
|
||||||
</div><!-- end div "page" -->
|
</div><!-- end div "page" -->
|
||||||
<!-- Constants -->
|
<!-- Constants -->
|
||||||
<script type="text/JavaScript">
|
<script type="text/JavaScript" src="<TMPL_VAR NAME="SCRIPTNAME">?js"></script>
|
||||||
var staticPrefix = '<TMPL_VAR NAME="STATIC_PREFIX">'.replace(/\/*$/,'/');
|
|
||||||
var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">'.replace(/^$/,'.').replace(/\/*$/,'/');
|
|
||||||
var availableLanguages='<TMPL_VAR NAME="AVAILABLE_LANGUAGES">'.split(/[,;] */);
|
|
||||||
var portal ='<TMPL_VAR NAME="PORTAL">';
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -195,9 +195,6 @@
|
|||||||
|
|
||||||
<TMPL_IF NAME="PING">
|
<TMPL_IF NAME="PING">
|
||||||
<!-- Keep session alive -->
|
<!-- Keep session alive -->
|
||||||
<script type="text/javascript">
|
|
||||||
setTimeout(ping,pingInterval);
|
|
||||||
</script>
|
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_INCLUDE NAME="footer.tpl">
|
<TMPL_INCLUDE NAME="footer.tpl">
|
||||||
|
Loading…
Reference in New Issue
Block a user