From 6768915dd9089fca0b476446ec302515edb79e7a Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 29 Jul 2018 13:47:01 +0000 Subject: [PATCH] f18style.css: small fix, fhemweb: add l as shortcut to detail view git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17048 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- www/pgm2/f18style.css | 4 ++-- www/pgm2/fhemweb.js | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/www/pgm2/f18style.css b/www/pgm2/f18style.css index f029e58c0..5913fdde6 100644 --- a/www/pgm2/f18style.css +++ b/www/pgm2/f18style.css @@ -51,8 +51,8 @@ div.block { border:1px solid gray; background: #F8F8E0; padding:0.7em; } .langLinks { font-size: 0.6em; } /* Widgets */ -.makeTable { display:inline; float:left; clear:left; /*detail-selector,slider*/ - margin-top:10px; margin-bottom:20px;} +.makeTable { display:inline; float:left; clear:left; margin-bottom:20px; } +.makeTable:not(:first-child) { margin-top:10px; } .makeSelect { display:inline; float:left; clear:left; } select { margin-left:5px; margin-right:5px; } .slider { float:left; width:250px; height:26px; } diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js index 25472e376..c5065cc93 100644 --- a/www/pgm2/fhemweb.js +++ b/www/pgm2/fhemweb.js @@ -166,24 +166,29 @@ FW_jqueryReadyFn() }); }); - $("form").each(function(){ // shutdown handling + $("form").each(function(){ // main input special cases var input = $(this).find("input.maininput"); if(!input.length) return; $(this).on("submit", function(e) { var val = $(input).val(); - - if(val.match(/^\s*ver.*/)) { + if(val.match(/^\s*ver.*/)) { // version e.preventDefault(); $(input).val(""); return FW_showVersion(val); - } else if(val.match(/^\s*shutdown/)) { + } else if(val.match(/^\s*shutdown/)) { // shutdown FW_cmd(FW_root+"?XHR=1&cmd="+val); $(input).val(""); return false; - } else if(val.match(/^\s*get\s+/)) { + } else if(val.match(/^\s*l\s/)) { // l dev + var m = val.match(/^\s*l\s+(.*)/); + location.href = FW_root+"?detail="+m[1]; + e.preventDefault(); + return false; + + } else if(val.match(/^\s*get\s+/)) { // get // make get use xhr instead of reload //return true; FW_cmd(FW_root+"?cmd="+encodeURIComponent(val)+"&XHR=1", function(data){