Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
jio
Commits
c4165e2a
Commit
c4165e2a
authored
Jan 10, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jslint pass announcement.js
parent
4bf94351
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
34 deletions
+36
-34
src/jio/announcements/announcement.js
src/jio/announcements/announcement.js
+36
-34
No files found.
src/jio/announcements/announcement.js
View file @
c4165e2a
var
announcement
=
function
(
spec
,
my
)
{
var
that
=
{};
/*jslint indent: 2, maxlen: 80, sloppy: true */
/*global announcement: true */
var
announcement
=
function
(
spec
,
my
)
{
var
that
=
{},
callback_a
=
[],
announcer
=
spec
.
announcer
||
{};
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
var
callback_a
=
[];
var
name
=
spec
.
name
||
''
;
var
announcer
=
spec
.
announcer
||
{};
// Methods //
that
.
add
=
function
(
callback
)
{
that
.
add
=
function
(
callback
)
{
callback_a
.
push
(
callback
);
};
that
.
remove
=
function
(
callback
)
{
that
.
remove
=
function
(
callback
)
{
var
i
,
tmp_callback_a
=
[];
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
if
(
callback_a
[
i
]
!==
callback
)
{
tmp_callback_a
.
push
(
callback_a
[
i
]);
}
...
...
@@ -21,17 +23,17 @@ var announcement = function(spec, my) {
callback_a
=
tmp_callback_a
;
};
that
.
register
=
function
()
{
that
.
register
=
function
()
{
announcer
.
register
(
that
);
};
that
.
unregister
=
function
()
{
that
.
unregister
=
function
()
{
announcer
.
unregister
(
that
);
};
that
.
trigger
=
function
(
args
)
{
that
.
trigger
=
function
(
args
)
{
var
i
;
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
callback_a
[
i
].
apply
(
null
,
args
);
}
};
...
...
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