Xarigami

project tracker

Xarigami Core [key: xgami]

All trackers
Summary
Issue List
Road Map
Changelog

Issue xgami-000831

Issue summary Details
Project:
Xarigami Core
Key:
xgami-000831
Type:
Bug
Reporter:
Jo
Priority:
High
Severity:
Critical
Status:
Resolved
Resolution:
Fixed
Owner:
Jo
Due:
- xarigami cumulus 1.4.0
Milestone:
None

js loading order is not consistent

Reported:  Apr 22, 2011 10:39 PM    Updated: Apr 22, 2011 11:25 PM by

Version affected: - xarigami cumulus 1.3.5

weighting was added to js. Since this time, the original loading order has become inconsistent.

By default js is loaded with weight 10.

JS should load in the order it is given for a given position except for: 1. Js library framework - the main lib should load first 2. A weight is given, and the js loaded accordingly in order. 3. If the weight is the same, then, we will load the src first over the inline code, as generally, the code depends on something loaded previously, if it depends on something at all.

People are using weight for everything that in turn then breaks any fail safes in the code for eg libraries etc.

Rework the loading, and take into consideration the type of js (code|src)

Actions

Reworked the js class code. All js is now loaded with raw weightings, or if none, they default to 10 if no weight is passed in.

Only js library framework main file is loaded with 9 if no weight passed in.

'code' js is loaded after any 'src' js, unless a weight is passed in.

The sort is now changed to multisort to consider weight and type, from the uasort.

Other than that all js should load in the order it is provided. No weights should be necessary except in special cases.

#