[enh] Backport panel style to portal.

This commit is contained in:
opi 2014-05-14 19:23:52 +02:00
parent 339a4426b1
commit febc74aa20
3 changed files with 120 additions and 131 deletions

View file

@ -48,8 +48,8 @@ body {
.logged .logo { .logged .logo {
position: fixed; position: fixed;
bottom: 1em; bottom: 20px;
right: 1em; right: 20px;
z-index: 0; z-index: 0;
opacity: 0.7; opacity: 0.7;
} }

File diff suppressed because one or more lines are too long

View file

@ -156,24 +156,17 @@ domReady(function(){
document.querySelector('body').classList.add('ynh-panel-active'); document.querySelector('body').classList.add('ynh-panel-active');
response = JSON.parse(r.responseText); response = JSON.parse(r.responseText);
// Append close button
/*var closeBtn = document.createElement("div");
closeBtn.setAttribute("id","ynhclose");
closeBtn.innerHTML = "X";
overlay.insertBefore(closeBtn, null);*/
// Add overlay header // Add overlay header
overlay.innerHTML += '<div class="wrapper">' + overlay.innerHTML += '<div class="wrapper info">' +
'<ul class="ul-reset user-menu"><li><a class="icon icon-connexion" href="'+ response.portal_url +'?action=logout">Logout</a></li></ul>'+ '<ul class="ul-reset user-menu"><li><a class="icon icon-connexion" href="'+ response.portal_url +'?action=logout">'+response.t_logout+'</a></li></ul>'+
'<div id="yuno-user" class="user-container col colNomarge">'+ '<a class="user-container user-container-info" href="'+ response.portal_url +'edit.html">' +
'<a class="user-img" href="'+ response.portal_url +'edit.html"><img src="'+ response.portal_url +'assets/img/avatar.png"></a>' + '<h2 class="user-username">'+ response.uid +'</h2>' +
'<div class="user-info">' + '<small class="user-fullname">'+ response.givenName + ' ' + response.sn +'</small>' +
'<h2><a href="'+ response.portal_url +'edit.html">'+ response.uid +'<small>'+ response.givenName + ' ' + response.sn +'</small></</a></h2>'+ '<span class="user-mail">'+ response.mail +'</span>' +
'<span class="user-mail">'+ response.mail +'</span>'+ '</a>'
'</div>' +
'</div>' +
'</div>'; '</div>';
// Add application links // Add application links
var links = []; var links = [];
Array.prototype.forEach.call(response.app, function(app, n){ Array.prototype.forEach.call(response.app, function(app, n){
@ -182,29 +175,10 @@ domReady(function(){
overlay.innerHTML += '<div id="yuno-apps" class="wrapper apps"><ul class="ul-reset listing-apps col colNomarge sourceProBold">'+ links.join('') +'</ul></div>'; overlay.innerHTML += '<div id="yuno-apps" class="wrapper apps"><ul class="ul-reset listing-apps col colNomarge sourceProBold">'+ links.join('') +'</ul></div>';
// Add overlay to DOM // Add overlay to DOM
var ynhssoPath = window.location.pathname;
if(ynhssoPath == '/ynhsso/') {
//Element.toggleClass(overlay, 'visible');
Element.toggleClass(portal, 'visible');
}
var btn = document.getElementById('logo'), var btn = document.getElementById('logo'),
yunoverlay = document.getElementById('ynhoverlay'), yunoverlay = document.getElementById('ynhoverlay'),
user = document.getElementById('yuno-user'), user = document.getElementById('yuno-user'),
apps = document.getElementById('yuno-apps'); apps = document.getElementById('yuno-apps');
/*var btnApps = document.querySelectorAll('.btnClick');
var closeBtn = document.querySelectorAll('.close');
Array.prototype.forEach.call(btnApps, function(el) {
el.addEventListener('click', function(e){
e.preventDefault();
var link = this.getAttribute('data-id');
//overlay.classList.add(link);
})
})*/
var pfx = ["webkit", "moz", "MS", "o", ""]; var pfx = ["webkit", "moz", "MS", "o", ""];
function PrefixedEvent(element, type, callback) { function PrefixedEvent(element, type, callback) {
@ -241,15 +215,6 @@ domReady(function(){
} }
}); });
// Bind close button
/*window.addEvent(document.getElementById('ynhclose'), 'click', function(e){
// Prevent default click
window.eventPreventDefault(e);
// Hide overlay
Element.removeClass(overlay, 'visible');
Element.removeClass(portal, 'visible');
});*/
}; };
r.send(); r.send();