fix homepage JS
main name field lost its ID in the redesign gave it one and changed the one in the JS to match
This commit is contained in:
parent
7db0beec75
commit
b44cb4b09e
3 changed files with 6 additions and 5 deletions
|
@ -8,7 +8,8 @@ module OutfitsHelper
|
||||||
options_from_collection_for_select(collection, :id, :human_name, value)
|
options_from_collection_for_select(collection, :id, :human_name, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pet_name_tag
|
def pet_name_tag(options={})
|
||||||
text_field_tag 'name', nil, :spellcheck => false, :id => nil
|
options = {:spellcheck => false, :id => nil}.merge(options)
|
||||||
|
text_field_tag 'name', nil, options
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#outfit-forms
|
#outfit-forms
|
||||||
#pet-preview
|
#pet-preview
|
||||||
= image_tag 'default_preview.png'
|
= image_tag 'default_preview.png', :alt => ''
|
||||||
%span
|
%span
|
||||||
%h1 Dress to Impress
|
%h1 Dress to Impress
|
||||||
%h2 Neopets wearables made easy!
|
%h2 Neopets wearables made easy!
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
= destination_tag 'wardrobe'
|
= destination_tag 'wardrobe'
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend Enter your pet's name
|
%legend Enter your pet's name
|
||||||
= pet_name_tag
|
= pet_name_tag :id => 'main-pet-name'
|
||||||
%button{:type => "submit"}
|
%button{:type => "submit"}
|
||||||
Plan my outfit!
|
Plan my outfit!
|
||||||
= form_tag wardrobe_path, :method => 'get', :id => 'start-from-scratch' do
|
= form_tag wardrobe_path, :method => 'get', :id => 'start-from-scratch' do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
var preview_el = $('#pet-preview'),
|
var preview_el = $('#pet-preview'),
|
||||||
img_el = preview_el.find('img'),
|
img_el = preview_el.find('img'),
|
||||||
response_el = preview_el.find('span'),
|
response_el = preview_el.find('span'),
|
||||||
name_el = $('#name');
|
name_el = $('#main-pet-name');
|
||||||
|
|
||||||
preview_el.click(function () {
|
preview_el.click(function () {
|
||||||
name_el.val(Preview.Job.current.name).closest('form').submit();
|
name_el.val(Preview.Job.current.name).closest('form').submit();
|
||||||
|
|
Loading…
Reference in a new issue