Changeset 12778 for branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/groups
- Timestamp:
- 07/20/15 13:49:39 (9 years ago)
- 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 224 224 <label for="fromDate">To: </label> 225 225 <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"/> 227 227 <span class="input-group-btn"> 228 228 <button type="button" class="btn btn-default" ng-click="openToDateSelection($event)"><i class="glyphicon glyphicon-calendar"></i></button> 229 229 </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> 230 243 </div> 231 244 </div> -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/groups/details/groupDetailsCtrl.js
r12551 r12778 104 104 $scope.toIsOpen = false; 105 105 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 106 139 $scope.openFromDateSelection = function ($event) { 107 140 $event.preventDefault(); … … 109 142 $scope.toIsOpen = false; 110 143 $scope.fromIsOpen = true; 144 $scope.curQuickSelection = $scope.quickSelectionList[0]; 111 145 }; 112 146 … … 116 150 $scope.fromIsOpen = false; 117 151 $scope.toIsOpen = true; 152 $scope.curQuickSelection = $scope.quickSelectionList[0]; 118 153 }; 119 154
Note: See TracChangeset
for help on using the changeset viewer.