Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
6d4cf7bb
Commit
6d4cf7bb
authored
Dec 29, 2013
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gmi app seems to not work with EventSource on gxv3175v2...
parent
f1a99722
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
index.php
Web/htdocs/gmi/index.php
+28
-5
style.css
Web/htdocs/gmi/style.css
+4
-0
No files found.
Web/htdocs/gmi/index.php
View file @
6d4cf7bb
...
...
@@ -100,10 +100,11 @@ $.fn.alterClass = function ( removals, additions ) {
};
})(
jQuery
);
/*
function postreply(arg)
{
alert
(
arg
);
}
console.debug
(arg);
}
*/
/*
var clicksound = new Audio("/domotika/gmi/beep.wav");
clicksound.preload = 'auto';
...
...
@@ -120,11 +121,14 @@ function butpushed(btype, bid)
//playClick(1);
//simpleGMI.play('/domotika/gmi/beep.wav',0,0,function(data){alert(data)});
$
.
post
(
"/rest/v1.2/"
+
btype
+
"/setbyid/"
+
bid
+
"/json"
);
//simpleGMI.post("http://q.unixmedia.net/rest/v1.2/"+btype+"/setbyid/"+bid+"/json", 'gmi=true', postreply);
}
setInterval
(
function
(){
simpleGMI
.
post
(
'http://q.unixmedia.net/domotika/gmi/style.css'
,
'aaa=sarca'
,
postreply
);
},
5000
);
simpleGMI
.
refresh
();
},
3600000
);
// simpleGMI.post('http://q.unixmedia.net/domotika/gmi/style.css', 'aaa=sarca', postreply);
//}, 5000);
</script>
</head>
<body>
...
...
@@ -189,6 +193,7 @@ setInterval(function(){
</div>
<div
class=
"footer-bar"
>
<!--
<button onClick="simpleGMI.dial(0, 0, 0, 281, '', 1)" class="pure-button pure-button-secondary">
<i class="fa fa-microphone fa-2x blackiconcolor"></i>
</button>
...
...
@@ -196,7 +201,13 @@ setInterval(function(){
<button onClick="simpleGMI.refresh()" class="pure-button pure-button-secondary" style="float:right">
<i class="fa fa-refresh fa-2x fa-spin blackiconcolor"></i>
</button>
-->
<button
onClick=
"simpleGMI.dial(0, 0, 0, 281, '', 1)"
class=
"pure-button pure-button-secondary"
>
<i
class=
"fa fa-microphone fa-2x blackiconcolor"
></i>
</button>
<button
onClick=
"simpleGMI.refresh()"
class=
"pure-button pure-button-secondary"
style=
"float:right"
>
<i
class=
"fa fa-refresh fa-2x blackiconcolor"
></i>
</button>
</div>
<script>
var
es
=
new
EventSource
(
"/sse"
);
...
...
@@ -211,12 +222,24 @@ var syncReceived = function(event) {
var
color
=
$
(
this
).
attr
(
'data-dmcolor-on'
);
else
var
color
=
$
(
this
).
attr
(
'data-dmcolor-off'
);
alert
(
color
);
$
(
this
).
alterClass
(
'pure-button-*'
,
color
);
}
)
});
}
es
.
addEventListener
(
"sync"
,
syncReceived
);
setInterval
(
function
(){
$
.
get
(
"/rest/v1.2/keepalive/json"
,
function
(
r
){
if
(
r
.
data
==
'SLOGGEDOUT'
)
{
//location.reload();
simpleGMI
.
refresh
();
}
});
},
5000
);
</script>
</body>
</html>
Web/htdocs/gmi/style.css
View file @
6d4cf7bb
...
...
@@ -39,3 +39,7 @@ body {
.pure-button-secondary
{
background
:
rgb
(
66
,
184
,
221
);
/* this is a light blue */
}
button
:active
{
background
:
yellow
;
}
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