Skip to content

Commit

Permalink
Fixes Smile-SA#1368 optimizer previews results broken
Browse files Browse the repository at this point in the history
  • Loading branch information
rbayet committed Apr 26, 2019
1 parent 0a9d043 commit 1e8712b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ div.optimizer-preview-fieldset {
clear: both;
}

.compare {
display: inline-block;
clear: both;
}

.product-list-container {
width: 48%;
float:left;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,60 @@
</div>

<div data-bind="if: hasProducts()">
<div class="compare">
<div class="product-list-container">
<div class="product-list-title">
<h1><span data-bind="i18n: 'Base Results'"></span></h1>
</div>
<ul data-bind="foreach: baseProducts" class="product-list">
<li class="product-list-item" data-bind="
attr: {'data-product-id': getId()},
">
<div class="product-image"><img data-bind="attr: { src: getImageUrl() }"/></div>

<div class="product-list-container">
<div class="product-list-title">
<h1><span data-bind="i18n: 'Base Results'"></span></h1>
</div>
<ul data-bind="foreach: baseProducts" class="product-list">
<li class="product-list-item" data-bind="
attr: {'data-product-id': getId()},
">
<div class="product-image"><img data-bind="attr: { src: getImageUrl() }"/></div>

<div class="product-details">
<h1><span data-bind="html: getName()"></span></h1>
<p class="price" data-bind="text: getFormattedPrice()"></p>
<p class="stock" data-bind="text: getStockLabel()"></p>
</div>

<div class="score-container">
<p>
<span class="score-label" data-bind="text: getScoreLabel()"></span>
<span data-bind="text: getScore()"></span>
</p>
</div>
</li>
</ul>
</div>
<div class="product-details">
<h1><span data-bind="html: getName()"></span></h1>
<p class="price" data-bind="text: getFormattedPrice()"></p>
<p class="stock" data-bind="text: getStockLabel()"></p>
</div>

<div class="product-list-container">
<div class="product-list-title">
<h1><span data-bind="i18n: 'Optimized Results'"></span></h1>
<div class="score-container">
<p>
<span class="score-label" data-bind="text: getScoreLabel()"></span>
<span data-bind="text: getScore()"></span>
</p>
</div>
</li>
</ul>
</div>
<ul data-bind="foreach: optimizedProducts" class="product-list">
<li class="product-list-item" data-bind="
attr: {'data-product-id': getId()},
">
<div class="product-image"><img data-bind="attr: { src: getImageUrl() }"/></div>

<div class="product-details">
<h1><span data-bind="html: getName()"></span></h1>
<p class="price" data-bind="text: getFormattedPrice()"></p>
<p class="stock" data-bind="text: getStockLabel()"></p>
</div>
<div class="product-list-container">
<div class="product-list-title">
<h1><span data-bind="i18n: 'Optimized Results'"></span></h1>
</div>
<ul data-bind="foreach: optimizedProducts" class="product-list">
<li class="product-list-item" data-bind="
attr: {'data-product-id': getId()},
">
<div class="product-image"><img data-bind="attr: { src: getImageUrl() }"/></div>

<div class="product-details">
<h1><span data-bind="html: getName()"></span></h1>
<p class="price" data-bind="text: getFormattedPrice()"></p>
<p class="stock" data-bind="text: getStockLabel()"></p>
</div>

<div class="score-container">
<p>
<span class="score-label" data-bind="text: getScoreLabel()"></span>
<span data-bind="text: getScore()"></span>
</p>
<span class="effect" data-bind="css: getEffectClass()"></span>
</div>
<div class="score-container">
<p>
<span class="score-label" data-bind="text: getScoreLabel()"></span>
<span data-bind="text: getScore()"></span>
</p>
<span class="effect" data-bind="css: getEffectClass()"></span>
</div>

</li>
</ul>
</li>
</ul>
</div>
</div>
<p class="bottom-links" data-bind="visible: hasMoreProducts()">
<a href="#" data-bind="click: showMoreProducts, text: messages.showMore" class="show-more-link"></a>
Expand Down

0 comments on commit 1e8712b

Please sign in to comment.