mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
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
|
@ -194,8 +194,8 @@ class Angel
|
|||
@ids[@lastID]
|
||||
|
||||
# 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)
|
||||
infiniteLoopTimeoutDuration: 1500 # wait this long when we check
|
||||
infiniteLoopIntervalDuration: 7500 # check this often (must be more than the others added)
|
||||
infiniteLoopTimeoutDuration: 2500 # wait this long when we check
|
||||
abortTimeoutDuration: 500 # give in-process or dying workers this long to give up
|
||||
constructor: (@god) ->
|
||||
@id = Angel.nextID()
|
||||
|
@ -227,7 +227,7 @@ class Angel
|
|||
_.delay ->
|
||||
worker.terminate()
|
||||
worker.removeEventListener 'message', onWorkerMessage
|
||||
, 1000
|
||||
, 2000
|
||||
@worker = null
|
||||
@
|
||||
|
||||
|
|
|
@ -52,7 +52,3 @@ block modal-body-content
|
|||
label.control-label(for=id + "-version-is-major") Major Changes?
|
||||
input(id=id + "-version-is-major", name="version-is-major", type="checkbox")
|
||||
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...
|
||||
|
||||
block modal-footer-content
|
||||
#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") .
|
||||
button.btn#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
||||
if !noSaveButton
|
||||
#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") .
|
||||
button.btn#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
||||
|
||||
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
|
||||
|
||||
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.onload = => @pushChangesToPreview()
|
||||
return false
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = class LevelSaveView extends SaveVersionModal
|
|||
context.levelNeedsSave = @level.hasLocalChanges()
|
||||
context.modifiedComponents = _.filter @supermodel.getModels(LevelComponent), @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
|
||||
|
||||
shouldSaveEntity: (m) ->
|
||||
|
|
|
@ -128,7 +128,7 @@ module.exports = class TomeView extends View
|
|||
spellKey = pathComponents.join '/'
|
||||
@thangSpells[thang.id].push spellKey
|
||||
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'
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue