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
| // src/store/rabota/search/actions.js:restoreQueryString | |
| let location = state.location; | |
| if (query[ 'subway_station' ] && getObjectValueByPath(state, 'location.subway_station.id') !== ensureNumber( query[ 'subway_station' ] )) { | |
| location = { | |
| subway_station: { id: ensureNumber( query[ 'subway_station' ] ) } | |
| }; | |
| } else if (query[ 'location.latitude' ] && query[ 'location.longitude' ] && getObjectValueByPath(state, 'location.geopoint.latitude') !== ensureNumber( query[ 'location.latitude' ] ) && getObjectValueByPath(state, 'location.geopoint.longitude') !== ensureNumber( query[ 'location.longitude' ] )) { | |
| location = { | |
| geopoint: { |
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
| /** | |
| * @param {string} ns | |
| */ | |
| export function consoleLogNamespaced (ns = 'global') { | |
| const themes = { | |
| log: { | |
| primaryPanel: ['#ff5644', '#db00af'], | |
| secondaryPanel: ['#424b5c', '#001333'], | |
| borders: ['#ff270f', '#333a47'] | |
| }, |
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
| export function pluralize (number, word, postfixes) { | |
| const mod10 = number % 10, | |
| mod100 = number % 100; | |
| let postfix = ''; | |
| if (mod100 >= 5 && mod100 < 21 | |
| || mod10 >= 5 && mod10 <= 9 | |
| || !mod10) { | |
| postfix = postfixes[2]; | |
| } else if (mod10 === 1) { | |
| postfix = postfixes[0]; |
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
| /** | |
| * @param {string} ns | |
| */ | |
| export function consoleLogNamespaced (ns = 'global') { | |
| const themes = { | |
| log: { | |
| primaryPanel: ['#ff5644', '#db00af'], | |
| secondaryPanel: ['#424b5c', '#001333'], | |
| borders: ['#ff270f', '#333a47'] | |
| }, |
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 loadImage (url) { | |
| return new Promise((resolve, reject) => { | |
| let img = new Image(); | |
| img.addEventListener('load', _ => { | |
| resolve(img) | |
| }); | |
| img.addEventListener('error', _ => { | |
| reject(_) | |
| }); | |
| img.src = url; |
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
| importScripts('https://npmcdn.com/promise-worker/dist/promise-worker.register.js'); | |
| registerPromiseWorker(function (msg) { | |
| return {hello: 'main thread'}; | |
| }); |
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
| var FontsLoader = global.FontsLoader = function (loadAsParallel) { | |
| this._loadAsParallel = loadAsParallel || true; | |
| this._currentProcesses = []; | |
| this._queue = []; | |
| }; | |
| FontsLoader.prototype.load = function (fontUrl, mimeType) { | |
| if (this._loadAsParallel || !this._currentProcesses.length) { | |
| return this._loadFont(fontUrl, mimeType); | |
| } |
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
| const GRID_COLUMN_ATTRIBUTE = 'grid-columns'; | |
| const GRID_CHECK_DEBOUNCE_MS = 100; | |
| const minItemWidth = Number(attrs.gridItemMin) || 100; | |
| const maxItemWidth = Number(attrs.gridItemMax) || 100; | |
| let onWidthChangeDebounced = $mdUtil.debounce(onWidthChanged, GRID_CHECK_DEBOUNCE_MS); | |
| let $window = angular.element(window); | |
| $window.on('resize', ev => onWidthChangeDebounced()); |
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
| /** | |
| * Copyright (c) 2017 Alex Belov | |
| * MIT | |
| */ | |
| /* Prefixes */ | |
| $bem-block-prefix: ab-; // .ab-class { .. } | |
| $bem-element-prefix: __; // .ab-class__element { .. } | |
| $bem-modifier-prefix: _; // .ab-class__element_modifier { .. } |
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
| // @import "variables"; | |
| @mixin transition-default($duration: .1s, $property: all, $delay: .0s) { | |
| transition: $property $duration $transitionDefaultTimingFunction $delay; | |
| } | |
| @mixin transition-series($params...) { | |
| transition: $params; | |
| } |