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
Tristan Cavelier
jio
Commits
4bf94351
Commit
4bf94351
authored
Jan 10, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jslint pass announcer.js
parent
b4d3ba8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
28 deletions
+30
-28
src/jio/announcements/announcer.js
src/jio/announcements/announcer.js
+30
-28
No files found.
src/jio/announcements/announcer.js
View file @
4bf94351
var
announcer
=
(
function
(
spec
,
my
)
{
var
that
=
{};
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
var
announcement_o
=
{};
// Methods //
that
.
register
=
function
(
name
)
{
if
(
!
announcement_o
[
name
])
{
announcement_o
[
name
]
=
announcement
();
}
};
/*jslint indent: 2, maxlen: 80, sloppy: true */
/*global announcement: true */
var
announcer
=
(
function
(
spec
,
my
)
{
var
that
=
{},
announcement_o
=
{};
spec
=
spec
||
{};
my
=
my
||
{};
that
.
unregister
=
function
(
name
)
{
if
(
announcement_o
[
name
])
{
delete
announcement_o
[
name
];
}
};
// Methods //
that
.
register
=
function
(
name
)
{
if
(
!
announcement_o
[
name
])
{
announcement_o
[
name
]
=
announcement
();
}
};
that
.
at
=
function
(
name
)
{
return
announcement_o
[
name
];
};
that
.
unregister
=
function
(
name
)
{
if
(
announcement_o
[
name
])
{
delete
announcement_o
[
name
];
}
};
that
.
on
=
function
(
name
,
callback
)
{
that
.
register
(
name
);
that
.
at
(
name
).
add
(
callback
);
};
that
.
at
=
function
(
name
)
{
return
announcement_o
[
name
];
};
that
.
trigger
=
function
(
name
,
args
)
{
that
.
at
(
name
).
trigger
(
args
);
};
that
.
on
=
function
(
name
,
callback
)
{
that
.
register
(
name
);
that
.
at
(
name
).
add
(
callback
);
};
return
that
;
that
.
trigger
=
function
(
name
,
args
)
{
that
.
at
(
name
).
trigger
(
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