EasyUI Forum
April 30, 2024, 08:31:51 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug with easyloader.js and jquery.parser.js  (Read 9125 times)
iklotzko
Newbie
*
Posts: 15


View Profile Email
« 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
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!