Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Roque
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
Hide 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
)
{
/*jslint indent: 2, maxlen: 80, sloppy: true */
var
that
=
{};
/*global announcement: true */
spec
=
spec
||
{};
var
announcement
=
function
(
spec
,
my
)
{
my
=
my
||
{};
var
that
=
{},
// Attributes //
callback_a
=
[],
var
callback_a
=
[];
announcer
=
spec
.
announcer
||
{};
var
name
=
spec
.
name
||
''
;
var
announcer
=
spec
.
announcer
||
{};
// Methods //
that
.
add
=
function
(
callback
)
{
callback_a
.
push
(
callback
);
};
that
.
remove
=
function
(
callback
)
{
spec
=
spec
||
{};
var
i
,
tmp_callback_a
=
[];
my
=
my
||
{};
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
if
(
callback_a
[
i
]
!==
callback
)
{
tmp_callback_a
.
push
(
callback_a
[
i
]);
}
}
callback_a
=
tmp_callback_a
;
};
that
.
register
=
function
()
{
// Methods //
announcer
.
register
(
that
);
that
.
add
=
function
(
callback
)
{
};
callback_a
.
push
(
callback
);
};
that
.
unregister
=
function
()
{
that
.
remove
=
function
(
callback
)
{
announcer
.
unregister
(
that
);
var
i
,
tmp_callback_a
=
[];
};
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
if
(
callback_a
[
i
]
!==
callback
)
{
tmp_callback_a
.
push
(
callback_a
[
i
]);
}
}
callback_a
=
tmp_callback_a
;
};
that
.
trigger
=
function
(
args
)
{
that
.
register
=
function
()
{
var
i
;
announcer
.
register
(
that
);
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
++
)
{
};
callback_a
[
i
].
apply
(
null
,
args
);
}
};
return
that
;
that
.
unregister
=
function
()
{
announcer
.
unregister
(
that
);
};
that
.
trigger
=
function
(
args
)
{
var
i
;
for
(
i
=
0
;
i
<
callback_a
.
length
;
i
+=
1
)
{
callback_a
[
i
].
apply
(
null
,
args
);
}
};
return
that
;
};
};
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