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
6cc5d6e3
Commit
6cc5d6e3
authored
Jan 08, 2011
by
danielvincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed all rspec/cucumber
parent
6ca0b001
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
47 additions
and
29 deletions
+47
-29
app/controllers/aspects_controller.rb
app/controllers/aspects_controller.rb
+1
-1
app/views/aspects/_aspect_listings.haml
app/views/aspects/_aspect_listings.haml
+4
-1
app/views/aspects/edit.html.haml
app/views/aspects/edit.html.haml
+7
-0
app/views/aspects/index.js.erb
app/views/aspects/index.js.erb
+16
-0
app/views/people/_aspect_list.haml
app/views/people/_aspect_list.haml
+1
-0
app/views/people/show.html.haml
app/views/people/show.html.haml
+3
-3
features/connects_users.feature
features/connects_users.feature
+3
-2
public/javascripts/stream.js
public/javascripts/stream.js
+0
-18
public/stylesheets/sass/application.sass
public/stylesheets/sass/application.sass
+11
-3
spec/controllers/aspects_controller_spec.rb
spec/controllers/aspects_controller_spec.rb
+1
-1
No files found.
app/controllers/aspects_controller.rb
View file @
6cc5d6e3
...
...
@@ -86,7 +86,7 @@ class AspectsController < ApplicationController
@post_hashes
=
hashes_for_posts
@posts
@post_count
=
@posts
.
count
re
spond_with
@aspect
re
direct_to
aspects_path
(
'a_ids[]'
=>
@aspect
.
id
)
end
end
...
...
app/views/aspects/_aspect_listings.haml
View file @
6cc5d6e3
...
...
@@ -8,7 +8,10 @@
=
link_to
t
(
'contacts'
,
:count
=>
@contacts
.
count
),
aspects_manage_path
,
:title
=>
t
(
'aspects.manage.manage_aspects'
)
=
@aspect_hashes
.
count
=
t
(
'_aspects'
)
-
if
@aspect_hashes
.
count
==
1
=
t
(
'_aspect'
)
-
else
=
t
(
'_aspects'
)
%ul
-
for
a_hash
in
aspect_hashes
...
...
app/views/aspects/edit.html.haml
View file @
6cc5d6e3
...
...
@@ -32,3 +32,10 @@
=
link_to
'rename'
,
'#'
\/
=
link_to
'delete'
,
@aspect
,
:method
=>
"delete"
,
:confirm
=>
t
(
'.confirm_remove_aspect'
)
#rename_aspect
=
form_for
@aspect
do
|
asp
|
=
asp
.
text_field
:name
,
:value
=>
@aspect
.
name
=
asp
.
submit
t
(
'.rename_aspect'
)
app/views/aspects/index.js.erb
View file @
6cc5d6e3
$('#aspect_stream_container').html("
<%=
escape_javascript
(
render
(
'aspects/aspect_stream'
,
:aspect
=>
@aspect
,
:aspect_ids
=>
@aspect_ids
,
:post_hashes
=>
@post_hashes
))
%>
");
$('#aspect_listings').html("
<%=
escape_javascript
(
render
(
'aspects/aspect_listings'
,
:aspect_hashes
=>
@aspect_hashes
))
%>
");
$('a[rel*=facebox]').facebox();
$(document).ready(function() {
$('#main_stream').infinitescroll({
navSelector : "div.pagination",
// selector for the paged navigation (it will be hidden)
nextSelector : ".pagination a.next_page",
// selector for the NEXT link (to page 2)
itemSelector : "#main_stream .stream_element",
// selector for all items you'll retrieve
bufferPx: 300,
donetext: "no more.",
loadingText: "",
loadingImg: '/images/ajax-loader.gif'
});
});
app/views/people/_aspect_list.haml
View file @
6cc5d6e3
...
...
@@ -41,6 +41,7 @@
:contact
=>
contact
,
:aspects_with_person
=>
aspects_with_person
,
:aspects_without_person
=>
aspects_without_person
}
%br
-
if
contact
.right
...
...
app/views/people/show.html.haml
View file @
6cc5d6e3
...
...
@@ -25,7 +25,7 @@
{
:controller
=>
"people"
,
:action
=>
"share_with"
,
:id
=>
@person
.
id
},
:class
=>
'button'
,
:class
=>
'
share_with
button'
,
:rel
=>
'facebox'
-
else
...
...
@@ -61,6 +61,6 @@
-
else
#stream
%li
%h3
=
t
(
'.no_posts'
)
%li
{
:style
=>
"text-align:center;"
}
.dull
=
t
(
'.no_posts'
)
features/connects_users.feature
View file @
6cc5d6e3
...
...
@@ -8,9 +8,10 @@ Feature: sending and receiving requests
Scenario
:
initiating and accepting a contact request
When
I sign in as
"bob@bob.bob"
And
I am on
"alice@alice.alice"
's page
And I press the first ".add.button" within "#aspects_list ul > li
:
first-child"
And
I press the first
".share_with.button"
within
"#author_info"
And I press the first ".add.button" within "#facebox #aspects_list ul > li
:
first-child"
And
I wait for the ajax to finish
Then I should see a ".added.button" within "#aspects_list ul > li
:
first-child"
Then I should see a ".added.button" within "
#facebox
#aspects_list ul > li
:
first-child"
Then
I go to the destroy user session page
When
I sign in as
"alice@alice.alice"
...
...
public/javascripts/stream.js
View file @
6cc5d6e3
...
...
@@ -152,9 +152,6 @@ var Stream = {
$
(
"
.stream
"
).
find
(
"
.delete
"
).
live
(
'
ajax:success
'
,
function
(
data
,
html
,
xhr
)
{
$
(
this
).
parents
(
"
.status_message
"
).
fadeOut
(
150
);
});
// inf scroll
Stream
.
infiniteScroll
(
$stream
);
},
toggleComments
:
function
(
evt
)
{
...
...
@@ -198,21 +195,6 @@ var Stream = {
commentBlock
.
find
(
'
textarea
'
).
focus
();
}
}
},
infiniteScroll
:
function
(
stream
){
stream
.
infinitescroll
({
navSelector
:
"
div.pagination
"
,
// selector for the paged navigation (it will be hidden)
nextSelector
:
"
.pagination a.next_page
"
,
// selector for the NEXT link (to page 2)
itemSelector
:
"
#main_stream .stream_element
"
,
// selector for all items you'll retrieve
bufferPx
:
300
,
donetext
:
"
no more.
"
,
loadingText
:
""
,
loadingImg
:
'
/images/ajax-loader.gif
'
});
}
};
...
...
public/stylesheets/sass/application.sass
View file @
6cc5d6e3
...
...
@@ -119,12 +119,12 @@ header
:
color
#111
:
color
rgba
(
15
,
15
,
15
,
0
.90
)
:
background
-webkit-gradient
(
linear
,
0%
0%
,
0%
100%
,
from
(
rgba
(
2
5
,
2
5
,
2
5
,
0
.8
0
))
,
to
(
rgba
(
0
,
0
,
0
,
0
.98
)))
:
background
-moz-linear-gradient
(
top
,
rgba
(
2
5
,
2
5
,
2
5
,
0
.8
0
)
,
rgba
(
0
,
0
,
0
,
0
.98
))
:
background
-webkit-gradient
(
linear
,
0%
0%
,
0%
100%
,
from
(
rgba
(
3
5
,
3
5
,
3
5
,
0
.8
5
))
,
to
(
rgba
(
2
0
,
2
0
,
2
0
,
1
)))
:
background
-moz-linear-gradient
(
top
,
rgba
(
3
5
,
3
5
,
3
5
,
0
.8
5
)
,
rgba
(
2
0
,
2
0
,
2
0
,
0
.98
))
:-webkit-box-shadow
0
1px
3px
#111
:-moz-box-shadow
0
1px
2px
#111
:
box-shadow
0
1px
3px
#
111
:
box-shadow
0
1px
3px
#
222
:
border
:
bottom
1px
solid
#777
...
...
@@ -1670,6 +1670,10 @@ ul#request_result
:-moz-box-shadow
0
1px
#fff
:
box-shadow
0
1px
#fff
:-webkit-border-radius
0
0
5px
5px
:-moz-border-radius
0
0
5px
5px
:
border-radius
0
0
5px
5px
input
.contact_list_search
:
width
100%
:
margin
...
...
@@ -1686,6 +1690,10 @@ ul#request_result
:
border
:
bottom
1px
solid
#eee
&
:last-child
:
border
:
bottom
none
&
:hover
:
background
:
color
rgb
(
245
,
245
,
245
)
...
...
spec/controllers/aspects_controller_spec.rb
View file @
6cc5d6e3
...
...
@@ -94,7 +94,7 @@ describe AspectsController do
describe
"#show"
do
it
"succeeds"
do
get
:show
,
'id'
=>
@aspect0
.
id
.
to_s
response
.
should
be_
success
response
.
should
be_
redirect
end
it
"assigns aspect, aspect_contacts, and posts"
do
get
:show
,
'id'
=>
@aspect0
.
id
.
to_s
...
...
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