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
60f7357f
Commit
60f7357f
authored
Apr 13, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Userlist javascript side... not yet ready but a start
parent
e23c7d37
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
19 deletions
+51
-19
chatgui.html
gui/chatgui.html
+33
-4
jquery-1.9.1.min.js
gui/jquery-1.9.1.min.js
+5
-0
maingui.html
gui/maingui.html
+4
-14
webwin.cpp
src/webwin.cpp
+9
-1
No files found.
gui/chatgui.html
View file @
60f7357f
<html>
<html
debug=
true
>
<head>
<title>
SkyliveX 0.1.0
</title>
<script
type=
"text/javascript"
src=
"https://getfirebug.com/firebug-lite.js"
></script>
<script
type=
"text/javascript"
src=
"jquery-1.9.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"SkyliveX.js"
></script>
<script
type=
"text/javascript"
>
function
sendMsg
()
...
...
@@ -16,7 +18,6 @@
sendMsg
();
}
}
</script>
<style>
...
...
@@ -175,13 +176,41 @@
</div>
<div
id=
"userlist"
class=
"cssuserlist"
>
<p>
ivan_staff
</p>
<p>
nextime
</p>
<ul
id=
"admins"
>
<li>
ivan_staff
</li>
<li>
nextime
</li>
</ul>
</div>
<form
name=
"messagesend"
onSubmit=
"return false;"
>
<textarea
id=
"chatinput"
class=
"csschatinput"
name=
"msginput"
onKeyDown=
"msgInputKey(event);"
>
</textarea>
</form>
<script
type=
"text/javascript"
>
function
updateUserlist
()
{
var
d
=
new
Date
();
$
.
get
(
"http://live1.skylive.name/tele1/userlist.txt?"
+
d
.
getTime
(),
function
(
data
)
{
var
ad
=
$
(
"#admins"
);
ad
.
empty
();
var
uarr
=
data
.
split
(
"
\n
"
);
$
.
each
(
uarr
,
function
(
i
)
{
if
(
uarr
[
i
].
length
>
2
)
{
var
t
=
"<li>"
+
uarr
[
i
]
+
"</li>"
;
ad
.
append
(
t
);
//alert(uarr[i]);
}
});
});
}
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
//setTimeout(function() { SkyliveX.resizeWin(636, 420); }, 500);
updateUserlist
();
setInterval
(
updateUserlist
,
5000
);
});
</script>
</body>
</html>
gui/jquery-1.9.1.min.js
0 → 100644
View file @
60f7357f
This diff is collapsed.
Click to expand it.
gui/maingui.html
View file @
60f7357f
<html
debug=
"true"
>
<head>
<title>
SkyliveX 0.1.0
</title>
<script
type=
"text/javascript"
src=
"jquery-1.9.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"SkyliveX.js"
></script>
<style>
...
...
@@ -93,22 +94,11 @@
</div>
<script
type=
"text/javascript"
>
function
showLiveImage
(
img
)
{
if
(
img
.
complete
)
{
document
.
getElementById
(
"liveimg"
).
src
=
img
.
src
;
}
else
{
setTimeout
(
function
(){
showLiveImage
(
img
);},
250
);
}
}
function
updateLiveImage
()
{
var
tele
=
document
.
getElementById
(
"numtele"
).
options
[
document
.
getElementById
(
"numtele"
).
selectedIndex
].
value
;
var
newImage
=
new
Image
();
newImage
.
src
=
"http://live1.skylive.name/tele"
+
tele
+
"live640.jpg?"
+
new
Date
().
getTime
();
var
d
=
new
Date
();
var
tele
=
document
.
getElementById
(
"telsel"
).
options
[
document
.
getElementById
(
"telsel"
).
selectedIndex
].
value
;
$
(
"#liveimg"
).
attr
(
"src"
,
"http://live1.skylive.name/tele"
+
tele
+
"/live640.jpg?"
+
d
.
getTime
());
}
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
SkyliveX
.
open_window
(
"chatgui.html"
,
false
);
...
...
src/webwin.cpp
View file @
60f7357f
...
...
@@ -82,6 +82,8 @@ WebWin::WebWin(QString &htmlfile)
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptCanCloseWindows
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptCanAccessClipboard
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessRemoteUrls
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessFileUrls
,
true
);
QPalette
pal
=
palette
();
pal
.
setBrush
(
QPalette
::
Base
,
Qt
::
transparent
);
...
...
@@ -107,6 +109,8 @@ WebWin::WebWin()
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptCanCloseWindows
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptCanAccessClipboard
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessFileUrls
,
true
);
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessRemoteUrls
,
true
);
msgsender
=
SENDER
;
}
...
...
@@ -147,6 +151,8 @@ QWebView* WebWin::createWindow(QWebPage::WebWindowType type)
// Assure plugin and js support also for this window.
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptEnabled
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessFileUrls
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessRemoteUrls
,
true
);
SKMessage
msg
(
"newwindow"
,
qobject_cast
<
SkylivexWin
*>
(
wv
));
sendMessage
(
msg
);
...
...
@@ -310,10 +316,12 @@ SkylivexWin* SkylivexWin::createSkyliveWindow(QString url, QWebPage::WebWindowTy
// Assure plugin and js support also for this window.
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptEnabled
,
true
);
wv
->
setPage
(
newWeb
);
wv
->
setAttribute
(
Qt
::
WA_DeleteOnClose
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessFileUrls
,
true
);
wv
->
settings
()
->
setAttribute
(
QWebSettings
::
LocalContentCanAccessRemoteUrls
,
true
);
if
(
type
==
QWebPage
::
WebModalDialog
)
wv
->
setWindowModality
(
Qt
::
ApplicationModal
);
QList
<
QString
>
urilist
=
url
.
split
(
"://"
);
...
...
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