Fixed layout of non-short item detail property labels. Commented out campaign editor analytics load for now to not kill things.

This commit is contained in:
Nick Winter 2015-01-11 10:04:24 -08:00
parent a9682a8cbe
commit 778647bf19
4 changed files with 16 additions and 18 deletions
app
models
styles/play/modal
templates/play/modal
views/editor/campaign

View file

@ -417,8 +417,10 @@ module.exports = class ThangType extends CocoModel
if i18nKey
name = $.i18n.t 'choose_hero.' + i18nKey
matchedShortName = true
else
name = _.string.humanize name
matchedShortName = false
format = ''
format = 'm' if /(range|radius|distance|vision)$/i.test name
@ -437,7 +439,7 @@ module.exports = class ThangType extends CocoModel
display.push "x#{modifiers.factor}" if modifiers.factor? and modifiers.factor isnt 1
display = display.join ', '
display = display.replace /9001m?/, 'Infinity'
name: name, display: display
name: name, display: display, matchedShortName: matchedShortName
isSilhouettedItem: ->
return console.error "Trying to determine whether #{@get('name')} should be a silhouetted item, but it has no gem cost." unless @get('gems') or @get('tier')

View file

@ -71,7 +71,7 @@
position: relative
font-size: 20px
font-weight: bold
.stat-label
position: absolute
left: 54px
@ -82,6 +82,16 @@
left: 150px
color: rgb(42,38,28)
&:not(.short-name)
text-align: center
.stat-label, .stat
position: initial
display: inline-block
.stat-label
margin-right: 8px
.item-description
margin: 15px 15px 0 25px
@ -106,17 +116,3 @@
.unequippable
position: absolute
body:not([lang^='en'])
#item-details-view
#item-details-body
.stat-row
text-align: center
.stat-label, .stat
position: initial
display: inline-block
.stat-label
margin-right: 8px

View file

@ -13,7 +13,7 @@
img.hr(src="/images/pages/play/modal/hr.png", draggable="false")
for stat in stats
div.stat-row.big-font
div(class="stat-row big-font" + (/^en/.test(me.get('preferredLanguage')) && stat.matchedShortName ? " short-name" : ""))
div.stat-label= stat.name
div.stat= stat.display
img.hr(src="/images/pages/play/modal/hr.png", class=stat.isLast ? "" : "faded", draggable="false")

View file

@ -47,7 +47,7 @@ module.exports = class CampaignEditorView extends RootView
@listenToOnce @levels, 'sync', @onFundamentalLoaded
@listenToOnce @achievements, 'sync', @onFundamentalLoaded
_.delay @getCampaignCompletions, 1000
#_.delay @getCampaignCompletions, 1000 # Roughly never finishes loading, nearly kills server.
loadThangTypeNames: ->
# Load the names of the ThangTypes that this level's Treema nodes might want to display.