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
92bc159f
Commit
92bc159f
authored
Aug 16, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - pdf viewer modal element WIP (needed publisher)
parent
52860619
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
319 additions
and
1 deletion
+319
-1
sample.pdf
resources/Elements/pdfmodal/sample.pdf
+198
-0
Master.blade.php
src/Views/Limitless/Help/Layout/Master.blade.php
+1
-0
Config.php
src/Views/Limitless/Notification/Config.php
+1
-1
pdf-modal.js
src/Views/Limitless/PdfModal/Attachments/pdf-modal.js
+9
-0
Config.php
src/Views/Limitless/PdfModal/Config.php
+67
-0
Index.blade.php
src/Views/Limitless/PdfModal/Documentation/Index.blade.php
+15
-0
PdfModal.blade.php
src/Views/Limitless/PdfModal/PdfModal.blade.php
+28
-0
No files found.
resources/Elements/pdfmodal/sample.pdf
0 → 100644
View file @
92bc159f
File added
src/Views/Limitless/Help/Layout/Master.blade.php
View file @
92bc159f
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Element.LoremIpsum'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-bubble-lines3'
,
'title'
=>
'Lorem Ipsum'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Element.LoremIpsum'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-bubble-lines3'
,
'title'
=>
'Lorem Ipsum'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Modal'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-stack'
,
'title'
=>
'Modal'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Modal'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-stack'
,
'title'
=>
'Modal'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Notification'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-popout'
,
'title'
=>
'Notification'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Notification'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-popout'
,
'title'
=>
'Notification'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=PdfModal'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-file-pdf'
,
'title'
=>
'PDF Viewer Modal'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Element.RandomSelect'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-shuffle'
,
'title'
=>
'Random Select'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Element.RandomSelect'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-shuffle'
,
'title'
=>
'Random Select'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Videoplayer'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-video-camera2'
,
'title'
=>
'Video Player'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Videoplayer'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-video-camera2'
,
'title'
=>
'Video Player'
])
...
...
src/Views/Limitless/Notification/Config.php
View file @
92bc159f
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
session
()
->
put
(
'info'
,
'Hello! I am an info message from session!'
);
session
()
->
put
(
'info'
,
'Hello! I am an info message from session!'
);
return
View
(
'Limitless::Notification.Init'
)
return
View
(
'Limitless::Notification.Init'
)
->
with
(
'success'
,
'Hello! I am a success message from view param!'
);
->
with
(
'success'
,
'Hello! I am a success message from
controller
view param!'
);
}
}
}
}
...
...
src/Views/Limitless/PdfModal/Attachments/pdf-modal.js
0 → 100644
View file @
92bc159f
// 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
);
});
src/Views/Limitless/PdfModal/Config.php
0 → 100644
View file @
92bc159f
<?php
/*
|------------------------------------------------------------------------------------------------
| Information
|------------------------------------------------------------------------------------------------
|
| This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
| sidekick package.
|
| Author: Kevin Almond Roe Yumang <kevin.yumang@itmax.email>
| Update: 2022-06-30 02:31:57
|
*/
namespace
Ceetrox\Sidekick\Views\Limitless\PdfModal
;
/*
|------------------------------------------------------------------------------------------------
| Dependencies
|------------------------------------------------------------------------------------------------
*/
use
View
;
/*
|------------------------------------------------------------------------------------------------
| Class "Config"
|------------------------------------------------------------------------------------------------
*/
class
Config
{
public
$methodAllocation
=
[
'Limitless::PdfModal'
=>
'pdfModal'
,
];
public
$assetAllocation
;
public
function
__construct
()
{
$this
->
assetAllocation
=
[
'Limitless::PdfModal'
=>
[
'Attachments/pdf-modal.js'
]
];
}
/*
|--------------------------------------------------------------------------------------------
| Method "pdfModal"
|--------------------------------------------------------------------------------------------
*/
public
function
pdfModal
(
$parameters
)
{
return
View
(
'Limitless::PdfModal.PdfModal'
)
->
withButtonText
(
$parameters
[
'button-text'
]
??
null
)
->
withTitle
(
$parameters
[
'title'
]
??
null
)
->
withUrl
(
$parameters
[
'url'
]
??
null
);
}
}
src/Views/Limitless/PdfModal/Documentation/Index.blade.php
0 → 100644
View file @
92bc159f
{{
--
Layout
Reference
--
}}
@
extends
(
'Limitless::Help.Layout.Master'
)
@
section
(
'Limitless::Content'
)
@
php
$pdfPath
=
secure_url
(
"/ceetrox/sidekick/resource/public/Elements/pdfmodal/sample.pdf"
);
@
endphp
@
Limitless
::
CardStart
([
'title'
=>
"Description"
,
'icon'
=>
'icon-info22'
])
@
Limitless
::
PdfModal
([
'url'
=>
$pdfPath
])
@
Limitless
::
CardStop
@
stop
src/Views/Limitless/PdfModal/PdfModal.blade.php
0 → 100644
View file @
92bc159f
<button
type=
"button"
class=
"LimitlessPdfViewerModalButton btn btn-secondary btn-labeled btn-labeled-left"
data-toggle=
"modal"
data-target=
"#LimitlessPdfModal"
data-backdrop=
"static"
data-keyboard=
"false"
>
<b><i
class=
"icon-file-pdf"
></i></b>
{{ $buttonText ?? $title ?? 'No Text' }}
</button>
<div
id=
"LimitlessPdfModal"
class=
"modal fade"
tabindex=
"-1"
>
<div
class=
"modal-dialog modal-full"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
>
{{ $title ?? $buttonText ?? 'No Title' }}
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
>
×
</button>
</div>
<div
class=
"modal-body"
>
<iframe
class=
"pdfIframe"
src=
"https://cdn.backoffice.online/pdfjs/web/viewer.html?file={{ $url }}"
style=
"border:1px solid #999999;"
width=
"100%"
>
</iframe>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
PDF schließen
</button>
</div>
</div>
</div>
</div>
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