Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request addyosmani#12 from RainerAtSpirit/master
AMD version.
  • Loading branch information
addyosmani committed Dec 17, 2011
2 parents b1927b5 + e0aeafe commit 14aeabd
Show file tree
Hide file tree
Showing 24 changed files with 19,310 additions and 921 deletions.
23 changes: 23 additions & 0 deletions app/app-build.js
@@ -0,0 +1,23 @@
({
appDir: "./",
baseUrl: "./",
dir: "../release",
paths: {
'backbone': 'libs/AMDbackbone-0.5.3',
'underscore': 'libs/underscore-1.2.2',
'jquery': 'libs/jQuery-1.7.1',
'json2': 'libs/json2',
'datepicker': 'libs/jQuery.ui.datepicker',
'datepickermobile': 'libs/jquery.ui.datepicker.mobile',
'jquerymobile': 'libs/jquery.mobile-1.0'
},
optimize: "uglify",
modules: [
{
name: "app",
exclude: [
// If you prefer not to include certain libs exclude them here
]
}
]
})
50 changes: 38 additions & 12 deletions app/app.js
@@ -1,12 +1,38 @@
/*!
* Flickly - Backbone jQuery Mobile demo
* http://addyosmani.com
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/

mobileSearch.views.appview = new AppView;
mobileSearch.routers.workspace = new Workspace();
mobileSearch.utils.toggleNavigation(false);
Backbone.history.start();

/*!
* Flickly - Backbone jQuery Mobile demo
* http://addyosmani.com
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*
Initialize namespacing
*/
define( ['backbone', 'views/appview', 'routers/workspace', 'utils', 'ui'],
function( Backbone, AppView, Workspace, utils, ui ) {
// Using ECMAScript 5 strict mode during development. By default r.js will ignore that.
"use strict";
window.mobileSearch = window.mobileSearch || {};



window.mobileSearch = {
views: {
appview: new AppView
},
routers:{
workspace:new Workspace()
},
utils: utils,
ui: ui,
defaults:{
resultsPerPage: 16,
safeSearch: 2,
maxDate:'',
minDate:'01/01/1970'
}
};


window.mobileSearch.utils.toggleNavigation( false );
Backbone.history.start();

} );
54 changes: 33 additions & 21 deletions app/init.js
@@ -1,21 +1,33 @@
/*
Initialize namespacing
*/

var mobileSearch = mobileSearch || {};

mobileSearch = {
views:{},
routers:{
workspace:{}
},
utils:{},
ui:{},
defaults:{
resultsPerPage: 16,
safeSearch: 2,
maxDate:'',
minDate:'01/01/1970'
}
};

/*!
* Flickly - Backbone jQuery Mobile demo
* http://addyosmani.com
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*
Initialize namespacing
*/

define( ['views/appview', 'router/workspace'],
function( AppView, Workspace ) {

var mobileSearch = mobileSearch || {};

mobileSearch = {
views: new AppView,
routers:{
workspace:new Workspace()
},
utils:{},
ui:{},
defaults:{
resultsPerPage: 16,
safeSearch: 2,
maxDate:'',
minDate:'01/01/1970'
}
};

mobileSearch.utils.toggleNavigation( false );
Backbone.history.start();

} );

0 comments on commit 14aeabd

Please sign in to comment.