Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/20/15 13:49:39 (9 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.WebApp.Statistics-3.3:

  • Added QuickSelection button to the client and group pag

HeuristicLab.Services.WebApp-3.3:
HeuristicLab.Services.WebApp.Statistics-3.3:

  • Changed 'User Name' to 'Username' to be consistent throughout the whole WebApp
Location:
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/groups/details
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/groups/details/groupDetails.cshtml

    r12551 r12778  
    224224             <label for="fromDate">To:&nbsp;</label>
    225225             <div class="input-group">
    226                  <input id="fromDate" type="text" class="form-control" datepicker-popup="dd.MM.yyyy" ng-model="toDate" is-open="toIsOpen" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
     226                 <input id="fromDate" type="text" class="form-control" datepicker-popup="dd.MM.yyyy" ng-model="toDate" is-open="toIsOpen" datepicker-options="dateOptions" ng-required="true" close-text="Close"/>
    227227                 <span class="input-group-btn">
    228228                     <button type="button" class="btn btn-default" ng-click="openToDateSelection($event)"><i class="glyphicon glyphicon-calendar"></i></button>
    229229                 </span>
     230             </div>
     231         </div>
     232         <div class="form-group" style="margin-left: 5px; margin-right: 5px;">
     233             <div class="btn-group" dropdown dropdown-append-to-body>
     234                 <button type="button" class="btn btn-default dropdown-toggle" dropdown-toggle style="width: 130px; text-align: left;">
     235                     <span class="text-left" style="display: inline-block; width: 85px;">{{curQuickSelection.name}}</span>
     236                     <span class="glyphicon glyphicon-chevron-down" style="margin-top: 3px;"></span>
     237                 </button>
     238                 <ul class="dropdown-menu" role="menu">
     239                     <li ng-repeat="quickSelection in quickSelectionList">
     240                         <a class="cursor-pointer" ng-click="changeQuickSelection(quickSelection)">{{quickSelection.name}}</a>
     241                     </li>
     242                 </ul>
    230243             </div>
    231244         </div>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/groups/details/groupDetailsCtrl.js

    r12551 r12778  
    104104            $scope.toIsOpen = false;
    105105
     106            $scope.quickSelectionList = [
     107                { id: 0, name: 'Custom' },
     108                { id: 1, name: 'Today' },
     109                { id: 2, name: 'Yesterday' },
     110                { id: 3, name: 'Last 7 Days' },
     111                { id: 4, name: 'Last 30 Days' }
     112            ];
     113            $scope.changeQuickSelection = function (quickSelection) {
     114                var today = new Date();
     115                var oneDayInMs = 24 * 60 * 60 * 1000;
     116                switch (quickSelection.id) {
     117                    case 1:
     118                        $scope.fromDate = new Date(today.valueOf());
     119                        $scope.toDate = new Date(today.valueOf());
     120                        break;
     121                    case 2:
     122                        $scope.fromDate = new Date(today.valueOf() - oneDayInMs);
     123                        $scope.toDate = new Date(today.valueOf() - oneDayInMs);
     124                        break;
     125                    case 3:
     126                        $scope.fromDate = new Date(today.valueOf() - (7 * oneDayInMs));
     127                        $scope.toDate = new Date(today.valueOf());
     128                        break;
     129                    case 4:
     130                        $scope.fromDate = new Date(today.valueOf() - (30 * oneDayInMs));
     131                        $scope.toDate = new Date(today.valueOf());
     132                        break;
     133                }
     134                $scope.curQuickSelection = quickSelection;
     135            };
     136            // set default 'today'
     137            $scope.changeQuickSelection($scope.quickSelectionList[1]);
     138
    106139            $scope.openFromDateSelection = function ($event) {
    107140                $event.preventDefault();
     
    109142                $scope.toIsOpen = false;
    110143                $scope.fromIsOpen = true;
     144                $scope.curQuickSelection = $scope.quickSelectionList[0];
    111145            };
    112146
     
    116150                $scope.fromIsOpen = false;
    117151                $scope.toIsOpen = true;
     152                $scope.curQuickSelection = $scope.quickSelectionList[0];
    118153            };
    119154
Note: See TracChangeset for help on using the changeset viewer.