- Timestamp:
- 04/26/16 11:30:46 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Hubs/CalendarHubber.js
r13782 r13795 14 14 vm.alertMessage = "No alerts"; 15 15 vm.currentcal = []; 16 $scope.permission = false; 16 17 vm.selectedEventId = -1; 17 18 vm.groups = []; … … 27 28 hubber.server.requestInfo(); 28 29 }); 29 hubber.client.processData = function (data ) {30 hubber.client.processData = function (data, users, groups) { 30 31 vm.data = JSON.parse(data); 32 vm.permUsers = JSON.parse(users); 33 vm.permGroups = JSON.parse(groups); 31 34 $scope.buildTree(); 32 35 33 36 $scope.$apply(); 34 37 }; … … 48 51 $scope.$apply(); 49 52 } 53 hubber.client.processPermissions = function (id, perm) { 54 var json = JSON.parse(perm); 55 56 $scope.treeview.currentNode.permissions = json; 57 refreshPermissions(); 58 $scope.permissionLoader = false; 59 $scope.$apply(); 60 } 50 61 hubber.client.processDowntime = function (id, down) { 51 62 var json = JSON.parse(down); … … 91 102 $(".selected.ng-binding").addClass('loaded'); 92 103 $scope.selectedEventId = -1; 104 93 105 if ($scope.treeview.currentNode != null && $scope.treeview.currentNode.Id != undefined) { 94 106 if ($scope.treeview.currentNode.calendar.length === 0) { 107 hubber.server.requestPermissions(vm.treeview.currentNode.Id); 95 108 hubber.server.requestDownTime(vm.treeview.currentNode.Id); 96 109 vm.permissionLoader = true; 97 110 } 98 111 else { 99 112 $timeout(function () { 113 refreshPermissions(); 100 114 $scope.currentcal = $scope.treeview.currentNode.calendar; 101 102 115 }, 0); 103 116 … … 106 119 107 120 }); 121 } 122 function refreshPermissions() { 123 for (var i = 0; i < $scope.permUsers.length; i++){ 124 $scope.permUsers[i].state = false; 125 for (var j = 0; j < $scope.treeview.currentNode.permissions.length; j++) { 126 if($scope.permUsers[i].Id === $scope.treeview.currentNode.permissions[j].GrantedUserId) 127 $scope.permUsers[i].state = true; 128 } 129 } 130 for (var i = 0; i < $scope.permGroups.length; i++) { 131 $scope.permGroups[i].state = false; 132 for (var j = 0; j < $scope.treeview.currentNode.permissions.length; j++) { 133 if ($scope.permGroups[i].Id === $scope.treeview.currentNode.permissions[j].GrantedUserId) 134 $scope.permGroups[i].state = true; 135 } 136 } 108 137 } 109 138 $scope.clearTreeSelect = function () { … … 179 208 return current; 180 209 } 181 182 210 $scope.toggleDisposable = function () { 183 211 $scope.calendarDispose = true; 184 212 hubber.server.toggleDisposable(vm.treeview.currentNode.Id); 185 213 } 186 214 $scope.pushPermissions = function () { 215 var perms = []; 216 $scope.permissionLoader = true; 217 var node = $scope.treeview.currentNode; 218 for (var i = 0; i < $scope.permGroups.length; i++) { 219 if ($scope.permGroups[i].state === true) 220 perms.push($scope.permGroups[i].Id); 221 } 222 for (var i = 0; i < $scope.permUsers.length; i++) { 223 if ($scope.permUsers[i].state === true) 224 perms.push($scope.permUsers[i].Id); 225 } 226 hubber.server.changePermissions(perms, node.Id); 227 } 187 228 function collectInfoToSave(node, refresh, last) { 188 229 var arr = node.calendar.down[0]; … … 273 314 $scope.currentcal = []; 274 315 hubber.server.requestDownTime(vm.treeview.currentNode.Id); 316 $(".selected.ng-scope").removeClass('changed'); 275 317 $(".selected.ng-binding").removeClass('changed'); 276 318 … … 293 335 function clearAllCalendarsFunc() { 294 336 $(".ng-binding.changed").removeClass('changed'); 337 $(".ng-scope.changed").removeClass('changed'); 295 338 $(".ng-binding.loaded").removeClass('loaded'); 339 $(".ng-scope.loaded").removeClass('loaded'); 296 340 $scope.selectedEventId = -1; 297 341 $scope.treeview.currentNode.calendar = null; … … 301 345 hubber.server.requestDownTime(vm.treeview.currentNode.Id); 302 346 $(".selected.ng-binding").addClass('loaded'); 347 $(".selected.ng-scope").addClass('loaded'); 303 348 } 304 349 function clearCalendarsRecurse(node) { … … 361 406 } 362 407 vm.treeview.currentNode.changes = true; 363 $(".selected .ng-binding").addClass('changed');408 $(".selected").addClass('changed'); 364 409 } 365 410 //*Add event by click -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Styling/StyleSheet.css
r13782 r13795 138 138 } 139 139 140 div[data-angular-treeview] { 141 /* prevent user selection */ 142 -moz-user-select: -moz-none; 143 -khtml-user-select: none; 144 -webkit-user-select: none; 145 -ms-user-select: none; 146 user-select: none; 147 /* default */ 148 font-family: Tahoma; 149 font-size: 13px; 150 color: #555; 151 text-decoration: none; 140 141 [animate-on-change] { 142 transition: all 1s; 143 -webkit-transition: all 1s; 152 144 } 153 145 154 div[data-tree-model] ul { 155 margin: 0; 156 padding: 0; 157 list-style: none; 158 border: none; 159 overflow: hidden; 160 } 161 162 div[data-tree-model] li { 163 position: relative; 164 padding: 0 0 0 20px; 165 line-height: 20px; 166 } 167 168 div[data-tree-model] li .expanded { 169 padding: 1px 10px; 170 background-image: url('../../wwwroot/img/computer_network-256.png'); 171 background-repeat: no-repeat; 146 [animate-on-change].changed { 147 background-color: lightblue; 148 transition: none; 149 -webkit-transition: none; 172 150 } 173 151 174 div[data-tree-model] li .collapsed{175 padding: 1px 10px;176 background-image: url('../../wwwroot/img/computer_network-256.png');177 background-repeat: no-repeat;152 [animate-on-change].changedshut { 153 background-color: lightsalmon; 154 transition: none; 155 -webkit-transition: none; 178 156 } 179 157 180 div[data-tree-model] li .normal { 181 padding: 1px 10px; 182 background-image: url('../../wwwroot/img/plainicon.com-51131-512px-515.png'); 183 background-repeat: no-repeat; 158 .panel-heading .nav-justified.nav-pills li.active>a{ 159 background-color:#74a9d8 !important; 184 160 } 185 186 div[data-tree-model] li i, div[data-tree-model] li span {187 cursor: pointer;188 }189 190 div[data-tree-model] li .selected {191 background-color: #aaddff;192 font-weight: bold;193 padding: 1px 5px;194 }195 div[data-tree-model] li .changed {196 background-color: #ffff00;197 font-weight: bold;198 padding: 1px 5px;199 }200 div[data-tree-model] li .loaded{201 text-decoration:underline;202 font-style:oblique;203 }204 [animate-on-change] {205 transition: all 1s;206 -webkit-transition: all 1s;207 }208 [animate-on-change].changed {209 background-color: lightblue;210 transition: none;211 -webkit-transition: none;212 }213 [animate-on-change].changedshut {214 background-color: lightsalmon;215 transition: none;216 -webkit-transition: none;217 } -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Styling/angular.treeview.css
r13754 r13795 1 1 div[data-angular-treeview] { 2 /* prevent user selection */ 3 -moz-user-select: -moz-none; 4 -khtml-user-select: none; 5 -webkit-user-select: none; 6 -ms-user-select: none; 7 user-select: none; 8 9 /* default */ 10 font-family: Tahoma; 11 font-size:13px; 12 color: #555; 13 text-decoration: none; 2 /* prevent user selection */ 3 4 -moz-user-select: -moz-none; 5 -khtml-user-select: none; 6 -webkit-user-select: none; 7 -ms-user-select: none; 8 user-select: none; 9 font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; 10 /* default */ 11 font-size: 14px; 12 font-weight:600; 13 color: white; 14 text-decoration: none; 15 text-shadow:1px 1px black; 14 16 } 15 17 16 18 div[data-tree-model] ul { 17 margin: 0; 18 padding: 0; 19 list-style: none; 20 border: none; 21 overflow: hidden; 19 20 padding:5px; 21 list-style: none; 22 border: none; 23 overflow: hidden; 24 border-color: lightslategray; 25 } 26 27 div[data-tree-model] li { 28 position: relative; 29 padding: 0 0 0 20px; 30 line-height: 20px; 31 margin-top:3px; 32 border: none; 33 border-color: lightblue; 34 border-radius:10px; 35 box-shadow: 2px 3px 5px rgba(0,0,0,0.6), inset 1px 10px 300px 51px rgba(33,151,184,1); 22 36 } 23 37 24 div[data-tree-model] li { 25 position: relative; 26 padding: 0 0 0 20px; 27 line-height: 20px; 28 } 38 div[data-tree-model] li .expanded { 39 padding: 1px 10px; 40 background-image: url('../img/folder.png'); 41 42 background-repeat: no-repeat; 43 } 29 44 30 div[data-tree-model] li .expanded {31 padding: 1px 10px;32 background-image: url("../img/folder.png");33 background-repeat: no-repeat;34 }45 div[data-tree-model] li .collapsed { 46 padding: 1px 10px; 47 background-image: url('../img/folder-closed.png'); 48 background-repeat: no-repeat; 49 } 35 50 36 div[data-tree-model] li .collapsed { 37 padding: 1px 10px; 38 background-image: url("../img/folder-closed.png"); 39 background-repeat: no-repeat; 40 } 51 div[data-tree-model] li .normal { 52 padding: 1px 10px; 53 color:black; 54 background-image: url('../img/file.png'); 55 background-repeat: no-repeat; 56 } 41 57 42 div[data-tree-model] li .normal { 43 padding: 1px 10px; 44 background-image: url("../img/file.png"); 45 background-repeat: no-repeat; 46 } 58 div[data-tree-model] li i, div[data-tree-model] li { 59 cursor: pointer; 60 } 47 61 48 div[data-tree-model] li i, div[data-tree-model] li span { 49 cursor: pointer; 50 } 62 div[data-tree-model] li.selected { 63 box-shadow: 2px 3px 5px rgba(0,0,0,0.6), inset 1px 10px 300px 51px rgba(143,201,58,1)!important; 64 } 65 div[data-tree-model] span.selected { 66 color:white!important; 67 text-shadow:1px 1px black!important; 68 font-weight: bold; 69 padding: 1px 5px; 70 } 51 71 52 div[data-tree-model] li .selected { 53 background-color: #aaddff; 54 font-weight: bold; 55 padding: 1px 5px; 56 } 72 div[data-tree-model] li.changed { 73 box-shadow: 2px 3px 5px rgba(0,0,0,0.6), inset 1px 10px 300px 51px rgba(250,250,210,1); 74 } 75 div[data-tree-model] span.changed { 76 color:black; 77 text-shadow:1px 1px white; 78 font-weight: bold; 79 padding: 1px 5px; 80 } 81 82 div[data-tree-model] span.loaded { 83 text-decoration: underline; 84 font-style: oblique; 85 86 }
Note: See TracChangeset
for help on using the changeset viewer.