diff --git a/i18n/_locales/en_US/messages.json b/i18n/_locales/en_US/messages.json index 8b88c8e62..9ca421b99 100644 --- a/i18n/_locales/en_US/messages.json +++ b/i18n/_locales/en_US/messages.json @@ -87,6 +87,9 @@ "err_epub_corrupt" : { "message": "Invalid or corrupted EPUB package" }, + "err_ajax": { + "message": "Error in ajax request" + }, "err_dlg_title" : { "message": "Unexpected Error" }, diff --git a/lib/Dialogs.js b/lib/Dialogs.js index d91a641b7..68343731e 100644 --- a/lib/Dialogs.js +++ b/lib/Dialogs.js @@ -40,8 +40,11 @@ define(['hgn!templates/managed-dialog.html', 'hgn!templates/progress-dialog.html msg = Strings.err_storage; break; case Messages.ERROR_EPUB: - msg = Strings.err_epub_corrupt + msg = Strings.err_epub_corrupt; break; + case Messages.ERROR_AJAX: + msg = Strings.err_ajax; + break; default: msg = Strings.err_unknown; console.trace(); @@ -163,4 +166,4 @@ define(['hgn!templates/managed-dialog.html', 'hgn!templates/progress-dialog.html }; return Dialogs; -}); \ No newline at end of file +}); diff --git a/lib/Readium.js b/lib/Readium.js index 7636a6901..9ac814da9 100644 --- a/lib/Readium.js +++ b/lib/Readium.js @@ -367,7 +367,7 @@ define('text',['module'], function (module) { }); -define('text!version.json',[],function () { return '{"readiumJs":{"sha":"4242280394c045dd5d460a36041022b985c897b0","tag":"Release-0.10-397-g4242280","clean":true},"readiumSharedJs":{"sha":"94a0dc7d5bae04540b715ce17a68f419394f5e03","tag":"Release-0.10-477-g94a0dc7","clean":true}}';}); +define('text!version.json',[],function () { return '{"readiumJs":{"sha":"4242280394c045dd5d460a36041022b985c897b0","tag":"Release-0.10-397-g4242280","clean":false},"readiumSharedJs":{"sha":"55ae3abb0efdf3dad6cabceb975a9ab8a2b41671","tag":"Release-0.10-481-g55ae3ab","clean":true}}';}); /* This code is required to IE for console shim @@ -26091,7 +26091,16 @@ ReadiumSDK.Views.ReaderView = function(options) { this.userStyles = function() { return _userStyles; }; - + + /** + * Returns the EPUB3 Multiple Renditions data for the currently-opened ebook (initialised in this.openBook()) + * + * @returns {ReadiumSDK.Models.MultipleRenditions} can be undefined + */ + this.getMultipleRenditions = function() { + return _multipleRenditions; + }; + /** * Open Book Data * @@ -26100,6 +26109,7 @@ ReadiumSDK.Views.ReaderView = function(options) { * @property {ReadiumSDK.Models.PageOpenRequest} openPageRequest - openPageRequestData, (optional) data related to open page request * @property {ReadiumSDK.Views.ReaderView.SettingsData} [settings] * @property {ReadiumSDK.Collections.StyleCollection} styles: [cssStyles] + * @property {ReadiumSDK.Collections.MultipleRenditions} multipleRenditions * @todo Define missing types */ @@ -26137,8 +26147,21 @@ ReadiumSDK.Views.ReaderView = function(options) { self.setStyles(openBookData.styles); } + if (openBookData.multipleRenditions) { + _multipleRenditions = new ReadiumSDK.Models.MultipleRenditions(openBookData.multipleRenditions); + } else { + _multipleRenditions = undefined; + } + var pageRequestData = undefined; + if(openBookData.openPageRequest) { + + if (_multipleRenditions) { + openBookData.openPageRequest = _multipleRenditions.adjustPageRequestRenditionMapping(openBookData.openPageRequest); + } + } + if(openBookData.openPageRequest) { if(openBookData.openPageRequest.idref || (openBookData.openPageRequest.contentRefUrl && openBookData.openPageRequest.sourceFileHref)) { diff --git a/readium-js b/readium-js index 23c428bea..424228039 160000 --- a/readium-js +++ b/readium-js @@ -1 +1 @@ -Subproject commit 23c428bea0cb25485d10e2bfc2c6c0695aa7c1ad +Subproject commit 4242280394c045dd5d460a36041022b985c897b0