1
0
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:
Tankred Hase 2013-06-11 03:36:48 +02:00
parent 2007fbcc0f
commit 1c234b7def
2 changed files with 47 additions and 57 deletions

View File

@ -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>

View File

@ -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);
};
}());
});
});