diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-06-01 23:00:08 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-06-02 20:12:49 +0200 |
commit | af427a992a96519c00ac9f98db8745f9fc1198fb (patch) | |
tree | 36f69164b289ce2405419f3946b7af0ba8f8b08e /tools/infra-dashboard/js/script.js | |
parent | 43b44d05ed662d7e9e4f0a66b5f1744685d7b5cc (diff) |
OPNFV Infra Dashboard
JIRA: RELENG-12
Change-Id: I7451a3d234e4e5d946cdb905d5720be6159b6544
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'tools/infra-dashboard/js/script.js')
-rw-r--r-- | tools/infra-dashboard/js/script.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/infra-dashboard/js/script.js b/tools/infra-dashboard/js/script.js new file mode 100644 index 00000000..07c832a2 --- /dev/null +++ b/tools/infra-dashboard/js/script.js @@ -0,0 +1,27 @@ +jQuery(document).ready(function () { + // If svg is not supported + if (!Modernizr.svg) { + jQuery('img[src$=".svg"]').each(function() { + jQuery(this).attr('src', jQuery(this).attr('src').replace('.svg', '.png')); + }); + } + // If media queries are not supported + if(!Modernizr.mq('only all')) { + jQuery('head').append('<link id="no-mq" rel="stylesheet" type="text/css">'); + jQuery("link#no-mq").attr("href", "/joomla/media/templates/highsoft_bootstrap/css/ie.css"); + } + // Sidebar click animation + jQuery('.nav-sidebar > li').click(function () { + if (!jQuery(this).hasClass("active")) { + jQuery('.nav-sidebar > li.active > div.active').removeClass('active'); + jQuery('.nav-sidebar > li.active > ul').slideUp("slow"); + jQuery('.nav-sidebar > li.active').removeClass('active'); + jQuery(this).addClass("active"); + jQuery('.nav-sidebar > li.active > ul').slideDown("slow"); + jQuery('.nav-sidebar > li.active > div').addClass('active'); + } + }); + jQuery("#sidebar-toggle").click(function (e) { + jQuery("#wrap").toggleClass("toggled"); + }); +});
\ No newline at end of file |