Clone -> Post.Clone
This commit is contained in:
parent
f1b82d013f
commit
dce18eb4ec
6
Makefile
6
Makefile
@ -39,11 +39,7 @@ sources_API := \
|
|||||||
src/General/CrossOrigin.coffee \
|
src/General/CrossOrigin.coffee \
|
||||||
src/Images/ImageCommon.coffee
|
src/Images/ImageCommon.coffee
|
||||||
|
|
||||||
sources_classes := \
|
sources_classes := $(call sort_dir,classes)
|
||||||
src/classes/Post.coffee src/classes/Clone.coffee \
|
|
||||||
$(filter-out \
|
|
||||||
%/Post.coffee %/Clone.coffee \
|
|
||||||
,$(call sort_dir,classes))
|
|
||||||
|
|
||||||
sources_General := \
|
sources_General := \
|
||||||
$(filter-out \
|
$(filter-out \
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
class Clone extends Post
|
Post.Clone = class extends Post
|
||||||
isClone: true
|
isClone: true
|
||||||
|
|
||||||
constructor: (@origin, @context, contractThumb) ->
|
constructor: (@origin, @context, contractThumb) ->
|
||||||
@ -11,10 +11,10 @@ class Clone extends Post
|
|||||||
@cloneWithoutVideo nodes.root
|
@cloneWithoutVideo nodes.root
|
||||||
else
|
else
|
||||||
nodes.root.cloneNode true
|
nodes.root.cloneNode true
|
||||||
Clone.prefix or= 0
|
Post.Clone.prefix or= 0
|
||||||
for node in [root, $$('[id]', root)...]
|
for node in [root, $$('[id]', root)...]
|
||||||
node.id = Clone.prefix + node.id
|
node.id = Post.Clone.prefix + node.id
|
||||||
Clone.prefix++
|
Post.Clone.prefix++
|
||||||
post = $ '.post', root
|
post = $ '.post', root
|
||||||
info = $ '.postInfo', post
|
info = $ '.postInfo', post
|
||||||
@nodes =
|
@nodes =
|
||||||
@ -261,7 +261,7 @@ class Post
|
|||||||
@board.posts.rm @
|
@board.posts.rm @
|
||||||
|
|
||||||
addClone: (context, contractThumb) ->
|
addClone: (context, contractThumb) ->
|
||||||
new Clone @, context, contractThumb
|
new Post.Clone @, context, contractThumb
|
||||||
|
|
||||||
rmClone: (index) ->
|
rmClone: (index) ->
|
||||||
@clones.splice index, 1
|
@clones.splice index, 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user