From 6f1aae4bae28cb84299eb2dd4e213076c63fa9ac Mon Sep 17 00:00:00 2001 From: Nicolaas Matthijs Date: Wed, 5 Mar 2014 16:52:17 +0000 Subject: [PATCH] Followed up on document preview scoping --- .../oae-core/documentpreview/js/documentpreview.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/node_modules/oae-core/documentpreview/js/documentpreview.js b/node_modules/oae-core/documentpreview/js/documentpreview.js index 2abb0565c6d..f47901e098c 100644 --- a/node_modules/oae-core/documentpreview/js/documentpreview.js +++ b/node_modules/oae-core/documentpreview/js/documentpreview.js @@ -89,9 +89,10 @@ define(['jquery', 'underscore', 'oae.core', 'lazyload'], function($, _, oae) { // Add the page container, containing a loading indicator $content.append(oae.api.util.template().render($('#documentpreview-content-page-template', $rootel), { - 'pageNumber': page.pageNumber, + // Replace colons as they cause CSS selectors to be invalid 'contentId': widgetData.id.replace(/:/g, '-'), - 'revisionId': widgetData.latestRevisionId.replace(/:/g, '-') + 'revisionId': widgetData.latestRevisionId.replace(/:/g, '-'), + 'pageNumber': page.pageNumber })); // Cache a reference to the page element @@ -533,10 +534,6 @@ define(['jquery', 'underscore', 'oae.core', 'lazyload'], function($, _, oae) { * current document */ var loadStyleSheets = function() { - // Remove the stylesheets from any documents that might have been previously loaded, as the styles - // can conflict - // TODO Remove this once https://github.com/oaeproject/Hilary/pull/741 has been fixed - $('head .lazyload').remove(); // The stylesheets are loaded before the pages are loaded to avoid display issues // when any of the pages are be loaded before the stylesheets are loaded LazyLoad.css([constructDocumentPreviewURL('combined.css')], function() {