2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

98_DOIFtools.pm: improved lookup window handling for for huge content, added attributes section and Ok button

git-svn-id: https://svn.fhem.de/fhem/trunk@13309 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2017-02-02 08:21:13 +00:00
parent 24709f26bf
commit 3df6e4d378
2 changed files with 25 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- update: 98_DOIFtools: improved lookup window handling for for huge content
add attributes section and Ok button
- update: 98_DOIFtools: add lookup window for probably assiciated devices
(internals and readings) in DOIF and DOIFtools detail view
- bugfix: FB_CALLIST: cleanup readings on set command clear

View File

@ -128,6 +128,7 @@ function doiftoolsAddLookUp () {
var dev = devList.Results[0];
var row = 0;
for (item in dev.Internals) {
if (item == "DEF") {dev.Internals[item] = "<pre>"+dev.Internals[item]+"</pre>"}
var cla = ((row++&1)?"odd":"even");
txt += "<tr class='"+cla+"'><td>"+item+"</td><td>"+dev.Internals[item].replace(/\n/g,"<br>")+"</td></tr>\n";
}
@ -137,23 +138,41 @@ function doiftoolsAddLookUp () {
var cla = ((row++&1)?"odd":"even");
txt += "<tr class='"+cla+"'><td>"+item+"</td><td>"+dev.Readings[item].Value+"</td><td>"+dev.Readings[item].Time+"</td></tr>\n";
}
txt += "</table>Attributes<table class='block wide attributes' style='font-size:12px'><br>";
row = 0;
for (item in dev.Attributes) {
if (item.match(/(userReadings|wait|setList)/) ) {dev.Attributes[item] = "<pre>"+dev.Attributes[item]+"</pre>"}
var cla = ((row++&1)?"odd":"even");
txt += "<tr class='"+cla+"'><td>"+item+"</td><td>"+dev.Attributes[item]+"</td></tr>\n";
}
txt += "</table>";
$('#addLookUp').html(txt);
$('#addLookUp').dialog("open");
$('#addLookUp').html(txt);
$('#addLookUp').dialog("open");
});
}
$(document).ready(function(){
$('body').append('<div id="addLookUp" style="display:none"></div>');
$('#addLookUp').dialog({
width:"60%",
height:"auto",
maxHeight:900,
modal: false,
position: { at: "right"},
collusion: "fit fit"
collusion: "fit fit",
buttons: [
{
text: "Ok",
style:"margin-right: 100%",
click: function() {
$( this ).dialog( "close" );
}
}
]
});
$('#addLookUp').dialog( "close" );
$(".assoc").find("a:even").each(function() {
$(this).on("mouseover",doiftoolsAddLookUp);
$(this).on("mouseleave",doiftoolsRemoveLookUp);
// $(this).on("mouseleave",doiftoolsRemoveLookUp);
});
});
</script>