things having to do with publisher belong in publisher.js not stream.js
This commit is contained in:
parent
d03119f7e9
commit
7089782ba1
2 changed files with 31 additions and 19 deletions
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
var $publisher = $("#publisher");
|
||||||
|
|
||||||
$("div.public_toggle input").live("click", function(evt){
|
$("div.public_toggle input").live("click", function(evt){
|
||||||
$("#publisher_service_icons").toggleClass("dim");
|
$("#publisher_service_icons").toggleClass("dim");
|
||||||
if($(this).attr('checked') == true){
|
if($(this).attr('checked') == true){
|
||||||
|
|
@ -12,18 +14,37 @@ $(document).ready(function(){
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
if($("textarea#status_message_message").val() != ""){
|
if($("#status_message_message").val() != ""){
|
||||||
$("#publisher").removeClass("closed");
|
$publisher
|
||||||
$("#publisher").find("textarea").focus();
|
.removeClass("closed");
|
||||||
$("#publisher .options_and_submit").show();
|
.find("textarea")
|
||||||
|
.focus();
|
||||||
|
|
||||||
|
$publisher
|
||||||
|
.find(".options_and_submit")
|
||||||
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#publisher textarea").live("focus", function(evt){
|
$publisher.find("textarea").live("focus", function(evt){
|
||||||
$("#publisher .options_and_submit").show();
|
$publisher.find(".options_and_submit").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#publisher textarea").live("click", function(evt){
|
$publisher.find("textarea").live("click", function(evt){
|
||||||
$("#publisher").removeClass("closed");
|
$publisher
|
||||||
$("#publisher").find("textarea").focus();
|
.removeClass("closed")
|
||||||
|
.find("textarea")
|
||||||
|
.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$publisher.find("textarea").bind("focus", function() {
|
||||||
|
$(this)
|
||||||
|
.css('min-height','42px');
|
||||||
|
});
|
||||||
|
|
||||||
|
$publisher.find("form").bind("blur", function() {
|
||||||
|
$publisher
|
||||||
|
.find("textarea")
|
||||||
|
.css('min-height','2px');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,10 @@
|
||||||
var Stream = {
|
var Stream = {
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
var $stream = $(".stream");
|
var $stream = $(".stream");
|
||||||
var $publisher = $("#publisher");
|
|
||||||
|
|
||||||
$("abbr.timeago").timeago();
|
$("abbr.timeago").timeago();
|
||||||
$stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments);
|
$stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments);
|
||||||
|
|
||||||
// publisher textarea reset
|
|
||||||
$publisher.find("textarea").bind("focus", function() {
|
|
||||||
$(this).css('min-height','42px');
|
|
||||||
});
|
|
||||||
$publisher.find("form").bind("blur", function() {
|
|
||||||
$("#publisher textarea").css('min-height','2px');
|
|
||||||
});
|
|
||||||
|
|
||||||
// comment link form focus
|
// comment link form focus
|
||||||
$stream.delegate(".focus_comment_textarea", "click", function(e){
|
$stream.delegate(".focus_comment_textarea", "click", function(e){
|
||||||
Stream.focusNewComment($(this), e);
|
Stream.focusNewComment($(this), e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue