| | |
| | | }
|
| | | } catch (e) {
|
| | |
|
| | | } |
| | | }
|
| | |
|
| | | var selectedProgGroup = dh_TempGetJSONData("currentManuCat", "");
|
| | | var blacklist = dh_TempGetJSONData("blackListVzPos", "[]");
|
| | |
| | | mod.pdfFile = info.pdf;
|
| | | }
|
| | | });
|
| | | timeline(Date.now(), " Start PrePareData");
|
| | | self.prepareModuleData(mod, module, {
|
| | | selectedProgGroup: selectedProgGroup,
|
| | | blacklist: blacklist,
|
| | | separatelist: separatelist
|
| | | });
|
| | | timeline(Date.now(), " End PrePareData");
|
| | | mod.endLessScroll = mod.articles.length > 20 && rawData.Modules.length === 1 && !mod.cfg["noEndlessScroll"];
|
| | | mod.articlesToShow = [];
|
| | | mod.currentScrollIndex = 0;
|
| | | mod.singleArticlePage = mod.articles.length === 1;
|
| | | |
| | | mod.setEquipmentCache();
|
| | |
|
| | | setDimensionsData(mod, self);
|
| | |
|
| | |
| | | mod.labelTextT = module.labelTextT;
|
| | | mod.infoText = module.infoText;
|
| | |
|
| | | mod.modProg = module.modProg;
|
| | | mod.modManu = module.modManu;
|
| | |
|
| | | this.setModuleConfig(mod, userVal);
|
| | |
|
| | | };
|
| | |
| | | //Im Prinzip wird eine Liste aller Javascriptaufrufnummer angezeigt in der für jedes Element der Anzeige die erste passende Artikelnummer angezigt wird
|
| | |
|
| | | module.Articles[0].forEach(function (equipment) {
|
| | | var tmpArticleDhCats = Article.registeredCategoriesAndSections(equipment.ArtCategories); |
| | | var tmpArticleInfoText = Article.registeredInfoTexts(equipment.CatString);
|
| | | var tmpArticleDhCats = equipment.ArtCategories;
|
| | | var tmpArticleInfoText = equipment.ArtInfoCategories;
|
| | |
|
| | | var tmpArtCats = [];
|
| | | var tmpArtInfoCats = [];
|
| | |
| | | p.artText = equipment.artText;
|
| | | p.artNo = equipment.ArtNr;
|
| | | p.hideDelete = equipment.hideDelete;
|
| | | p.hideFront = equipment.hideFront; |
| | | p.hideFront = equipment.hideFront;
|
| | | p.ptm = equipment.ptm;
|
| | | var foundP = propTransInfo.find(function (pti) {
|
| | | return p.id === pti.id;
|
| | |
| | | var selectedProgGroup = options.selectedProgGroup || "";
|
| | | // var articlesWithHinge = [];
|
| | | var blacklist = options.blacklist || [];
|
| | | var separatelist = options.separatelist || [];
|
| | | var separatelist = options.separatelist || []; |
| | |
|
| | | mod.catConfigGlobal = mod.catConfig.filter(function (cfg) {
|
| | | return cfg.defaultArt === ""
|
| | |
| | | return cfg.defaultArt !== ""
|
| | | });
|
| | |
|
| | | // Performance: einmalig O(1)-Lookups/Mengen aufbauen statt je Artikel/Equipment linear zu suchen.
|
| | | var propTransInfoByArtNo = buildIndexMap(propTransInfo, "artNo"); // ersetzt propTransInfo.find() je PropTrans-Artikel
|
| | | var categoriesToHide = mod.cfg["CategoriesToHide"] || [];
|
| | | var categoriesToHideSet = {}; // ersetzt CategoriesToHide.indexOf()
|
| | | for (var chIdx = 0; chIdx < categoriesToHide.length; chIdx++) {
|
| | | categoriesToHideSet["$" + categoriesToHide[chIdx]] = true;
|
| | | }
|
| | | var equipSeen = {}; // ersetzt equipmentArtNumbersOnPage.indexOf() (O(n^2) -> O(n))
|
| | | for (var eqIdx = 0; eqIdx < mod.equipmentArtNumbersOnPage.length; eqIdx++) {
|
| | | equipSeen["$" + mod.equipmentArtNumbersOnPage[eqIdx]] = true;
|
| | | } |
| | | timeline(Date.now(), "Start PrePareDataArticlesForEach");
|
| | | module.Articles[0].forEach(function (article, index) {
|
| | | // if (index == 0 || index == 1) {
|
| | | if ((mod.cfg["ignoreVzPos"] === false) || (mod.cfg["ignoreVzPos"] && blacklist.indexOf(article.ArtNr) < 0)) {
|
| | |
| | | }
|
| | | if ((category.priority === 10 || category.priority === 100) && art.isPropTrans()) {
|
| | |
|
| | | var foundP = propTransInfo.find(function (pti) {
|
| | | return art.artNo === pti.artNo;
|
| | | });
|
| | | var foundP = propTransInfoByArtNo["$" + art.artNo];
|
| | | if (foundP) {
|
| | | art.ptId = foundP.id;
|
| | | art.showPropTransControls = true;
|
| | | }
|
| | | }
|
| | | if (category.priority >= 1000 && mod.moduleFilterCategories.indexOf(category) < 0) {
|
| | | if (mod.cfg["CategoriesToHide"].indexOf(category.id) < 0) {
|
| | | if (!categoriesToHideSet["$" + category.id]) {
|
| | | mod.moduleFilterCategories.push(category);
|
| | | }
|
| | | }
|
| | | });
|
| | | mod.articles.push(art);
|
| | | // Alle Artikelnummern von Fittings auf der Katapage in eindeutige Liste packen
|
| | | art.artFittings.forEach(function (f, index) {
|
| | | if (!f.hideFittingbyAN) {
|
| | | if (!equipSeen["$" + f.artNoFitting]) {
|
| | | equipSeen["$" + f.artNoFitting] = true;
|
| | | mod.equipmentArtNumbersOnPage.push(f.artNoFitting);
|
| | | }
|
| | | }
|
| | | });
|
| | | // Alle Artikelnummern von Eigenschaftsübertragungen auf der Katapage in eindeutige Liste packen
|
| | | art.artPropTrans.forEach(function (pt, index) {
|
| | | if (pt.artNo !== "") {
|
| | | if (!equipSeen["$" + pt.artNo]) {
|
| | | equipSeen["$" + pt.artNo] = true;
|
| | | mod.equipmentArtNumbersOnPage.push(pt.artNo);
|
| | | }
|
| | | }
|
| | | });
|
| | | // Alle Artikelnummern von Warenkorbartikeln auf der Katapage in eindeutige Liste packen
|
| | | art.artShoppingCartArticles.forEach(function (sc, index) {
|
| | | if (!equipSeen["$" + sc.artNo]) {
|
| | | equipSeen["$" + sc.artNo] = true;
|
| | | mod.equipmentArtNumbersOnPage.push(sc.artNo);
|
| | | }
|
| | | });
|
| | | // Alle Artikelnummern von PO-Artikeln auf der Katapage in eindeutige Liste packen
|
| | | art.artPoEquipment.forEach(function (poe, index) {
|
| | | if (!equipSeen["$" + poe.artNo]) {
|
| | | equipSeen["$" + poe.artNo] = true;
|
| | | mod.equipmentArtNumbersOnPage.push(poe.artNo);
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | // }
|
| | | });
|
| | |
|
| | |
|
| | | timeline(Date.now(), "Stop PrePareDataArticlesForEach");
|
| | |
|
| | | var articleModes = {};
|
| | | mod.articles.forEach(function (article) {
|
| | |
| | | articleModes[article.subHingeArticle.artNo] = searchMode;
|
| | | }
|
| | | });
|
| | | |
| | |
|
| | |
|
| | | DoSyncFPSAction("ArticleEquipmentObserverAction", {
|
| | |
| | | filterList: mod.cfg["ArtPropsToShow"].length > 0 ? mod.cfg["ArtPropsToShow"] : mod.cfg["ArtPropsToHide"],
|
| | | articleModes: articleModes
|
| | | });
|
| | | |
| | |
|
| | | if (mod.cfg["sortArticleByArtNo"]) {
|
| | | mod.articles.sort(function (b, a) {
|
| | |
| | | mod.filteredArticles = mod.articles.slice();
|
| | | mod.moduleFilterCategories.sort(function (a, b) {
|
| | | return a.order - b.order;
|
| | | });
|
| | | }); |
| | |
|
| | | };
|
| | |
|
| | | KataPage.prototype.prepareModuleDataAccessoires = function (mod, module) {
|
| | |
| | |
|
| | | var art = new Article(article, ArticleType.ACCESS, mod, "", []);
|
| | |
|
| | | var tmpArticleDhAcces = Article.registeredAccessoiresCategories(article.CatString);
|
| | | var tmpArticleDhAcces = article.ArtAccessCategories;
|
| | | tmpArticleDhAcces.forEach(function (tmpCat) {
|
| | | var foundCategory = definedAccessoiresCategories.find(function (cat) {
|
| | | return cat.id === tmpCat;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | KataPage.prototype.build = function () {
|
| | | var self = this;
|
| | | var container = $("#kataPage");
|
| | |
| | | //Wenn es nur einen Artikel in dem Modul gibt und der Schalter "showFirstArtNoAsModTitle" gesetzt ist dann wir der Artikeltext des Artikels im Accordion als Modultitel benutzt
|
| | | mod.titel = mod.articles[0].getArtText();
|
| | | }
|
| | |
|
| | | modTitel.html(mod.titel);
|
| | |
|
| | | modTitel.on("click", function () {
|
| | |
| | | self.preSelectFilter(mod);
|
| | | })
|
| | | }
|
| | |
|
| | |
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * Stellt den Suchmodus (Flag) eines Artikels fuer das dynamische Zubehoer ein.
|
| | | * @param {string} article
|