fix permanent reload on idots login screen caused by trying to show (on login page not existing) quick-add selectbox, now not loading idots javascript files at all for login page, as they are not needed

This commit is contained in:
Ralf Becker 2014-01-16 08:56:23 +00:00
parent 6203286a6c
commit f8679b86ba
2 changed files with 15 additions and 11 deletions

View File

@ -111,17 +111,20 @@ class idots_framework extends egw_framework
egw_framework::set_onload('window.setTimeout(function(){window.scrollTo(0, 1);}, 100);'); egw_framework::set_onload('window.setTimeout(function(){window.scrollTo(0, 1);}, 100);');
} }
// include regular include slidereffects.js // load idots specific javascript files, if we are not in login or logout
if (!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects']) if (!in_array($GLOBALS['egw_info']['flags']['currentapp'], array('login', 'logout')))
{ {
self::validate_file('/phpgwapi/templates/idots/js/slidereffects.js'); // include regular include slidereffects.js
if (!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects'])
{
self::validate_file('/phpgwapi/templates/idots/js/slidereffects.js');
}
else
{
self::validate_file('/phpgwapi/templates/idots/js/simple_show_hide.js');
}
self::validate_file('/phpgwapi/templates/idots/js/idots.js');
} }
else
{
self::validate_file('/phpgwapi/templates/idots/js/simple_show_hide.js');
}
self::validate_file('/phpgwapi/templates/idots/js/idots.js');
if ($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover'] == 'onmouseover' && !html::$ua_mobile) if ($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover'] == 'onmouseover' && !html::$ua_mobile)
{ {
$show_menu_event = 'mouseover'; $show_menu_event = 'mouseover';

View File

@ -14,8 +14,9 @@
* idots javascript * idots javascript
*/ */
egw_LAB.wait(function() { egw_LAB.wait(function() {
// add quick add select box // add quick-add select box, but only if parent is present (not for login page!)
egw.link_quick_add('quick_add'); var quick_add = document.getElementById('quick_add');
if (quick_add) egw.link_quick_add(quick_add);
// instanciate slideout menus via "data-slide-out" of egw.js script tag // instanciate slideout menus via "data-slide-out" of egw.js script tag
var egw_script = document.getElementById('egw_script_id'); var egw_script = document.getElementById('egw_script_id');