vier mobile: prefixed transition in css, mobile-related javascript only on mobile

This commit is contained in:
fabrixxm 2015-11-12 09:30:54 +01:00
parent 54460bdf35
commit c81f63a5b3
2 changed files with 22 additions and 9 deletions

View file

@ -108,6 +108,9 @@ aside {
max-width: 400px; max-width: 400px;
width: 80%; width: 80%;
left: -100%; left: -100%;
-webkit-transition: left 0.5s;
-moz-transition: left 0.5s;
-o-transition: left 0.5s;
transition: left 0.5s; transition: left 0.5s;
} }

View file

@ -87,6 +87,15 @@ function cmtBbClose(id) {
$("#comment-edit-bb-" + id).hide(); $("#comment-edit-bb-" + id).hide();
} }
</script>
EOT;
if ($a->is_mobile || $a->is_tablet){
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() { $(document).ready(function() {
$(".mobile-aside-toggle a").click(function(e){ $(".mobile-aside-toggle a").click(function(e){
e.preventDefault(); e.preventDefault();
@ -96,9 +105,10 @@ $(document).ready(function() {
$(this).toggleClass("show"); $(this).toggleClass("show");
}); });
}); });
</script> </script>
EOT; EOT;
}
// Hide the left menu bar // Hide the left menu bar
if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications", if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",