Procházet zdrojové kódy

added previous/next week buttons

tags/1.0.0
Robin Thoni před 8 roky
rodič
revize
6af3d5af19

+ 6
- 0
app/controllers/home.controller.js Zobrazit soubor

@@ -162,5 +162,11 @@ angular.module('app')
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 171
             $scope.setDates($scope.getMonday($scope.selectedDate));
166 172
     }]);

+ 5
- 0
app/controllers/sidebar.controller.js Zobrazit soubor

@@ -47,4 +47,9 @@ angular.module('app')
47 47
                     DataShareBusiness.setCurrentGroup(group);
48 48
                 }
49 49
             };
50
+
51
+            $scope.findFreeRoom = function()
52
+            {
53
+
54
+            };
50 55
         }]);

+ 13
- 1
app/views/home.html Zobrazit soubor

@@ -11,7 +11,19 @@
11 11
     <div lu-busy="coursesView" class="col-xs-12 seven-cols">
12 12
 
13 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 27
         </div>
16 28
 
17 29
         <div class="col-xs-1 hour-column">

+ 5
- 0
app/views/sidebar.html Zobrazit soubor

@@ -42,6 +42,11 @@
42 42
                     </md-button>
43 43
                 </li>
44 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 50
         </div>
46 51
     </md-content>
47 52
 </md-sidenav>

Načítá se…
Zrušit
Uložit