place thumbnails inside status message form and add spacing
This commit is contained in:
parent
43e10307a6
commit
b6dc32959c
4 changed files with 12 additions and 4 deletions
|
|
@ -46,12 +46,13 @@
|
|||
$('#new_status_message').append("<input type='hidden' value='" + id + "' name='photos[]' />");
|
||||
$('#photodropzone').append(
|
||||
"<li class='publisher_photo' style='position:relative;'>" +
|
||||
"<img src='" + url +"' data-id='" + id + "' />" +
|
||||
"<img src='" + url +"' data-id='" + id + "' />" +
|
||||
"<div class='x'> X </div>" +
|
||||
"<div class='circle'></div>" +
|
||||
"</li>"
|
||||
);
|
||||
$('#publisher').find("input[type='submit']").removeAttr('disabled');
|
||||
$("#publisher textarea").css('paddingBottom', $("#photodropzone").height() + 10);
|
||||
$('.x').live('click', function(){
|
||||
var photo = $(this).closest('.publisher_photo');
|
||||
photo.addClass("dim");
|
||||
|
|
@ -60,8 +61,10 @@
|
|||
success: function() {
|
||||
photo.fadeOut(400, function(){
|
||||
photo.remove();
|
||||
$("#publisher textarea").css('paddingBottom', $("#photodropzone").height() + 10);
|
||||
if ( $('.publisher_photo').length == 0){
|
||||
$("#publisher textarea").removeClass("with_attachments");
|
||||
$("#publisher textarea").css('paddingBottom', '');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ var Publisher = {
|
|||
clear: function(){
|
||||
this.autocompletion.mentionList.clear();
|
||||
$("#photodropzone").find('li').remove();
|
||||
$("#publisher textarea").removeClass("with_attachments");
|
||||
$("#publisher textarea").removeClass("with_attachments").css('paddingBottom', '');
|
||||
},
|
||||
bindServiceIcons: function(){
|
||||
$(".service_icon").bind("click", function(evt){
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ var Stream = {
|
|||
|
||||
$(".new_status_message").live('ajax:loading', function(data, json, xhr) {
|
||||
$("#photodropzone").find('li').remove();
|
||||
$("#publisher textarea").removeClass("with_attachments");
|
||||
$("#publisher textarea").removeClass("with_attachments").css('paddingBottom', '');
|
||||
});
|
||||
|
||||
$(".new_status_message").live('ajax:success', function(data, json, xhr) {
|
||||
|
|
|
|||
|
|
@ -869,7 +869,7 @@ label
|
|||
|
||||
input
|
||||
:display inline
|
||||
|
||||
|
||||
.right
|
||||
:top 2px
|
||||
|
||||
|
|
@ -972,8 +972,13 @@ label
|
|||
:z-index 3
|
||||
:position absolute
|
||||
:bottom 0
|
||||
:width 435px
|
||||
:left 5px
|
||||
li
|
||||
:margin-right 4px
|
||||
img
|
||||
:height 50px
|
||||
:width 50px
|
||||
.circle
|
||||
:display none
|
||||
:z-index 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue