Блюдо овальное "Экрю" 31х21,5 см — Блюда — Блюда — Столовая посуда — Каталог

05.02.2018

Блюдо овальное "Экрю" 31х21,5 см - Блюда - Блюда - Столовая посуда - Каталог

Введите свой E-mail, чтобы мы выслали вам код активации.

‘) if (count > dropdownColumnToggle) { dropdownSize++; navSize++; } if (behFlag) { dropdownSize++; dropdownCount++; } if (brandFlag) { dropdownSize++; dropdownCount++; } if (dropdownSize > 1) { $parent.find(‘.nav-dropdown’).addClass(‘_width-‘ + dropdownSize + ‘_’ + navSize).find(‘#dropdown_’ + id).addClass(‘_width-‘ + dropdownSize); } createDropdownCol(id, dropdownCount); } /** * Создаем обертку Dropdown * @param {Number} id / Родительский ID * @param {Number} dropdownCount / Кол-во колонок внутри Dropdown */ function createDropdownCol(id, dropdownCount){ var $dropdown = $(‘#dropdown_’ + id), i = dropdownCount; while (i > 0) { $dropdown.append(‘

‘) i—; } } function createList(id, count){ //onsole.log(arguments); var $dropdown = $(‘#dropdown_’ + id), $dropdownColumn = $dropdown.find(‘.nav-dropdown__column:first-child’), columnSize = count > dropdownColumnToggle ? 2 : 1, columnFlag = 0, columnToggleMoment = columnSize > 1 ? count / columnSize : 0, count = 0, codeBehFlag = false, codeBrandFlag = false; function checkToggleMoment() { if(columnFlag == 0 && columnSize > 1){ count++; if (count > columnToggleMoment) { columnFlag = 1; } } } function createListItem(id, name, link, parentId) { $appendTo = $(‘#nav-list_’ + parentId); if (columnFlag == -1) { $appendTo = $(‘#nav-list_’ + parentId + ‘-2’); } $appendTo.append(‘

‘); checkToggleMoment(); } function createSubItem(name, link, parentId) { $(‘#nav-item_’ + parentId).find(‘.nav-category__sub’).append(‘

‘); checkToggleMoment(); } var navClass = »; if (columnSize == 2) { navClass = ‘_width-2’; } $dropdownColumn.append(‘

‘); // Закрыли .nav-category } function createBehList (id, count) { var $dropdown = $(‘#dropdown_’ + id), $dropdownColumn = $dropdown.find(‘.nav-dropdown__column:nth-child(2)’); $dropdownColumn.addClass(‘_dark’).append(‘

‘); } function createBehListTitle(id, name, parentId) { $appendTo = $(‘#nav-beh-list_’ + parentId); $appendTo.append(‘

‘); } function createBehSubItem(name, link, parentId) { $(‘#nav-beh-item_’ + parentId).find(‘.nav-category__sub’).append(‘

‘); } function createBrandList (id, count) { var $dropdown = $(‘#dropdown_’ + id), $dropdownColumn = $dropdown.find(‘.nav-dropdown__column:nth-child(3)’); $dropdownColumn.addClass(‘_dark’).append(‘

‘); } function createBrandListTitle(id, name, parentId) { $appendTo = $(‘#nav-brand-list_’ + parentId); $appendTo.append(‘

‘); } function createBrandSubItem(name, link, parentId) { $(‘#nav-brand-item_’ + parentId).find(‘.nav-category__sub’).append(‘

‘); } for (var prop in navObject) { var count = 0, parentCount = 0; behFlag = false; behBrand = false; for (var prop2 in navObject[prop][‘childs’]) { var current = navObject[prop][‘childs’][prop2], currentChildsCount = current.childsCount, currentCode = current.code; if (currentCode == ») { if (currentChildsCount != undefined) { count = count + Number(currentChildsCount); } parentCount++; // Если у пункта нет детей, то +1 в общее кол-во } else if (currentCode == ‘navBeh’) { behFlag = true; } else if (currentCode == ‘navBrand’) { behBrand = true; } } count = count + parentCount; addNavElem(prop.substr(1), navObject[prop].name, navObject[prop].link, navObject[prop].active); createDropdown(prop.substr(1), count, behFlag, behBrand); createList(prop.substr(1), count); //console.log(count); }

Читайте также:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *