1
0
Fork 0
forked from OpenNeo/impress

move IMPRESS_HOST js constant into JS rather than an HTML attribute

This commit is contained in:
Emi Matchu 2010-06-08 19:18:59 -04:00
parent aa21347deb
commit adce2e7317
2 changed files with 3 additions and 3 deletions

View file

@ -9,11 +9,12 @@
#item-preview #item-preview
#item-preview-species= standard_species_images(@item.supported_species) #item-preview-species= standard_species_images(@item.supported_species)
#item-preview-error #item-preview-error
#item-preview-swf{'data-impress-host' => RemoteImpressHost} #item-preview-swf
Javascript and Flash are required to preview wearables. Sorry! Javascript and Flash are required to preview wearables. Sorry!
:javascript :javascript
var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect}; var CURRENT_ITEM_ZONES_RESTRICT = #{@item.zones_restrict.inspect},
IMPRESS_HOST = #{RemoteImpressHost.inspect};
- content_for :javascripts do - content_for :javascripts do
= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', = javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js',

View file

@ -1,6 +1,5 @@
var PREVIEW_SWF_ID = 'item-preview-swf', var PREVIEW_SWF_ID = 'item-preview-swf',
PREVIEW_SWF = document.getElementById(PREVIEW_SWF_ID), PREVIEW_SWF = document.getElementById(PREVIEW_SWF_ID),
IMPRESS_HOST = PREVIEW_SWF.getAttribute('data-impress-host'),
speciesList = $('#item-preview a'), speciesList = $('#item-preview a'),
MainWardrobe; MainWardrobe;