Commits

Michael Granger committed 4a8c414

Fix load-order issues in some browsers

Comments (0)

Files changed (1)

 'use strict';
 
 $script([
-	'/js/vendor/jquery-2.0.3.js',
-	'/js/vendor/angular/angular.js',
-	'/js/vendor/holder.min.js',
-], 'libs');
+	'/js/vendor/jquery-2.0.3.js'
+], 'jquery');
 
-$script.ready( 'libs', function() {
+$script.ready( 'jquery', function() {
+	console.debug( "JQuery loaded. Loading angular." );
+	$script([
+		'/js/vendor/angular/angular.js'
+	], 'angular');
+});
+
+$script.ready( 'angular', function() {
+	console.debug( "Libs loaded. Loading application." );
 	$script([
 		'/js/vendor/angular/angular-animate.min.js',
 		'/js/vendor/angular/angular-resource.min.js',
 		'/js/vendor/angular/angular-sanitize.min.js',
 		'/js/vendor/angular/angular-route.min.js',
 		'/js/vendor/ui-bootstrap-0.6.0.js',
+	], 'angular-libs');
+});
+
+$script.ready( 'angular-libs', function() {
+	console.debug( "Angular libs loaded. Loading plugins." );
+	$script([
 		'/js/vendor/imagesloaded.pkgd.js',
 		'/js/vendor/masonry.pkgd.js',
 		'/js/vendor/angular/angular-masonry.js',
 		'/js/vendor/resumable.js',
+	], 'plugins' );
+});
+
+$script.ready( 'plugins', function() {
+	console.debug( "Libs loaded. Loading application." );
+	$script([
 		'/js/angelfish/upload.js',
 		'/js/angelfish/gallery.js',
 		'/js/angelfish/filters.js',
 		'/js/angelfish/services.js',
 		'/js/navmenu.js',
 	], 'angelfish' );
-})
+});
 
 $script.ready( 'angelfish', function() {
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.