mirror of
https://github.com/moparisthebest/mail
synced 2025-01-09 04:28:16 -05:00
refactored sandbox with requirejs
This commit is contained in:
parent
2007fbcc0f
commit
1c234b7def
@ -8,23 +8,7 @@
|
||||
<link rel="stylesheet" href="css/styles.css"/>
|
||||
|
||||
<!-- The Scripts -->
|
||||
<script src="lib/jquery-1.8.2.min.js"></script>
|
||||
<script src="lib/underscore-1.4.4.min.js"></script>
|
||||
<script src="lib/backbone-1.0.0.min.js"></script>
|
||||
<script src="js/jqm-config.js"></script>
|
||||
<script src="lib/jquery.mobile-1.2.0.min.js"></script>
|
||||
|
||||
<script src="js/app-config.js"></script>
|
||||
|
||||
<script src="js/view/login-view.js"></script>
|
||||
<script src="js/view/compose-view.js"></script>
|
||||
<script src="js/view/messagelist-view.js"></script>
|
||||
<script src="js/view/messagelistitem-view.js"></script>
|
||||
<script src="js/view/folderlist-view.js"></script>
|
||||
<script src="js/view/read-view.js"></script>
|
||||
|
||||
<script src="js/app-router.js"></script>
|
||||
<script src="sandbox.js"></script>
|
||||
<script data-main="sandbox.js" src="lib/require.js"></script>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
@ -1,6 +1,11 @@
|
||||
(function() {
|
||||
require(['require-config'], function() {
|
||||
'use strict';
|
||||
|
||||
// Start the main app logic.
|
||||
require(['jquery', 'backbone', 'js/app-router',
|
||||
'js/app-config'
|
||||
], function($, Backbone, Router, app) {
|
||||
|
||||
var router,
|
||||
mainWindow,
|
||||
mainWindowOrigin;
|
||||
@ -21,7 +26,7 @@
|
||||
mainWindowOrigin = e.origin;
|
||||
|
||||
// start backone.js router
|
||||
router = new app.Router();
|
||||
router = new Router();
|
||||
Backbone.history.start();
|
||||
}
|
||||
};
|
||||
@ -45,4 +50,5 @@
|
||||
}, mainWindowOrigin);
|
||||
};
|
||||
|
||||
}());
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user