From adce2e731767514690cd5d607a6929016ef97905 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 8 Jun 2010 19:18:59 -0400 Subject: [PATCH] move IMPRESS_HOST js constant into JS rather than an HTML attribute --- app/views/items/show.html.haml | 5 +++-- public/javascripts/items/show.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index 1e7fefd7..13fe6ddd 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -9,11 +9,12 @@ #item-preview #item-preview-species= standard_species_images(@item.supported_species) #item-preview-error - #item-preview-swf{'data-impress-host' => RemoteImpressHost} + #item-preview-swf Javascript and Flash are required to preview wearables. Sorry! :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 = javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', diff --git a/public/javascripts/items/show.js b/public/javascripts/items/show.js index f885f88a..942dcd7e 100644 --- a/public/javascripts/items/show.js +++ b/public/javascripts/items/show.js @@ -1,6 +1,5 @@ var PREVIEW_SWF_ID = 'item-preview-swf', PREVIEW_SWF = document.getElementById(PREVIEW_SWF_ID), - IMPRESS_HOST = PREVIEW_SWF.getAttribute('data-impress-host'), speciesList = $('#item-preview a'), MainWardrobe;