Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
c0423e5e
Commit
c0423e5e
authored
14 years ago
by
danielvincent
Browse files
Options
Downloads
Patches
Plain Diff
reverting commit manually
parent
829ad636
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/views/aspects/manage.html.haml
+6
-17
6 additions, 17 deletions
app/views/aspects/manage.html.haml
public/javascripts/aspect-edit.js
+27
-43
27 additions, 43 deletions
public/javascripts/aspect-edit.js
public/stylesheets/sass/application.sass
+21
-50
21 additions, 50 deletions
public/stylesheets/sass/application.sass
with
54 additions
and
110 deletions
app/views/aspects/manage.html.haml
+
6
−
17
View file @
c0423e5e
...
...
@@ -16,7 +16,7 @@
%h3
=
t
(
'.requests'
)
.requests
%ul
%ul
.dropzone
-
if
@remote_requests
.
size
<
1
%li
No new requests
-
else
...
...
@@ -44,23 +44,20 @@
%span
.tip
click to edit
%ul
.tools
%li
=
link_to
t
(
'.add_a_new_friend'
),
"#add_request_pane_
#{
aspect
.
id
}
"
,
:class
=>
'add_request_button'
%li
!=
remove_link
(
aspect
)
%ul
.people
{
:data
=>
{
:aspect_id
=>
aspect
.
id
}}
%ul
.dropzone
{
:data
=>
{
:aspect_id
=>
aspect
.
id
}}
-
for
person
in
aspect
.
people
%li
.person
{
:data
=>
{
:guid
=>
person
.
id
,
:aspect_id
=>
aspect
.
id
}}
.delete
.x
=
link_to
"X"
,
"#remove_person_pane"
,
:class
=>
"remove_person_button"
X
.circle
=
person_image_tag
(
person
)
.draggable_info
Drag to add people
%li
.dropzone_targets
%span
.dropzone.add_person
=
link_to
"Add person"
,
"#add_request_pane_
#{
aspect
.
id
}
"
,
:class
=>
'add_request_button'
%span
.dropzone.move_person
=
link_to
"Move person"
,
'#'
.fancybox_content
...
...
@@ -68,11 +65,3 @@
=
render
"requests/new_request"
,
:aspect
=>
aspect
.fancybox_content
#remove_person_pane
.span-12.last
.modal_title_bar
%h4
Remove from aspect
.person
This diff is collapsed.
Click to expand it.
public/javascripts/aspect-edit.js
+
27
−
43
View file @
c0423e5e
...
...
@@ -21,62 +21,49 @@ function decrementRequestsCounter() {
// Dragging person between aspects
$
(
function
()
{
$
(
"
.person
"
).
draggable
({
$
(
"
ul
.person
"
).
draggable
({
revert
:
true
,
start
:
function
(
event
,
ui
){
$
(
this
).
children
(
"
img
"
).
animate
({
'
height
'
:
80
,
'
width
'
:
80
,
'
opacity
'
:
0.8
},
200
);
$
(
"
.dr
opzone
"
).
fadeIn
(
100
);
$
(
"
.dr
aggable_info
"
).
fadeIn
(
100
);
},
stop
:
function
(
event
,
ui
){
$
(
this
).
children
(
"
img
"
).
animate
({
'
height
'
:
70
,
'
width
'
:
70
,
'
opacity
'
:
1
},
200
);
$
(
"
.draggable_info
"
).
fadeOut
(
100
);
}
});
$
(
"
.
dropzone
"
,
"
.aspect
"
).
droppable
({
$
(
"
.
aspect ul.dropzone
"
).
droppable
({
hoverClass
:
'
active
'
,
drop
:
function
(
event
,
ui
)
{
var
dropzone
=
$
(
this
);
var
person
=
ui
.
draggable
;
var
aspect
=
dropzone
.
closest
(
"
.aspect
"
);
if
(
person
.
hasClass
(
'
request
'
)
){
$
.
ajax
({
type
:
"
DELETE
"
,
url
:
"
/requests/
"
+
person
.
attr
(
'
data-guid
'
),
data
:
{
"
accept
"
:
true
,
"
aspect_id
"
:
aspect
.
attr
(
'
data-
gu
id
'
)
},
data
:
{
"
accept
"
:
true
,
"
aspect_id
"
:
dropzone
.
attr
(
'
data-
aspect_
id
'
)
},
success
:
function
(
data
){
decrementRequestsCounter
();
}
});
};
if
(
aspect
.
attr
(
'
data-guid
'
)
!=
person
.
attr
(
'
data-aspect_id
'
)){
if
(
dropzone
.
hasClass
(
"
move_person
"
)
){
$
.
ajax
({
url
:
"
/aspects/move_friend/
"
,
data
:
{
"
friend_id
"
:
person
.
attr
(
'
data-guid
'
),
"
from
"
:
person
.
attr
(
'
data-aspect_id
'
),
"
to
"
:
{
"
to
"
:
aspect
.
attr
(
'
data-guid
'
)
}},
success
:
function
(
data
){
person
.
attr
(
'
data-aspect_id
'
,
aspect
.
attr
(
'
data-guid
'
));
}});
$
(
"
ul.people li:last
"
,
aspect
).
before
(
person
);
}
else
{
$
.
ajax
({
url
:
"
/aspects/add_to_aspect/
"
,
data
:
{
"
friend_id
"
:
person
.
attr
(
'
data-guid
'
),
"
aspect_id
"
:
aspect
.
attr
(
'
data-guid
'
)
},
success
:
function
(
data
){
person
.
attr
(
'
data-aspect_id
'
,
aspect
.
attr
(
'
data-guid
'
));
}});
$
(
"
ul.people li:last
"
,
aspect
).
before
(
person
);
if
(
dropzone
.
attr
(
'
data-aspect_id
'
)
!=
person
.
attr
(
'
data-aspect_id
'
)){
$
.
ajax
({
url
:
"
/aspects/move_friend/
"
,
data
:
{
"
friend_id
"
:
person
.
attr
(
'
data-guid
'
),
"
from
"
:
person
.
attr
(
'
data-aspect_id
'
),
"
to
"
:
{
"
to
"
:
dropzone
.
attr
(
'
data-aspect_id
'
)
}},
success
:
function
(
data
){
person
.
attr
(
'
data-aspect_id
'
,
dropzone
.
attr
(
'
data-aspect_id
'
));
}});
}
}
$
(
this
).
closest
(
"
ul
"
).
append
(
person
);
}
});
...
...
@@ -101,7 +88,7 @@ $(function() {
'
aspect_id
'
:
person
.
attr
(
'
data-aspect_id
'
)
}
});
}
person
.
fadeOut
(
'
slow
'
,
function
(){
person
.
remove
()
}
);
person
.
fadeOut
(
'
slow
'
,
$
(
this
)
.
remove
());
}
}
});
...
...
@@ -111,7 +98,6 @@ $(function() {
// Person deletion
$
(
"
.delete
"
).
live
(
"
click
"
,
function
()
{
var
person
=
$
(
this
).
closest
(
"
li.person
"
);
...
...
@@ -132,19 +118,17 @@ $(".delete").live("click", function() {
}
else
{
var
person_id
=
$
(
this
).
closest
(
"
li.person
"
).
attr
(
'
data-guid
'
);
if
(
confirm
(
"
Remove this person from all aspects?
"
)
){
var
person_id
=
$
(
this
).
closest
(
"
li.person
"
).
attr
(
'
data-guid
'
);
/*
$.ajax({
type: "DELETE",
url: "/people/" + person_id,
success: function() {
person.fadeOut(200);
}
});
*/
$
.
ajax
({
type
:
"
DELETE
"
,
url
:
"
/people/
"
+
person_id
,
success
:
function
()
{
person
.
fadeOut
(
200
);
}
});
}
}
});
...
...
This diff is collapsed.
Click to expand it.
public/stylesheets/sass/application.sass
+
21
−
50
View file @
c0423e5e
...
...
@@ -938,71 +938,49 @@ h1.big_text
&
:last-child
:
margin
:
right
0
ul
#aspect_list
:list
:style
none
:
padding
0
:
margin
0
.aspect
,
.requests
,
.aspect_remove
:
position
relative
:list
:style
none
:
color
#999
:
cursor
default
:
text-shadow
0
1px
#fff
ul
.dropzone
:
position
relative
:
min-height
20px
:
margin
0
:
bottom
25px
.dropzone
:
display
inline-block
:-webkit-border-radius
10px
:-moz-border-radius
10px
:
border-radius
10px
:
margin
5px
:list
:style
none
:
padding
15px
:
border
2px
dashed
#ccc
:
height
70px
:
max-height
70px
:
width
70px
:
max-width
70px
&
.active
:
background
:
color
rgba
(
255
,
252
,
127
,
0
.2
)
a
:
display
block
:
height
100%
:
padding
:
top
12px
:text
:align
center
.draggable_info
:
position
absolute
:
display
none
:
right
15px
:
bottom
10px
:
font
:style
italic
:
size
14px
:
color
#999
&
:hover
:
color
#666
ul
:list
:style
none
:
min-height
20px
:
margin
0
:
bottom
25px
:
padding
0
li
:
display
inline-block
:
color
#aaa
.person
:
display
inline-block
:
cursor
move
:
z-index
10
:
top
0
:
position
relative
:
padding
0
:
margin
5px
...
...
@@ -1056,15 +1034,8 @@ ul#aspect_list
.x
:
z-index
2
:
position
absolute
:
padding
:
top
2px
:
left
7px
a
:
cursor
default
:
display
block
:
height
100%
:
text-shadow
none
:
color
#eee
:
top
2px
:
left
7px
&
:hover
:
cursor
default
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment