Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
sidekick
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Privat - Marco Schmiedel
sidekick
Commits
3bbc2856
Commit
3bbc2856
authored
Aug 17, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - pdf viewer modal element
parent
e04a0af2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
12 deletions
+49
-12
pdf-modal.js
src/Views/Limitless/PdfModal/Attachments/pdf-modal.js
+47
-10
PdfModal.blade.php
src/Views/Limitless/PdfModal/PdfModal.blade.php
+2
-2
No files found.
src/Views/Limitless/PdfModal/Attachments/pdf-modal.js
View file @
3bbc2856
// Resize the modal to the right size.
function
initPdfViewerModalElements
()
{
$
(
window
).
on
(
'
touchstart click resize
'
,
function
()
{
setPdfModalButtons
();
setTimeout
(
function
(){
setPdfModals
();
$
(
'
.pdfIframe
'
).
each
(
function
()
{
setResizeEvent
();
var
ModalDialog
=
$
(
this
).
parents
(
'
.modal
'
);
}
$
(
this
).
height
((
ModalDialog
.
height
()
-
250
)
+
'
px
'
);
});
},
300
);
});
$
(
document
).
ready
(
function
()
{
function
setPdfModalButtons
()
{
let
counter
=
0
;
$
(
'
.LimitlessPdfViewerModalButton
'
).
each
(
function
()
{
counter
++
;
let
element
=
$
(
this
);
element
.
attr
(
'
id
'
,
'
LimitlessPdfViewerModalButton
'
+
counter
);
element
.
attr
(
'
data-target
'
,
'
#LimitlessPdfModal
'
+
counter
);
});
}
function
setPdfModals
()
{
let
counter
=
0
;
$
(
'
.LimitlessPdfModal
'
).
each
(
function
()
{
counter
++
;
let
element
=
$
(
this
);
element
.
attr
(
'
id
'
,
'
LimitlessPdfModal
'
+
counter
);
});
}
function
setResizeEvent
()
{
// Resize the modal to the right size.
$
(
window
).
on
(
'
touchstart click resize
'
,
function
()
{
setTimeout
(
function
(){
$
(
'
.pdfIframe
'
).
each
(
function
()
{
var
ModalDialog
=
$
(
this
).
parents
(
'
.modal
'
);
$
(
this
).
height
((
ModalDialog
.
height
()
-
250
)
+
'
px
'
);
});
},
300
);
});
}
$
(
document
).
ready
(
function
()
{
initPdfViewerModalElements
();
});
});
\ No newline at end of file
src/Views/Limitless/PdfModal/PdfModal.blade.php
View file @
3bbc2856
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<b><i
class=
"icon-file-pdf"
></i></b>
{{ $buttonText ?? $title ?? 'No Text' }}
<b><i
class=
"icon-file-pdf"
></i></b>
{{ $buttonText ?? $title ?? 'No Text' }}
</button>
</button>
<div
id=
"LimitlessPdfModal"
class=
"
modal fade"
tabindex=
"-1"
>
<div
class=
"LimitlessPdfModal
modal fade"
tabindex=
"-1"
>
<div
class=
"modal-dialog modal-full"
>
<div
class=
"modal-dialog modal-full"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<iframe
class=
"pdfIframe"
<iframe
class=
"pdfIframe"
src=
"https://cdn.backoffice.online/pdfjs/web/viewer.html?file={{ urlencode($url) }}"
src=
"https://cdn.backoffice.online/pdfjs/web/viewer.html?file={{ urlencode($url) }}"
style=
"border:1px solid #999999;"
width=
"100%"
>
style=
"border:1px solid #999999;"
width=
"100%"
>
</iframe>
</iframe>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment