fhem/core/www/pgm2/fhemweb.js
// Show the webCmd list in a dialog if: smallScreen & hiddenroom=detail & room
Show the webCmd list in a dialog if: smallScreen & hiddenroom=detail & room
Show the webCmd list in a dialog if : smallScreen & hiddenroom = detail & room
function
FW_smallScreenCommands()
{
  if($("div#menu select").length == 0 ||           
     $("div#content").attr("room") == undefined || 
     $("div#content div.col1 a").length > 0)       
    return;
  $("div#content div.col1").each(function(){
    var tr = $(this).closest("tr");
    if($(tr).find("> td").length <= 2)
      return;
    $(this).html("<a href='#'>"+$(this).html()+"</a>");
    $(this).find("a").click(function(){
      var t = $("<table></table>"), row=0;
      $(tr).find("> td").each(function(){
        $(t).append("<tr></tr>");
        if(row++ == 0) {
          $(t).find("tr:last").append($(this).find("a").html());
        } else {
          $(this).attr("data-orig", 1);
          this.orig=$(this).parent();
          $(t).find("tr:last").append($(this).detach());
        }
      });
      FW_okDialog(t, this, function(){
        $("#FW_okDialog [data-orig]").each(function(){
          $(this).detach().appendTo(this.orig);
        });
      });
    });
  });
}
function FW_smallScreenCommands ( ) { if ( $ ( "div#menu select" ) . length == 0 || $ ( "div#content" ) . attr ( "room" ) == undefined || $ ( "div#content div.col1 a" ) . length > 0 ) return ; $ ( "div#content div.col1" ) . each ( function ( ) { var tr = $ ( this ) . closest ( "tr" ) ; if ( $ ( tr ) . find ( "> td" ) . length <= 2 ) return ; $ ( this ) . html ( "<a href='#'>" + $ ( this ) . html ( ) + "</a>" ) ; $ ( this ) . find ( "a" ) . click ( function ( ) { var t = $ ( "<table></table>" ) , row = 0 ; $ ( tr ) . find ( "> td" ) . each ( function ( ) { $ ( t ) . append ( "<tr></tr>" ) ; if ( row ++ == 0 ) { $ ( t ) . find ( "tr:last" ) . append ( $ ( this ) . find ( "a" ) . html ( ) ) ; } else { $ ( this ) . attr ( "data-orig" , 1 ) ; this . orig = $ ( this ) . parent ( ) ; $ ( t ) . find ( "tr:last" ) . append ( $ ( this ) . detach ( ) ) ; } } ) ; FW_okDialog ( t , this , function ( ) { $ ( "#FW_okDialog [data-orig]" ) . each ( function ( ) { $ ( this ) . detach ( ) . appendTo ( this . orig ) ; } ) ; } ) ; } ) ; } ) ; }
Show the webCmd list in a dialog if: smallScreen & hiddenroom=detail & room
Show the webCmd list in a dialog if : smallScreen & hiddenroom = detail & room
// not SmallScreen // not room Overview // no hiddenroom=detail