Skip to content

Commit

Permalink
Add .slideView or .preView classes in speaker console view (impress#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnogatz authored Dec 19, 2022
1 parent 64d66bf commit 972dc41
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
17 changes: 17 additions & 0 deletions css/impress-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ It is focused on plugin functionality, not the visual style of your presentation
padding-right: 1em;
}

/*
We might want to hide the help, toolbar, progress and progress bar in the
preView window of the impressConsole that is displayed when you press P.
*/
.impress-console.preView .impress-progress,
.impress-console.preView .impress-progressbar,
.impress-console.preView #impress-toolbar,
.impress-console.preView #impress-help {
display: none;
}
/*
Hide the help in the slideView as well.
*/
.impress-console.slideView #impress-help {
display: none;
}

/*
With help from the mouse-timeout plugin, we can hide the toolbar and
have it show only when you move/click/touch the mouse.
Expand Down
9 changes: 5 additions & 4 deletions js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -2891,8 +2891,8 @@
var preView = consoleWindow.document.getElementById( 'preView' );

// Firefox:
slideView.contentDocument.body.classList.add( 'impress-console' );
preView.contentDocument.body.classList.add( 'impress-console' );
slideView.contentDocument.body.classList.add( 'impress-console', 'slideView' );
preView.contentDocument.body.classList.add( 'impress-console', 'preView' );
if ( cssFileIframe !== undefined ) {
slideView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand All @@ -2906,7 +2906,8 @@

// Chrome:
slideView.addEventListener( 'load', function() {
slideView.contentDocument.body.classList.add( 'impress-console' );
slideView.contentDocument.body.classList.add( 'impress-console',
'slideView' );
if ( cssFileIframe !== undefined ) {
slideView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand All @@ -2916,7 +2917,7 @@
}
} );
preView.addEventListener( 'load', function() {
preView.contentDocument.body.classList.add( 'impress-console' );
preView.contentDocument.body.classList.add( 'impress-console', 'preView' );
if ( cssFileIframe !== undefined ) {
preView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand Down
9 changes: 5 additions & 4 deletions src/plugins/impressConsole/impressConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@
var preView = consoleWindow.document.getElementById( 'preView' );

// Firefox:
slideView.contentDocument.body.classList.add( 'impress-console' );
preView.contentDocument.body.classList.add( 'impress-console' );
slideView.contentDocument.body.classList.add( 'impress-console', 'slideView' );
preView.contentDocument.body.classList.add( 'impress-console', 'preView' );
if ( cssFileIframe !== undefined ) {
slideView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand All @@ -357,7 +357,8 @@

// Chrome:
slideView.addEventListener( 'load', function() {
slideView.contentDocument.body.classList.add( 'impress-console' );
slideView.contentDocument.body.classList.add( 'impress-console',
'slideView' );
if ( cssFileIframe !== undefined ) {
slideView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand All @@ -367,7 +368,7 @@
}
} );
preView.addEventListener( 'load', function() {
preView.contentDocument.body.classList.add( 'impress-console' );
preView.contentDocument.body.classList.add( 'impress-console', 'preView' );
if ( cssFileIframe !== undefined ) {
preView.contentDocument.head.insertAdjacentHTML(
'beforeend',
Expand Down

0 comments on commit 972dc41

Please sign in to comment.