Changeset 12685 for stable/HeuristicLab.Services.WebApp.Status/3.3/WebApp
- Timestamp:
- 07/08/15 14:10:49 (9 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12583,12666
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Services.WebApp.Status/3.3/WebApp/history/history.cshtml
r12563 r12685 24 24 <label for="fromDate">To: </label> 25 25 <div class="input-group"> 26 <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" 26 <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"/> 27 27 <span class="input-group-btn"> 28 28 <button type="button" class="btn btn-default" ng-click="openToDateSelection($event)"><i class="glyphicon glyphicon-calendar"></i></button> 29 29 </span> 30 </div> 31 </div> 32 <div class="form-group" style="margin-left: 5px; margin-right: 5px;"> 33 <div class="btn-group" dropdown dropdown-append-to-body> 34 <button type="button" class="btn btn-default dropdown-toggle" dropdown-toggle style="width: 130px; text-align: left;"> 35 <span class="text-left" style="display: inline-block; width: 85px;">{{curQuickSelection.name}}</span> 36 <span class="glyphicon glyphicon-chevron-down" style="margin-top: 3px;"></span> 37 </button> 38 <ul class="dropdown-menu" role="menu"> 39 <li ng-repeat="quickSelection in quickSelectionList"> 40 <a ng-click="changeQuickSelection(quickSelection)">{{quickSelection.name}}</a> 41 </li> 42 </ul> 30 43 </div> 31 44 </div> -
stable/HeuristicLab.Services.WebApp.Status/3.3/WebApp/history/historyCtrl.js
r12563 r12685 47 47 $scope.toIsOpen = false; 48 48 49 $scope.quickSelectionList = [ 50 { id: 0, name: 'Custom' }, 51 { id: 1, name: 'Today' }, 52 { id: 2, name: 'Yesterday' }, 53 { id: 3, name: 'Last 7 Days' }, 54 { id: 4, name: 'Last 30 Days' } 55 ]; 56 $scope.changeQuickSelection = function (quickSelection) { 57 var today = new Date(); 58 var oneDayInMs = 24 * 60 * 60 * 1000; 59 switch (quickSelection.id) { 60 case 1: 61 $scope.fromDate = new Date(today.valueOf()); 62 $scope.toDate = new Date(today.valueOf()); 63 break; 64 case 2: 65 $scope.fromDate = new Date(today.valueOf() - oneDayInMs); 66 $scope.toDate = new Date(today.valueOf() - oneDayInMs); 67 break; 68 case 3: 69 $scope.fromDate = new Date(today.valueOf() - (7 * oneDayInMs)); 70 $scope.toDate = new Date(today.valueOf()); 71 break; 72 case 4: 73 $scope.fromDate = new Date(today.valueOf() - (30 * oneDayInMs)); 74 $scope.toDate = new Date(today.valueOf()); 75 break; 76 } 77 $scope.curQuickSelection = quickSelection; 78 }; 79 // set default 'today' 80 $scope.changeQuickSelection($scope.quickSelectionList[1]); 81 49 82 $scope.openFromDateSelection = function ($event) { 50 83 $event.preventDefault(); … … 52 85 $scope.toIsOpen = false; 53 86 $scope.fromIsOpen = true; 87 $scope.curQuickSelection = $scope.quickSelectionList[0]; 54 88 }; 55 89 … … 59 93 $scope.fromIsOpen = false; 60 94 $scope.toIsOpen = true; 95 $scope.curQuickSelection = $scope.quickSelectionList[0]; 61 96 }; 62 97
Note: See TracChangeset
for help on using the changeset viewer.