This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .fadein.ng-hide-remove, | |
| .fadeout.ng-hide-add.ng-hide-add-active { | |
| opacity: 0; | |
| } | |
| .fadeout.ng-hide-add, | |
| .fadein.ng-hide-remove.ng-hide-remove-active { | |
| opacity: 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setTimeout(function () { | |
| el.find('.group-edit-form .select2-input.ui-select-search').click(function () { | |
| this.focus(); | |
| }); | |
| }, 300); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NavBarCtrl { | |
| constructor($state, Auth, $scope) { | |
| this.Auth = Auth; | |
| this.$state = $state; | |
| $scope.$on('$destroy', () => eventName.off(null, null, this)); | |
| } | |
| } | |
| moduleName.controller('NavBarCtrl', NavBarCtrl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $rootScope.$on(events.OPENED, function (event, current) { | |
| jQuery(el).find('.' + selectors.label) | |
| .each(function (index, header) { | |
| var ctrl = angular.element(header).scope(); | |
| if (ctrl) { | |
| ctrl.isOpen = header === current ? !ctrl.isOpen : false; | |
| } | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error: { [Error: getaddrinfo ENOTFOUND uit.truedash.com uit.truedash.com:443] | |
| code: 'ENOTFOUND', | |
| errno: 'ENOTFOUND', | |
| syscall: 'getaddrinfo', | |
| hostname: 'uit.truedash.com', | |
| host: 'uit.truedash.com', | |
| port: 443 } | |
| Error: { [Error: getaddrinfo ENOTFOUND uit.truedash.com uit.truedash.com:443] | |
| code: 'ENOTFOUND', | |
| errno: 'ENOTFOUND', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (ui.item.sortable.dropindex !== undefined) { | |
| let positions = []; | |
| ui.item.sortable.sourceModel.forEach((metric, index) => { | |
| positions.push({cardMetricRelationId: metric.relationId, position: index + 1}); | |
| }); | |
| this.cardBuilder.loading = true; | |
| return this.card.metrics.updatePositions(positions).then(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getRandomColor() { | |
| var letters = '0123456789ABCDEF'.split(''); | |
| var color = '#'; | |
| for (var i = 0; i < 6; i++ ) { | |
| color += letters[Math.floor(Math.random() * 16)]; | |
| } | |
| return color; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (){ | |
| angular.module('liraApp', ['ngRoute', 'ngSanitize']); | |
| function config ($routeProvider, $locationProvider) { | |
| $routeProvider | |
| .when('/', { | |
| templateUrl: 'home/home.view.html', | |
| controller: 'homeCtrl', | |
| controllerAs: 'home' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //аджакс запрос на сервер, реализованный в ес6/7, возвращает промис | |
| //в данном случае при успешном ответе с сервера (200) - вернет нам статус из ответа с сервера | |
| //в случае ошибки - выведет в консоль ошибку | |
| //.then(function(res){return res.status},function(err){console.log(err)}); | |
| //так бы выглядили наши функции если бы мы писали их на ес5 | |
| //в данном случае мы сразу к промису привязываем then, и возвращаем данные которые нам вернет сервер | |
| var p = fetch('/foo') | |
| .then(res => res.status, err => console.error(err)) | |
| //тут по отдельности обрабатываем уже то что вернулось промиса обращаясь к нему как к переменной |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fib = function(numMax){ | |
| var counter = 0, | |
| i = 1, | |
| j = 1; | |
| for (var k = 0; k < numMax; k++) { | |
| if ((Math.max(i,j) % 2) !==0) | |
| counter++; | |
| x = i + j; | |
| i = j; |