Changes in preparation for Coffeescript 2. #829
This commit is contained in:
parent
d2c2c017f1
commit
10f5f60b7f
@ -11,7 +11,7 @@ class Callbacks
|
|||||||
@keys.push name unless @[name]
|
@keys.push name unless @[name]
|
||||||
@[name] = cb
|
@[name] = cb
|
||||||
|
|
||||||
execute: (node, keys=@keys, force) ->
|
execute: (node, keys=@keys, force=false) ->
|
||||||
return if node.callbacksExecuted and !force
|
return if node.callbacksExecuted and !force
|
||||||
node.callbacksExecuted = true
|
node.callbacksExecuted = true
|
||||||
for name in keys
|
for name in keys
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
Post.Clone = class extends Post
|
Post.Clone = class extends Post
|
||||||
isClone: true
|
isClone: true
|
||||||
|
|
||||||
constructor: (@origin, @context, contractThumb) ->
|
constructor: ->
|
||||||
|
that = Object.create(Post.Clone.prototype)
|
||||||
|
that.construct arguments...
|
||||||
|
return that
|
||||||
|
|
||||||
|
construct: (@origin, @context, contractThumb) ->
|
||||||
for key in ['ID', 'postID', 'threadID', 'boardID', 'siteID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
for key in ['ID', 'postID', 'threadID', 'boardID', 'siteID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
||||||
# Copy or point to the origin's key value.
|
# Copy or point to the origin's key value.
|
||||||
@[key] = @origin[key]
|
@[key] = @origin[key]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user