Commit 09b877ef authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

remove modal window from team member managment

parent 621491c6
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();
});
});
}
......@@ -815,7 +815,7 @@ tr.line_notes_row {
width:28px;
height:27px;
top: -12px;
border: 1px solid #474D57;
border: 1px solid #CCC;
border-radius: 3px;
background: #fff;
......
= render "project_head"
%div
= render :partial => "team", :locals => {:project => @project}
= render :partial => "team", :locals => {:project => @project}
%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
%span.entity-info
- if request.xhr?
= link_to "#back", :onclick => "backToMembers();" do
.entity-button
Team List
%i
%h2= "New Team member"
%hr
-if @team_member.errors.any?
%ul
- @team_member.errors.full_messages.each do |msg|
......@@ -19,6 +28,6 @@
.span-6
= f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select"
%br
.span-6
.merge-tabs
= f.submit 'Save', :class => "grey-button"
- if @team_member.valid?
:plain
$("#new_tm_dialog").dialog("close");
$("#team-table").append("#{escape_javascript(render(:partial => 'show', :locals => {:member => @team_member} ))}");
$("#team_member_new").hide("slide", { direction: "right" }, 150, function(){
$("#team-table").show("slide", { direction: "left" }, 150, function() {
$("#team_member_new").remove();
$("#team-table").replaceWith("#{escape_javascript(render('projects/team'))}");
$(".add_new").show();
});
});
- else
:plain
$("#new_tm_dialog").empty();
$("#new_tm_dialog").append("#{escape_javascript(render('form'))}");
$("#team_member_new").replaceWith("#{escape_javascript(render('form'))}");
$('select#team_member_user_id').chosen();
-#$("#new-member-holder").empty();
-#$("#new-member-holder").append("#{escape_javascript(render('form'))}");
:plain
var new_tm_dialog = $("<div id='new_tm_dialog'></div>");
new_tm_dialog.html("#{escape_javascript(render('form'))}");
$(new_tm_dialog).dialog({
width: 350,
resizable: false,
draggable: false,
title: "Add new member to project team",
close: function(event, ui) { $("#new_tm_dialog").remove();},
modal: true
$("#team-table").hide("slide", { direction: "left" }, 150, function(){
$(this).parent().append("#{escape_javascript(render('form'))}");
$('#team_member_new select#team_member_user_id').chosen();
$("#team_member_new").show("slide", { direction: "right" }, 150);
$(".add_new").hide();
});
$('#team_member_new select#team_member_user_id').chosen();
......@@ -26,7 +26,7 @@ describe "TeamMembers" do
end
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
describe "fill in" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment