Переглянути джерело

workaround for up folder

tags/1.0.0
Robin Thoni 8 роки тому
джерело
коміт
dd928be427

+ 5
- 5
app/app.js Переглянути файл

@@ -14,27 +14,27 @@ var app = angular.module('app', [
14 14
 app.config(['$stateProvider', '$urlRouterProvider',
15 15
     function($stateProvider, $urlRouterProvider) {
16 16
 
17
-        $stateProvider.state('home',{
18
-            url:'/?group',
17
+        $stateProvider.state('home', {
18
+            url:'/groups?group',
19 19
             reloadOnSearch: false,
20 20
             templateUrl:'views/home.html',
21 21
             controller:'HomeController'
22 22
         });
23 23
 
24
-        $stateProvider.state('rooms',{
24
+        $stateProvider.state('rooms', {
25 25
             url:'/rooms?group',
26 26
             reloadOnSearch: false,
27 27
             templateUrl:'views/home.html',
28 28
             controller:'HomeController'
29 29
         });
30 30
 
31
-        $stateProvider.state('freeroom',{
31
+        $stateProvider.state('freeroom', {
32 32
             url:'/freeroom',
33 33
             templateUrl:'views/freeroom.html',
34 34
             controller:'FreeRoomController'
35 35
         });
36 36
 
37
-        $urlRouterProvider.otherwise('/');
37
+        $urlRouterProvider.otherwise('/groups');
38 38
 
39 39
     }])
40 40
     .directive('dateNow', ['$filter', function($filter) {

+ 2
- 1
app/controllers/home.controller.js Переглянути файл

@@ -122,7 +122,8 @@ angular.module('app')
122 122
                 if (group != null && $scope.getSheetCount() < 5) {
123 123
                     var promiseLoadCourses = {
124 124
                         id: "promiseLoadCourses",
125
-                        groups: ["coursesView"]
125
+                        groups: ["coursesView"],
126
+                        loaderGroups: ["sidebar"]
126 127
                     };
127 128
                     if ($scope.weekId.id == null) {
128 129
                         WeeksBusiness.getCurrentWeek({group_id: group.Id, type_id: group.Type}, promiseLoadCourses)

+ 1
- 1
app/views/sidebar.html Переглянути файл

@@ -26,7 +26,7 @@
26 26
                 <ul class="col-sm-12 sidebar-group-list">
27 27
                     <li ng-show="DataShareBusiness.CurrentGroups.length != 0" class="col-xs-12">
28 28
                         <md-button class="md-primary md-hue-1 md-group-button col-xs-12"
29
-                                   ui-sref="{{getStateName()}}({group: DataShareBusiness.getSearchString(DataShareBusiness.getCurrentGroup().Parent)})">
29
+                                   ng-click="DataShareBusiness.upCurrentGroup()">
30 30
                             ..
31 31
                         </md-button>
32 32
                     </li>

+ 1
- 1
app/views/toolbar.html Переглянути файл

@@ -4,7 +4,7 @@
4 4
             <md-icon md-svg-icon="img/menu.svg"></md-icon>
5 5
         </md-button>
6 6
         <h2 ng-show="isInState('home') || isInState('rooms')">
7
-            <a ui-sref="{{getStateName()}}">{{ DataShareBusiness.SearchSeparator }} </a>
7
+            {{ DataShareBusiness.SearchSeparator }}
8 8
             <a ui-sref="{{getStateName()}}({group: DataShareBusiness.getSearchString(group)})" ng-repeat="group in DataShareBusiness.CurrentGroups">
9 9
                 {{ group.Name }}{{ $last ? "" : " " + DataShareBusiness.SearchSeparator + " " }}
10 10
             </a>

+ 3
- 3
sdk/Business/DataShareBusiness.js Переглянути файл

@@ -10,7 +10,7 @@
10 10
 
11 11
                 Rooms: null,
12 12
 
13
-                SearchSeparator: "|",
13
+                SearchSeparator: "~",
14 14
 
15 15
                 CurrentGroups: [],
16 16
 
@@ -100,10 +100,10 @@
100 100
                 upCurrentGroup: function()
101 101
                 {
102 102
                     if (data.CurrentGroups.length > 1) {
103
-                        data.setCurrentGroup(data.CurrentGroups[data.CurrentGroups.length - 2]);
103
+                        data.goToGroup(data.CurrentGroups[data.CurrentGroups.length - 2]);
104 104
                     }
105 105
                     else if (data.CurrentGroups.length == 1) {
106
-                        data.setCurrentGroup(null);
106
+                        data.goToGroup(null);
107 107
                     }
108 108
                 }
109 109
             };

Завантаження…
Відмінити
Зберегти