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
31d67e34
Commit
31d67e34
authored
Jan 30, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let's users know where they are in the gui!
parent
42c87512
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
148 additions
and
33 deletions
+148
-33
combined.min.css
Web/htdocs/gui/css/combined.min.css
+1
-1
style.css
Web/htdocs/gui/css/style.css
+8
-0
common.php
Web/htdocs/gui/includes/common.php
+60
-12
combined.min.js
Web/htdocs/gui/js/combined.min.js
+30
-2
domotika.js
Web/htdocs/gui/js/domotika.js
+30
-2
actuations.php
Web/htdocs/gui/left/actuations.php
+2
-2
cameras.php
Web/htdocs/gui/left/cameras.php
+2
-2
stats.php
Web/htdocs/gui/left/stats.php
+2
-2
video.php
Web/htdocs/gui/left/video.php
+2
-2
actuations.php
Web/htdocs/gui/pages/actuations.php
+3
-0
index.php
Web/htdocs/gui/right/index.php
+8
-8
No files found.
Web/htdocs/gui/css/combined.min.css
View file @
31d67e34
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Web/htdocs/gui/css/style.css
View file @
31d67e34
...
...
@@ -379,6 +379,14 @@ input::-webkit-input-speech-button {
bottom
:
-2px
;
}
.shadow-dmwhite
{
box-shadow
:
0px
0px
25px
6px
#969696
inset
;
}
.shadow-dmblack
{
box-shadow
:
0px
0px
25px
6px
#7e79ff
inset
;
}
.notifypanel
{
position
:
absolute
;
right
:
5px
;
...
...
Web/htdocs/gui/includes/common.php
View file @
31d67e34
...
...
@@ -2,18 +2,66 @@
$GUIDEBUG
=
FALSE
;
//$GUIDEBUG=TRUE;
$BASEGUIPATH
=
str_replace
(
"/index.php"
,
""
,
$_SERVER
[
'PHP_SELF'
]);
$FSPATH
=
realpath
(
dirname
(
__FILE__
)
.
"/.."
);
$GUIPATH
=
str_replace
(
$BASEGUIPATH
,
''
,
explode
(
'?'
,
$_SERVER
[
'REQUEST_URI'
])[
0
]);
$sectar
=
explode
(
"/"
,
$GUIPATH
);
$GUISECTION
=
"index"
;
$GUISUBSECTION
=
""
;
if
(
count
(
$sectar
)
>
1
and
$sectar
[
1
]
!=
""
)
function
getBaseGuiPath
()
{
return
str_replace
(
"/index.php"
,
""
,
$_SERVER
[
'PHP_SELF'
]);
}
function
getFSPath
()
{
return
realpath
(
dirname
(
__FILE__
)
.
"/.."
);
}
function
getGuiPath
()
{
return
str_replace
(
getBaseGuiPath
(),
''
,
explode
(
'?'
,
$_SERVER
[
'REQUEST_URI'
])[
0
]);
}
function
getSection
(
$path
=
false
)
{
if
(
$path
)
$sectar
=
explode
(
"/"
,
$path
);
else
$sectar
=
explode
(
"/"
,
getGuiPath
());
$GUISECTION
=
"index"
;
if
(
count
(
$sectar
)
>
1
and
$sectar
[
1
]
!=
""
)
$GUISECTION
=
$sectar
[
1
];
if
(
count
(
$sectar
)
>
2
)
return
$GUISECTION
;
}
function
getSubsection
(
$path
=
false
)
{
if
(
$path
)
$sectar
=
explode
(
"/"
,
$path
);
else
$sectar
=
explode
(
"/"
,
getGuiPath
());
$GUISUBSECTION
=
""
;
if
(
count
(
$sectar
)
>
2
)
$GUISUBSECTION
=
$sectar
[
2
];
if
(
count
(
$sectar
)
>
3
)
return
$GUISUBSECTION
;
}
function
getSubsectionOpt
(
$path
=
false
)
{
if
(
$path
)
$sectar
=
explode
(
"/"
,
$path
);
else
$sectar
=
explode
(
"/"
,
getGuiPath
());
$GUISUBSECTIONOPT
=
""
;
if
(
count
(
$sectar
)
>
3
)
$GUISUBSECTIONOPT
=
$sectar
[
3
];
return
$GUISUBSECTIONOPT
;
}
$BASEGUIPATH
=
getBaseGuiPath
();
$FSPATH
=
getFSPath
();
$GUIPATH
=
getGuiPath
();
$GUISECTION
=
getSection
();
$GUISUBSECTION
=
getSubsection
();
$GUISUBSECTIONOPT
=
getSubsectionOpt
();
$left
=
FALSE
;
$right
=
FALSE
;
...
...
Web/htdocs/gui/js/combined.min.js
View file @
31d67e34
...
...
@@ -87,6 +87,21 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document
//document.documentElement.requestFullscreen();
//window.screen.mozLockOrientation('portrait');
<?
$baseg=str_replace("/js/domotika.js","",$BASEGUIPATH);
$baseg=str_replace("/js/combined.min.js", "", $baseg);
?>
var BASEGUIPATH='<?=$baseg?>';
var sectar=window.location.pathname.replace(BASEGUIPATH, "").split("/");
var GUISECTION="index";
if(sectar.length>1 && sectar[1].length>0 && sectar[1]!='actuations')
GUISECTION=sectar[1];
var GUISUBSECTION="";
if(sectar.length>2)
GUISUBSECTION=sectar[2];
console.debug(sectar);
console.debug(GUISECTION);
var windowWidth = window.screen.width < window.outerWidth ?
window.screen.width : window.outerWidth;
...
...
@@ -346,8 +361,21 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document
$(document).ready(function() {
mval = calcSnapSize();
$(".left-drawer").css("width", mval);
$(".right-drawer").css("width", mval)
$(".left-drawer").each(function(){ $(this).css("width", mval)});
$(".right-drawer").each(function(){ $(this).css("width", mval)});
$(".right-drawer a").each(function(){
if($(this).attr('data-guisection')==GUISECTION){
//$(this).css('border', '2px solid azure');
$(this).addClass('shadow-<?=$_DOMOTIKA["gui_theme"]?>');
}
});
$(".left-drawer a").each(function(){
if($(this).attr('data-guisubsection')==GUISUBSECTION){
//$(this).css('border', '2px solid azure');
$(this).addClass('shadow-<?=$_DOMOTIKA["gui_theme"]?>');
}
});
});
var snapper = new Snap({
...
...
Web/htdocs/gui/js/domotika.js
View file @
31d67e34
...
...
@@ -2,6 +2,21 @@
//document.documentElement.requestFullscreen();
//window.screen.mozLockOrientation('portrait');
<
?
$baseg
=
str_replace
(
"/js/domotika.js"
,
""
,
$BASEGUIPATH
);
$baseg
=
str_replace
(
"/js/combined.min.js"
,
""
,
$baseg
);
?
>
var
BASEGUIPATH
=
'<?=$baseg?>'
;
var
sectar
=
window
.
location
.
pathname
.
replace
(
BASEGUIPATH
,
""
).
split
(
"/"
);
var
GUISECTION
=
"index"
;
if
(
sectar
.
length
>
1
&&
sectar
[
1
].
length
>
0
&&
sectar
[
1
]
!=
'actuations'
)
GUISECTION
=
sectar
[
1
];
var
GUISUBSECTION
=
""
;
if
(
sectar
.
length
>
2
)
GUISUBSECTION
=
sectar
[
2
];
console
.
debug
(
sectar
);
console
.
debug
(
GUISECTION
);
var
windowWidth
=
window
.
screen
.
width
<
window
.
outerWidth
?
window
.
screen
.
width
:
window
.
outerWidth
;
...
...
@@ -261,8 +276,21 @@
$
(
document
).
ready
(
function
()
{
mval
=
calcSnapSize
();
$
(
".left-drawer"
).
css
(
"width"
,
mval
);
$
(
".right-drawer"
).
css
(
"width"
,
mval
)
$
(
".left-drawer"
).
each
(
function
(){
$
(
this
).
css
(
"width"
,
mval
)});
$
(
".right-drawer"
).
each
(
function
(){
$
(
this
).
css
(
"width"
,
mval
)});
$
(
".right-drawer a"
).
each
(
function
(){
if
(
$
(
this
).
attr
(
'data-guisection'
)
==
GUISECTION
){
//$(this).css('border', '2px solid azure');
$
(
this
).
addClass
(
'shadow-<?=$_DOMOTIKA["gui_theme"]?>'
);
}
});
$
(
".left-drawer a"
).
each
(
function
(){
if
(
$
(
this
).
attr
(
'data-guisubsection'
)
==
GUISUBSECTION
){
//$(this).css('border', '2px solid azure');
$
(
this
).
addClass
(
'shadow-<?=$_DOMOTIKA["gui_theme"]?>'
);
}
});
});
var
snapper
=
new
Snap
({
...
...
Web/htdocs/gui/left/actuations.php
View file @
31d67e34
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"left-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<a
href=
"
<?=
$BASEGUIPATH
?>
"
class=
"btn btn-block btn-default leftbtn"
<?
/* style="background-image: url(/resources/icons/home_white_alpha_32x32.png)" */
?>
>
home
</a>
<a
href=
"
<?=
$BASEGUIPATH
?>
/"
data-guisubsection=
''
class=
"btn btn-block btn-default leftbtn"
<?
/* style="background-image: url(/resources/icons/home_white_alpha_32x32.png)" */
?>
>
home
</a>
<?
$links
=
array
();
foreach
(
getWebSections
(
array
(
'home'
),
array
(),
'devsection'
)
as
$ws
)
...
...
@@ -13,7 +13,7 @@
{
if
(
!
startsWith
(
$v
,
'_'
))
{
?>
<a
href=
"
<?=
$BASEGUIPATH
.
"/actuations/"
.
$v
?>
"
class=
"btn btn-block btn-default leftbtn"
>
<?=
$k
?>
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/actuations/"
.
$v
?>
"
data-guisubsection=
'
<?=
$v
?>
'
class=
"btn btn-block btn-default leftbtn"
>
<?=
$k
?>
</a>
<?
}
}
...
...
Web/htdocs/gui/left/cameras.php
View file @
31d67e34
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"left-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
class=
"btn btn-block btn-default"
>
Telecamere Home
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
data-guisubsection=
''
class=
"btn btn-block btn-default"
>
Telecamere Home
</a>
<?
$v
=
DB
::
query
(
"SELECT id,button_name,position FROM mediasources WHERE websection='camera' AND active=1 ORDER BY position,id"
);
$links
=
array
();
...
...
@@ -13,7 +13,7 @@
foreach
(
$links
as
$k
=>
$v
)
{
?>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras/"
.
$v
?>
"
class=
"btn btn-block btn-default"
>
<?=
$k
?>
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras/"
.
$v
?>
"
data-guisubsection=
'
<?=
$v
?>
'
class=
"btn btn-block btn-default"
>
<?=
$k
?>
</a>
<?
}
?>
...
...
Web/htdocs/gui/left/stats.php
View file @
31d67e34
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"left-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
class=
"btn btn-block btn-default"
>
Stats Home
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
data-guisubsection=
''
class=
"btn btn-block btn-default"
>
Stats Home
</a>
<?
$l
=
DB
::
query
(
"SELECT websection FROM stats_charts WHERE websection!='home' group by websection order by websection"
);
foreach
(
$l
as
$k
=>
$v
)
{
?>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats/"
.
$v
[
'websection'
]
?>
"
class=
"btn btn-block btn-default"
>
<?=
$v
[
'websection'
]
?>
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats/"
.
$v
[
'websection'
]
?>
"
data-guisubsection=
'
<?=
$v
?>
'
class=
"btn btn-block btn-default"
>
<?=
$v
[
'websection'
]
?>
</a>
<?
}
?>
...
...
Web/htdocs/gui/left/video.php
View file @
31d67e34
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"left-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
class=
"btn btn-block btn-default"
>
Video Home
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
data-guisubsection=
''
class=
"btn btn-block btn-default"
>
Video Home
</a>
<?
$v
=
DB
::
query
(
"SELECT id,button_name,position FROM mediasources WHERE websection='video' AND active=1 ORDER BY position,id"
);
$links
=
array
();
...
...
@@ -13,7 +13,7 @@
foreach
(
$links
as
$k
=>
$v
)
{
?>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video/"
.
$v
?>
"
class=
"btn btn-block btn-default"
>
<?=
$k
?>
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video/"
.
$v
?>
"
data-guisubsection=
'
<?=
$v
?>
'
class=
"btn btn-block btn-default"
>
<?=
$k
?>
</a>
<?
}
?>
...
...
Web/htdocs/gui/pages/actuations.php
View file @
31d67e34
...
...
@@ -5,6 +5,9 @@
$paneldimensions
=
array
(
'dimensions'
=>
array
(
4
=>
'50%'
));
$SHOW_EMPTY_PANELS
=
FALSE
;
if
(
$GUISUBSECTION
==
""
)
header
(
"Location:
$BASEGUIPATH
"
);
$panels
=
array
();
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Actions"
),
'panel_sections'
=>
'actions'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$panels
[]
=
array
(
'panel_title'
=>
$tr
->
Get
(
$GUISUBSECTION
)
.
" - "
.
$tr
->
Get
(
"Outputs"
),
'panel_sections'
=>
'output'
,
'panel_websections'
=>
$GUISUBSECTION
,
'panel_cols'
=>
4
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
...
...
Web/htdocs/gui/right/index.php
View file @
31d67e34
...
...
@@ -2,15 +2,15 @@
<div
class=
"right-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<div
class=
"panel-heading"
><h2
class=
"panel-title"
>
Menu
</h2></div>
<a
href=
"
<?=
$BASEGUIPATH
.
"/"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-attuazioni"
>
Attuazioni
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/clima"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-clima"
>
Clima
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-tv"
>
Video
&
TV
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-video"
>
Telecamere
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-stats"
>
Stats
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/"
?>
"
data-guisection=
'index'
class=
"btn btn-block btn-default rightbtn rightbtn-attuazioni"
>
Attuazioni
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/clima"
?>
"
data-guisection=
'clima'
class=
"btn btn-block btn-default rightbtn rightbtn-clima"
>
Clima
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
data-guisection=
'video'
class=
"btn btn-block btn-default rightbtn rightbtn-tv"
>
Video
&
TV
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
data-guisection=
'cameras'
class=
"btn btn-block btn-default rightbtn rightbtn-video"
>
Telecamere
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
data-guisection=
'stats'
class=
"btn btn-block btn-default rightbtn rightbtn-stats"
>
Stats
</a>
<!--
<a href="
<?=
$BASEGUIPATH
.
"/alarm"
?>
" class="btn btn-block btn-default rightbtn rightbtn-alarm">Antifurto</a>
<a href="
<?=
$BASEGUIPATH
.
"/audio"
?>
" class="btn btn-block btn-default rightbtn rightbtn-audio">Audio</a>
<a href="
<?=
$BASEGUIPATH
.
"/irrigation"
?>
" class="btn btn-block btn-default rightbtn rightbtn-irr">Irrigazione</a>
<a href="
<?=
$BASEGUIPATH
.
"/alarm"
?>
"
data-guisection='alarm'
class="btn btn-block btn-default rightbtn rightbtn-alarm">Antifurto</a>
<a href="
<?=
$BASEGUIPATH
.
"/audio"
?>
"
data-guisection='audio'
class="btn btn-block btn-default rightbtn rightbtn-audio">Audio</a>
<a href="
<?=
$BASEGUIPATH
.
"/irrigation"
?>
"
data-guisection='irrigation'
class="btn btn-block btn-default rightbtn rightbtn-irr">Irrigazione</a>
-->
</div>
</div>
...
...
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