diff --git a/config.default.php b/config.default.php index 59c602b3..e2f65ac5 100644 --- a/config.default.php +++ b/config.default.php @@ -220,6 +220,11 @@ if (!defined('TAB_INFO')) define('TAB_INFO', true); */ if (!defined('HEADER_EXPANDER')) define('HEADER_EXPANDER', false); +/** + * Enable a header expander for the main page to shrink/expand when clicking on an arrow? + */ +if (!defined('HEADER_EXPANDER_MANUAL')) define('HEADER_EXPANDER_MANUAL', false); + /** * Define how many minutes between each system sort (defaults to 5 as this is a common interval for appointments) */ diff --git a/css/index.css b/css/index.css index 6597b1e8..0b0aa809 100644 --- a/css/index.css +++ b/css/index.css @@ -1,3 +1,13 @@ +.headerexpand { + text-align: center; + position: absolute; + height: 20px; + bottom: 0px; + width: 100%; +} +#headerexpandimage { + height: 20px; +} .box { margin: 8px; } diff --git a/images/arrow-down-2.png b/images/arrow-down-2.png new file mode 100644 index 00000000..17b92877 Binary files /dev/null and b/images/arrow-down-2.png differ diff --git a/images/arrow-up-2.png b/images/arrow-up-2.png new file mode 100644 index 00000000..1b90617f Binary files /dev/null and b/images/arrow-up-2.png differ diff --git a/index.php b/index.php index 8a60d890..24d7a8fa 100644 --- a/index.php +++ b/index.php @@ -111,7 +111,15 @@ if (AUTO_LOGOUT_MINUTES !== false) } if (HEADER_EXPANDER) +{ $js[] = "js/headerexpand.js"; + $js[] = "js/headerexpandauto.js"; +} +else if (HEADER_EXPANDER_MANUAL) +{ + $js[] = "js/headerexpand.js"; + $js[] = "js/headerexpandmanual.js"; +} xhtml_head(T_("queXS"), $body, array("css/index.css","css/tabber.css","include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css") , $js); print $script; @@ -124,6 +132,7 @@ print $script;
+
<? echo T_('/>
diff --git a/js/headerexpand.js b/js/headerexpand.js index 556730ab..1683d31e 100644 --- a/js/headerexpand.js +++ b/js/headerexpand.js @@ -1,21 +1,16 @@ -//Apply to all items of class header -$(document).ready(function(){ - $(".header").hover( - //function on mouse over - function(){ - $(".header").css("height","30%"); - $(".content").css("height","70%"); - $(".content").css("top","30%"); - $(".box:not(.important)").css("display",""); - }, +function headerexpand() +{ + $(".header").css("height","30%"); + $(".content").css("height","70%"); + $(".content").css("top","30%"); + $(".box:not(.important)").css("display",""); +} - //function on mouse out - function(){ - $(".header").css("height","5%"); - $(".content").css("height","95%"); - $(".content").css("top","5%"); - $(".box:not(.important)").css("display","none"); - } - ); +function headercontract() +{ + $(".header").css("height","5%"); + $(".content").css("height","95%"); + $(".content").css("top","5%"); + $(".box:not(.important)").css("display","none"); - }); +} diff --git a/js/headerexpandauto.js b/js/headerexpandauto.js new file mode 100644 index 00000000..65e2f4b6 --- /dev/null +++ b/js/headerexpandauto.js @@ -0,0 +1,11 @@ +//Apply to all items of class header +$(document).ready(function(){ + $(".header").hover( + //function on mouse over + headerexpand, + + //function on mouse out + headercontract + ); + + }); diff --git a/js/headerexpandmanual.js b/js/headerexpandmanual.js new file mode 100644 index 00000000..694cea29 --- /dev/null +++ b/js/headerexpandmanual.js @@ -0,0 +1,20 @@ +//Apply to all items of class header +$(document).ready(function(){ + $("#headerexpandimage").click(headertogglemanual); + + }); + +function headertogglemanual() +{ + if ($("#headerexpandimage").attr('src') == './images/arrow-up-2.png') + { + $("#headerexpandimage").attr('src',"./images/arrow-down-2.png"); + headercontract(); + } + else + { + $("#headerexpandimage").attr('src',"./images/arrow-up-2.png"); + headerexpand(); + } + +}