index.html 3.57 KB
Newer Older
1
<!DOCTYPE html>
Giorgos Korfiatis's avatar
Giorgos Korfiatis committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!--
Copyright (C) 2015 GRNET S.A.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
Efthymia Bika's avatar
Efthymia Bika committed
18
<html>
Efthymia Bika's avatar
Efthymia Bika committed
19 20 21 22 23 24 25 26
    <head>
        <title>BaaS GUI</title>
        <link rel="stylesheet" href="static/stylesheets/foundation.css" />
        <link rel="stylesheet" href="static/stylesheets/font-awesome-4.4.0/css/font-awesome.min.css" />
        <link rel="stylesheet" href="static/stylesheets/custom.css" />
        <script src="static/js/vendor/jquery.js"></script>
        <script src="static/js/vendor/modernizr.js"></script>
        <script src="config.js"></script>
Efthymia Bika's avatar
Efthymia Bika committed
27 28 29 30
        <script src="backup.js"></script>
        <script src="dup_calls.js"></script>
        <script src="timeview.js"></script>

Efthymia Bika's avatar
Efthymia Bika committed
31
        <script type="text/javascript">
Efthymia Bika's avatar
Efthymia Bika committed
32
            create_baas_dir();
Efthymia Bika's avatar
Efthymia Bika committed
33 34
            var gui = require('nw.gui');
            var win = gui.Window.get();
Efthymia Bika's avatar
Efthymia Bika committed
35 36 37 38 39 40 41 42 43 44 45

            // check operating system for the menu
            if (process.platform === "darwin") {
                var nativeMenuBar = new gui.Menu({
                                type: "menubar"
                                    });
                nativeMenuBar.createMacBuiltin("BaaS");
                win.menu = nativeMenuBar;
            }

            // actually assign menu to window
Efthymia Bika's avatar
Efthymia Bika committed
46 47
            win.resizeTo(900, 750);
            win.focus();
Efthymia Bika's avatar
Efthymia Bika committed
48

Efthymia Bika's avatar
Efthymia Bika committed
49 50 51 52 53 54 55 56 57 58 59 60 61
            $(document).ready(function() {
                $("#activity-link").trigger("click").addClass("active");
            });

            function activate_tab(tab) {
                $(".item").each(function() {
                    if(this.id == tab) {
                        $(this).addClass("active");
                    } else {
                        $(this).removeClass("active");
                    }
                });
            }
Efthymia Bika's avatar
Efthymia Bika committed
62 63 64 65
        </script>
    </head>

    <body>
66
        <div class="blue-bar icon-bar four-up">
Efthymia Bika's avatar
Efthymia Bika committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
            <a class="item" id="activity-link"
                onclick="$('#main').load('activity.html');
                activate_tab(this.id);">
                <i class="fa fa-tasks"></i>
                <label>Activity</label>
            </a>
            <a class="item" id="backup-tab-link"
                onclick="$('#main').load('backup-list.html');
                activate_tab(this.id)">
                <i class="fa fa-upload"></i>
                <label>Backup</label>
            </a>
            <a class="item" id="restore-tab-link"
                onclick="$('#main').load('restore.html');
                activate_tab(this.id)">
                <i class="fa fa-download"></i>
                <label>Restore</label>
            </a>
            <a class="item" id="cloud-settings-link"
                onclick="$('#main').load('cloud-list.html');
                activate_tab(this.id);">
                <i class="fa fa-cloud"></i>
                <label>Cloud Settings</label>
            </a>
91
        </div>
Efthymia Bika's avatar
Efthymia Bika committed
92 93 94 95 96 97 98
        <div id="main"></div>

        <script src="static/js/foundation.min.js"></script>
        <script type="text/javascript">
            $(document).foundation();
        </script>
    </body>
99
</html>