Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
cdbd9df15e
4 changed files with 27 additions and 34 deletions
|
|
@ -5,7 +5,8 @@
|
||||||
- content_for :head do
|
- content_for :head do
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready( function(){
|
$(document).ready( function(){
|
||||||
$("#edit_photo_toggle").bind('click', function() {
|
$("#edit_photo_toggle").bind('click', function(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
$("#photo_edit_options").toggle();
|
$("#photo_edit_options").toggle();
|
||||||
$(".edit_photo input[type='text']").first().focus();
|
$(".edit_photo input[type='text']").first().focus();
|
||||||
});
|
});
|
||||||
|
|
@ -38,12 +39,11 @@
|
||||||
#show_photo
|
#show_photo
|
||||||
-if @ownership
|
-if @ownership
|
||||||
= image_tag 'ajax-loader.gif', :id => "photo_spinner", :class => "hidden"
|
= image_tag 'ajax-loader.gif', :id => "photo_spinner", :class => "hidden"
|
||||||
.edit_pane
|
= image_tag @photo.url(:scaled_full)
|
||||||
.controls{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
|
.photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}}
|
||||||
= link_to t('.make_profile_photo'), '#', :class => "make_profile_photo"
|
= link_to t('.make_profile_photo'), '#', :class => 'make_profile_photo'
|
||||||
|
|
|
|
||||||
= link_to 'edit', '#', :id => "edit_photo_toggle"
|
= link_to 'edit', '#', :id => "edit_photo_toggle"
|
||||||
= image_tag @photo.url(:scaled_full)
|
|
||||||
|
|
||||||
-else
|
-else
|
||||||
= image_tag @photo.url(:scaled_full)
|
= image_tag @photo.url(:scaled_full)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
%h3= markdownify(post.message)
|
= markdownify(post.message)
|
||||||
%br
|
%br
|
||||||
- for photo in post.photos
|
- for photo in post.photos
|
||||||
= link_to (image_tag photo.url(:thumb_medium)), object_path(photo)
|
= link_to (image_tag photo.url(:thumb_medium)), object_path(photo)
|
||||||
|
|
|
||||||
|
|
@ -138,19 +138,27 @@ function openVideo(type, videoid, link) {
|
||||||
link.onclick = function() { $container.slideToggle('fast', function() { } ); }
|
link.onclick = function() { $container.slideToggle('fast', function() { } ); }
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".make_profile_photo").live("click", function(){
|
$(".make_profile_photo").live("click", function(evt){
|
||||||
|
|
||||||
|
evt.preventDefault();
|
||||||
|
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
$controls = $this.closest(".controls"),
|
$controls = $this.closest(".photo_options"),
|
||||||
user_id = $controls.attr('data-actor');
|
user_id = $controls.attr('data-actor');
|
||||||
person_id = $controls.attr('data-actor_person');
|
person_id = $controls.attr('data-actor_person');
|
||||||
photo_url = $controls.attr('data-image_url');
|
photo_url = $controls.attr('data-image_url');
|
||||||
|
|
||||||
|
$("img[data-person_id='"+ person_id +"']").each( function() {
|
||||||
|
$(this).fadeTo(200,0.3);
|
||||||
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
url: '/people/'+user_id,
|
url: '/people/'+user_id,
|
||||||
data: {"person":{"profile":{ "image_url": photo_url }}},
|
data: {"person":{"profile":{ "image_url": photo_url }}},
|
||||||
success: function(){
|
success: function(){
|
||||||
$("img[data-person_id='"+ person_id +"']").each( function() {
|
$("img[data-person_id='"+ person_id +"']").each( function() {
|
||||||
|
$(this).fadeTo(200,1);
|
||||||
this.src = photo_url;
|
this.src = photo_url;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -665,6 +665,7 @@ li.message .from .right
|
||||||
:margin-right 1em
|
:margin-right 1em
|
||||||
|
|
||||||
#show_photo
|
#show_photo
|
||||||
|
:position relative
|
||||||
:display inline-block
|
:display inline-block
|
||||||
:background
|
:background
|
||||||
:color #fff
|
:color #fff
|
||||||
|
|
@ -680,6 +681,8 @@ li.message .from .right
|
||||||
:border-radius 3px
|
:border-radius 3px
|
||||||
|
|
||||||
img
|
img
|
||||||
|
:z-index 2
|
||||||
|
:position relative
|
||||||
:max-width 100%
|
:max-width 100%
|
||||||
:margin
|
:margin
|
||||||
:bottom 10px
|
:bottom 10px
|
||||||
|
|
@ -687,6 +690,7 @@ li.message .from .right
|
||||||
:bottom 1px solid #ddd
|
:bottom 1px solid #ddd
|
||||||
|
|
||||||
#photo_spinner
|
#photo_spinner
|
||||||
|
:z-index 1
|
||||||
:position absolute
|
:position absolute
|
||||||
:height 100px
|
:height 100px
|
||||||
:width 100px
|
:width 100px
|
||||||
|
|
@ -1351,32 +1355,13 @@ input[type="search"]
|
||||||
:border-radius 5px
|
:border-radius 5px
|
||||||
|
|
||||||
|
|
||||||
.edit_pane
|
.photo_options
|
||||||
:display inline
|
:display inline
|
||||||
:position relative
|
|
||||||
|
|
||||||
.controls
|
|
||||||
:display none
|
|
||||||
:background
|
|
||||||
:color rgba(51,51,51,0.9)
|
|
||||||
:padding 10px
|
|
||||||
:position absolute
|
:position absolute
|
||||||
:right 1px
|
:bottom 5px
|
||||||
:margin
|
:right 13px
|
||||||
:top 1px
|
|
||||||
|
|
||||||
a
|
:color #999
|
||||||
:font
|
|
||||||
:weight bold
|
|
||||||
:color #eee
|
|
||||||
:text-shadow 0 1px #000
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
:color #fff
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
.controls
|
|
||||||
:display inline
|
|
||||||
|
|
||||||
ul#breadcrumb
|
ul#breadcrumb
|
||||||
:list
|
:list
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue