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 { ...@@ -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;
......
= render "project_head" = 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? -if @team_member.errors.any?
%ul %ul
- @team_member.errors.full_messages.each do |msg| - @team_member.errors.full_messages.each do |msg|
...@@ -19,6 +28,6 @@ ...@@ -19,6 +28,6 @@
.span-6 .span-6
= f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select" = f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select"
%br %br
.span-6 .merge-tabs
= f.submit 'Save', :class => "grey-button" = f.submit 'Save', :class => "grey-button"
- 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();
-#$("#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();
...@@ -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
......
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