This commit is contained in:
Eric Allen 2010-07-05 09:58:25 -07:00
parent f10a98d8ac
commit 1cd748d7a2
3 changed files with 11 additions and 4 deletions

View file

@ -28,5 +28,9 @@ else
page << "defaultTags = #{default_tags_for_autocomplete};"
end
page.replace_html "sidebar", :file => 'sidebar/sidebar.html.erb'
page['default_project_name_id'].value = @project.name
page['todo_project_name'].value = @project.name
page.replace_html "project_name", @project.name
page.replace_html "sidebar", :file => 'sidebar/sidebar.html.erb'
page << "enable_rich_interaction();"

View file

@ -30,7 +30,10 @@ end
When /^I edit the project name to "([^\"]*)"$/ do |new_title|
click_link "link_edit_project_#{@project.id}"
fill_in "project[name]", :with => new_title
click_button "submit_project_#{@project.id}"
selenium.click "submit_project_#{@project.id}",
:wait_for => :text,
:element => "flash",
:text => "Project saved"
end
Then /^I should see the bold text "([^\"]*)" in the project description$/ do |bold|

View file

@ -273,6 +273,8 @@ function enable_rich_interaction(){
/* Reset auto updater */
field_touched = false;
$('h2#project_name').editable(save_project_name, {style: 'padding:0px', submit: "OK"});
}
/* Auto-refresh */
@ -462,8 +464,6 @@ $(document).ready(function() {
return(value);
};
$('h2#project_name').editable(save_project_name, {style: 'padding:0px', submit: "OK"});
$('.alphabetize_link').click(function(evt){
evt.preventDefault();
if(confirm('Are you sure that you want to sort these projects alphabetically? This will replace the existing sort order.')){