Add nascent version of the mod detail page
* Create a nascent version of the mod detail page * Make the slug mandatory for Mod instead of name, and load the name from the data file * Make the Feedback view universal on all pages * Refactor the use of mod pack to have a single global object at the router level which is shared between pages. Further, make this one object load itself immediately and have it automatically load any activated mod version * Refactor the use of Storage related to mod pack versions into the router as well. * Add trace logging back in for events, but allow individual classes to suppress it (as opposed to actually supressing the events) * Fix a bug in ModVersion.eachItem where it would suggest so-called items which are merely registered slugs without associated items
This commit is contained in:
@@ -13,14 +13,13 @@ FeedbackController = require './controllers/feedback_controller'
|
||||
Logger = require './logger'
|
||||
CraftingGuideRouter = require './crafting_guide_router'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
if typeof(global) is 'undefined'
|
||||
window.global = window
|
||||
global = window.global
|
||||
|
||||
global.logger = new Logger
|
||||
global.router = new CraftingGuideRouter
|
||||
global.util = require 'util'
|
||||
global.views = views
|
||||
|
||||
switch window.location.hostname
|
||||
when 'localhost'
|
||||
@@ -33,8 +32,14 @@ switch window.location.hostname
|
||||
global.env = 'production'
|
||||
logger.level = Logger.INFO
|
||||
|
||||
global.router = new CraftingGuideRouter
|
||||
global.util = require 'util'
|
||||
global.views = views
|
||||
|
||||
global.feedbackController = new FeedbackController el:'.view__feedback'
|
||||
feedbackController.render()
|
||||
|
||||
global.router.loadDefaultModPack()
|
||||
|
||||
logger.info "CraftingGuide is ready"
|
||||
Backbone.history.start pushState:true
|
||||
|
||||
Reference in New Issue
Block a user