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
52860619
Commit
52860619
authored
Aug 16, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - notification element laravel integration
parent
efd06d41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
28 deletions
+30
-28
Config.php
src/Views/Limitless/Notification/Config.php
+5
-1
Init.blade.php
src/Views/Limitless/Notification/Init.blade.php
+25
-27
No files found.
src/Views/Limitless/Notification/Config.php
View file @
52860619
...
@@ -72,7 +72,11 @@
...
@@ -72,7 +72,11 @@
*/
*/
public
function
initNotifications
()
public
function
initNotifications
()
{
{
return
View
(
'Limitless::Notification.Init'
)
->
with
(
'success'
,
'Hello! I am from notif init!'
);
// samples. transfer/remove later.
session
()
->
put
(
'info'
,
'Hello! I am an info message from session!'
);
return
View
(
'Limitless::Notification.Init'
)
->
with
(
'success'
,
'Hello! I am a success message from view param!'
);
}
}
}
}
...
...
src/Views/Limitless/Notification/Init.blade.php
View file @
52860619
<script>
<script>
{{
--
let
limitlessNotifications
=
new
LimitlessNotification
();
--
}}
$
(
document
).
ready
(
function
()
{
{{
--
// Default Toasters--}}
let
limitlessNotifications
=
new
LimitlessNotification
();
{{
--
@
if
(
isset
(
$errors
))
@
foreach
(
$errors
->
all
()
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
error
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
isset
(
$infos
))
@
foreach
(
$infos
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
info
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
isset
(
$warnings
))
@
foreach
(
$warnings
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
warning
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
isset
(
$successes
))
@
foreach
(
$successes
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
success
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
isset
(
$hiddens
))
@
foreach
(
$hiddens
as
$data
)
console
.
log
(
"
{{ $data }}
"
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
isset
(
$error
))
limitlessNotifications
.
set
(
''
,
"
{{ $error }}
"
,
'
error
'
);
@
endif
--
}}
{{
--
@
if
(
isset
(
$success
))
--
}}
{{
--
let
a
=
limitlessNotifications
.
set
(
''
,
"
{{ $success }}
"
,
'
warning
'
);
--
}}
// Default Toasters
{{
--
console
.
log
(
'
{{ $success }}
'
);
--
}}
@
if
(
isset
(
$errors
))
@
foreach
(
$errors
->
all
()
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
error
'
);
@
endforeach
@
endif
{{
--
console
.
log
(
a
);
--
}}
@
if
(
isset
(
$infos
))
@
foreach
(
$infos
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
info
'
);
@
endforeach
@
endif
@
if
(
isset
(
$warnings
))
@
foreach
(
$warnings
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
warning
'
);
@
endforeach
@
endif
@
if
(
isset
(
$successes
))
@
foreach
(
$successes
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
success
'
);
@
endforeach
@
endif
@
if
(
isset
(
$hiddens
))
@
foreach
(
$hiddens
as
$data
)
console
.
log
(
"
{{ $data }}
"
);
@
endforeach
@
endif
@
if
(
isset
(
$error
))
limitlessNotifications
.
set
(
''
,
"
{{ $error }}
"
,
'
error
'
);
@
endif
@
if
(
isset
(
$success
))
limitlessNotifications
.
set
(
''
,
"
{{ $success }}
"
,
'
success
'
);
@
endif
@
if
(
isset
(
$warning
))
limitlessNotifications
.
set
(
''
,
"
{{ $warning }}
"
,
'
warning
'
);
@
endif
@
if
(
isset
(
$info
))
limitlessNotifications
.
set
(
''
,
"
{{ $info }}
"
,
'
info
'
);
@
endif
@
if
(
isset
(
$hidden
))
console
.
log
(
"
{{ $hidden }}
"
);
@
endif
{{
--
@
endif
--
}}
// Session Toasters
{{
--
@
if
(
isset
(
$warning
))
limitlessNotifications
.
set
(
''
,
"
{{ $warning }}
"
,
'
warning
'
);
@
endif
--
}}
@
if
(
Session
::
has
(
'
errors
'
))
@
foreach
(
Session
::
get
(
'
errors
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
error
'
);
@
endforeach
@
endif
{{
--
@
if
(
isset
(
$info
))
limitlessNotifications
.
set
(
''
,
"
{{ $info }}
"
,
'
info
'
);
@
endif
--
}}
@
if
(
Session
::
has
(
'
infos
'
))
@
foreach
(
Session
::
get
(
'
infos
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
info
'
);
@
endforeach
@
endif
{{
--
@
if
(
isset
(
$hidden
))
console
.
log
(
"
{{ $hidden }}
"
);
@
endif
--
}}
@
if
(
Session
::
has
(
'
warnings
'
))
@
foreach
(
Session
::
get
(
'
warnings
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
warning
'
);
@
endforeach
@
endif
@
if
(
Session
::
has
(
'
successes
'
))
@
foreach
(
Session
::
get
(
'
successes
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
success
'
);
@
endforeach
@
endif
@
if
(
Session
::
has
(
'
hiddens
'
))
@
foreach
(
Session
::
get
(
'
hiddens
'
)
as
$data
)
console
.
log
(
"
{{ $data }}
"
);
@
endforeach
@
endif
@
if
(
Session
::
has
(
'
error
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('error') }}
"
,
'
error
'
);
@
endif
@
if
(
Session
::
has
(
'
success
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('success') }}
"
,
'
success
'
);
@
endif
@
if
(
Session
::
has
(
'
warning
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('warning') }}
"
,
'
warning
'
);
@
endif
@
if
(
Session
::
has
(
'
info
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('info') }}
"
,
'
info
'
);
@
endif
@
if
(
Session
::
has
(
'
hidden
'
))
console
.
log
(
"
{{ Session::get('hidden') }}
"
);
@
endif
{{
--
// Session Toasters--}}
})
{{
--
@
if
(
Session
::
has
(
'
errors
'
))
@
foreach
(
Session
::
get
(
'
errors
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
error
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
infos
'
))
@
foreach
(
Session
::
get
(
'
infos
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
info
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
warnings
'
))
@
foreach
(
Session
::
get
(
'
warnings
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
warning
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
successes
'
))
@
foreach
(
Session
::
get
(
'
successes
'
)
as
$data
)
limitlessNotifications
.
set
(
''
,
"
{{ $data }}
"
,
'
success
'
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
hiddens
'
))
@
foreach
(
Session
::
get
(
'
hiddens
'
)
as
$data
)
console
.
log
(
"
{{ $data }}
"
);
@
endforeach
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
error
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('error') }}
"
,
'
error
'
);
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
success
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('success') }}
"
,
'
success
'
);
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
warning
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('warning') }}
"
,
'
warning
'
);
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
info
'
))
limitlessNotifications
.
set
(
''
,
"
{{ Session::get('info') }}
"
,
'
info
'
);
@
endif
--
}}
{{
--
@
if
(
Session
::
has
(
'
hidden
'
))
console
.
log
(
"
{{ Session::get('hidden') }}
"
);
@
endif
--
}}
</script>
</script>
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