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
3e3b855c
Commit
3e3b855c
authored
Jan 06, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added webapp mode for firefox browsers with openwebapp manifest and installer
parent
426e2eca
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
6 deletions
+65
-6
.htaccess
Web/htdocs/gui/.htaccess
+2
-2
page.php
Web/htdocs/gui/includes/page.php
+1
-1
install.php
Web/htdocs/gui/install.php
+37
-0
manifest.webapp
Web/htdocs/gui/manifest.webapp
+13
-0
offline.appcache
Web/htdocs/gui/offline.appcache
+1
-3
foot.php
Web/htdocs/gui/parts/foot.php
+8
-0
apache.conf
conf/defaults/apache.conf
+3
-0
No files found.
Web/htdocs/gui/.htaccess
View file @
3e3b855c
...
...
@@ -4,7 +4,7 @@ FallbackResource /domotika/gui/index.php
Deny
from
all
</
Files
>
<
Files
index.php
>
<
Files
Match
"^(index|install)\.php$"
>
Order
Allow,Deny
Allow
from
all
</
Files
>
</
Files
Match
>
Web/htdocs/gui/includes/page.php
View file @
3e3b855c
<!DOCTYPE html>
<html
manifest=
"offline.appcache"
>
<html
manifest=
"
<?=
$BASEGUIPATH
?>
/
offline.appcache"
>
<head>
<?=
$PAGE_BUFFER
[
'head'
]
?>
<?=
$PAGE_ADDHEAD
?>
...
...
Web/htdocs/gui/install.php
0 → 100644
View file @
3e3b855c
<?
include
(
"includes/common.php"
);
?>
<html>
<head>
</head>
<body>
<button
id=
"install"
>
Install Domotika GUI on homescreen
</button>
<script>
(
function
(){
function
install
(
ev
)
{
ev
.
preventDefault
();
// define the manifest URL
var
port
=
""
;
if
(
document
.
location
.
port
)
var
port
=
":"
+
document
.
location
.
port
;
var
manifest_url
=
document
.
location
.
protocol
+
"//"
+
document
.
location
.
host
+
port
+
"
<?=
str_replace
(
"/install.php"
,
""
,
$BASEGUIPATH
)
?>
/manifest.webapp"
;
// install the app
var
myapp
=
navigator
.
mozApps
.
install
(
manifest_url
);
myapp
.
onsuccess
=
function
(
data
)
{
// App is installed, remove button
//this.parentNode.removeChild(this);
console
.
log
(
this
);
};
myapp
.
onerror
=
function
()
{
// App wasn't installed, info is in this.error.name
console
.
log
(
'Install failed, error: '
+
this
.
error
.
name
);
};
};
// get a reference to the button and call install() on click
var
button
=
document
.
getElementById
(
'install'
);
button
.
addEventListener
(
'click'
,
install
,
false
);
})();
</script>
</body>
</html>
Web/htdocs/gui/manifest.webapp
0 → 100644
View file @
3e3b855c
{
"name": "Domotika GUI",
"description": "Home automation user interface",
"launch_path": "/domotika/gui",
"icons": {
"256": "/resources/img/logo_icon.png"
},
"developer": {
"name": "Unixmedia S.r.l.",
"url": "http://www.unixmedia.it"
},
"default_locale": "en"
}
Web/htdocs/gui/offline.appcache
View file @
3e3b855c
CACHE MANIFEST
#1388875358
/domotika/gui/index.php
/domotika/gui/
#1388875360
/resources/img/logo_icon.png
NETWORK:
*
Web/htdocs/gui/parts/foot.php
View file @
3e3b855c
...
...
@@ -27,6 +27,9 @@
<script
src=
"
<?=
$BASEGUIPATH
;
?>
/js/combined.min.js"
></script>
<script>
//document.documentElement.requestFullscreen();
var
ttsEnabled
=
<?=
$_DOMOTIKA
[
'tts'
]
?>
;
//var scroller = new AppScroll({
...
...
@@ -399,8 +402,11 @@
setInterval
(
function
(
i
){
console
.
debug
(
"setinterval"
);
$
.
get
(
"/rest/v1.2/keepalive/json"
,
function
(
r
){
console
.
debug
(
r
);
console
.
debug
(
"getok"
);
if
(
r
.
data
==
'SLOGGEDOUT'
)
{
location
.
reload
();
...
...
@@ -409,6 +415,8 @@
$
(
"#modal_offline"
).
modal
(
'hide'
);
}).
fail
(
function
(
r
){
console
.
debug
(
"getfail"
);
console
.
debug
(
r
);
$
(
"#modal_offline"
).
modal
(
'show'
);
}
);
...
...
conf/defaults/apache.conf
View file @
3e3b855c
...
...
@@ -23,6 +23,9 @@
Alias
/
domotika
/
home
/
domotika
/
Web
/
htdocs
Alias
/
admin
/
home
/
domotika
/
Web
/
admin
AddType
text
/
cache
-
manifest
.
appcache
AddType
text
/
css
.
css
AddType
application
/
x
-
web
-
app
-
manifest
+
json
.
webapp
<
Directory
/
home
/
domotika
/
Web
/
htdocs
>
Options
FollowSymLinks
...
...
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