Skip to content

Instantly share code, notes, and snippets.

@danielricecodes
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save danielricecodes/633c464151f0f1a53e3d to your computer and use it in GitHub Desktop.

Select an option

Save danielricecodes/633c464151f0f1a53e3d to your computer and use it in GitHub Desktop.

Revisions

  1. @Phonk64 Phonk64 revised this gist May 15, 2014. No changes.
  2. @Phonk64 Phonk64 revised this gist Apr 29, 2014. 1 changed file with 112 additions and 1 deletion.
    113 changes: 112 additions & 1 deletion gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -22,4 +22,115 @@ function program1(depth0,data) {
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.heroImage.relativeURI", { hash: {} }); }
    buffer += escapeExpression(stack1) + "' />\n ";
    return buffer;}
    return buffer;}

    function program3(depth0,data) {

    var buffer = "", stack1;
    buffer += "\n <img alt='";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.name);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.name", { hash: {} }); }
    buffer += escapeExpression(stack1) + "' src='/celebrity-asr/images/destinations/ASR/shore_excursions/preview_unavailable.gif' />\n ";
    return buffer;}

    buffer += "\n <div class='small-package-module' id='";
    foundHelper = helpers.id;
    stack1 = foundHelper || depth0.id;
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "id", { hash: {} }); }
    buffer += escapeExpression(stack1) + "'>\n <dl>\n <dt class='thumbnail'>\n ";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.heroImage);
    stack2 = helpers['if'];
    tmp1 = self.program(1, program1, data);
    tmp1.hash = {};
    tmp1.fn = tmp1;
    tmp1.inverse = self.program(3, program3, data);
    stack1 = stack2.call(depth0, stack1, tmp1);
    if(stack1 || stack1 === 0) { buffer += stack1; }
    buffer += "\n </dt>\n <dt class='location'>\n ";
    stack1 = 35;
    foundHelper = helpers.product;
    stack2 = foundHelper || depth0.product;
    stack2 = (stack2 === null || stack2 === undefined || stack2 === false ? stack2 : stack2.location);
    stack2 = (stack2 === null || stack2 === undefined || stack2 === false ? stack2 : stack2.name);
    foundHelper = helpers.truncate;
    stack3 = foundHelper || depth0.truncate;
    if(typeof stack3 === functionType) { stack1 = stack3.call(depth0, stack2, stack1, { hash: {} }); }
    else if(stack3=== undef) { stack1 = helperMissing.call(depth0, "truncate", stack2, stack1, { hash: {} }); }
    else { stack1 = stack3; }
    buffer += escapeExpression(stack1) + "\n </dt>\n <dd class='blue name'>\n <a href='#'>";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.name);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.name", { hash: {} }); }
    buffer += escapeExpression(stack1) + "</a>\n </dd>\n <dd>\n";

    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.href);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.href", { hash: {} }); }
    tmphref=window.location.protocol + "//" + window.location.host+escapeExpression(stack1);

    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.productID);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.productID", { hash: {} }); }
    buffer += "\n <div id='BVRRInlineRating-"+(escapeExpression(stack1).toLowerCase())+"'></div>\n ";
    buffer += "\n </dd>\n </dl>\n <div class='detail' \n onmouseover=document.getElementById('InlineRatingTwo-"+escapeExpression(stack1)+"').innerHTML=document.getElementById('BVRRInlineRating-"+(escapeExpression(stack1).toLowerCase())+"').innerHTML; > \n" ;
    buffer += " \n <dl>\n <dt class='location'>\n ";
    stack1 = 30;
    foundHelper = helpers.product;
    stack2 = foundHelper || depth0.product;
    stack2 = (stack2 === null || stack2 === undefined || stack2 === false ? stack2 : stack2.location);
    stack2 = (stack2 === null || stack2 === undefined || stack2 === false ? stack2 : stack2.name);
    foundHelper = helpers.truncate;
    stack3 = foundHelper || depth0.truncate;
    if(typeof stack3 === functionType) { stack1 = stack3.call(depth0, stack2, stack1, { hash: {} }); }
    else if(stack3=== undef) { stack1 = helperMissing.call(depth0, "truncate", stack2, stack1, { hash: {} }); }
    else { stack1 = stack3; }
    buffer += escapeExpression(stack1) + "\n </dt>\n <dd class='blue name'>\n <a href='";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.href);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.href", { hash: {} }); }
    buffer += escapeExpression(stack1) + "'>\n ";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.name);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.name", { hash: {} }); }
    buffer += escapeExpression(stack1) + "\n </a>\n </dd>\n <dd>";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.productID);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.productID", { hash: {} }); }
    buffer += "\n <div id='InlineRatingTwo-"+(escapeExpression(stack1).toLowerCase())+"' > </div> ";
    buffer += " \n </dd> \n <dd class='description'> ";
    stack1 = 70;
    foundHelper = helpers.product;
    stack2 = foundHelper || depth0.product;
    stack2 = (stack2 === null || stack2 === undefined || stack2 === false ? stack2 : stack2.shortDescription);
    foundHelper = helpers.truncate;
    stack3 = foundHelper || depth0.truncate;
    if(typeof stack3 === functionType) { stack1 = stack3.call(depth0, stack2, stack1, { hash: {} }); }
    else if(stack3=== undef) { stack1 = helperMissing.call(depth0, "truncate", stack2, stack1, { hash: {} }); }
    else { stack1 = stack3; }
    buffer += escapeExpression(stack1) + "</dd>\n <dd class='details-link'>\n <a class='right-arrow-with-divider' href='";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.href);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.href", { hash: {} }); }
    buffer += escapeExpression(stack1) + "'>View Details</a>\n </dd>\n </dl>\n </div>\n </div>\n ";
    return buffer;});
    })();
  3. @Phonk64 Phonk64 created this gist Apr 29, 2014.
    25 changes: 25 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    function program1(depth0,data) {

    var buffer = "", stack1;
    buffer += "\n <img alt='";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.name);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.name", { hash: {} }); }
    buffer += escapeExpression(stack1) + "' src='";
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.heroImage);
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.baseHTTP);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.heroImage.baseHTTP", { hash: {} }); }
    buffer += escapeExpression(stack1);
    foundHelper = helpers.product;
    stack1 = foundHelper || depth0.product;
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.heroImage);
    stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.relativeURI);
    if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
    else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "product.heroImage.relativeURI", { hash: {} }); }
    buffer += escapeExpression(stack1) + "' />\n ";
    return buffer;}