Browse Source

workaround for up folder

tags/1.0.0
Robin Thoni 8 years ago
parent
commit
dd928be427

+ 5
- 5
app/app.js View File

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

+ 2
- 1
app/controllers/home.controller.js View File

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

+ 1
- 1
app/views/sidebar.html View File

26
                 <ul class="col-sm-12 sidebar-group-list">
26
                 <ul class="col-sm-12 sidebar-group-list">
27
                     <li ng-show="DataShareBusiness.CurrentGroups.length != 0" class="col-xs-12">
27
                     <li ng-show="DataShareBusiness.CurrentGroups.length != 0" class="col-xs-12">
28
                         <md-button class="md-primary md-hue-1 md-group-button col-xs-12"
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
                         </md-button>
31
                         </md-button>
32
                     </li>
32
                     </li>

+ 1
- 1
app/views/toolbar.html View File

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

+ 3
- 3
sdk/Business/DataShareBusiness.js View File

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

Loading…
Cancel
Save