Created
September 6, 2012 20:37
-
-
Save v/3660199 to your computer and use it in GitHub Desktop.
Sadness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{BrunchApplication} = require 'helpers' | |
{MainRouter} = require 'routers/main_router' | |
{HomeView} = require 'views/HomeView' | |
{LoginView} = require 'views/LoginView' | |
{EditView} = require 'views/EditView' | |
{NavigationView} = require 'views/NavigationView' | |
{LoginModel} = require 'models/LoginModel' | |
{CurrentLoggedView} = require 'views/CurrentLoggedView' | |
{HoursView} = require 'views/HoursView' | |
{ManageSubView} = require 'views/ManageSubView' | |
{ManageUserView} = require 'views/ManageUserView' | |
{CreateModal} = require 'views/CreateModal' | |
class exports.Application extends BrunchApplication | |
# This callback would be executed on document ready event. | |
# If you have a big application, perhaps it's a good idea to | |
# group things by their type e.g. `@views = {}; @views.home = new HomeView`. | |
initialize: -> | |
window.hours = {} | |
window.hours.urlRoot = 'http://localhost:8080/' | |
@loginModel = new LoginModel | |
@homeView = new HomeView | |
@loginView = new LoginView | |
@navigation = new NavigationView | |
@router = new MainRouter | |
@editView = new EditView | |
@hoursView = new HoursView | |
@manageSubView = new ManageSubView | |
@manageUserView = new ManageUserView | |
@createModal = new CreateModal | |
@homeView.generateTree() | |
app.activeModel = new Backbone.Model | |
loggedinview = new CurrentLoggedView | |
@router.navigate 'login', trigger: true | |
window.app = new exports.Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class exports.HourModel extends Backbone.Model | |
urlRoot: window.hours.urlRoot + "/hours" | |
defaults: | |
location_id: -1 | |
start_date: 0 | |
end_date: 0 | |
priority: 0 | |
start_time: 0 | |
end_time: 0 | |
days_of_week: {} | |
open: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment