x_Faq.min.js 848 B

1
  1. define(["knockout","jquery","ccResourceLoader!global/OCS_BFService","navigation"],function(e,t,n,r){"use strict";return{WIDGET_ID:"x_Faq",faqs:e.observableArray([]),categoryName:e.observable(),onLoad:function(e){},getFaqs:function(){var e=this,n=e.category().displayName.replace("Usados","").replace("Seminuevos","").trim();e.categoryName(n);var r=e.category().longDescription,i=t('<div style="display:none;">').append(t.parseHTML(r)),s=1;e.faqs([]);while(i.find("#faq-collection-"+s).length>0){var o={question:null,answer:null},u=i.find("#faq-collection-"+s);for(var a in o)u.attr(a)&&(o[a]=e.replaceVars(u.attr(a)));e.faqs.push(o),s++}},beforeAppear:function(){var e=this;e.getFaqs()},replaceVars:function(e){var t={RESERVE_AMOUNT:n.utils.product.parsePrice(n.utils.product.montoReserva())};for(var r in t)e=e.replace("["+r+"]",t[r]);return e}}})