mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
f18.js: fix rightmenu on smallscreen (Forum #82351)
git-svn-id: https://svn.fhem.de/fhem/trunk@16999 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4093c3cb4e
commit
ff92462227
@ -46,8 +46,6 @@ $(document).ready(function(){
|
|||||||
$("body").addClass('small');
|
$("body").addClass('small');
|
||||||
f18_attr["Pinned.menu"] = false;
|
f18_attr["Pinned.menu"] = false;
|
||||||
}
|
}
|
||||||
if(f18_attr.rightMenu)
|
|
||||||
$("body").addClass("rightMenu");
|
|
||||||
|
|
||||||
var f18_aCol = getComputedStyle($("a").get(0),null).getPropertyValue('color');
|
var f18_aCol = getComputedStyle($("a").get(0),null).getPropertyValue('color');
|
||||||
for(var i in f18_icon)
|
for(var i in f18_icon)
|
||||||
@ -60,7 +58,6 @@ $(document).ready(function(){
|
|||||||
if($(szc).length)
|
if($(szc).length)
|
||||||
$(szc).before("<div class='SVGplot'></div>");
|
$(szc).before("<div class='SVGplot'></div>");
|
||||||
|
|
||||||
f18_setFixedInput();
|
|
||||||
f18_menu();
|
f18_menu();
|
||||||
f18_tables();
|
f18_tables();
|
||||||
f18_svgSetCols();
|
f18_svgSetCols();
|
||||||
@ -219,9 +216,7 @@ f18_special()
|
|||||||
$("tr#f18rs").append("<table id='f18ts' class='block wide'></table>");
|
$("tr#f18rs").append("<table id='f18ts' class='block wide'></table>");
|
||||||
appendTo = "table#f18ts";
|
appendTo = "table#f18ts";
|
||||||
|
|
||||||
addHider("rightMenu", false, "MenuBtn right<br>on SmallScreen", function(c){
|
addHider("rightMenu", false, "MenuBtn right<br>on SmallScreen", f18_resize);
|
||||||
$("body").toggleClass("rightMenu");
|
|
||||||
});
|
|
||||||
addHider("savePinChanges", false, "Save pin changes");
|
addHider("savePinChanges", false, "Save pin changes");
|
||||||
addHider("showDragger", false, "Dragging active", function(c){
|
addHider("showDragger", false, "Dragging active", function(c){
|
||||||
if(c) {
|
if(c) {
|
||||||
@ -395,15 +390,20 @@ f18_resize()
|
|||||||
log("f18.js W:"+w+" S:"+screen.width);
|
log("f18.js W:"+w+" S:"+screen.width);
|
||||||
var hl = f18_getAttr("hideLogo"),
|
var hl = f18_getAttr("hideLogo"),
|
||||||
hi = f18_getAttr("hideInput"),
|
hi = f18_getAttr("hideInput"),
|
||||||
pm = f18_getAttr("Pinned.menu");
|
pm = f18_getAttr("Pinned.menu"),
|
||||||
|
rm = (f18_getAttr("rightMenu") && f18_small);
|
||||||
|
|
||||||
var left = 0;
|
var left = 0;
|
||||||
left += hl ? 0 : 40;
|
left += hl ? 0 : 40;
|
||||||
left += pm ? 0 : 44;
|
left += pm ? 0 : 44;
|
||||||
|
var lleft = (pm ? 10 : 52);
|
||||||
$("input.maininput").css({ width:(w-left-(FW_isiOS ? 30 : 20))+'px',
|
$("input.maininput").css({ width:(w-left-(FW_isiOS ? 30 : 20))+'px',
|
||||||
display: hi ? "none":"block"});
|
display: hi ? "none":"block"});
|
||||||
$("#hdr").css({ left:left+'px' });
|
|
||||||
$("#menu,#content").css("top", (hi && pm && hl) ? "10px" : "50px");
|
$("#menu,#content").css("top", (hi && pm && hl) ? "10px" : "50px");
|
||||||
|
$("#hdr").css({ left:(rm ? 10 : left)+'px' });
|
||||||
|
$("#menuBtn").css({ left:(rm ? "auto":"10px"), right:(rm ? "10px":"auto") });
|
||||||
|
$("#logo") .css({ left:(rm ? "auto":lleft ), right:(rm ? "52px":"auto") });
|
||||||
|
f18_setFixedInput(); // Wonder, why its needed
|
||||||
}
|
}
|
||||||
|
|
||||||
function
|
function
|
||||||
|
@ -210,9 +210,6 @@ body.touch div.col1, body.touch #menu table.room div { padding:0.25em 0; }
|
|||||||
body.pinnedMenu #menuBtn { display:none; }
|
body.pinnedMenu #menuBtn { display:none; }
|
||||||
body.pinnedMenu #menu { left:10px; }
|
body.pinnedMenu #menu { left:10px; }
|
||||||
body.pinnedMenu #logo { left:10px; }
|
body.pinnedMenu #logo { left:10px; }
|
||||||
body.small.rightMenu #menuBtn { right:10px; left:auto; }
|
|
||||||
body.small.rightMenu #logo { right:52px; left:auto; }
|
|
||||||
body.small.rightMenu #hdr { left:10px; right:auto; }
|
|
||||||
body { background-repeat: no-repeat; background-size:cover; }
|
body { background-repeat: no-repeat; background-size:cover; }
|
||||||
|
|
||||||
div.SVGlabel { display:inline-block; }
|
div.SVGlabel { display:inline-block; }
|
||||||
|
Loading…
Reference in New Issue
Block a user