mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 18:15:52 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
2f1ed2f8b9
6 changed files with 25 additions and 10 deletions
|
@ -313,7 +313,7 @@ $itemSlotGridHeight: 70px
|
|||
padding: 9px 0 9px 9px
|
||||
|
||||
#double-click-hint
|
||||
margin: 20px 0 70px
|
||||
margin: 20px 50px 70px 0
|
||||
|
||||
h4
|
||||
clear: both
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
strong
|
||||
color: rgb(50,50,30)
|
||||
|
||||
#selected-item-unlock-button
|
||||
#selected-item-unlock-button, .unequippable
|
||||
left: 856px
|
||||
top: 594px
|
||||
width: 337px
|
||||
|
@ -80,3 +80,7 @@
|
|||
|
||||
img
|
||||
height: 16px
|
||||
|
||||
.unequippable
|
||||
position: absolute
|
||||
|
||||
|
|
|
@ -33,9 +33,14 @@
|
|||
p Only admins will see it for now.
|
||||
|
||||
if item && !item.owned
|
||||
button#selected-item-unlock-button.btn.big-font.unlock-button(disabled=!item.affordable, data-item-id=item.id)
|
||||
span(data-i18n="play.unlock") Unlock
|
||||
span.spl= '('+item.get('gems')
|
||||
img(src="/images/common/gem.png")
|
||||
span )
|
||||
if item.equippable
|
||||
button#selected-item-unlock-button.btn.big-font.unlock-button(disabled=!item.affordable, data-item-id=item.id)
|
||||
span(data-i18n="play.unlock") Unlock
|
||||
span.spl= '('+item.get('gems')
|
||||
img(src="/images/common/gem.png")
|
||||
span )
|
||||
else
|
||||
// Temp, while we only have Warriors: prevent them from buying non-Warrior stuff
|
||||
button.btn.big-font.disabled.unequippable #{item.get('heroClass')} Only
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ module.exports = class InventoryModal extends ModalView
|
|||
@toggleFullscreen()
|
||||
hasGoneFullScreenOnce = true
|
||||
@updateConfig =>
|
||||
@trigger 'play-click'
|
||||
@trigger? 'play-click'
|
||||
window.tracker?.trackEvent 'Play Level Modal', Action: 'Play'
|
||||
|
||||
updateConfig: (callback, skipSessionSave) ->
|
||||
|
|
|
@ -361,7 +361,7 @@ dungeon = [
|
|||
y: 14
|
||||
nextLevels:
|
||||
#more_practice: 'crawlways-of-kithgard'
|
||||
continue: 'true-names'
|
||||
continue: 'forgetful-gemsmith'
|
||||
practice: true
|
||||
}
|
||||
#{
|
||||
|
@ -385,7 +385,7 @@ dungeon = [
|
|||
x: 63
|
||||
y: 13
|
||||
nextLevels:
|
||||
continue: 'shadow-guard'
|
||||
continue: 'true-names'
|
||||
}
|
||||
{
|
||||
name: 'True Names'
|
||||
|
|
|
@ -106,6 +106,7 @@ module.exports = class SpellView extends CocoView
|
|||
@toggleControls null, @writable
|
||||
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
||||
$(@ace.container).find('.ace_gutter').on 'click mouseenter', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||
$(@ace.container).find('.ace_gutter').on 'click', @onGutterClick
|
||||
@initAutocomplete aceConfig.liveCompletion ? true
|
||||
|
||||
createACEShortcuts: ->
|
||||
|
@ -392,6 +393,7 @@ module.exports = class SpellView extends CocoView
|
|||
return unless e.spell is @spell
|
||||
@reloadCode true
|
||||
@ace.clearSelection()
|
||||
_.delay (=> @ace?.clearSelection()), 500 # Make double sure this gets done (saw some timing issues?)
|
||||
|
||||
reloadCode: (cast=true) ->
|
||||
@updateACEText @spell.originalSource
|
||||
|
@ -795,6 +797,9 @@ module.exports = class SpellView extends CocoView
|
|||
# @ is the gutter element
|
||||
Backbone.Mediator.publish 'tome:jiggle-problem-alert', {}
|
||||
|
||||
onGutterClick: =>
|
||||
@ace.clearSelection()
|
||||
|
||||
onDisableControls: (e) -> @toggleControls e, false
|
||||
onEnableControls: (e) -> @toggleControls e, @writable
|
||||
toggleControls: (e, enabled) ->
|
||||
|
@ -881,6 +886,7 @@ module.exports = class SpellView extends CocoView
|
|||
|
||||
destroy: ->
|
||||
$(@ace?.container).find('.ace_gutter').off 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||
$(@ace?.container).find('.ace_gutter').off 'click', @onGutterClick
|
||||
@firepad?.dispose()
|
||||
@ace?.commands.removeCommand command for command in @aceCommands
|
||||
@ace?.destroy()
|
||||
|
|
Loading…
Reference in a new issue