-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified 0138-WebUI-Add-SettingsAccessInStatusAndControl to allow to
click on the device image to directly go to the device settings. (cf. #1444 (comment))
- Loading branch information
Showing
5 changed files
with
18,596 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 208 additions & 0 deletions
208
...I-Add-SettingsAccessInStatusAndControl/occu/WebUI/www/rega/pages/tabs/control/devices.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
<script type="text/javascript"> | ||
<% | ||
if( system.GetSessionVar("sessionTAB") != "control/devices" ) | ||
{ | ||
system.SetSessionVar("sessionTAB", "control/devices"); | ||
system.SetSessionVar("sessionTAB1", ""); | ||
} | ||
%> | ||
//setPath("<span onclick='WebUI.enter(ControlPage);'>Status und Bedienung</span> > Ger�te"); | ||
setPath("<span onclick='WebUI.enter(ControlPage);'>"+translateKey('menuControlPage') +"</span> > " +translateKey('submenuDevices')); | ||
fltHD = new iseFilter('fltHD'); | ||
</script> | ||
|
||
<table width="100%" class="CLASS03900" cellpadding="0" cellspacing="0"> | ||
<colgroup> | ||
<col style="width:260px;"/> | ||
<col style="width:auto;"/> | ||
</colgroup> | ||
<tr> | ||
<!-- Linke Spalte --> | ||
<td id="contentLeft"> | ||
<table class="CLASS03901"> | ||
<tr> | ||
<td style="vertical-align: top;"> | ||
<div id="divDL" class="CLASS03902"> | ||
<script type="text/javascript"> | ||
var contHeight = $("content").style.height; | ||
contHeight = contHeight.replace(/px/, ""); | ||
$("divDL").style.height = Math.floor((contHeight * 0.98)) + "px"; | ||
</script> | ||
<table id="tblFunctionNames" class="StatViewTbl CLASS03903" cellpadding="4" cellspacing="0" > | ||
<colgroup> | ||
<col style="width:100px;"/> | ||
<col style="width:100px;"/> | ||
</colgroup> | ||
<% | ||
object obj = dom.GetObject(ID_DEVICES); | ||
if ( obj ) | ||
{ | ||
obj.SortByName(); | ||
string tmp = ""; | ||
string sFirstId = ""; | ||
foreach( tmp, obj.EnumEnabledIDs() ) | ||
{ | ||
object devs = dom.GetObject(tmp); | ||
string s1; | ||
foreach( s1, devs.Channels().EnumEnabledVisibleIDs() ) | ||
{ | ||
object oCH = dom.GetObject( s1 ); | ||
if( oCH ) | ||
{ | ||
boolean bHasFullAccess = (oCH.UserAccessRights(iulOtherThanAdmin) == iarFullAccess); | ||
boolean bHasDPs = (oCH.DPs().EnumEnabledVisibleIDs().Length()); | ||
boolean bDefaultDPWrite = (oCH.DefaultDPWrite()!=ID_ERROR); | ||
boolean bIsSysVarDP = false; | ||
object oTmpDP = dom.GetObject( oCH.DefaultDPWrite() ); | ||
if( oTmpDP ) | ||
{ | ||
bIsSysVarDP = ( oTmpDP.IsTypeOf( OT_VARDP ) || oTmpDP.IsTypeOf( OT_ALARMDP ) ); | ||
} | ||
} | ||
} | ||
if(devs.Visible() | ||
&& devs.ReadyConfig() | ||
&& devs.HssType() | ||
&& (! devs.MetaData("operateGroupOnly") == "true" ) | ||
&& (devs.HssType() != "VIR-OL-GTW") | ||
&& (devs.HssType() != "VIR-HUE-GTW") | ||
) | ||
{ | ||
if( sFirstId == "" ) | ||
{ | ||
sFirstId = tmp; | ||
} | ||
Write("<tr class='CLASS03904'>"); | ||
Write("<td id='"#devs.ID()#"name' class='ButtonStatusRooms CLASS03905' onclick='loadChannels("#devs.ID()#")'>"); | ||
string sName = devs.Name(); | ||
integer iLength = 12; | ||
Call("/esp/datapointconfigurator.fn::StringCut()"); | ||
Write(sName); | ||
Write("</td>"); | ||
Write("<td id='"#devs.ID()#"pic' class='ButtonStatusRoomsPic CLASS03906' onclick='picDivHide(jg_250);DeviceListPage.showConfiguration(event, \"DEVICE\", "# devs.ID() #");' onmouseover='this.addClassName(\"DeviceListRow_Highlight\")' onmouseout='this.removeClassName(\"DeviceListRow_Highlight\")' >"); | ||
|
||
string sPicDivId = "picDiv"#devs.ID(); | ||
Write("<div id='"#sPicDivId#"' class='CLASS03907' style='margin:auto;' "); | ||
Write("onmouseover='picDivShow(jg_250, \""#devs.Label()#"\", 250, -1, this);'"); | ||
Write("onmouseout='picDivHide(jg_250);'"); | ||
Write("></div>"); | ||
|
||
Write("<script type='text/javascript'>"); | ||
Write("var jg_0 = new jsGraphics('"#sPicDivId#"');"); | ||
Write("InitGD(jg_0, 50);"); | ||
Write("Draw(jg_0, '"#devs.Label()#"', 50, '-1');"); | ||
Write("</script>"); | ||
|
||
Write("</td>"); | ||
Write("</tr>"); | ||
} | ||
} | ||
} | ||
%> | ||
</table> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
|
||
<!-- Rechte Spalte --> | ||
<td id="contentRight"> | ||
<div id="divRTD" class="CLASS03908"> | ||
<script type="text/javascript"> | ||
var contHeight = $("content").style.height; | ||
contHeight = contHeight.replace(/px/, ""); | ||
$("divRTD").style.height = Math.floor((contHeight * 0.98)) + "px"; | ||
</script> | ||
<table id="tblRightContent" class="CLASS03909"> | ||
<tr class="CLASS03910"> | ||
<td style="vertical-align: top;" id="chnList"></td> | ||
</tr> | ||
</table> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<script type="text/javascript"> | ||
|
||
loadChannels = function(id, specialFlag) | ||
{ | ||
|
||
// Introduced with the blind.fn | ||
if (! specialFlag) { | ||
jQuery('body').data('loadCh_'+id, false ); | ||
} | ||
|
||
iseInitUpdateArrays(); | ||
if( id ) | ||
{ | ||
// aktuellen Markierung aufheben | ||
var tdlist = $("tblFunctionNames").getElementsByTagName('td'); | ||
for (var i = 0; i < tdlist.length; i++) | ||
{ | ||
$(tdlist[i]).removeClassName("ButtonStatusRoomsSelected"); | ||
$(tdlist[i]).removeClassName("ButtonStatusRoomsPicSelected"); | ||
} | ||
|
||
// Markierung setzen | ||
$(id + "name").addClassName("ButtonStatusRoomsSelected"); | ||
$(id + "pic").addClassName("ButtonStatusRoomsPicSelected"); | ||
|
||
// Inhalt nachladen | ||
var pb = ''; | ||
pb += 'integer id = '+id+';'; | ||
var opts = | ||
{ | ||
postBody: pb, | ||
evalScripts: true | ||
}; | ||
new Ajax.Updater("chnList", "/pages/tabs/control/hdevichannels.htm?sid=" + SessionId, opts); | ||
} | ||
else | ||
{ | ||
if(dbg)alert(translateKey("alertIDnotSet") + " (control/devices.htm)"); | ||
} | ||
} | ||
|
||
// Beim laden der Seite ersten Raum anzeigen | ||
<% | ||
if( system.GetSessionVar("sessionTAB1") == "" ) | ||
{ | ||
system.SetSessionVar("sessionTAB1",sFirstId); | ||
} | ||
%> | ||
loadChannels( <% Write( system.GetSessionVar("sessionTAB1") ); %> ); | ||
|
||
filterOptions = new iseFilter(); | ||
</script> | ||
|
||
<script type="text/javascript"> | ||
var s = ""; | ||
|
||
s += "<table cellspacing='8'>"; | ||
s += "<tr>"; | ||
s += "<td style='text-align:center; vertical-align: middle;'><div class='FooterButton' onclick='WebUI.goBack()'>"+translateKey("footerBtnPageBack")+"</div></td>"; | ||
s += "<td style='text-align:center; vertical-align: middle;'><div class='FooterButton CLASS03911' onclick='fltHD.clearFilters();updateTable();' >"+translateKey('footerBtnResetFilter')+"</div></td>"; | ||
s += "</tr>"; | ||
s += "</table>"; | ||
|
||
setFooter(s); | ||
|
||
updateTable = function() | ||
{ | ||
colorFilterBtns(fltHD); | ||
for (var i = 0; i < arChns.length; i++) | ||
{ | ||
if (!fltHD.objPassFilter(arChns[i])) | ||
{ | ||
hide(arChns[i]['trid']); | ||
if (arChns[i]['ctrlId']) hide(arChns[i]['ctrlId']); | ||
} | ||
else | ||
{ | ||
show(arChns[i]['trid']); | ||
if (arChns[i]['ctrlId']) show(arChns[i]['ctrlId']); | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.