Skip to content

Commit

Permalink
Corrects the remove javascript for alternate values so that a request…
Browse files Browse the repository at this point in the history
… is not made, this fixes the remove functionality so that not all inserted subforms are removed.
  • Loading branch information
mjy committed Oct 24, 2014
1 parent 0e01312 commit 3261796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/alternate_values.js.coffee
Expand Up @@ -39,6 +39,7 @@ bind_alternate_value_remove = (link) ->
$('a', $(link).prev('div.alternate-value-record')).click (event) ->
# alert 'Remove triggered by new link.'
destroy_record(this)
event.preventDefault() # Prevent link from following its href
return
return

Expand Down
4 changes: 1 addition & 3 deletions spec/models/source/bibtex_spec.rb
Expand Up @@ -2,9 +2,6 @@

describe Source::Bibtex, :type => :model do

$user_id = 1 # user_id & project_id must be set to get housekeeping to work correctly
$project_id = 1

let(:bibtex) { FactoryGirl.build(:source_bibtex) }

before(:each) do
Expand Down Expand Up @@ -438,6 +435,7 @@
end

context 'before save set cached values - multiple authors' do

before(:all) {
@l_src = FactoryGirl.create(:src_mult_authors)
}
Expand Down

0 comments on commit 3261796

Please sign in to comment.