calling jQuery.noConflict() as early as possible to NOT occupy $ variable stalling many SiteMgr templates

This commit is contained in:
Ralf Becker 2016-06-15 08:54:12 +02:00
parent d40a3aa34f
commit 2857511ac9
4 changed files with 19 additions and 0 deletions

View File

@ -54,6 +54,7 @@ module.exports = function (grunt) {
files: { files: {
"api/js/jsapi.min.js": [ "api/js/jsapi.min.js": [
"vendor/bower-asset/jquery/dist/jquery.js", "vendor/bower-asset/jquery/dist/jquery.js",
"api/js/jquery/jquery.noconflict.js",
"vendor/bower-asset/jquery-ui/jquery-ui.js", "vendor/bower-asset/jquery-ui/jquery-ui.js",
"api/js/jsapi/jsapi.js", "api/js/jsapi/jsapi.js",
"api/js/egw_json.js", "api/js/egw_json.js",

View File

@ -0,0 +1,16 @@
/**
* EGroupware API: switch jQuery to NOT use $ as early as possible
*
* @link http://www.egroupware.org
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
* @subpackage ajax
* @author Ralf Becker <rb@stylite.de>
* @version $Id$
*/
/*egw:uses
/vendor/bower-asset/jquery/dist/jquery.js;
*/
jQuery.noConflict();

View File

@ -168,6 +168,7 @@ abstract class Framework extends Framework\Extra
// allways load jquery (not -ui) first // allways load jquery (not -ui) first
'/vendor/bower-asset/jquery/dist/jquery.js', '/vendor/bower-asset/jquery/dist/jquery.js',
'/api/js/jquery/jquery.noconflict.js',
// always include javascript helper functions // always include javascript helper functions
'/api/js/jsapi/jsapi.js', '/api/js/jsapi/jsapi.js',
'/api/js/jsapi/egw.js', '/api/js/jsapi/egw.js',

View File

@ -214,6 +214,7 @@ class Bundle
// generate api bundle // generate api bundle
$inc_mgr->include_js_file('/vendor/bower-asset/jquery/dist/jquery.js'); $inc_mgr->include_js_file('/vendor/bower-asset/jquery/dist/jquery.js');
$inc_mgr->include_js_file('/api/js/jquery/jquery.noconflict.js');
$inc_mgr->include_js_file('/vendor/bower-asset/jquery-ui/jquery-ui.js'); $inc_mgr->include_js_file('/vendor/bower-asset/jquery-ui/jquery-ui.js');
$inc_mgr->include_js_file('/api/js/jsapi/jsapi.js'); $inc_mgr->include_js_file('/api/js/jsapi/jsapi.js');
$inc_mgr->include_js_file('/api/js/egw_json.js'); $inc_mgr->include_js_file('/api/js/egw_json.js');