diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index 680930cb02..be9b6f28c8 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -197,14 +197,15 @@ function generateProjectIdentifier() { function observeProjectName() { jQuery('#project_name').keyup(function() { if(!projectIdentifierLocked) { - jQuery('project_identifier').setValue(generateProjectIdentifier()); + jQuery('#project_identifier').val(generateProjectIdentifier()); } }); } function observeProjectIdentifier() { jQuery('#project_identifier').keyup(function() { - if($('project_identifier').getValue() !== '' && $('project_identifier').getValue() != generateProjectIdentifier()) { + if(jQuery('#project_identifier').getValue() !== '' && + jQuery('#project_identifier').getValue() != generateProjectIdentifier()) { projectIdentifierLocked = true; } else { projectIdentifierLocked = false; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 55ecdc4b69..f246a71660 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -68,8 +68,8 @@ module ApplicationHelper end def link_to_function(content, function, html_options = {}) - onclick = "#{function}; return false;" - content_tag(:a, content, html_options.merge(onclick: onclick)) + onclick = "#{function}; return false;" + content_tag(:a, content, html_options.merge(onclick: onclick)) end def required_field_name(name = '') diff --git a/spec/features/time_entry/time_entry_report_spec.rb b/spec/features/time_entry/time_entry_report_spec.rb index 199b0b6029..522fbc2e52 100644 --- a/spec/features/time_entry/time_entry_report_spec.rb +++ b/spec/features/time_entry/time_entry_report_spec.rb @@ -43,10 +43,10 @@ describe 'time entry report', type: :feature, js: true do let(:work_package2) { FactoryGirl.create(:work_package, project: project2) } let!(:project_time_entry2) { FactoryGirl.create(:time_entry, - project: project2, - spent_on: 1.year.ago, - work_package: work_package2, - hours: 5.0) + project: project2, + spent_on: 1.year.ago, + work_package: work_package2, + hours: 5.0) } let(:user) { FactoryGirl.create(:admin) } @@ -66,7 +66,6 @@ describe 'time entry report', type: :feature, js: true do end end - context 'for all projects' do before do visit time_entries_path