Move bindings for post hiding/deleting effect from old stream.js to StreamElement
This commit is contained in:
parent
3e80e4366d
commit
e1cfd59dce
2 changed files with 11 additions and 9 deletions
|
|
@ -29,15 +29,6 @@ var Stream = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// ajax-loader and hide icon visibility handling for post hide and unhide
|
|
||||||
$("a.stream_element_delete.vis_hide").live("click", function(evt){
|
|
||||||
$(this).toggleClass("hidden");
|
|
||||||
$(this).next("img.hide_loader").toggleClass("hidden");
|
|
||||||
});
|
|
||||||
$("a.stream_element_hide_undo").live("click", function(evt){
|
|
||||||
$(this).closest('.stream_element').find("img.hide_loader").toggleClass("hidden");
|
|
||||||
});
|
|
||||||
|
|
||||||
// this.setUpComments();
|
// this.setUpComments();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
likes: self.instantiate("Likes", element.find("div.likes_container")),
|
likes: self.instantiate("Likes", element.find("div.likes_container")),
|
||||||
lightBox: self.instantiate("Lightbox", element),
|
lightBox: self.instantiate("Lightbox", element),
|
||||||
deletePostLink: element.find("a.stream_element_delete"),
|
deletePostLink: element.find("a.stream_element_delete"),
|
||||||
|
hidePostLoader: element.find("img.hide_loader"),
|
||||||
|
hidePostUndo: element.find("a.stream_element_hide_undo"),
|
||||||
postScope: element.find("span.post_scope"),
|
postScope: element.find("span.post_scope"),
|
||||||
content: element.find(".content p")
|
content: element.find(".content p")
|
||||||
});
|
});
|
||||||
|
|
@ -28,6 +30,15 @@
|
||||||
userCollapse: false
|
userCollapse: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.deletePostLink.bind("click", function(evt) {
|
||||||
|
self.deletePostLink.toggleClass("hidden");
|
||||||
|
self.hidePostLoader.toggleClass("hidden");
|
||||||
|
});
|
||||||
|
|
||||||
|
self.hidePostUndo.bind("click", function(evt) {
|
||||||
|
self.hidePostLoader.toggleClass("hidden");
|
||||||
|
});
|
||||||
|
|
||||||
self.globalSubscribe("post/" + self.postGuid + "/comment/added", function(evt, comment) {
|
self.globalSubscribe("post/" + self.postGuid + "/comment/added", function(evt, comment) {
|
||||||
self.commentStream.publish("comment/added", comment);
|
self.commentStream.publish("comment/added", comment);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue