Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
astronomy
skylivex
Commits
018ad60b
Commit
018ad60b
authored
Feb 25, 2013
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize js object SkyliveX
parent
e4f6f169
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
SkyliveX.js
gui/SkyliveX.js
+22
-21
No files found.
gui/SkyliveX.js
View file @
018ad60b
function
changeContent
(
id
,
content
)
function
skyliveClass
()
{}
{
skyliveClass
.
prototype
.
method
=
function
(
name
,
func
){
this
.
prototype
[
name
]
=
func
;
return
this
;
}
skyliveClass
.
method
(
'changeContent'
,
function
(
id
,
content
){
var
n
=
document
.
getElementById
(
id
);
var
n
=
document
.
getElementById
(
id
);
if
(
typeof
(
n
)
!=
"undefined"
)
if
(
typeof
(
n
)
!=
"undefined"
)
n
.
innerHTML
=
content
;
n
.
innerHTML
=
content
;
}
});
function
notify
(
content
)
skyliveClass
.
method
(
'notify'
,
function
(
content
){
{
if
(
typeof
(
notifycb
)
==
"function"
)
if
(
typeof
(
notifycb
)
==
"function"
)
notifycb
(
content
);
notifycb
(
content
);
}
});
function
msgalert
(
content
)
skyliveClass
.
method
(
'msgalert'
,
function
(
content
){
{
if
(
typeof
(
alertcb
)
==
"function"
)
if
(
typeof
(
alertcb
)
==
"function"
)
alertcb
(
content
);
alertcb
(
content
);
else
//else
alert
(
content
);
// alert(content);
}
});
function
publicReceived
(
user
,
msg
)
skyliveClass
.
method
(
'publicReceived'
,
function
(
user
,
msg
){
{
if
(
typeof
(
public_received
)
==
"function"
)
if
(
typeof
(
public_received
)
==
"function"
)
{
{
public_received
(
user
,
msg
);
public_received
(
user
,
msg
);
...
@@ -29,11 +30,11 @@ function publicReceived(user, msg)
...
@@ -29,11 +30,11 @@ function publicReceived(user, msg)
newel
.
innerHTML
=
"<"
+
user
+
"> "
+
msg
;
newel
.
innerHTML
=
"<"
+
user
+
"> "
+
msg
;
n
.
appendChild
(
newel
);
n
.
appendChild
(
newel
);
n
.
scollTop
=
n
.
scrollHeight
;
n
.
scollTop
=
n
.
scrollHeight
;
}
}
}
}
}
}
);
SkyliveX
.
page
=
new
SkyliveClass
();
SkyliveX
.
changeContent
.
connect
(
changeContent
);
SkyliveX
.
changeContent
.
connect
(
SkyliveX
.
page
.
changeContent
);
SkyliveX
.
notify
.
connect
(
notify
);
SkyliveX
.
notify
.
connect
(
SkyliveX
.
page
.
notify
);
SkyliveX
.
alertmsg
.
connect
(
msgalert
);
SkyliveX
.
alertmsg
.
connect
(
SkyliveX
.
page
.
msgalert
);
SkyliveX
.
public_received
.
connect
(
publicReceived
);
SkyliveX
.
public_received
.
connect
(
SkyliveX
.
page
.
publicReceived
);
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