mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Add login.js to phpgwapi in order to make it available for all templates. Implement socialMedia for jdots and idots templates too
This commit is contained in:
parent
3253a191b7
commit
1912a14fe7
@ -444,6 +444,9 @@ abstract class egw_framework
|
||||
*/
|
||||
function login_screen($extra_vars)
|
||||
{
|
||||
//allow to include JSONP file with social media urls from egroupware.org
|
||||
self::csp_script_src_attrs('https://www.egroupware.org');
|
||||
|
||||
//error_log(__METHOD__."() server[template_dir]=".array2string($GLOBALS['egw_info']['server']['template_dir']).", this->template=$this->template, this->template_dir=$this->template_dir, get_class(this)=".get_class($this));
|
||||
$tmpl = new Template($GLOBALS['egw_info']['server']['template_dir']);
|
||||
|
||||
|
54
phpgwapi/js/login.js
Normal file
54
phpgwapi/js/login.js
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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.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('#socialBox'));
|
||||
|
||||
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);
|
||||
// setTimeout(anim, 7000);
|
||||
// }
|
||||
//anim();
|
||||
//$j(window).resize(function(){window.location.href=window.location.href});
|
||||
// });
|
||||
//
|
||||
//});
|
@ -1,4 +1,4 @@
|
||||
|
||||
<script src="./phpgwapi/js/login.js" type="text/javascript"></script>
|
||||
<div id="loginMainDiv">
|
||||
<div id="divAppIconBar" style="position:relative;">
|
||||
<div id="divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" border="0" alt="{logo_title}" title="{logo_title}" /></a></div>
|
||||
@ -61,6 +61,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END registration -->
|
||||
<tr>
|
||||
<td id="socialBox"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -468,7 +468,11 @@ body {
|
||||
position: relative;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 80px;
|
||||
background-image: url(../images/login-background.jpg);
|
||||
background-color: white;
|
||||
}
|
||||
#socialMedia {
|
||||
left: 273px;
|
||||
position: relative;
|
||||
}
|
||||
#loginScreenMessage {
|
||||
text-align: center;
|
||||
|
Loading…
Reference in New Issue
Block a user