blob: 4c699825f4be6555f8b93eb7f52eac05e3fd6a80 [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001import {Injectable} from "@angular/core";
2
3@Injectable()
4export class IframeService {
5
6 addClassOpenModal(elementClassName: string) {
7 var parentBodyElement = parent.document.getElementsByClassName(elementClassName)[0];
8 if (parentBodyElement) {
9 parentBodyElement.classList.add("modal-open");
10 }
11 }
12
13 removeClassCloseModal(elementClassName: string) {
14 var parentBodyElement = parent.document.getElementsByClassName(elementClassName)[0];
15 if (parentBodyElement) {
16 parentBodyElement.classList.remove("modal-open");
17 }
18 }
Ittay Sternf7926712019-07-07 19:23:03 +030019
20
21 addFullScreen(){
22 let parentBodyElement = parent.document.getElementsByClassName('service-model-content')[0];
23 if (parentBodyElement) {
24 parentBodyElement.classList.add("full-screen");
25 }
26 }
27
28 removeFullScreen(){
29 let parentBodyElement = parent.document.getElementsByClassName('service-model-content')[0];
30 if (parentBodyElement) {
31 parentBodyElement.classList.remove("full-screen");
32 }
33 }
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030034}