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
cc0cd69e
Commit
cc0cd69e
authored
Aug 04, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - toastr changed to PNotify package. named Notifications added. WIP
parent
5d95f38f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
199 additions
and
0 deletions
+199
-0
Master.blade.php
src/Views/Limitless/Help/Layout/Master.blade.php
+1
-0
notification.init.js
...s/Limitless/Notification/Attachments/notification.init.js
+105
-0
Config.php
src/Views/Limitless/Notification/Config.php
+66
-0
Index.blade.php
...iews/Limitless/Notification/Documentation/Index.blade.php
+18
-0
Notification.blade.php
src/Views/Limitless/Notification/Notification.blade.php
+9
-0
No files found.
src/Views/Limitless/Help/Layout/Master.blade.php
View file @
cc0cd69e
...
...
@@ -43,6 +43,7 @@
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Element.LoremIpsum'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-bubble-lines3'
,
'title'
=>
'Lorem Ipsum'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Looper'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-loop3'
,
'title'
=>
'Looper'
])
@
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=Element.RandomSelect'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-shuffle'
,
'title'
=>
'Random Select'
])
@
Limitless
::
SideNavMenuItem
([
'url'
=>
'?page=Videoplayer'
,
'target'
=>
'_self'
,
'icon'
=>
'icon-video-camera2'
,
'title'
=>
'Video Player'
])
...
...
src/Views/Limitless/Notification/Attachments/notification.init.js
0 → 100644
View file @
cc0cd69e
function
getDefaultIcon
(
type
,
icon
)
{
if
(
!
icon
)
{
icon
=
'
icon-warning22
'
;
switch
(
type
)
{
case
'
success
'
:
icon
=
'
icon-checkmark3
'
;
break
;
case
'
error
'
:
icon
=
'
icon-blocked
'
;
break
;
case
'
warning
'
:
icon
=
'
icon-warning22
'
;
break
;
case
'
info
'
:
icon
=
'
icon-info22
'
;
break
;
}
}
return
icon
;
}
function
getType
(
type
)
{
switch
(
type
)
{
case
'
success
'
:
case
'
error
'
:
case
'
info
'
:
break
;
case
'
error
'
:
case
'
warning
'
:
type
=
'
success
'
;
break
;
}
return
type
;
}
$
(
document
).
ready
(
function
()
{
if
(
typeof
PNotify
==
'
undefined
'
)
{
console
.
warn
(
'
Warning - pnotify.min.js is not loaded.
'
);
return
;
}
let
elementObjects
=
$
(
'
.LimitlessNotification
'
);
elementObjects
.
each
(
function
()
{
let
obj
=
$
(
this
);
let
title
=
obj
.
attr
(
'
data-title
'
);
let
msg
=
obj
.
attr
(
'
data-message
'
);
let
type
=
obj
.
attr
(
'
data-type
'
);
let
icon
=
obj
.
attr
(
'
data-icon
'
);
setTimeout
(
function
()
{
new
PNotify
({
title
:
title
,
text
:
msg
,
icon
:
getDefaultIcon
(
type
,
icon
),
type
:
getType
(
type
)
});
},
1
);
});
// TRANSFER SAMPLES ON RESOURCES
$
(
'
#notify_success
'
).
on
(
'
click
'
,
function
()
{
new
PNotify
({
title
:
'
Success!
'
,
text
:
'
This is a Success!
'
,
icon
:
'
icon-checkmark3
'
,
type
:
'
success
'
});
});
$
(
'
#notify_error
'
).
on
(
'
click
'
,
function
()
{
new
PNotify
({
title
:
'
Error!
'
,
text
:
'
This is an Error!
'
,
icon
:
'
icon-blocked
'
,
type
:
'
error
'
});
});
$
(
'
#notify_warning
'
).
on
(
'
click
'
,
function
()
{
new
PNotify
({
title
:
'
Warning!
'
,
text
:
'
This is a Warning!
'
,
icon
:
'
icon-warning22
'
,
type
:
''
});
});
$
(
'
#notify_info
'
).
on
(
'
click
'
,
function
()
{
new
PNotify
({
title
:
'
Info!
'
,
text
:
'
This is an Info!
'
,
icon
:
'
icon-info22
'
,
type
:
'
info
'
});
});
})
\ No newline at end of file
src/Views/Limitless/Notification/Config.php
0 → 100644
View file @
cc0cd69e
<?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\Notification
;
/*
|------------------------------------------------------------------------------------------------
| Dependencies
|------------------------------------------------------------------------------------------------
*/
use
View
;
/*
|------------------------------------------------------------------------------------------------
| Class "Config"
|------------------------------------------------------------------------------------------------
*/
class
Config
{
public
$methodAllocation
=
[
'Limitless::Notify'
=>
'notify'
,
];
public
$assetAllocation
;
public
function
__construct
()
{
$this
->
assetAllocation
=
[
'Limitless::Notify'
=>
[
'Attachments/notification.init.js'
,
secure_url
(
'/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/notifications/pnotify.min.js'
),
]
];
}
/*
|--------------------------------------------------------------------------------------------
| Method "notify"
|--------------------------------------------------------------------------------------------
*/
public
function
notify
(
$parameters
)
{
return
View
(
'Limitless::Notification.Notification'
)
->
withTitle
(
$parameters
[
'title'
]
??
''
)
->
withMessage
(
$parameters
[
'message'
]
??
'No Message'
)
->
withType
(
$parameters
[
'type'
]
??
'success'
)
->
withIcon
(
$parameters
[
'icon'
]
??
null
);
}
}
src/Views/Limitless/Notification/Documentation/Index.blade.php
0 → 100644
View file @
cc0cd69e
{{
--
Layout
Reference
--
}}
@
extends
(
'Limitless::Help.Layout.Master'
)
@
section
(
'Limitless::Content'
)
@
Limitless
::
CardStart
([
'title'
=>
"Description"
,
'icon'
=>
'icon-info22'
])
@
Limitless
::
Notify
([
'type'
=>
'info'
,
'title'
=>
'PNotify'
,
'message'
=>
'Popup notifications using PNotify!'
])
<
button
type
=
"button"
class
="
btn
btn
-
light
" id="
notify_success
">Success</button>
<button type="
button
" class="
btn
btn
-
light
" id="
notify_error
">Error</button>
<button type="
button
" class="
btn
btn
-
light
" id="
notify_warning
">Warning</button>
<button type="
button
" class="
btn
btn
-
light
" id="
notify_info
">Info</button>
<button type="
button
" class="
btn
btn
-
light
" id="
notify_confirm
">Confirm</button>
@Limitless::CardStop
@stop
\ No newline at end of file
src/Views/Limitless/Notification/Notification.blade.php
0 → 100644
View file @
cc0cd69e
<div
class=
"LimitlessNotification"
data-type=
"{{ $type }}"
data-icon=
"{{ $icon }}"
data-title=
"{{ $title }}"
data-message=
"{{ $message }}"
hidden
>
</div>
\ No newline at end of file
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