Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Milan
diaspora
Commits
cdbd9df1
Commit
cdbd9df1
authored
Nov 22, 2010
by
maxwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:diaspora/diaspora
parents
ae2b3d75
108ac9fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
34 deletions
+27
-34
app/views/photos/show.html.haml
app/views/photos/show.html.haml
+7
-7
app/views/status_messages/_status_message.haml
app/views/status_messages/_status_message.haml
+1
-1
public/javascripts/view.js
public/javascripts/view.js
+10
-2
public/stylesheets/sass/application.sass
public/stylesheets/sass/application.sass
+9
-24
No files found.
app/views/photos/show.html.haml
View file @
cdbd9df1
...
...
@@ -5,7 +5,8 @@
-
content_for
:head
do
:javascript
$
(
document
).
ready
(
function
(){
$
(
"
#edit_photo_toggle
"
).
bind
(
'
click
'
,
function
()
{
$
(
"
#edit_photo_toggle
"
).
bind
(
'
click
'
,
function
(
evt
)
{
evt
.
preventDefault
();
$
(
"
#photo_edit_options
"
).
toggle
();
$
(
"
.edit_photo input[type='text']
"
).
first
().
focus
();
});
...
...
@@ -38,12 +39,11 @@
#show_photo
-
if
@ownership
=
image_tag
'ajax-loader.gif'
,
:id
=>
"photo_spinner"
,
:class
=>
"hidden"
.edit_pane
.controls
{
: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
'edit'
,
'#'
,
:id
=>
"edit_photo_toggle"
=
image_tag
@photo
.
url
(
:scaled_full
)
=
image_tag
@photo
.
url
(
:scaled_full
)
.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
'edit'
,
'#'
,
:id
=>
"edit_photo_toggle"
-
else
=
image_tag
@photo
.
url
(
:scaled_full
)
...
...
app/views/status_messages/_status_message.haml
View file @
cdbd9df1
...
...
@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%h3
=
markdownify
(
post
.
message
)
=
markdownify
(
post
.
message
)
%br
-
for
photo
in
post
.
photos
=
link_to
(
image_tag
photo
.
url
(
:thumb_medium
)),
object_path
(
photo
)
public/javascripts/view.js
View file @
cdbd9df1
...
...
@@ -138,19 +138,27 @@ function openVideo(type, videoid, link) {
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
),
$controls
=
$this
.
closest
(
"
.
control
s
"
),
$controls
=
$this
.
closest
(
"
.
photo_option
s
"
),
user_id
=
$controls
.
attr
(
'
data-actor
'
);
person_id
=
$controls
.
attr
(
'
data-actor_person
'
);
photo_url
=
$controls
.
attr
(
'
data-image_url
'
);
$
(
"
img[data-person_id='
"
+
person_id
+
"
']
"
).
each
(
function
()
{
$
(
this
).
fadeTo
(
200
,
0.3
);
});
$
.
ajax
({
type
:
"
PUT
"
,
url
:
'
/people/
'
+
user_id
,
data
:
{
"
person
"
:{
"
profile
"
:{
"
image_url
"
:
photo_url
}}},
success
:
function
(){
$
(
"
img[data-person_id='
"
+
person_id
+
"
']
"
).
each
(
function
()
{
$
(
this
).
fadeTo
(
200
,
1
);
this
.
src
=
photo_url
;
});
}
...
...
public/stylesheets/sass/application.sass
View file @
cdbd9df1
...
...
@@ -665,6 +665,7 @@ li.message .from .right
:
margin-right
1em
#show_photo
:
position
relative
:
display
inline-block
:
background
:
color
#fff
...
...
@@ -680,6 +681,8 @@ li.message .from .right
:
border-radius
3px
img
:
z-index
2
:
position
relative
:
max-width
100%
:
margin
:
bottom
10px
...
...
@@ -687,6 +690,7 @@ li.message .from .right
:
bottom
1px
solid
#ddd
#photo_spinner
:
z-index
1
:
position
absolute
:
height
100px
:
width
100px
...
...
@@ -1351,32 +1355,13 @@ input[type="search"]
:
border-radius
5px
.
edit_pane
.
photo_options
:
display
inline
:
position
relative
.controls
:
display
none
:
background
:
color
rgba
(
51
,
51
,
51
,
0
.9
)
:
padding
10px
:
position
absolute
:
right
1px
:
margin
:
top
1px
a
:
font
:weight
bold
:
color
#eee
:
text-shadow
0
1px
#000
:
position
absolute
:
bottom
5px
:
right
13px
&
:hover
:
color
#fff
&
:hover
.controls
:
display
inline
:
color
#999
ul
#breadcrumb
:list
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment