fixed or working around javascript errors in IE11

This commit is contained in:
Ralf Becker 2014-02-19 15:20:19 +00:00
parent d3f2b0a1f9
commit 07db88276e
3 changed files with 55 additions and 56 deletions

View File

@ -419,6 +419,9 @@ class calendar_ui
$GLOBALS['egw']->preferences->add('calendar','saved_states',$saved_states);
$GLOBALS['egw']->preferences->save_repository(false,'user',true);
}
// only run for calendar views
if (in_array(gettype($this), array('calendar_uilist', 'calendar_uiviews')))
{
// store state in request for clientside favorites to use
// remove date and other states never stored in a favorite
$states = array_diff_key($states,array('date'=>false,'year'=>false,'month'=>false,'day'=>false,'save_owner'=>false));
@ -426,7 +429,7 @@ class calendar_ui
{
// sidebox request is from top frame, which has app.calendar NOT loaded by time response arrives
}
elseif (egw_json_request::isJSONRequest())
elseif (egw_json_request::isJSONRequest())// && strpos($_GET['menuaction'], 'calendar_uiforms') === false)
{
$response = egw_json_response::get();
$response->apply('app.calendar.set_state', array($states, $_GET['menuaction']));
@ -438,6 +441,7 @@ class calendar_ui
}
}
}
}
/**
* gets the icons displayed for a given event

View File

@ -210,7 +210,7 @@ class calendar_uiviews extends calendar_ui
// handle views in other files
if (!isset($this->public_functions[$this->view]))
{
$GLOBALS['egw']->redirect_link('/index.php',array('menuaction'=>$this->view_menuaction));
$GLOBALS['egw']->redirect_link('/index.php',array('menuaction'=>$this->view_menuaction,'ajax'=>'true'),'calendar');
}
// get manual to load the right page
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => 'ManualCalendar'.ucfirst($this->view));

View File

@ -36,7 +36,7 @@ app.classes.calendar = AppJS.extend(
this._super.apply(this, arguments);
// make calendar object available, even if not running in top window, as sidebox does
if (window.top !== window && typeof window.top.app.calendar == 'undefined')
if (window.top !== window)
{
window.top.app.calendar = this;
}
@ -64,9 +64,10 @@ app.classes.calendar = AppJS.extend(
* and ready. If you must store a reference to the et2 object,
* make sure to clean it up in destroy().
*
* @param et2 etemplate2 Newly ready object
* @param {etemplate2} _et2 newly ready et2 object
* @param {string} _name name of template
*/
et2_ready: function(et2)
et2_ready: function(_et2, _name)
{
// call parent
this._super.apply(this, arguments);
@ -82,21 +83,14 @@ app.classes.calendar = AppJS.extend(
var content = this.et2.getArrayMgr('content');
if (typeof et2.templates['calendar.list'] != 'undefined')
switch (_name)
{
try {
// check if listview runs in an iframe --> use linkHandler to open it top-level
if (top.egw && top != window && window.framework)
{
window.framework.linkHandler(document.location.href+'&ajax=true', 'calendar');
}
}
catch(e) {
// ignore error eg. comming because we have a top not belonging to EGroupware
}
case 'calendar.list':
this.filter_change();
}
if (typeof et2.templates['calendar.edit'] != 'undefined' && typeof content.data['conflicts'] == 'undefined')
break;
case 'calendar.edit':
if (typeof content.data['conflicts'] == 'undefined')
{
$j(document.getElementById('calendar-edit_calendar-delete_series')).hide();
//Check if it's fallback from conflict window or it's from edit window
@ -117,10 +111,11 @@ app.classes.calendar = AppJS.extend(
, [content.data['id'],content.data['lock_token']],null,true,null,null).sendRequest(true);
};
}
//this.replace_eTemplate_onsubmit();
if (typeof et2.templates['calendar.freetimesearch'] != 'undefined')
{
break;
case 'calendar.freetimesearch':
this.set_enddate_visibility();
break;
}
},
@ -790,8 +785,8 @@ app.classes.calendar = AppJS.extend(
*/
filter_change: function()
{
var filter = this.et2.getWidgetById('filter');
var dates = this.et2.getWidgetById('calendar.list.dates');
var filter = this.et2 ? this.et2.getWidgetById('filter') : null;
var dates = this.et2 ? this.et2.getWidgetById('calendar.list.dates') : null;
if (filter && dates)
{