Merge branch 'master' into production

This commit is contained in:
Nick Winter 2015-03-11 09:01:52 -07:00
commit a433c30616
5 changed files with 21 additions and 14 deletions

View file

@ -150,7 +150,7 @@ module.exports = class LevelBus extends Bus
return unless @onPoint()
@fireScriptsRef?.update(e)
state = @session.get('state')
scripts = state.scripts
scripts = state.scripts ? {}
scripts.currentScript = e.currentScript
scripts.currentScriptOffset = e.currentScriptOffset
@changedSessionProperties.state = true

View file

@ -423,5 +423,5 @@ body[lang='ru']
#hero-carousel .hero-item .hero-stats h2
font-size: 24px
#confirm-button
font-size: 14px
#purchase-hero-button
font-size: 18px

View file

@ -54,12 +54,14 @@ block outer_content
select.form-control#language-select
table.table
for row in translationList
tr(data-format=row.format || '')
for row in translationList
table.table
tr
th= row.title
tr(data-format=row.format || '')
td.english-value-row
div= row.enValue
tr(data-format=row.format || '')
td.to-value-row
if row.format === 'markdown'
div(data-index=row.index.toString())= row.toValue

View file

@ -55,13 +55,18 @@ module.exports = class I18NEditModelView extends RootView
editors = []
@$el.find('tr[data-format="markdown"]').each((index, el) =>
englishEditor = ace.edit(enEl=$(el).find('.english-value-row div')[0])
englishEditor.el = enEl
englishEditor.setReadOnly(true)
toEditor = ace.edit(toEl=$(el).find('.to-value-row div')[0])
toEditor.el = toEl
toEditor.on 'change', @onEditorChange
editors = editors.concat([englishEditor, toEditor])
foundEnEl = enEl=$(el).find('.english-value-row div')[0]
if foundEnEl?
englishEditor = ace.edit(foundEnEl)
englishEditor.el = enEl
englishEditor.setReadOnly(true)
editors.push englishEditor
foundToEl = toEl=$(el).find('.to-value-row div')[0]
if foundToEl?
toEditor = ace.edit(foundToEl)
toEditor.el = toEl
toEditor.on 'change', @onEditorChange
editors.push toEditor
)
for editor in editors

View file

@ -32,7 +32,7 @@ PollHandler = class PollHandler extends Handler
@sendSuccess res, @formatEntity(req, poll)
findPollPriority: (lastPollID, callback) ->
return callback null, -9001 unless lastPollID
return callback null, -9001 unless lastPollID and lastPollID isnt '-'
Poll.findById mongoose.Types.ObjectId(lastPollID), 'priority', {lean: true}, (err, poll) ->
callback err, poll?.priority