EasyUI Forum

General Category => Bug Report => Topic started by: iklotzko on January 16, 2015, 11:39:31 AM



Title: Bug with easyloader.js and jquery.parser.js
Post by: iklotzko on January 16, 2015, 11:39:31 AM
I have to override the base property of easyloader. This is because easyloader is in a different directory than plugins (think gulp/grunt and concat files).

However, when easyloader is loaded and after jQuery is ready, the jquery.parser.js file is loaded but this occurs before the base property is overwritten and thus is tried to load with the wrong path.

Long Term fix option suggestion to jQueryEasyUI
To fix, the parser should be loaded as a prerequisite to the first load, so base applies jquery.parser.js

Short term fix options by End User of jQueryEasyUI (4.1):
1) Move easyloader loading of parser out of jquery ready block and into user code

easyloader.js line 411
Code:
if (window.jQuery){
   jQuery(function(){
      //easyloader.load('parser', function(){
      //jQuery.parser.parse();
      //});
   });
}

myownloader.js
Code:
easyloader.base = './scripts/jquery-easyui/';
easyloader.load('parser', function(){
   jQuery.parser.parse();
});
easyloader.load(['window', 'panel', 'tree'], function() {

2) Second option is to move parser.js into .plugins folder


Title: Re: Bug with easyloader.js and jquery.parser.js
Post by: jarry on January 16, 2015, 05:46:50 PM
Please refer to http://www.jeasyui.com/documentation/easyloader.php. Some code snippets in this documentation show how to change the base directory and how to load other files.