Skip to content

Commit

Permalink
JDF-155 - ensure the application modules are loaded in proper order
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogoevici committed Nov 26, 2012
1 parent 93dc9f9 commit 6b63d75
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*/
define([
'app/models/booking',
'configuration'
'configuration',
'backbone'
], function (Booking, config) {

// Here we define the Bookings collection
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/webapp/resources/js/app/collections/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
define([
// BThe collection element type and configuration are dependencies
'app/models/event',
'configuration'
'configuration',
'backbone'
], function (Event, config) {
/**
* Here we define the Bookings collection
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/webapp/resources/js/app/collections/venues.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
define([
// Configuration and the collection element type are dependencies
'app/models/venue',
'configuration'
'configuration',
'backbone'
], function (Venue, config) {

return Backbone.Collection.extend({
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/webapp/resources/js/app/models/booking.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*/
define([
// Configuration is a dependency
'configuration'
'configuration',
'backbone'
], function (config) {

/**
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/webapp/resources/js/app/models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* Module for the Event model
*/
define([
'configuration'
'configuration',
'backbone'
], function (config) {
/**
* The Event model class definition
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/webapp/resources/js/app/models/venue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* Module for the Venue model
*/
define([
'configuration'
'configuration',
'backbone'
], function (config) {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define([], function () {
define(['backbone'], function () {

var AboutView = Backbone.View.extend({
render:function () {
Expand Down
2 changes: 0 additions & 2 deletions demo/src/main/webapp/resources/js/configurations/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ define("initializer", ["jquery"],
// Now we declare all the dependencies
require([
'order!initializer',
'order!underscore',
'order!backbone',
'order!router'
], function(){
});
Expand Down
5 changes: 3 additions & 2 deletions demo/src/main/webapp/resources/js/configurations/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ define("configuration", function() {
baseUrl: ""
}
}
})
});

define("initializer", [
'jquery',
'utilities',
Expand All @@ -60,5 +61,5 @@ require(['order!initializer',

define(["configuration"],function(configuration){
return {config: configuration };
})
});

0 comments on commit 6b63d75

Please sign in to comment.