Replaces yepnope.js with lazyload.js
Solves the caching and multi-load of the same file problems - adds a bit of promise-based loading logic ontop of ll.js to ensure order and count
This commit is contained in:
@@ -14,7 +14,6 @@ namespace Umbraco.Web.UI.JavaScript
|
||||
internal class CssInitialization : AssetInitialization
|
||||
{
|
||||
private readonly ManifestParser _parser;
|
||||
|
||||
public CssInitialization(ManifestParser parser)
|
||||
{
|
||||
_parser = parser;
|
||||
@@ -57,7 +56,7 @@ namespace Umbraco.Web.UI.JavaScript
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var file in files)
|
||||
sb.AppendFormat("{0}yepnope.injectCss('{1}');", Environment.NewLine, file);
|
||||
sb.AppendFormat("{0}LazyLoad.css('{1}');", Environment.NewLine, file);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace Umbraco.Web.UI.JavaScript
|
||||
}
|
||||
|
||||
return ParseMain(
|
||||
noCache,
|
||||
result.ToString(),
|
||||
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
[
|
||||
'lib/jquery/jquery-ui-1.10.3.custom.min.js',
|
||||
'lib/jquery/jquery-2.0.3.min.js',
|
||||
'lib/angular/1.1.5/angular.min.js',
|
||||
'lib/underscore/underscore.js',
|
||||
|
||||
/*
|
||||
'lib/jquery/jquery-ui-1.10.3.custom.min.js',
|
||||
'lib/jquery/jquery.ui.core.min.js',
|
||||
'lib/jquery/jquery.ui.widget.min.js',
|
||||
'lib/jquery/jquery.ui.mouse.min.js',
|
||||
'lib/jquery/jquery.ui.sortable.min.js',
|
||||
*/
|
||||
|
||||
'lib/angular/1.1.5/angular-cookies.min.js',
|
||||
'lib/angular/1.1.5/angular-mobile.js',
|
||||
|
||||
@@ -1,22 +1,8 @@
|
||||
"##JsNoCache##"
|
||||
yepnope({
|
||||
load: [
|
||||
'lib/jquery/jquery-2.0.3.min.js',
|
||||
'lib/angular/1.1.5/angular.min.js',
|
||||
'lib/underscore/underscore.js',
|
||||
],
|
||||
complete: function () {
|
||||
yepnope({
|
||||
load: "##JsInitialize##",
|
||||
complete: function () {
|
||||
LazyLoad.js("##JsInitialize##", function () {
|
||||
//we need to set the legacy UmbClientMgr path
|
||||
UmbClientMgr.setUmbracoPath('"##UmbracoPath##"');
|
||||
|
||||
//we need to set the legacy UmbClientMgr path
|
||||
UmbClientMgr.setUmbracoPath('"##UmbracoPath##"');
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
angular.bootstrap(document, ['umbraco']);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
jQuery(document).ready(function () {
|
||||
angular.bootstrap(document, ['umbraco']);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user