/* Copyright (C) 2016 - 2020 EngSaS - Langenbach. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /** @namespace GnuBoat JavaScript namespace */ var GnuBoat = GnuBoat || {}; /** * @brief Used to display user messages */ GnuBoat.displayMessage = function(text) { $("#message").empty(); $(text).appendTo("#message"); location.hash = "#messages"; $('#message').show(); setTimeout(function(){ $('#message').hide(); }, 60000); } GnuBoat.menuSetup = function() { var active = 'active'; var layout = null; var menu = null; var menuLink = null; var content = null; function toggleAll() { layout.toggleClass(active); menu.toggleClass(active); menuLink.toggleClass(active); } $(document).ready(function () { layout = $("#layout"); menu = $("#menu"); menuLink = $("#menuLink"); content = $("#main"); menuLink.click(function () { toggleAll(); }); content.click(function() { if (menu.hasClass(active)) { toggleAll(); } }); }); } ;