stop jQuery from setting $ as early as possible and added more checks for calendar running in frameworked template

This commit is contained in:
Ralf Becker 2016-06-14 21:17:46 +02:00
parent 700ef496d7
commit 7bb87c2615
2 changed files with 7 additions and 5 deletions

View File

@ -151,12 +151,13 @@
window.egw_LAB = $LAB.setOptions({AlwaysPreserveOrder:true,BasePath:window.egw_webserverUrl+'/'});
var include = JSON.parse(egw_script.getAttribute('data-include'));
var jquery = include.shift();
window.egw_LAB.script(include).wait(function()
window.egw_LAB.script([jquery]).wait(function(){
// tell jQuery to remove $, as EGroupware does NOT use it and it conflicts with eg. mootools
jQuery.noConflict();
}).script(include).wait(function()
{
// tell jQuery to remove $, as EGroupware does NOT use it and it conflicts with eg. mootools
jQuery.noConflict();
// call egw.link_handler, if attr specified
var egw_redirect = egw_script.getAttribute('data-egw-redirect');
if (egw_redirect)

View File

@ -90,7 +90,8 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
init: function()
{
// categories have nothing to do with calendar, but eT2 objects loads calendars app.js
if (framework.applications.calendar.browser.currentLocation.match('menuaction=preferences\.preferences_categories_ui\.index'))
if (framework && framework.applications.calendar.browser &&
framework.applications.calendar.browser.currentLocation.match('menuaction=preferences\.preferences_categories_ui\.index'))
{
this._super.apply(this, arguments);
return;