- Timestamp:
- 04/21/16 16:48:34 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/css/site.min.css
r13758 r13782 1 @import url(http://fonts.googleapis.com/css?family=Roboto:400);.wrapper,h4{text-align:center}.label,sub,sup{vertical-align:baseline}[role=button],div[data-tree-model] li i,div[data-tree-model] li span{cursor:pointer}.fc table,table{border-spacing:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body{-webkit-font-smoothing:antialiased;font:400 14px Roboto,arial,sans-serif}.container{padding:25px;position:fixed}.form-login{background-color:#EDEDED;border-radius:15px;border-color:#d2d2d2;border-width:5px;box-shadow:0 1px 0 #cfcfcf;padding:10px 20px 20px;padding:10px 20px 20px}h4{border:0 solid #fff;border-bottom-width:1px;padding-bottom:10px}.panel-warning>.panel-heading{background-image:linear-gradient(to bottom,#eb9114 0,#f1b25b 100%)!important;color:#fff!important}.panel-danger>.panel-heading{background-image:linear-gradient(to bottom,#c12e2a 0,#d9534f 100%)!important;color:#fff!important}.label-as-badge{border-radius:1em}.bar-off{fill:#c2c2d6}.bar-off:hover{fill:#e0e0eb}.bar-wait{fill:#f0a742}.bar-wait:hover{fill:#f4bd71}.bar-trans{fill:#80d4ff}.bar-trans:hover{fill:#9df}.bar-calc{fill:#2f6fa6}.bar-calc:hover{fill:#3884c7}.bar-paus{fill:#47476b}.bar-paus:hover{fill:#5c5c8a}.bar-fin{fill:#5cb85c}.bar-fin:hover{fill:#71c171}.bar-abo{fill:#c2302c}.bar-abo:hover{fill:#d54944}.bar-fail{fill:#c2302c}.bar-fail:hover{fill:#d54944}rect.selection{stroke:gray;stroke-dasharray:4px;stroke-opacity:.5;fill:transparent}svg ::selection{background:0 0}svg ::-moz-selection{background:0 0}svg ::-webkit-selection{background:0 0}.btn-danger:focus,.btn-danger:hover,.btn-default:focus,.btn-default:hover,.btn-info:focus,.btn-info:hover,.btn-primary:focus,.btn-primary:hover,.btn-success:focus,.btn-success:hover,.btn-warning:focus,.btn-warning:hover{background-position:0 -15px}div[data-tree-model] li .changed{background-color:#ff0;font-weight:700;padding:1px 5px}div[data-tree-model] li .loaded{text-decoration:underline;font-style:oblique} div[data-angular-treeview]{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:Tahoma;font-size:13px;color:#555;text-decoration:none}div[data-tree-model] ul{margin:0;padding:0;list-style:none;border:none;overflow:hidden}div[data-tree-model] li{position:relative;padding:0 0 0 20px;line-height:20px}div[data-tree-model] li .expanded{padding:1px 10px;background-image:url(../img/folder.png);background-repeat:no-repeat}div[data-tree-model] li .collapsed{padding:1px 10px;background-image:url(../img/folder-closed.png);background-repeat:no-repeat}div[data-tree-model] li .normal{padding:1px 10px;background-image:url(../img/file.png);background-repeat:no-repeat}div[data-tree-model] li .selected{background-color:#adf;font-weight:700;padding:1px 5px}/*!1 @import url(http://fonts.googleapis.com/css?family=Roboto:400);.wrapper,h4{text-align:center}.label,sub,sup{vertical-align:baseline}[role=button],div[data-tree-model] li i,div[data-tree-model] li span{cursor:pointer}.fc table,table{border-spacing:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body{-webkit-font-smoothing:antialiased;font:400 14px Roboto,arial,sans-serif}.container{padding:25px;position:fixed}.form-login{background-color:#EDEDED;border-radius:15px;border-color:#d2d2d2;border-width:5px;box-shadow:0 1px 0 #cfcfcf;padding:10px 20px 20px;padding:10px 20px 20px}h4{border:0 solid #fff;border-bottom-width:1px;padding-bottom:10px}.panel-warning>.panel-heading{background-image:linear-gradient(to bottom,#eb9114 0,#f1b25b 100%)!important;color:#fff!important}.panel-danger>.panel-heading{background-image:linear-gradient(to bottom,#c12e2a 0,#d9534f 100%)!important;color:#fff!important}.label-as-badge{border-radius:1em}.bar-off{fill:#c2c2d6}.bar-off:hover{fill:#e0e0eb}.bar-wait{fill:#f0a742}.bar-wait:hover{fill:#f4bd71}.bar-trans{fill:#80d4ff}.bar-trans:hover{fill:#9df}.bar-calc{fill:#2f6fa6}.bar-calc:hover{fill:#3884c7}.bar-paus{fill:#47476b}.bar-paus:hover{fill:#5c5c8a}.bar-fin{fill:#5cb85c}.bar-fin:hover{fill:#71c171}.bar-abo{fill:#c2302c}.bar-abo:hover{fill:#d54944}.bar-fail{fill:#c2302c}.bar-fail:hover{fill:#d54944}rect.selection{stroke:gray;stroke-dasharray:4px;stroke-opacity:.5;fill:transparent}svg ::selection{background:0 0}svg ::-moz-selection{background:0 0}svg ::-webkit-selection{background:0 0}.btn-danger:focus,.btn-danger:hover,.btn-default:focus,.btn-default:hover,.btn-info:focus,.btn-info:hover,.btn-primary:focus,.btn-primary:hover,.btn-success:focus,.btn-success:hover,.btn-warning:focus,.btn-warning:hover{background-position:0 -15px}div[data-tree-model] li .changed{background-color:#ff0;font-weight:700;padding:1px 5px}div[data-tree-model] li .loaded{text-decoration:underline;font-style:oblique}[animate-on-change]{transition:all 1s;-webkit-transition:all 1s}[animate-on-change].changed{background-color:#add8e6;transition:none;-webkit-transition:none}[animate-on-change].changedshut{background-color:#ffa07a;transition:none;-webkit-transition:none}div[data-angular-treeview]{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:Tahoma;font-size:13px;color:#555;text-decoration:none}div[data-tree-model] ul{margin:0;padding:0;list-style:none;border:none;overflow:hidden}div[data-tree-model] li{position:relative;padding:0 0 0 20px;line-height:20px}div[data-tree-model] li .expanded{padding:1px 10px;background-image:url(../img/folder.png);background-repeat:no-repeat}div[data-tree-model] li .collapsed{padding:1px 10px;background-image:url(../img/folder-closed.png);background-repeat:no-repeat}div[data-tree-model] li .normal{padding:1px 10px;background-image:url(../img/file.png);background-repeat:no-repeat}div[data-tree-model] li .selected{background-color:#adf;font-weight:700;padding:1px 5px}/*! 2 2 * Bootstrap v3.3.6 (http://getbootstrap.com) 3 3 * Copyright 2011-2015 Twitter, Inc. -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/calendarhubber.js
r13775 r13782 15 15 vm.currentcal = []; 16 16 vm.selectedEventId = -1; 17 17 vm.groups = []; 18 vm.clients = []; 18 19 vm.init = function () { 19 20 … … 33 34 }; 34 35 hubber.client.savingCurrentDone = function () { 36 vm.calendarSaver = false; 35 37 $scope.clearCurrentCalendar(); 36 38 $scope.$apply(); 37 39 }; 38 40 hubber.client.savingAllDone = function () { 41 vm.calendarSaver = false; 39 42 clearAllCalendarsFunc(); 40 43 $scope.$apply(); 41 44 }; 45 hubber.client.processDispose = function (disp) { 46 vm.treeview.currentNode.IsDisposable = disp; 47 $scope.calendarDispose = false; 48 $scope.$apply(); 49 } 42 50 hubber.client.processDowntime = function (id, down) { 43 51 var json = JSON.parse(down); … … 83 91 $(".selected.ng-binding").addClass('loaded'); 84 92 $scope.selectedEventId = -1; 85 if ($scope.treeview.currentNode != null ) {93 if ($scope.treeview.currentNode != null && $scope.treeview.currentNode.Id != undefined) { 86 94 if ($scope.treeview.currentNode.calendar.length === 0) { 87 95 hubber.server.requestDownTime(vm.treeview.currentNode.Id); … … 98 106 99 107 }); 108 } 109 $scope.clearTreeSelect = function () { 110 if (vm.treeview.currentNode != undefined) { 111 vm.treeview.currentNode.selected = undefined; 112 vm.treeview.currentNode = undefined; 113 vm.selectedEventId = -1; 114 } 100 115 } 101 116 $scope.buildTree = function () { … … 103 118 vm.temptree = []; 104 119 vm.top = false; 120 var ungrouped = { 121 children: [], 122 Name: 'Ungrouped' 123 } 105 124 for (; vm.data.length > 0;) { 106 125 107 if (vm.data[0].ParentResourceId == null ) {126 if (vm.data[0].ParentResourceId == null && vm.data[0].IsDisposable !== undefined) { 108 127 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 128 vm.clients.push(curr); 129 ungrouped.children.push(curr); 130 } 131 else if (vm.data[0].ParentResourceId == null) { 132 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 133 vm.groups.push(curr); 109 134 vm.tree.push(curr); 110 135 } 111 136 else { 112 137 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 138 if (curr.IsDisposable !== undefined) 139 vm.clients.push(curr); 140 else 141 vm.groups.push(curr); 113 142 vm.temptree.push(curr); 114 143 } 115 144 } 145 vm.tree.push(ungrouped); 116 146 117 147 }; … … 134 164 for (var t = 0; t < vm.data.length;) { 135 165 if (current.Id == vm.data[t].ParentResourceId) { 166 if (vm.data[t].IsDisposable !== undefined) 167 vm.clients.push(vm.data[t]); 168 else 169 vm.groups.push(vm.data[t]); 136 170 current.children.push(vm.data.splice(t, 1)[0]); 137 171 } … … 145 179 return current; 146 180 } 181 182 $scope.toggleDisposable = function () { 183 $scope.calendarDispose = true; 184 hubber.server.toggleDisposable(vm.treeview.currentNode.Id); 185 } 186 147 187 function collectInfoToSave(node, refresh, last) { 148 188 var arr = node.calendar.down[0]; … … 164 204 "" + Date.parse(arr[i].rec.end), 165 205 arr[i].rec.days.join(",") 166 206 167 207 168 208 ]); … … 181 221 "" + Date.parse(arr[i].rec.end), 182 222 arr[i].rec.days.join(",") 183 223 184 224 ]); 185 225 } … … 189 229 } 190 230 $scope.saveCurrentCalendar = function () { 231 vm.calendarSaver = true; 191 232 collectInfoToSave(vm.treeview.currentNode, true, false); 192 233 //true for refresh, false for showing it's only one calendar saved. 193 234 } 194 235 $scope.saveAllCalendars = function () { 236 195 237 $scope.allSave = []; 196 238 for (var i = 0; i < $scope.tree.length; i++) … … 205 247 plain: true 206 248 }).then(function (success) { 249 vm.calendarSaver = true; 207 250 for (var i = 0; i < $scope.allSave.length; i++) { 208 251 if (i >= $scope.allSave.length - 1) … … 255 298 $scope.currentcal = []; 256 299 for (var i = 0; i < $scope.tree.length; i++) 257 removeCalendarsRecurse($scope.tree[i]);300 clearCalendarsRecurse($scope.tree[i]); 258 301 hubber.server.requestDownTime(vm.treeview.currentNode.Id); 259 302 $(".selected.ng-binding").addClass('loaded'); 260 303 } 261 function removeCalendarsRecurse(node) {304 function clearCalendarsRecurse(node) { 262 305 263 306 node.calendar = []; … … 265 308 node.changes = false; 266 309 for (var i = 0; i < node.children.length; i++) { 267 removeCalendarsRecurse(node.children[i]); 268 } 269 } 270 310 clearCalendarsRecurse(node.children[i]); 311 } 312 } 313 $scope.deleteAllEvents = function () { 314 vm.calendarDeleter = true; 315 vm.selectedEventId = -1; 316 var node = vm.treeview.currentNode.calendar.down[0]; 317 for (var i = 0; i < node.length;) { 318 if (node[i].id != '00000000-0000-0000-0000-000000000000') 319 vm.treeview.currentNode.todelete.push(node[i].id); 320 $scope.setChanged(vm.selectedEventId); 321 node.splice(i, 1); 322 } 323 vm.calendarDeleter = false; 324 ngDialog.open({ 325 template: 326 '<p>All events have been deleted. Save the changes to confirm deletion, clearing will restore all the events from the server</p>', 327 plain: true 328 }); 329 } 271 330 $scope.deleteAllPreviousEvents = function () { 331 vm.calendarDeleter = true; 272 332 vm.selectedEventId = -1; 273 333 var node = vm.treeview.currentNode.calendar.down[0]; … … 282 342 i++; 283 343 } 344 vm.calendarDeleter = false; 284 345 ngDialog.open({ 285 346 template: … … 329 390 vm.selectedEventId = vm.treeview.currentNode.calendar.down[0].length - 1; 330 391 vm.setChanged(vm.selectedEventId); 331 // $("#resourcecalendar").fullCalendar('refetchEvents'); 392 $scope.currentcal = []; 393 $scope.currentcal = vm.treeview.currentNode.calendar; 394 332 395 333 396 } … … 342 405 $scope.eventClick = function (date, jsEvent, view) { 343 406 vm.selectedEventId = checkId(date._id); 407 }; 408 $scope.eventClickBtn = function (id) { 409 vm.selectedEventId = checkId(id); 410 vm.goToDate(); 344 411 }; 345 412 /* alert on Drop */ … … 381 448 382 449 }; 450 $scope.removeList = function (id) { 451 var index = checkId(id); 452 vm.selectedEventId = -1; 453 vm.setChanged(vm.selectedEventId); 454 if (vm.treeview.currentNode.calendar.down[0][index].id != "00000000-0000-0000-0000-000000000000") { 455 vm.treeview.currentNode.todelete.push(vm.treeview.currentNode.calendar.down[0][index].id); 456 } 457 vm.treeview.currentNode.calendar.down[0].splice(index, 1); 458 459 460 }; 383 461 384 462 $scope.checkDateStartEnd = function () { 385 463 if ($scope.currentcal.down[0][vm.selectedEventId].rec.start > $scope.currentcal.down[0][vm.selectedEventId].rec.end || 386 464 $scope.currentcal.down[0][vm.selectedEventId].rec.end === undefined) { 387 465 388 466 $scope.currentcal.down[0][vm.selectedEventId].rec.end = new Date($scope.currentcal.down[0][vm.selectedEventId].rec.start); 389 467 390 468 } 391 469 if ($scope.currentcal.down[0][vm.selectedEventId].rec.start < Date.now()) 392 470 $scope.currentcal.down[0][vm.selectedEventId].rec.start = new Date(); 393 471 } 394 472 //pushes all changes to other recurs 395 473 $scope.pushRecurChanges = function (recid) { … … 415 493 } 416 494 else { 417 495 418 496 arr[i].start.setHours(ob.start.getHours(), ob.start.getMinutes()); 419 497 arr[i].end.setHours(ob.end.getHours(), ob.end.getMinutes()); … … 439 517 loop2: 440 518 for (var i = 0; i < arr.length; i++) { 441 519 442 520 if (arr[i].rec.recid === recid) { 443 var dend = (d +1000 * 3600 * 24);521 var dend = (d + 1000 * 3600 * 24); 444 522 if (arr[i].start.getTime() >= d && 445 523 arr[i].end.getTime() <= dend) { … … 449 527 } 450 528 } 451 529 452 530 var ts = new Date(d); 453 531 ts.setHours(new Date(ob.start).getHours(), new Date(ob.start).getMinutes()); … … 465 543 466 544 } 467 545 468 546 d += (1000 * 3600 * 24);// 1 day 469 547 470 548 } 471 549 }); … … 491 569 } 492 570 571 $scope.goToDate = function () { 572 $("#resourcecalendar").fullCalendar('gotoDate', vm.currentcal.down[0][vm.selectedEventId].start); 573 } 493 574 /* Render Tooltip */ 494 575 $scope.eventRender = function (event, element, view) { … … 508 589 header: { 509 590 left: 'title', 510 center: ' ',591 center: 'agendaWeek, agendaDay', 511 592 right: 'today prev,next' 512 593 }, … … 520 601 521 602 522 } 523 }; 524 525 526 603 604 } 605 }; 606 607 608 609 }).filter('disp', function () { 610 return function (input) { 611 return input ? 'Disposable' : 'Not disposable'; 612 } 613 }).directive('animateOnChange', function ($timeout) { 614 return function (scope, element, attr) { 615 scope.$watch(attr.animateOnChange, function (nv, ov) { 616 617 if (nv != ov) { 618 if (scope.currentcal.down[0][scope.selectedEventId].title === "Unavailable") { 619 element.addClass('changed'); 620 $timeout(function () { 621 element.removeClass('changed'); 622 }, 250); // Could be enhanced to take duration as a parameter 623 } 624 else { 625 element.addClass('changedshut'); 626 $timeout(function () { 627 element.removeClass('changedshut'); 628 }, 250); // Could be enhanced to take duration as a parameter 629 } 630 } 631 }); 632 }; 527 633 }); 528 634
Note: See TracChangeset
for help on using the changeset viewer.