Fixed a few bugs; re-enabled protectAPI for Brawlwood.
This commit is contained in:
parent
6c48660922
commit
a8ef87c9ea
6 changed files with 15 additions and 17 deletions
app
lib
templates
views
|
@ -194,8 +194,8 @@ class Angel
|
||||||
@ids[@lastID]
|
@ids[@lastID]
|
||||||
|
|
||||||
# https://github.com/codecombat/codecombat/issues/81 -- TODO: we need to wait for worker initialization first
|
# https://github.com/codecombat/codecombat/issues/81 -- TODO: we need to wait for worker initialization first
|
||||||
infiniteLoopIntervalDuration: 5000 # check this often (must be more than the others added)
|
infiniteLoopIntervalDuration: 7500 # check this often (must be more than the others added)
|
||||||
infiniteLoopTimeoutDuration: 1500 # wait this long when we check
|
infiniteLoopTimeoutDuration: 2500 # wait this long when we check
|
||||||
abortTimeoutDuration: 500 # give in-process or dying workers this long to give up
|
abortTimeoutDuration: 500 # give in-process or dying workers this long to give up
|
||||||
constructor: (@god) ->
|
constructor: (@god) ->
|
||||||
@id = Angel.nextID()
|
@id = Angel.nextID()
|
||||||
|
@ -227,7 +227,7 @@ class Angel
|
||||||
_.delay ->
|
_.delay ->
|
||||||
worker.terminate()
|
worker.terminate()
|
||||||
worker.removeEventListener 'message', onWorkerMessage
|
worker.removeEventListener 'message', onWorkerMessage
|
||||||
, 1000
|
, 2000
|
||||||
@worker = null
|
@worker = null
|
||||||
@
|
@
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,3 @@ block modal-body-content
|
||||||
label.control-label(for=id + "-version-is-major") Major Changes?
|
label.control-label(for=id + "-version-is-major") Major Changes?
|
||||||
input(id=id + "-version-is-major", name="version-is-major", type="checkbox")
|
input(id=id + "-version-is-major", name="version-is-major", type="checkbox")
|
||||||
span.help-block (Could this update break anything depending on this System?)
|
span.help-block (Could this update break anything depending on this System?)
|
||||||
|
|
||||||
if noSaveButton
|
|
||||||
block modal-footer-content
|
|
||||||
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
|
||||||
|
|
|
@ -17,12 +17,14 @@ block modal-body-wait-content
|
||||||
h3(data-i18n="common.saving") Saving...
|
h3(data-i18n="common.saving") Saving...
|
||||||
|
|
||||||
block modal-footer-content
|
block modal-footer-content
|
||||||
#accept-cla-wrapper.alert.alert-info
|
if !noSaveButton
|
||||||
span(data-i18n="versions.cla_prefix") To save changes, first you must agree to our
|
#accept-cla-wrapper.alert.alert-info
|
||||||
|
|
span(data-i18n="versions.cla_prefix") To save changes, first you must agree to our
|
||||||
strong#cla-link(data-i18n="versions.cla_url") CLA
|
|
|
||||||
span(data-i18n="versions.cla_suffix") .
|
strong#cla-link(data-i18n="versions.cla_url") CLA
|
||||||
button.btn#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
span(data-i18n="versions.cla_suffix") .
|
||||||
|
button.btn#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
||||||
|
|
||||||
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
||||||
button.btn.btn-primary#save-version-button(data-i18n="common.save") Save
|
if !noSaveButton
|
||||||
|
button.btn.btn-primary#save-version-button(data-i18n="common.save") Save
|
||||||
|
|
|
@ -59,7 +59,7 @@ module.exports = class ArticleEditView extends View
|
||||||
context
|
context
|
||||||
|
|
||||||
openPreview: =>
|
openPreview: =>
|
||||||
@preview = window.open('http://localhost:3000/editor/article/x/preview', 'preview', 'height=800,width=600')
|
@preview = window.open('/editor/article/x/preview', 'preview', 'height=800,width=600')
|
||||||
@preview.focus() if window.focus
|
@preview.focus() if window.focus
|
||||||
@preview.onload = => @pushChangesToPreview()
|
@preview.onload = => @pushChangesToPreview()
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -23,7 +23,7 @@ module.exports = class LevelSaveView extends SaveVersionModal
|
||||||
context.levelNeedsSave = @level.hasLocalChanges()
|
context.levelNeedsSave = @level.hasLocalChanges()
|
||||||
context.modifiedComponents = _.filter @supermodel.getModels(LevelComponent), @shouldSaveEntity
|
context.modifiedComponents = _.filter @supermodel.getModels(LevelComponent), @shouldSaveEntity
|
||||||
context.modifiedSystems = _.filter @supermodel.getModels(LevelSystem), @shouldSaveEntity
|
context.modifiedSystems = _.filter @supermodel.getModels(LevelSystem), @shouldSaveEntity
|
||||||
context.noSaveButton = context.levelNeedsSave or context.modifiedComponents.length or context.modifiedSystems.length
|
context.noSaveButton = not (context.levelNeedsSave or context.modifiedComponents.length or context.modifiedSystems.length)
|
||||||
context
|
context
|
||||||
|
|
||||||
shouldSaveEntity: (m) ->
|
shouldSaveEntity: (m) ->
|
||||||
|
|
|
@ -128,7 +128,7 @@ module.exports = class TomeView extends View
|
||||||
spellKey = pathComponents.join '/'
|
spellKey = pathComponents.join '/'
|
||||||
@thangSpells[thang.id].push spellKey
|
@thangSpells[thang.id].push spellKey
|
||||||
unless method.cloneOf
|
unless method.cloneOf
|
||||||
skipProtectAPI = true #@getQueryVariable("skip_protect_api") is "true"
|
skipProtectAPI = @getQueryVariable("skip_protect_api") is "true" or @options.levelID isnt 'brawlwood'
|
||||||
skipFlow = @getQueryVariable("skip_flow") is "true" or @options.levelID is 'brawlwood'
|
skipFlow = @getQueryVariable("skip_flow") is "true" or @options.levelID is 'brawlwood'
|
||||||
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: skipFlow, skipProtectAPI: skipProtectAPI, worker: @worker
|
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: skipFlow, skipProtectAPI: skipProtectAPI, worker: @worker
|
||||||
for thangID, spellKeys of @thangSpells
|
for thangID, spellKeys of @thangSpells
|
||||||
|
|
Reference in a new issue