Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/01/15 14:59:47 (10 years ago)
Author:
ascheibe
Message:

#2394 merged r12428, r12429, r12430, r12435, r12442, r12443, r12445, r12514, r12517, r12519, r12520, r12521, r12523, r12532, r12542, r12546, r12552, r12553, r12556, r12557, r12559, r12561, r12146, r12457 into stable

Location:
stable
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Services.WebApp/3.3/WebApp/shared/directives/flot.js

    r12428 r12563  
    66            link: function (scope, element, attrs) {
    77                var chart = null, opts = scope[attrs.options];
     8                var div = null;
    89
    910                scope.$watchCollection(attrs.dataset, function (newData, oldData) {
    1011                    if (!chart) {
    11                         var div = element.append("<div>");
     12                        div = element.append("<div>");
    1213                        div.bind("plotselected", function (event, ranges) {
    1314                            $.each(chart.getXAxes(), function (_, axis) {
  • stable/HeuristicLab.Services.WebApp/3.3/WebApp/shared/layout/layout.cshtml

    r12428 r12563  
    1 @using HeuristicLab.Services.WebApp.Configs
     1@* HeuristicLab
     2 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 *
     4 * This file is part of HeuristicLab.
     5 *
     6 * HeuristicLab is free software: you can redistribute it and/or modify
     7 * it under the terms of the GNU General Public License as published by
     8 * the Free Software Foundation, either version 3 of the License, or
     9 * (at your option) any later version.
     10 *
     11 * HeuristicLab is distributed in the hope that it will be useful,
     12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14 * GNU General Public License for more details.
     15 *
     16 * You should have received a copy of the GNU General Public License
     17 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     18*@
     19
     20@using HeuristicLab.Services.WebApp.Configs
    221<!DOCTYPE html>
    322<html lang="en" ng-app="app">
     
    1534    <![endif]-->
    1635    @Scripts.Render("~/Bundles/Vendors/js")
    17     @{
    18         BundleTable.EnableOptimizations = false;
     36    @foreach (var script in BundleConfig.GetWebAppScripts()) {
     37        <script src="@script"></script>
    1938    }
    20     @Scripts.Render("~/Bundles/WebApp/js")
    21     @{
    22         BundleTable.EnableOptimizations = true;
    23     }
     39
     40    @Scripts.Render("~/Bundles/WebApp/Shared")
    2441</head>
    25 <body>
    26     <div id="app">
    27         <header id="toolbar" class="navbar navbar-default navbar-static-top no-border no-padding-margin"
    28                 ng-controller="app.menu.ctrl">
    29             <nav>
    30                 <div class="container-fluid">
    31                     <div class="navbar-header">
    32                         <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-navbar">
     42<body ngcloak>
     43<div id="app">
     44    <header id="toolbar" class="navbar navbar-default navbar-static-top no-border no-padding-margin"
     45            ng-controller="app.menu.ctrl">
     46        <nav>
     47            <div class="container-fluid">
     48                <div class="navbar-header">
     49                    <div class="center-block">
     50                        <a class="navbar-brand" href="#">
     51                            <img src="~/WebApp/shared/images/HeuristicLab-Logo.png" style="float: left; height: 100%; margin-right: 5px;"/>
     52                            <span style="color: #f7921d">HeuristicLab</span>
     53                        </a>
     54                        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#menu .navbar-collapse">
    3355                            <span class="sr-only">Toggle navigation</span>
    3456                            <span class="icon-bar"></span>
     
    3658                            <span class="icon-bar"></span>
    3759                        </button>
    38                         <a class="navbar-brand" href="#">
    39                             <img src="~/WebApp/shared/images/HeuristicLab-Logo.png" style="float: left; height: 100%; margin-left: 25px; margin-right: 5px;" />
    40                             Heuristic<span style="color: #f7921d">Lab</span>
    41                         </a>
    42                     </div>
    43 
    44                     <div class="collapse navbar-collapse" id="top-navbar">
    45                         <ul class="nav navbar-nav navbar-right">
    46                             @if (Request.IsAuthenticated) {
    47                                 <li>
    48                                     <p class="navbar-text">Hello @User.Identity.Name!</p>
    49                                 </li>
    50                                 <li>
    51                                     <a ng-href="" data-ng-click="logout()">Logout</a>
    52                                 </li>
    53                             } else {
    54                                 <li>
    55                                     <a ng-href="#/login">Login</a>
    56                                 </li>
    57                             }
    58                         </ul>
    5960                    </div>
    6061                </div>
    61             </nav>
    62         </header>
    6362
    64         <aside id="menu" ng-controller="app.menu.ctrl">
     63                <div class="navbar-content">
     64                    <ul class="nav navbar-nav navbar-right">
     65                        @if (Request.IsAuthenticated)
     66                        {
     67                            <li>
     68                                <span class="navbar-text">Hello @User.Identity.Name!</span>
     69                            </li>
     70                            <li>
     71                                <a ng-href="" data-ng-click="logout()">Logout</a>
     72                            </li>
     73                        }
     74                        else
     75                        {
     76                            <li>
     77                                <a ng-href="#/login" data-ng-click="hideMenu()">Login</a>
     78                            </li>
     79                        }
     80                    </ul>
     81                </div>
     82            </div>
     83        </nav>
     84    </header>
     85
     86    <aside id="menu" ng-controller="app.menu.ctrl">
     87        <div class="navbar-collapse collapse">
    6588            <ul class="nav nav-sidebar"
    6689                ng-include="'App/LoadSharedView?directory=menu&view=menu.cshtml&dateTime=@DateTime.Now'"
    6790                ng-init="entries = menuEntries;"></ul>
    68         </aside>
     91        </div>
     92    </aside>
    6993
    70         <section id="view">
    71             <ui-view/>
    72         </section>
    73     </div>
     94    <section id="view">
     95        <ui-view/>
     96    </section>
     97</div>
     98<script type="text/javascript">
     99$('.navbar-collapse').on('click', 'li a', function () {
     100    $('.navbar-collapse').collapse('hide');
     101});
     102</script>
    74103</body>
    75104</html>
  • stable/HeuristicLab.Services.WebApp/3.3/WebApp/shared/menu/menuCtrl.js

    r12428 r12563  
    77            $scope.menuEntries = app.getMenu().getMenuEntries();
    88            $scope.isActive = function (viewLocation) {
    9                 var loc = viewLocation.toUpperCase().substr(1);
    10                 var actualLocation = $location.path().toUpperCase();
    11                 var splitLoc = loc.split("/");
    12                 if (splitLoc.length <= 2) {
    13                     var actualLocationSplit = actualLocation.split("/");
    14                     if (actualLocationSplit.length > 1) {
    15                         if (splitLoc[1] == actualLocationSplit[1]) {
    16                             return true;
     9                var linkLocation = viewLocation.toUpperCase().substr(1);
     10                var currentLocation = $location.path().toUpperCase();
     11                if (linkLocation == currentLocation) {
     12                    return true;
     13                }
     14                var linkLocationParts = linkLocation.split("/");
     15                var currentLocationParts = currentLocation.split("/");
     16                var linkLocationPartsLength = linkLocationParts.length;
     17                if (linkLocationPartsLength < currentLocationParts.length) {
     18                    for (var i = 0; i < linkLocationPartsLength; ++i) {
     19                        if (linkLocationParts[i] !== currentLocationParts[i]) {
     20                            return false;
    1721                        }
    1822                    }
     23                    return true;
    1924                }
    20                 return $location.path().toUpperCase() == loc;
     25                return false;
    2126            };
    2227
    23             $scope.logout = function() {
    24                 authService.logout({}, function() {
     28            $scope.logout = function () {
     29                authService.logout({}, function () {
    2530                    $window.location.hash = "";
    2631                    $window.location.reload();
    2732                });
    2833            };
     34
     35            $scope.hideMenu = function () {
     36                $(".navbar-collapse").collapse('hide');
     37            };
    2938        }]
    3039    );
Note: See TracChangeset for help on using the changeset viewer.