show publisher if it was closed when you select another aspect
This commit is contained in:
parent
06013fabec
commit
cdb5cf37e7
2 changed files with 44 additions and 38 deletions
|
|
@ -17,4 +17,5 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
Diaspora.widgets.timeago.updateTimeAgo();
|
Diaspora.widgets.timeago.updateTimeAgo();
|
||||||
|
Publisher.initialize();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,18 @@
|
||||||
* the COPYRIGHT file.
|
* the COPYRIGHT file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//TODO: make this a widget
|
||||||
$(document).ready(function(){
|
var Publisher = {
|
||||||
|
initialize: function() {
|
||||||
var $publisher = $("#publisher");
|
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) {
|
||||||
$(".question_mark").click();
|
$(".question_mark").click();
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if($("#status_message_message").val() != ""){
|
if ($("#status_message_message").val() != "") {
|
||||||
$publisher
|
$publisher
|
||||||
.removeClass("closed")
|
.removeClass("closed")
|
||||||
.find("textarea")
|
.find("textarea")
|
||||||
|
|
@ -25,11 +25,11 @@ $(document).ready(function(){
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$publisher.find("textarea").live("focus", function(evt){
|
$publisher.find("textarea").live("focus", function(evt) {
|
||||||
$publisher.find(".options_and_submit").show();
|
$publisher.find(".options_and_submit").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$publisher.find("textarea").live("click", function(evt){
|
$publisher.find("textarea").live("click", function(evt) {
|
||||||
$publisher
|
$publisher
|
||||||
.removeClass("closed")
|
.removeClass("closed")
|
||||||
.find("textarea")
|
.find("textarea")
|
||||||
|
|
@ -39,12 +39,17 @@ $(document).ready(function(){
|
||||||
|
|
||||||
$publisher.find("textarea").bind("focus", function() {
|
$publisher.find("textarea").bind("focus", function() {
|
||||||
$(this)
|
$(this)
|
||||||
.css('min-height','42px');
|
.css('min-height', '42px');
|
||||||
});
|
});
|
||||||
|
|
||||||
$publisher.find("form").bind("blur", function() {
|
$publisher.find("form").bind("blur", function() {
|
||||||
$publisher
|
$publisher
|
||||||
.find("textarea")
|
.find("textarea")
|
||||||
.css('min-height','2px');
|
.css('min-height', '2px');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
Publisher.initialize();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue