1
0
Fork 0
dubuval/twig-widget-views-v1.js

3 lines
84 KiB
JavaScript
Raw Normal View History

2016-10-16 08:53:19 +00:00
goog.provide("widget_buynow");goog.require("twig");goog.require("twig.filter");widget_buynow=function(env){twig.Template.call(this,env)};twig.inherits(widget_buynow,twig.Template);widget_buynow.prototype.getParent_=function(context){return false};widget_buynow.prototype.render_=function(sb,context,blocks){if(twig.attr("app"in context?context["app"]:null,"maintenance")){sb.append(' <div class="maintenance-mode js-maintenance">\n <h1 class="buynow-form__maintenance-title">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.maintenance_title","Were temporarily offline for maintenance"),"html",null,true));sb.append('</h1>\n <p class="buynow-form__maintenance-copy">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.maintenance_copy1","Every now and then we have to disable access to the editor whilst we make improvements to speed things up for yourself and visitors to your site."),"html",null,true));sb.append('</p>\n <p class="buynow-form__maintenance-copy">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.maintenance_copy2","These upgrades are usually pretty quick, so well be back up soon!"),"html",null,true));sb.append("</p>\n </div>\n")}else{sb.append(" ");context["freePackage"]=false;sb.append(" ");if(twig.attr("data"in context?context["data"]:null,"packageData")&&twig.attr(twig.attr("data"in context?context["data"]:null,"packageData"),"price")=="0.00"){sb.append(" ");context["freePackage"]=true;sb.append(" ")}sb.append(' <form class="widget-buynow-container">\n <ul class="widget-buynow-container-list">\n <li>\n <span class="widget-buynow-title">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.your_detials","Your details"),"html",null,true));sb.append("</span>\n\n ");if(twig.attr("data"in context?context["data"]:null,"showNames")==true){sb.append(' <div>\n <label title="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.first_name","First name"),"html",null,true));sb.append('">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.first_name","First name"),"html",null,true));sb.append('</label>\n <input type="text" name="firstname" class="widget-buynow-first-name js-input-buynow-first-name" title=');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.first_name","First name"),"html",null,true));sb.append(' placeholder="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.first_name","First name"),"html",null,true));sb.append("\">\n <span class='filed-error-firstName errors'></span>\n </div>\n <div>\n <label title=\"");sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.last_name","Last name"),"html",null,true));sb.append('">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.last_name","Last name"),"html",null,true));sb.append('</label>\n <input type="text" name="lastname" class="widget-buynow-last-name js-input-buynow-last-name" title="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.last_name","Last name"),"html",null,true));sb.append('" placeholder="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.last_name","Last name"),"html",null,true));sb.append("\">\n <span class='filed-error-lastName errors'></span>\n </div>\n ")}sb.append('\n <div>\n <label title="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.account","Account"),"html",null,true));sb.append('">');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.account","Account"),"html",null,true));sb.append('</label>\n <input type="email" name="Account" class="widget-buynow-email bk-standard-input js-input-buynow-email" title="');sb.append(twig.filter.escape(this.env_,App.t("widgets.buynow.account","Account"),"html",null,true));
}sb.append(' <tr>\n <td></td>\n <td></td>\n <td class="basket-summary-subtotal">');sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.subtotal","Subtotal: %1","subTotal"in context?context["subTotal"]:null),"html",null,true));sb.append('</td>\n </tr>\n </tbody>\n </table>\n\n <form action="');sb.append(twig.filter.escape(this.env_,twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"cart"),"checkoutUrl"),"html",null,true));sb.append('" method="POST">\n ');context["sitePrimaryDomain"]=twig.attr("data"in context?context["data"]:null,"sitePrimaryDomain")?twig.attr("data"in context?context["data"]:null,"sitePrimaryDomain"):"sitePrimaryDomain"in context?context["sitePrimaryDomain"]:null;sb.append('\n <input type="hidden" name="cartId" value="');sb.append(twig.filter.escape(this.env_,twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"cart"),"id"),"html",null,true));sb.append('">\n <input type="hidden" name="storeRef" value="');sb.append(twig.filter.escape(this.env_,twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"store"),"ref"),"html",null,true));sb.append('">\n <input type="hidden" name="storeUrl" value="');sb.append(twig.filter.escape(this.env_,twig.attr("app"in context?context["app"]:null,"protocol"),"html",null,true));sb.append("://");sb.append(twig.filter.escape(this.env_,"sitePrimaryDomain"in context?context["sitePrimaryDomain"]:null,"html",null,true));sb.append('/store">\n\n ');context["purchaseDisabled"]=twig.attr("app"in context?context["app"]:null,"mode")!="published";sb.append(" ");context["itemCount"]=twig.attr("data"in context?context["data"]:null,"itemCount",undefined,undefined,true)?twig.attr("data"in context?context["data"]:null,"itemCount"):twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"cart"),"itemCount");sb.append(" ");if(("itemCount"in context?context["itemCount"]:null)<1){sb.append(" ");context["purchaseDisabled"]=true;sb.append(" ")}sb.append('\n <button class="btn basket-summary-submit" type="submit"');if("purchaseDisabled"in context?context["purchaseDisabled"]:null){sb.append(" disabled")}sb.append(">\n ");sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.submit","Proceed to checkout"),"html",null,true));sb.append("\n </button>\n </form>\n ")}else{sb.append(' <p class="basket-summary-empty-copy">');sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.empty","Your basket is empty!"),"html",null,true));sb.append('</p>\n <a class="basket-summary-empty-cta btn" href="');sb.append(twig.filter.escape(this.env_,"requestBase"in context?context["requestBase"]:null,"html",null,true));sb.append('/store">');sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.empty_cta","Continue shopping"),"html",null,true));sb.append("</a>\n ")}sb.append("\n")}else{sb.append("\n ");if(twig.filter.length(this.env_,twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"store"),"email"))>0){sb.append(" <p>");sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.nopayment_available","This store doesn't currently support taking payments. Please contact the store owner at %1.",twig.attr(twig.attr(twig.attr("plugins"in context?context["plugins"]:null,"ecommerce"),"store"),"email")),"html",null,true));sb.append("</p>\n ")}else{sb.append(" <p>");sb.append(twig.filter.escape(this.env_,App.t("widgets.ecombasketsummary.nopayment_available_general","This store doesn't currently support taking payments."),"html",null,true));sb.append("</p>\n ")}sb.append("\n")}};widget_ecombasketsummary.prototype.getTemplateName=function(){return"widget_ecombasketsummary"};widget_ecomb
sb.append(' <span class="bk-profile-business">');if(twig.filter.length(this.env_,twig.attr("data"in context?context["data"]:null,"business"))>0&&twig.attr("data"in context?context["data"]:null,"business")!="profile"){sb.append(twig.filter.escape(this.env_,twig.attr("data"in context?context["data"]:null,"business"),"html",null,true))}else{sb.append(twig.filter.escape(this.env_,twig.attr("profile"in context?context["profile"]:null,"business"),"html",null,true));sb.append(" ")}sb.append("</span>\n ")}else if(twig.attr("app"in context?context["app"]:null,"mode")!="published"&&twig.attr("app"in context?context["app"]:null,"mode")!="site-preview"){sb.append(' <span class="bk-profile-business">');sb.append(twig.filter.escape(this.env_,App.t("widgets.profile.nobusiness","No business"),"html",null,true));sb.append("</span>\n ")}}sb.append("\n");if(twig.attr("data"in context?context["data"]:null,"profileType")=="copyright"){sb.append(" ");if(twig.attr("data"in context?context["data"]:null,"copyright")!="profile"&&twig.filter.length(this.env_,twig.attr("data"in context?context["data"]:null,"copyright"))>0||twig.filter.length(this.env_,twig.attr("profile"in context?context["profile"]:null,"copyright"))>0){sb.append(' <span class="bk-profile-copyright">');if(twig.filter.length(this.env_,twig.attr("data"in context?context["data"]:null,"copyright"))>0&&twig.attr("data"in context?context["data"]:null,"copyright")!="profile"){sb.append(twig.filter.escape(this.env_,twig.attr("data"in context?context["data"]:null,"copyright"),"html",null,true))}else{sb.append(twig.filter.escape(this.env_,twig.attr("profile"in context?context["profile"]:null,"copyright"),"html",null,true));sb.append(" ")}sb.append("</span>\n ")}else if(twig.attr("app"in context?context["app"]:null,"mode")!="published"&&twig.attr("app"in context?context["app"]:null,"mode")!="site-preview"){sb.append(' <span class="bk-profile-copyright">');sb.append(twig.filter.escape(this.env_,App.t("widgets.profile.nocopyright","No copyright"),"html",null,true));sb.append("</span>\n ")}}sb.append("\n");if(twig.attr("data"in context?context["data"]:null,"profileType")=="twitter"){sb.append('<ul class="twitter js-twitter">\n\n');if(twig.filter.length(this.env_,twig.attr("data"in context?context["data"]:null,"tweets"))>0){sb.append(" ");context["tweet"]=twig.attr(twig.attr("data"in context?context["data"]:null,"tweets"),0,undefined,"array");sb.append(' <li>\n <div class="twitter-profile-pic">\n <a href="https://twitter.com/');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"screenName"),"html",null,true));sb.append('" target="_blank">\n <img alt="');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"fullName"),"html",null,true));sb.append('" title="');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"fullName"),"html",null,true));sb.append('" data-screename="');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"screenName"),"html",null,true));sb.append('" src="');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"imageUrl"),"html",null,true));sb.append('">\n </a>\n </div>\n\n <div class="twitter-content">\n <a href="https://twitter.com/');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"screenName"),"html",null,true));sb.append('" target="_blank">\n <span class="bk-full-name"> ');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"fullName"),"html",null,true));sb.append(" </span>\n </a>\n <p> ");sb.append(twig.attr("tweet"in context?context["tweet"]:null,"text"));sb.append(' </p>\n <time class="created_at" data-value="');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"createdAt"),"html",null,true));sb.append('"> ');sb.append(twig.filter.escape(this.env_,twig.attr("tweet"in context?context["tweet"]:null,"crea