Skip to content

Commit

Permalink
Merge branch 'lmvco-patch-2' of https://github.com/lmvco/readium-js-v…
Browse files Browse the repository at this point in the history
…iewer into lmvco-lmvco-patch-2

Conflicts:
	lib/Readium.js
  • Loading branch information
danielweck committed Mar 5, 2015
2 parents 31e55f5 + 89057bb commit c88909c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
3 changes: 3 additions & 0 deletions i18n/_locales/en_US/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
7 changes: 5 additions & 2 deletions lib/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -163,4 +166,4 @@ define(['hgn!templates/managed-dialog.html', 'hgn!templates/progress-dialog.html
};

return Dialogs;
});
});
27 changes: 25 additions & 2 deletions lib/Readium.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*
Expand All @@ -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
*/

Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit c88909c

Please sign in to comment.