Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
64a859a4
Commit
64a859a4
authored
7 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #5829 add notification service for actions
parent
20394790
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/maarch_entreprise/js/angular/app/notification.service.js
+30
-0
30 additions, 0 deletions
.../maarch_entreprise/js/angular/app/notification.service.js
apps/maarch_entreprise/js/angular/app/notification.service.ts
+15
-0
15 additions, 0 deletions
.../maarch_entreprise/js/angular/app/notification.service.ts
with
45 additions
and
0 deletions
apps/maarch_entreprise/js/angular/app/notification.service.js
0 → 100644
+
30
−
0
View file @
64a859a4
"
use strict
"
;
var
__decorate
=
(
this
&&
this
.
__decorate
)
||
function
(
decorators
,
target
,
key
,
desc
)
{
var
c
=
arguments
.
length
,
r
=
c
<
3
?
target
:
desc
===
null
?
desc
=
Object
.
getOwnPropertyDescriptor
(
target
,
key
)
:
desc
,
d
;
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
decorate
===
"
function
"
)
r
=
Reflect
.
decorate
(
decorators
,
target
,
key
,
desc
);
else
for
(
var
i
=
decorators
.
length
-
1
;
i
>=
0
;
i
--
)
if
(
d
=
decorators
[
i
])
r
=
(
c
<
3
?
d
(
r
)
:
c
>
3
?
d
(
target
,
key
,
r
)
:
d
(
target
,
key
))
||
r
;
return
c
>
3
&&
r
&&
Object
.
defineProperty
(
target
,
key
,
r
),
r
;
};
var
__metadata
=
(
this
&&
this
.
__metadata
)
||
function
(
k
,
v
)
{
if
(
typeof
Reflect
===
"
object
"
&&
typeof
Reflect
.
metadata
===
"
function
"
)
return
Reflect
.
metadata
(
k
,
v
);
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
var
md2_1
=
require
(
"
md2
"
);
var
core_1
=
require
(
"
@angular/core
"
);
var
NotificationService
=
(
function
()
{
function
NotificationService
(
toast
)
{
this
.
toast
=
toast
;
}
NotificationService
.
prototype
.
success
=
function
(
message
)
{
this
.
toast
.
show
(
'
<i class="fa fa-info-circle fa-2x"></i><span>
'
+
message
+
'
</span>
'
,
2000
);
};
NotificationService
.
prototype
.
error
=
function
(
message
)
{
this
.
toast
.
show
(
'
<i class="fa fa-exclamation-triangle fa-2x"></i><span>
'
+
message
+
'
</span>
'
,
2000
);
};
return
NotificationService
;
}());
NotificationService
=
__decorate
([
core_1
.
Injectable
(),
__metadata
(
"
design:paramtypes
"
,
[
md2_1
.
Md2Toast
])
],
NotificationService
);
exports
.
NotificationService
=
NotificationService
;
This diff is collapsed.
Click to expand it.
apps/maarch_entreprise/js/angular/app/notification.service.ts
0 → 100644
+
15
−
0
View file @
64a859a4
import
{
Md2Toast
}
from
'
md2
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
()
export
class
NotificationService
{
constructor
(
private
toast
:
Md2Toast
)
{
}
success
(
message
:
string
)
{
this
.
toast
.
show
(
'
<i class="fa fa-info-circle fa-2x"></i><span>
'
+
message
+
'
</span>
'
,
2000
);
}
error
(
message
:
string
)
{
this
.
toast
.
show
(
'
<i class="fa fa-exclamation-triangle fa-2x"></i><span>
'
+
message
+
'
</span>
'
,
2000
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment