This file contains 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 map from 'lodash/map' | |
function deepFlattenHelper(obj, acc = {}, path = []) { | |
if (!obj) { | |
return acc | |
} | |
let result = { ...acc } | |
if (typeof obj === 'object') { |
This file contains 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 EXAMPLE_TIME_ENTRIES = [ | |
{ | |
id: 1, | |
date: '2017-11-20', | |
categoryId: 1, | |
notes: 'some example notes', | |
minutesTracked: 180, | |
}, | |
{ | |
id: 2, |
This file contains 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 Application from '../application'; | |
import renderScreen from '../utils/render-screen'; | |
import computePercentage from '../utils/compute-percentage'; | |
import timer from './timer-presenter'; | |
import state from '../data/state'; | |
import adapter from '../data/adapter'; | |
import LevelArtistView from '../view/level-artist-view'; |
This file contains 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
'use strict'; | |
(function () { | |
var pinHandle = document.querySelector('.pin__main'); | |
var formAddress = document.querySelector('#address'); | |
var PIN_HEIGHT = 94; | |
var PIN_WIDTH = 74; | |
var tokyoMap = document.querySelector('.tokyo'); | |
var MIN_X = 0; | |
var MAX_X = 1200; |
This file contains 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
'use strict'; | |
(function () { | |
var pins; | |
var type; | |
var price; | |
var roomNumbers; | |
var guestNumbers; | |
var featuresSets = []; | |
var housingType = document.querySelector('#housing_type'); |
This file contains 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
js/forms.js:12: var syncValues = function (element, value) { // TODO: make it a normal function instead of "var foo = function" expression | |
js/forms.js:16: var syncValueWithMin = function (element, value) { // TODO: make it a normal function instead of "var foo = function" expression | |
js/filter.js:11: var checkboxNames = ['wifi', 'dishwasher', 'parking', 'washer', 'elevator', 'conditioner']; // TODO: Name constants LIKE_THIS | |
js/filter.js:81: window.filter = function (offerList) { // TODO: move assignment to window outside of the module | |
js/load.js:8: var onError = function (errorMessage) { // TODO: make it a normal function instead of "var foo = function" expression, name it as an event handler | |
js/load.js:29: xhr.timeout = 10000; // 10s TODO: Name a constant LIKE_THAT | |
js/map.js:5: var updatePins = function (offers) { // TODO: make it a normal function instead of "var foo = function" expression | |
js/map.js:9: var onLoad = function (data) { // TODO: make it a normal function instead of "var foo = func |
This file contains 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
'use strict'; | |
/* global utils */ | |
(function () { | |
var filteredList = []; | |
var filterContainer = document.querySelector('.tokyo__filters-container'); | |
var filterHousing = filterContainer.querySelector('#housing_type'); | |
var filterPrice = filterContainer.querySelector('#housing_price'); | |
var filterRoomNumber = filterContainer.querySelector('#housing_room-number'); | |
var filterGuestsNumber = filterContainer.querySelector('#housing_guests-number'); |
This file contains 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
'use strict'; | |
function setupMap() { | |
var titles = [ | |
'Большая уютная квартира', | |
'Маленькая неуютная квартира', | |
'Огромный прекрасный дворец', | |
'Маленький ужасный дворец', | |
'Красивый гостевой домик', |
This file contains 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 'themes.scss'; | |
@mixin themify($themes: $themes) { | |
@each $theme, $map in $themes { | |
.theme-#{$theme} & { | |
$theme-map: () !global; | |
@each $key, $submap in $map { | |
$value: map-get(map-get($themes, $theme), '#{$key}'); | |
$theme-map: map-merge($theme-map, ($key: $value)) !global; |
NewerOlder