The front page loads! No translated text though.

This commit is contained in:
Phoenix Eliot 2016-09-16 18:18:03 -07:00
parent ffdce15705
commit 667ea35d0c
5 changed files with 8 additions and 7 deletions

View file

@ -17,6 +17,9 @@ window.TreemaUtils = require('../bower_components/treema/treema-utils.js');
window.moment = require('moment'); window.moment = require('moment');
window.$.i18n = require('../bower_components/i18next/i18next.js'); window.$.i18n = require('../bower_components/i18next/i18next.js');
require('../vendor/scripts/idle.js').createjs; require('../vendor/scripts/idle.js').createjs;
window.key = require('../vendor/scripts/keymaster.js');
require('../vendor/scripts/jquery.noty.packaged.min.js');
require('bootstrap/dist/js/bootstrap');
require('./core/Router.coffee'); require('./core/Router.coffee');

View file

@ -204,7 +204,7 @@ module.exports = class CocoRouter extends Backbone.Router
window.currentView.onLeaveMessage = _.noop # to stop repeat confirm calls window.currentView.onLeaveMessage = _.noop # to stop repeat confirm calls
path = 'play/CampaignView' if window.serverConfig.picoCTF and not /^(views)?\/?play/.test(path) path = 'play/CampaignView' if window.serverConfig.picoCTF and not /^(views)?\/?play/.test(path)
path = "views/#{path}" if not _.string.startsWith(path, 'views/') # path = "views/#{path}" if not _.string.startsWith(path, 'views/')
ViewClass = @tryToLoadModule path ViewClass = @tryToLoadModule path
if not ViewClass and application.moduleLoader.load(path) if not ViewClass and application.moduleLoader.load(path)
@listenToOnce application.moduleLoader, 'load-complete', -> @listenToOnce application.moduleLoader, 'load-complete', ->

View file

@ -9,7 +9,7 @@
else else
if (me.get('preferredLanguage',true) || 'en-US').split('-')[0] == 'nl' if (me.get('preferredLanguage',true) || 'en-US').split('-')[0] == 'nl'
img(src="/images/pages/play/modal/lang-nl/buy-gems-background-NL.png")#buy-gems-background) img(src="/images/pages/play/modal/lang-nl/buy-gems-background-NL.png")#buy-gems-background
else else
img(src="/images/pages/play/modal/buy-gems-background.png")#buy-gems-background img(src="/images/pages/play/modal/buy-gems-background.png")#buy-gems-background
h1(data-i18n="play.buy_gems") h1(data-i18n="play.buy_gems")

View file

@ -2,7 +2,6 @@
// (c) 2011-2013 Thomas Fuchs // (c) 2011-2013 Thomas Fuchs
// keymaster.js may be freely distributed under the MIT license. // keymaster.js may be freely distributed under the MIT license.
;(function(global){
var k, var k,
_handlers = {}, _handlers = {},
_mods = { 16: false, 18: false, 17: false, 91: false }, _mods = { 16: false, 18: false, 17: false, 91: false },
@ -96,7 +95,7 @@
// see if it's in the current scope // see if it's in the current scope
// Changed this for CodeCombat // Changed this for CodeCombat
//if(handler.scope == scope || handler.scope == 'all'){ //if(handler.scope == scope || handler.scope == 'all'){
if (true) { if (true) {
// check if modifiers match if any // check if modifiers match if any
@ -295,5 +294,3 @@
global.key.unbind = unbindKey; global.key.unbind = unbindKey;
if(typeof module !== 'undefined') module.exports = key; if(typeof module !== 'undefined') module.exports = key;
})(this);

View file

@ -19,7 +19,8 @@ module.exports = {
plugins: [ plugins: [
new webpack.ContextReplacementPlugin(/./, function(context){ new webpack.ContextReplacementPlugin(/./, function(context){
if (context.resource === path.resolve('./app/views')) { if (context.resource === path.resolve('./app/views')) {
context.regExp = /home/i console.log(context.regExp);
context.regExp = /^.*Home.*$/i;
} }
console.log(arguments); console.log(arguments);
}), }),