Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
09b877ef
Commit
09b877ef
authored
Jan 14, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove modal window from team member managment
parent
621491c6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
42 deletions
+54
-42
app/assets/javascripts/team.js
app/assets/javascripts/team.js
+8
-0
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+1
-1
app/views/projects/team.html.haml
app/views/projects/team.html.haml
+1
-2
app/views/team_members/_form.html.haml
app/views/team_members/_form.html.haml
+30
-21
app/views/team_members/create.js.haml
app/views/team_members/create.js.haml
+8
-4
app/views/team_members/new.js.haml
app/views/team_members/new.js.haml
+5
-13
spec/requests/team_members_spec.rb
spec/requests/team_members_spec.rb
+1
-1
No files found.
app/assets/javascripts/team.js
0 → 100644
View file @
09b877ef
function
backToMembers
(){
$
(
"
#team_member_new
"
).
hide
(
"
slide
"
,
{
direction
:
"
right
"
},
150
,
function
(){
$
(
"
#team-table
"
).
show
(
"
slide
"
,
{
direction
:
"
left
"
},
150
,
function
()
{
$
(
"
#team_member_new
"
).
remove
();
$
(
"
.add_new
"
).
show
();
});
});
}
app/assets/stylesheets/projects.css.scss
View file @
09b877ef
...
@@ -815,7 +815,7 @@ tr.line_notes_row {
...
@@ -815,7 +815,7 @@ tr.line_notes_row {
width
:
28px
;
width
:
28px
;
height
:
27px
;
height
:
27px
;
top
:
-12px
;
top
:
-12px
;
border
:
1px
solid
#
474D57
;
border
:
1px
solid
#
CCC
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
#fff
;
background
:
#fff
;
...
...
app/views/projects/team.html.haml
View file @
09b877ef
=
render
"project_head"
=
render
"project_head"
%div
=
render
:partial
=>
"team"
,
:locals
=>
{
:project
=>
@project
}
=
render
:partial
=>
"team"
,
:locals
=>
{
:project
=>
@project
}
app/views/team_members/_form.html.haml
View file @
09b877ef
%div
=
form_for
@team_member
,
:as
=>
:team_member
,
:url
=>
project_team_members_path
(
@project
,
@team_member
),
:remote
=>
"true"
do
|
f
|
=
form_for
@team_member
,
:as
=>
:team_member
,
:url
=>
project_team_members_path
(
@project
,
@team_member
),
:remote
=>
"true"
do
|
f
|
%div
-
if
@team_member
.
errors
.
any?
%span
.entity-info
%ul
-
if
request
.
xhr?
-
@team_member
.
errors
.
full_messages
.
each
do
|
msg
|
=
link_to
"#back"
,
:onclick
=>
"backToMembers();"
do
%li
=
msg
.entity-button
Team List
%i
%h2
=
"New Team member"
.span-6.append-bottom
%hr
%b
Name
-
if
@team_member
.
errors
.
any?
.span-6
%ul
=
f
.
select
(
:user_id
,
User
.
not_in_project
(
@project
).
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select user"
},
{
:style
=>
"width:300px"
})
-
@team_member
.
errors
.
full_messages
.
each
do
|
msg
|
.span-6
%li
=
msg
%b
Project Access:
.span-6
=
f
.
select
:project_access
,
options_for_select
(
Project
.
access_options
,
@team_member
.
project_access
),
{},
:class
=>
"project-access-select"
.span-6
.span-6.append-bottom
%b
Repository Access:
%b
Name
.span-6
.span-6
=
f
.
select
:repo_access
,
options_for_select
(
Repository
.
access_options
,
@team_member
.
repo_access
),
{},
:class
=>
"repo-access-select"
=
f
.
select
(
:user_id
,
User
.
not_in_project
(
@project
).
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select user"
},
{
:style
=>
"width:300px"
})
%br
.span-6
.span-6
%b
Project Access:
=
f
.
submit
'Save'
,
:class
=>
"grey-button"
.span-6
=
f
.
select
:project_access
,
options_for_select
(
Project
.
access_options
,
@team_member
.
project_access
),
{},
:class
=>
"project-access-select"
.span-6
%b
Repository Access:
.span-6
=
f
.
select
:repo_access
,
options_for_select
(
Repository
.
access_options
,
@team_member
.
repo_access
),
{},
:class
=>
"repo-access-select"
%br
.merge-tabs
=
f
.
submit
'Save'
,
:class
=>
"grey-button"
app/views/team_members/create.js.haml
View file @
09b877ef
-
if
@team_member
.
valid?
-
if
@team_member
.
valid?
:plain
:plain
$("#new_tm_dialog").dialog("close");
$("#team_member_new").hide("slide", { direction: "right" }, 150, function(){
$("#team-table").append("
#{
escape_javascript
(
render
(
:partial
=>
'show'
,
:locals
=>
{
:member
=>
@team_member
}
))
}
");
$("#team-table").show("slide", { direction: "left" }, 150, function() {
$("#team_member_new").remove();
$("#team-table").replaceWith("
#{
escape_javascript
(
render
(
'projects/team'
))
}
");
$(".add_new").show();
});
});
-
else
-
else
:plain
:plain
$("#new_tm_dialog").empty();
$("#team_member_new").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$("#new_tm_dialog").append("
#{
escape_javascript
(
render
(
'form'
))
}
");
$('select#team_member_user_id').chosen();
$('select#team_member_user_id').chosen();
app/views/team_members/new.js.haml
View file @
09b877ef
-#$("#new-member-holder").empty();
-#$("#new-member-holder").append("#{escape_javascript(render('form'))}");
:plain
:plain
var new_tm_dialog = $("<div id='new_tm_dialog'></div>");
$("#team-table").hide("slide", { direction: "left" }, 150, function(){
new_tm_dialog.html("
#{
escape_javascript
(
render
(
'form'
))
}
");
$(this).parent().append("
#{
escape_javascript
(
render
(
'form'
))
}
");
$(new_tm_dialog).dialog({
$('#team_member_new select#team_member_user_id').chosen();
width: 350,
$("#team_member_new").show("slide", { direction: "right" }, 150);
resizable: false,
$(".add_new").hide();
draggable: false,
title: "Add new member to project team",
close: function(event, ui) { $("#new_tm_dialog").remove();},
modal: true
});
});
$('#team_member_new select#team_member_user_id').chosen();
spec/requests/team_members_spec.rb
View file @
09b877ef
...
@@ -26,7 +26,7 @@ describe "TeamMembers" do
...
@@ -26,7 +26,7 @@ describe "TeamMembers" do
end
end
it
"should open new team member popup"
do
it
"should open new team member popup"
do
page
.
should
have_content
(
"
Add new member to project
"
)
page
.
should
have_content
(
"
New Team member
"
)
end
end
describe
"fill in"
do
describe
"fill in"
do
...
...
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