A few tweaks to the GameMenuModal.

This commit is contained in:
Nick Winter 2014-11-09 20:19:12 -08:00
parent 982e85da52
commit 44d4d13c93
6 changed files with 6 additions and 21 deletions

View file

@ -281,7 +281,6 @@
game_menu:
inventory_tab: "Inventory"
choose_hero_tab: "Restart Level"
save_load_tab: "Save/Load"
options_tab: "Options"
guide_tab: "Guide"

View file

@ -171,6 +171,6 @@ $heroCanvasHeight: 265px
background-image: url(/images/common/code_languages/io_small.png)
body.ipad #choose-hero-view
// iPad is Python-only for now, and has its own reset button.
// iPad is Python-only for now.
.form
display: none

View file

@ -41,7 +41,7 @@
.glyphicon-volume-up
position: absolute
right: 0
right: -10px
//- header, horizontal rule

View file

@ -63,12 +63,3 @@
select#option-code-language(name="code-language")
for option in codeLanguages
option(value=option.id, selected=codeLanguage === option.id)= option.name
if level
.form-group.select-group
label.control-label(for="#restart-level-confirm-button", data-i18n="play_level.reload_title") Reload All Code?
button(data-dismiss="modal", data-i18n="play_level.reload_confirm").btn.btn-sm.btn-danger#restart-level-confirm-button Reload All
span.help-block(data-i18n="play_level.reload_really") Are you sure you want to reload this level back to the beginning?

View file

@ -6,23 +6,20 @@
li
a#change-hero-tab
span.glyphicon.glyphicon-user
span(data-i18n='play.change_hero')
span(data-i18n='[title]game_menu.choose_hero_caption;play.change_hero')
for submenu, index in submenus
li(class=submenu === showTab ? "active" : "")
a(href='#' + submenu + '-view', data-toggle='tab')
span.glyphicon(class="glyphicon-"+iconMap[submenu])
span(data-i18n='game_menu.' + submenu.replace('-', '_') + '_tab')
- var i18nKey = 'game_menu.' + submenu.replace('-', '_');
span(data-i18n='[title]' + i18nKey + '_caption;' + i18nKey + '_tab')
if me.get('anonymous')
li.auth-tab(data-toggle='coco-modal', data-target="modal/AuthModal")
a(data-toggle='coco-modal', data-target="modal/AuthModal")
span.glyphicon.glyphicon-pencil
span(data-i18n='game_menu.auth_tab')
span(data-i18n='[title]game_menu.auth_caption;game_menu.auth_tab')
.tab-content.game-menu-tab-content
for submenu, index in submenus
.tab-pane(id=submenu + '-view')
// .clearfix
//
//block modal-footer
// button.btn.btn-primary.btn-lg.overlaid-close-button(type="button", data-dismiss="modal", aria-hidden="true", data-i18n="modal.close") Close

View file

@ -12,7 +12,6 @@ module.exports = class ChooseHeroView extends CocoView
template: template
events:
'click #restart-level-confirm-button': -> Backbone.Mediator.publish 'level:restart', {}
'slide.bs.carousel #hero-carousel': 'onHeroChanged'
'change #option-code-language': 'onCodeLanguageChanged'
@ -37,7 +36,6 @@ module.exports = class ChooseHeroView extends CocoView
context = super(context)
context.heroes = @heroes.models
hero.locked = temporaryHeroInfo[hero.get('slug')].status is 'Locked' and not me.ownsHero hero.get('original') for hero in context.heroes
context.level = @options.level
context.codeLanguages = [
{id: 'python', name: 'Python (Default)'}
{id: 'javascript', name: 'JavaScript'}