source: src/mapservice-webclient/dist/webclient/gnuboat.js@ f8bfdce

debian/bullseye
Last change on this file since f8bfdce was 2edb5e7, checked in by Joachim Langenbach <joachim.langenbach@…>, 6 years ago

Added build mapservice-webclient

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2
3 Copyright (C) 2016 - 2020 EngSaS - Langenbach. All rights reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 MA 02110-1301 USA.
19
20*/
21
22/** @namespace GnuBoat JavaScript namespace */
23var GnuBoat = GnuBoat || {};
24
25/**
26 * @brief Used to display user messages
27 */
28GnuBoat.displayMessage = function(text)
29{
30 $("#message").empty();
31 $(text).appendTo("#message");
32 location.hash = "#messages";
33 $('#message').show();
34 setTimeout(function(){ $('#message').hide(); }, 60000);
35}
36
37GnuBoat.menuSetup = function()
38{
39 var active = 'active';
40 var layout = null;
41 var menu = null;
42 var menuLink = null;
43 var content = null;
44
45 function toggleAll() {
46 layout.toggleClass(active);
47 menu.toggleClass(active);
48 menuLink.toggleClass(active);
49 }
50
51 $(document).ready(function () {
52 layout = $("#layout");
53 menu = $("#menu");
54 menuLink = $("#menuLink");
55 content = $("#main");
56
57 menuLink.click(function () {
58 toggleAll();
59 });
60
61 content.click(function() {
62 if (menu.hasClass(active)) {
63 toggleAll();
64 }
65 });
66 });
67}
68
69;
Note: See TracBrowser for help on using the repository browser.