diff --git a/src/plugins/bookPlayer/plugin.js b/src/plugins/bookPlayer/plugin.js index b655b038a8..a9b784f5e8 100644 --- a/src/plugins/bookPlayer/plugin.js +++ b/src/plugins/bookPlayer/plugin.js @@ -7,7 +7,7 @@ import 'css!./style'; import 'material-icons'; import 'paper-icon-button-light'; -import TableOfContent from './tableOfContent'; +import TableOfContents from './tableOfContents'; export class BookPlayer { constructor() { @@ -163,7 +163,7 @@ export class BookPlayer { openTableOfContents() { if (this._loaded) { - this._tocElement = new TableOfContent(this); + this._tocElement = new TableOfContents(this); } } @@ -271,6 +271,7 @@ export class BookPlayer { if (item.Path && (item.Path.endsWith('epub'))) { return true; } + return false; } } diff --git a/src/plugins/bookPlayer/tableOfContent.js b/src/plugins/bookPlayer/tableOfContents.js similarity index 98% rename from src/plugins/bookPlayer/tableOfContent.js rename to src/plugins/bookPlayer/tableOfContents.js index 6a35966b1b..23e288aff5 100644 --- a/src/plugins/bookPlayer/tableOfContent.js +++ b/src/plugins/bookPlayer/tableOfContents.js @@ -1,6 +1,6 @@ import dialogHelper from 'dialogHelper'; -export default class TableOfContent { +export default class TableOfContents { constructor(bookPlayer) { this._bookPlayer = bookPlayer; this._rendition = bookPlayer._rendition; @@ -59,6 +59,7 @@ export default class TableOfContent { autoFocus: false, removeOnClose: true }); + elem.id = 'dialogToc'; let tocHtml = '
'; @@ -72,6 +73,7 @@ export default class TableOfContent { tocHtml += `${chapter.label}`; tocHtml += ''; }); + tocHtml += ''; elem.innerHTML = tocHtml; @@ -84,7 +86,6 @@ export default class TableOfContent { this._elem = elem; this.bindEvents(); - dialogHelper.open(elem); } } diff --git a/src/plugins/photoPlayer/plugin.js b/src/plugins/photoPlayer/plugin.js index d8d4ee70ef..d8e55fa67e 100644 --- a/src/plugins/photoPlayer/plugin.js +++ b/src/plugins/photoPlayer/plugin.js @@ -9,17 +9,12 @@ export default class PhotoPlayer { } play(options) { - return new Promise(function (resolve, reject) { - import('slideshow').then(({default: slideshow}) => { - var index = options.startIndex || 0; var apiClient = connectionManager.currentApiClient(); - apiClient.getCurrentUser().then(function(result) { - var newSlideShow = new slideshow({ showTitle: false, cover: false, @@ -31,7 +26,6 @@ export default class PhotoPlayer { }); newSlideShow.show(); - resolve(); }); }); @@ -39,7 +33,6 @@ export default class PhotoPlayer { } canPlayMediaType(mediaType) { - return (mediaType || '').toLowerCase() === 'photo'; } }