diff --git a/pixelegg/css/pixelegg.css b/pixelegg/css/pixelegg.css index 7108871a58..32721f8a72 100644 --- a/pixelegg/css/pixelegg.css +++ b/pixelegg/css/pixelegg.css @@ -2118,6 +2118,14 @@ body { * @version $Id$ */ @import-once "def_colors.less"; +#socialMedia { + float: right; + position: relative; + top: -30px; +} +#socialMedia a { + margin-left: 10px; +} /* ################################################################################## * login page */ diff --git a/pixelegg/inc/class.pixelegg_framework.inc.php b/pixelegg/inc/class.pixelegg_framework.inc.php index d8f624f342..1017fb8211 100755 --- a/pixelegg/inc/class.pixelegg_framework.inc.php +++ b/pixelegg/inc/class.pixelegg_framework.inc.php @@ -68,4 +68,18 @@ class pixelegg_framework extends jdots_framework { return egw_framework::_get_css(); } + + /** + * displays a login screen + * + * Reimplemented to allow to include JSONP file with social media urls from egroupware.org + * + * @param string $extra_vars for login url + */ + function login_screen($extra_vars) + { + self::csp_script_src_attrs('https://www.egroupware.org'); + + return parent::login_screen($extra_vars); + } } diff --git a/pixelegg/js/login.js b/pixelegg/js/login.js index 1711af1b43..832e42d518 100755 --- a/pixelegg/js/login.js +++ b/pixelegg/js/login.js @@ -1,17 +1,47 @@ -/* +/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ -//egw_LAB.wait(function() { -// $j(document).ready(function() { +egw_LAB.wait(function() { + $j.ajax('https://www.egroupware.org/social.js', { + dataType: "jsonp", + jsonp: false, + jsonpCallback: "do_social", + cache: true + }).done(function(_data) + { + $j(document).ready(function() { + var social = $j(document.createElement('div')) + .attr({ + id: "socialMedia", + class: "socialMedia" + }) + .appendTo($j('#centerBox')); + + for(var i=0; i < _data.length; ++i) + { + var data = _data[i]; + var url = data.lang ? data.lang[$j('meta[name="language"]').attr('content')] : null || data.url; + $j(document.createElement('a')).attr({ + href: url, + target: '_blank' + }) + .appendTo(social) + .append($j(document.createElement('img')) + .attr('src', data.svg)); + } + }); + }); +}); + // $j('img.bgfade').hide(); //// var dg_H = $j(window).height(); //// var dg_W = $j(window).width(); //// $j('#wrap').css({'height':dg_H,'width':dg_W}); -// +// // function anim() { // $j("#wrap img.bgfade").first().appendTo('#wrap').fadeOut(3500); // $j("#wrap img").first().fadeIn(3500); @@ -20,5 +50,5 @@ //anim(); //$j(window).resize(function(){window.location.href=window.location.href}); // }); -// +// //}); \ No newline at end of file diff --git a/pixelegg/less/layout_loginPage.less b/pixelegg/less/layout_loginPage.less index cdaf918a1b..952a707436 100644 --- a/pixelegg/less/layout_loginPage.less +++ b/pixelegg/less/layout_loginPage.less @@ -17,6 +17,14 @@ @import-once "def_colors.less"; //############################################################################################################## +#socialMedia { + float: right; + position: relative; + top: -30px; +} +#socialMedia a { + margin-left: 10px; +} /* ################################################################################## * login page