2015-02-21 14:29:10 +01:00
|
|
|
/**
|
|
|
|
* EGroupware login page javascript
|
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
2019-03-19 09:36:51 +01:00
|
|
|
* @package login
|
2015-02-21 14:29:10 +01:00
|
|
|
* @subpackage api
|
2019-03-19 09:36:51 +01:00
|
|
|
* @link https://www.egroupware.org
|
2014-07-24 19:13:46 +02:00
|
|
|
*/
|
|
|
|
|
2015-07-04 09:53:50 +02:00
|
|
|
/* if login page is not in top window, set top windows location to it */
|
|
|
|
if (top !== window) top.location = window.location;
|
|
|
|
|
2015-02-21 14:29:10 +01:00
|
|
|
egw_LAB.wait(function()
|
|
|
|
{
|
2016-06-02 16:51:15 +02:00
|
|
|
jQuery(document).ready(function()
|
2014-07-24 19:13:46 +02:00
|
|
|
{
|
2019-03-18 16:32:06 +01:00
|
|
|
// check if the browser supports ES6 and try to warn user
|
|
|
|
try {
|
2019-03-18 16:39:14 +01:00
|
|
|
Function ("() => {};");
|
2019-03-18 16:32:06 +01:00
|
|
|
}
|
|
|
|
catch (exception){
|
2019-03-19 09:36:51 +01:00
|
|
|
alert(egw.lang('Your browser is not up-to-date (JavaScript ES6 compatible), you may experience some of the features not working.'));
|
2019-03-18 16:32:06 +01:00
|
|
|
}
|
|
|
|
|
2015-11-16 16:45:04 +01:00
|
|
|
// lock the device orientation in portrait view
|
2016-06-14 17:31:33 +02:00
|
|
|
if (screen.orientation && typeof screen.orientation.lock == 'function') screen.orientation.lock('portrait');
|
2017-04-06 18:17:47 +02:00
|
|
|
jQuery('.closeBtn').click(function (){
|
2019-03-19 09:36:51 +01:00
|
|
|
setTimeout(function(){jQuery('.loginMessageBox').slideUp("slow");},100);
|
2017-04-06 18:17:47 +02:00
|
|
|
});
|
2015-02-21 14:29:10 +01:00
|
|
|
function do_social(_data)
|
|
|
|
{
|
2016-06-02 16:51:15 +02:00
|
|
|
var social = jQuery(document.createElement('div'))
|
2014-07-24 19:13:46 +02:00
|
|
|
.attr({
|
|
|
|
id: "socialMedia",
|
|
|
|
class: "socialMedia"
|
|
|
|
})
|
2017-02-07 12:44:00 +01:00
|
|
|
.appendTo(jQuery('#socialBox'));
|
2014-07-24 19:13:46 +02:00
|
|
|
|
|
|
|
for(var i=0; i < _data.length; ++i)
|
|
|
|
{
|
|
|
|
var data = _data[i];
|
2016-06-02 16:51:15 +02:00
|
|
|
var url = (data.lang ? data.lang[jQuery('meta[name="language"]').attr('content')] : null) || data.url;
|
|
|
|
jQuery(document.createElement('a')).attr({
|
2014-07-24 19:13:46 +02:00
|
|
|
href: url,
|
|
|
|
target: '_blank'
|
|
|
|
})
|
|
|
|
.appendTo(social)
|
2016-06-02 16:51:15 +02:00
|
|
|
.append(jQuery(document.createElement('img'))
|
2014-07-24 19:13:46 +02:00
|
|
|
.attr('src', data.svg));
|
|
|
|
}
|
2015-02-21 14:29:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_social([
|
2016-05-05 11:46:03 +02:00
|
|
|
{ "svg": egw_webserverUrl+"/api/templates/default/images/login_contact.svg", "url": "https://www.egroupware.org/en/contact.html", "lang": { "de": "https://www.egroupware.org/de/kontakt.html" }},
|
|
|
|
{ "svg": egw_webserverUrl+"/api/templates/default/images/login_facebook.svg", "url": "https://www.facebook.com/egroupware" },
|
|
|
|
{ "svg": egw_webserverUrl+"/api/templates/default/images/login_twitter.svg", "url": "https://twitter.com/egroupware" }
|
2015-02-21 14:29:10 +01:00
|
|
|
]);
|
2014-07-24 19:13:46 +02:00
|
|
|
});
|
|
|
|
});
|