Fixes the highslide lib

parent 3537fb9f
......@@ -55,7 +55,6 @@
},
"styles": [
"src/styles/styles.scss",
"src/assets/js/highslide/highslide.css",
{
"input": "src/styles/themes/theme-arsnova-dot-click-contrast.scss",
"bundleName": "theme-arsnova-dot-click-contrast",
......@@ -103,7 +102,6 @@
}
],
"scripts": [
"src/assets/js/highslide/highslide.js"
]
},
"configurations": {
......
......@@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/assets" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
<excludeFolder url="file://$MODULE_DIR$/src/assets/js/highslide" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
......
......@@ -189,10 +189,7 @@ export class QuizLobbyComponent implements OnInit, OnDestroy {
private addFooterElementsAsOwner(): void {
const footerElements = [
this.footerBarService.footerElemEditQuiz,
this.footerBarService.footerElemStartQuiz,
this.footerBarService.footerElemQRCode,
this.footerBarService.footerElemResponseProgress,
this.footerBarService.footerElemEditQuiz, this.footerBarService.footerElemStartQuiz, this.footerBarService.footerElemQRCode,
];
if (environment.readingConfirmationEnabled) {
footerElements.splice(2, 0, this.footerBarService.footerElemReadingConfirmation);
......
......@@ -383,7 +383,6 @@ export class QuizResultsComponent implements OnInit, OnDestroy {
if (environment.confidenceSliderEnabled) {
footerElems.push(this.footerBarService.footerElemConfidenceSlider);
}
footerElems.push(this.footerBarService.footerElemResponseProgress);
}
this.footerBarService.footerElemBack.onClickCallback = async () => {
this.ngbModal.open(ToLobbyConfirmComponent).result.then(() => {
......@@ -393,11 +392,9 @@ export class QuizResultsComponent implements OnInit, OnDestroy {
}).catch(() => {});
};
} else {
footerElems = [
this.footerBarService.footerElemFullscreen,
];
if (this.quizService.quiz.currentQuestionIndex === this.quizService.quiz.questionList.length - 1) {
if (this.quizService.quiz.questionList.some(question => [
footerElems = [];
if (this.quizService.quiz.currentQuestionIndex === this.quizService.quiz.questionList.length - 1 && this.quizService.quiz.questionList.some(
question => [
QuestionType.FreeTextQuestion,
QuestionType.MultipleChoiceQuestion,
QuestionType.RangedQuestion,
......@@ -405,8 +402,7 @@ export class QuizResultsComponent implements OnInit, OnDestroy {
QuestionType.TrueFalseSingleChoiceQuestion,
QuestionType.YesNoSingleChoiceQuestion,
].includes(question.TYPE))) {
footerElems.push(this.footerBarService.footerElemLeaderboard);
}
footerElems.push(this.footerBarService.footerElemLeaderboard);
}
}
this.footerBarService.replaceFooterElements(footerElems);
......@@ -481,8 +477,6 @@ export class QuizResultsComponent implements OnInit, OnDestroy {
this.showStartQuizButton = this.quizService.quiz.questionList.length > this.quizService.quiz.currentQuestionIndex + 1;
break;
case MessageProtocol.Countdown:
this.showStartQuizButton = false;
this.showStopCountdownButton = data.payload.value > 0;
this.showStartQuizButton = !data.payload.value && this.quizService.quiz.questionList.length > this.quizService.quiz.currentQuestionIndex + 1;
break;
......
......@@ -12,15 +12,6 @@ import { ThemesService } from '../../service/themes/themes.service';
import { UpdateCheckService } from '../../service/update-check/update-check.service';
import { UserService } from '../../service/user/user.service';
declare global {
// tslint:disable-next-line:interface-name
interface Window {
hs: any;
}
}
window.hs = window.hs || {};
@Component({
selector: 'app-root',
templateUrl: './root.component.html',
......@@ -75,14 +66,6 @@ export class RootComponent implements OnInit, AfterViewInit {
this.sharedService.isLoadingEmitter.next(false);
}
});
window.hs.graphicsDir = '/assets/js/highslide/graphics/';
window.hs.showCredits = false;
window.hs.expandCursor = null;
window.hs.restoreCursor = null;
window.hs.fullExpandOpacity = 0;
window.hs.maxHeight = 500;
window.hs.zIndexCounter = 1040;
}
public ngAfterViewInit(): void {
......
......@@ -263,7 +263,6 @@ export class QuizService {
}
this.footerBarService.footerElemReadingConfirmation.isActive = !!this.quiz.sessionConfig.readingConfirmationEnabled;
this.footerBarService.footerElemResponseProgress.isActive = !!this.quiz.sessionConfig.showResponseProgress;
this.footerBarService.footerElemConfidenceSlider.isActive = !!this.quiz.sessionConfig.confidenceSliderEnabled;
if (isPlatformBrowser(this.platformId)) {
......
This diff is collapsed.
This diff is collapsed.
/**
* @file: highslide.css
* @version: 5.0.0
*/
.highslide-container div{font-size:10pt}.highslide-container table{background:0 0;table-layout:auto}.highslide{outline:0;text-decoration:none}.highslide:hover img{border-color:gray}.highslide-active-anchor img{visibility:hidden}.highslide-gallery .highslide-active-anchor img{border-color:#000;visibility:visible;cursor:default}.highslide-image{border-width:2px;border-style:solid;border-color:#fff}.highslide-outline,.highslide-wrapper{background:#fff}.glossy-dark{background:#111}.highslide-number{font-weight:700;color:gray;font-size:.9em}.highslide-caption{display:none;font-size:1em;padding:5px}.highslide-heading{display:none;font-weight:700;margin:.4em}.highslide-dimming{background:#000}a.highslide-full-expand{background:url(graphics/fullexpand.gif) no-repeat;display:block;margin:0 10px 10px 0;width:34px;height:34px}.highslide-loading{display:block;color:#000;font-size:9px;font-weight:700;text-transform:uppercase;text-decoration:none;padding:3px;border:1px solid #fff;background-color:#fff;padding-left:22px;background-image:url(graphics/loader.white.gif);background-repeat:no-repeat;background-position:3px 1px}a.highslide-credits,a.highslide-credits i{padding:2px;color:silver;text-decoration:none;font-size:10px}a.highslide-credits:hover,a.highslide-credits:hover i{color:#fff;background-color:gray}.highslide-move,.highslide-move *{cursor:move}.highslide-viewport{display:none;position:fixed;width:100%;height:100%;z-index:1;background:0 0;left:0;top:0}.highslide-overlay{display:none}.hidden-container{display:none}
\ No newline at end of file
This diff is collapsed.
......@@ -38,6 +38,10 @@
href="https://fonts.googleapis.com/css?family=Roboto:400,500,700,900"
rel="prefetch"/>
<link as="script"
href="/assets/js/highslide/highslide.min.js"
rel="prefetch"/>
<link class="theme-styles"
href="/theme-Material.css"
rel="stylesheet"
......@@ -149,7 +153,16 @@
<script crossorigin="anonymous"
src="https://polyfill.io/v3/polyfill.min.js?callback=polyfillsLoaded&flags=gated&features=default%2CArray.from%2CArray.isArray%2CArray.prototype.every%2CArray.prototype.entries%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.forEach%2CArray.prototype.includes%2CArray.prototype.indexOf%2CArray.prototype.keys%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.some%2CAudioContext%2CBlob%2CDate.now%2CJSON%2CMap%2CNumber.parseFloat%2CNumber.parseInt%2CObject.assign%2CObject.entries%2CObject.keys%2CObject.values%2CPromise%2CSet%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CString.prototype.trim%2CSymbol%2CSymbol.hasInstance%2CSymbol.isConcatSpreadable%2CSymbol.iterator%2CSymbol.match%2CSymbol.replace%2CSymbol.search%2CSymbol.species%2CSymbol.split%2CSymbol.toPrimitive%2CSymbol.toStringTag%2CSymbol.unscopables%2CWindow%2CXMLHttpRequest%2Cconsole%2Cconsole.log%2Cconsole.info%2Cdocument%2ClocalStorage"></script>
<script type="text/javascript">
<script src="/assets/js/highslide/highslide.min.js"></script>
<script>
hs.graphicsDir = '/assets/js/highslide/graphics/';
hs.showCredits = false;
hs.expandCursor = null;
hs.restoreCursor = null;
hs.fullExpandOpacity = 0;
hs.maxHeight = 500;
hs.zIndexCounter = 1040;
</script>
</body>
......
......@@ -81,7 +81,7 @@ function postMarkdownRenderer(value: string): string {
if (imgMatch) {
imgMatch.forEach(token => {
const imgNode: HTMLImageElement = createElementFromHTML(token) as HTMLImageElement;
imgNode.classList.add(...['thumbnail', 'cursor-zoom-in']);
imgNode.classList.add(...['thumbnail', 'cursor-zoom-in', 'img-fluid']);
const anchorNode = document.createElement<'a'>('a');
anchorNode.href = imgNode.src;
......
......@@ -21,10 +21,7 @@ body {
}
.thumbnail {
width: auto;
height: auto;
max-width: 100%;
max-height: 200px;
max-height: 15rem;
}
#theme-wrapper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment