Browse Source

added previous/next week buttons

tags/1.0.0
Robin Thoni 8 years ago
parent
commit
6af3d5af19

+ 6
- 0
app/controllers/home.controller.js View File

162
                 }
162
                 }
163
             });
163
             });
164
 
164
 
165
+            $scope.goToRelativeWeek = function(relativeWeek)
166
+            {
167
+                $scope.selectedDate.setDate($scope.selectedDate.getDate() + (relativeWeek * 7));
168
+                $scope.loadWeeks();
169
+            };
170
+
165
             $scope.setDates($scope.getMonday($scope.selectedDate));
171
             $scope.setDates($scope.getMonday($scope.selectedDate));
166
     }]);
172
     }]);

+ 5
- 0
app/controllers/sidebar.controller.js View File

47
                     DataShareBusiness.setCurrentGroup(group);
47
                     DataShareBusiness.setCurrentGroup(group);
48
                 }
48
                 }
49
             };
49
             };
50
+
51
+            $scope.findFreeRoom = function()
52
+            {
53
+
54
+            };
50
         }]);
55
         }]);

+ 13
- 1
app/views/home.html View File

11
     <div lu-busy="coursesView" class="col-xs-12 seven-cols">
11
     <div lu-busy="coursesView" class="col-xs-12 seven-cols">
12
 
12
 
13
         <div class="col-xs-12">
13
         <div class="col-xs-12">
14
-            <md-datepicker class="col-xs-2 col-xs-offset-5" ng-model="selectedDate" md-placeholder="Enter date"></md-datepicker>
14
+            <div class="col-xs-offset-4 col-xs-1">
15
+                <md-button class="md-primary md-group-button" ng-click="goToRelativeWeek(-1)">
16
+                    <
17
+                </md-button>
18
+            </div>
19
+            <div class="col-xs-2">
20
+                <md-datepicker ng-model="selectedDate" md-placeholder="Enter date"></md-datepicker>
21
+            </div>
22
+            <div class="col-xs-1">
23
+                <md-button class="md-primary md-group-button col-xs-1" ng-click="goToRelativeWeek(1)">
24
+                    >
25
+                </md-button>
26
+            </div>
15
         </div>
27
         </div>
16
 
28
 
17
         <div class="col-xs-1 hour-column">
29
         <div class="col-xs-1 hour-column">

+ 5
- 0
app/views/sidebar.html View File

42
                     </md-button>
42
                     </md-button>
43
                 </li>
43
                 </li>
44
             </ul>
44
             </ul>
45
+
46
+            <!--<span>Need a room ?</span>
47
+            <md-button class="md-primary md-group-button col-xs-12" ng-click="findFreeRoom()">
48
+                Find a free room!
49
+            </md-button>-->
45
         </div>
50
         </div>
46
     </md-content>
51
     </md-content>
47
 </md-sidenav>
52
 </md-sidenav>

Loading…
Cancel
Save