From 57f4058ddf42607c66953b47e8bca2a08fcb382c Mon Sep 17 00:00:00 2001 From: kanoi Date: Thu, 13 Aug 2015 12:03:36 +1000 Subject: [PATCH] php - convert hover menu to click on iOS and others --- pool/inc.php | 11 +++-------- pool/page.php | 42 +++++++++++------------------------------- 2 files changed, 14 insertions(+), 39 deletions(-) diff --git a/pool/inc.php b/pool/inc.php index 0b72e58b..75d91b97 100644 --- a/pool/inc.php +++ b/pool/inc.php @@ -75,7 +75,7 @@ function jst(){var e=document.getElementById('jst');if(e){e.style.visibility='hi return $h; } # -function HeadCSS($iCrap = false) +function HeadCSS() { $h = "input[type=checkbox] {vertical-align:-2px;} form {display:inline-block;} @@ -106,15 +106,10 @@ input.tiny {width:0px;height:0px;margin:0px;padding:0px;outline:none;border:0px; #n42 td.navboxr {float:right;} #n42 td.nav {position:relative;} #n42 td.ts {border-width:1px;border-color:#0022ee;border-style:solid none none none;} -"; - if (!$iCrap) - { - $h .= "#n42 div.sub {left:0px;z-index:42;position:absolute;visibility:hidden;} +#n42 div.sub {left:0px;z-index:42;position:absolute;visibility:hidden;} #n42 td.nav:hover {background:#0099ee;} #n42 td.nav:hover div.sub {background:#0077ee;visibility:visible;} -"; - } - $h .= "h1 {margin-top:20px;float:middle;font-size:20px;} +h1 {margin-top:20px;float:middle;font-size:20px;} .foot, .push {height:50px;} .title {background-color:#909090;} .even {background-color:#cccccc;} diff --git a/pool/page.php b/pool/page.php index 05ad4521..4bfe7f6b 100644 --- a/pool/page.php +++ b/pool/page.php @@ -153,20 +153,10 @@ function trm_force($html) return dotrm($html, false); } # -function isCrap() -{ - if (isset($_SERVER['HTTP_USER_AGENT'])) - return strpos($_SERVER['HTTP_USER_AGENT'],'iP'); - else - return false; -} -# function pghead($css_marker, $script_marker, $name) { global $page_title; - $iCrap = isCrap(); - $head = "\n"; $head .= "$page_title$name"; @@ -178,7 +168,7 @@ function pghead($css_marker, $script_marker, $name) $head .= HeadJS(); $head .= "\n\n"; $head .= "\n"; $head .= ''; @@ -444,8 +434,8 @@ function pgtop($info, $dotop, $user, $douser) if ($who == false) { $top .= '"; - } - else - { - $ret .= "
'; - $top .= ' $item) { - foreach ($submenus as $submenu => $item) - $ret .= "
'; + $ret .= ''; } $ret .= "\n"; return $ret;