Skip to content

Commit

Permalink
Update from core
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jul 11, 2016
1 parent b84321f commit ea9d3c9
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 29 deletions.
53 changes: 49 additions & 4 deletions public/themes/aimeos.js
Expand Up @@ -485,7 +485,6 @@ AimeosCatalog = {
var prodDeps = $(event.delegateTarget).data("proddeps") || {}; // {"<prodid>":["attrid",...],...}
var attrMap = {}, attrList = [];


if( typeof index === "undefined" ) {
throw new Error( "HTML select node has no attribute data-index" );
}
Expand All @@ -509,13 +508,13 @@ AimeosCatalog = {
}


$(".select-list", event.delegateTarget).each(function(i, select) {
$(".select-list", event.delegateTarget).each(function(idx, select) {

if( event.currentTarget == select ) {
return;
}

$(this).find(".select-option").each(function(i, option) {
$(".select-option", this).each(function(i, option) {

var opt = $(option);
var val = opt.val();
Expand All @@ -535,8 +534,10 @@ AimeosCatalog = {
delete by[index];
}

if( disabled > 0 ) {
if( idx !== 0 && disabled > 0 ) {
opt.attr("disabled", "disabled");
opt.prop("selected", false);
opt.prop("checked", false);
} else {
opt.removeAttr("disabled");
}
Expand Down Expand Up @@ -640,6 +641,28 @@ AimeosCatalog = {
},


/**
* Shows the images associated to the variant attributes
*/
setupVariantImages: function() {

$(".catalog-detail-basket-selection, .catalog-list-items .items-selection").on("change", ".select-list", function(event) {

var elem = $(this);
var type = elem.data("type");
var value = elem.find(".select-option:checked").val();

elem.parents(".product").find(".image-single .item").each( function(ev) {

if( $(this).data("variant-" + type) == value ) {
window.location.hash = $(this).attr("id");
return false;
}
});
});
},


/**
* Adds products to the basket without page reload
*/
Expand All @@ -664,6 +687,7 @@ AimeosCatalog = {

this.setupSelectionDependencies();
this.setupSelectionContent();
this.setupVariantImages();
this.setupVariantCheck();
this.setupBasketAdd();
}
Expand Down Expand Up @@ -801,6 +825,26 @@ AimeosCatalogFilter = {
},


/**
* Registers events for the catalog filter search input reset
*/
setupSearchTextReset: function() {

$(".catalog-filter-search").on("keyup", ".value", function(ev) {
if ($(this).val() !== "") {
$(".reset .symbol", ev.delegateTarget).css("visibility", "visible");
} else {
$(".reset .symbol", ev.delegateTarget).css("visibility", "hidden");
}
});

$(".catalog-filter-search").on("click", ".reset", function(ev) {
$(".symbol", this).css("visibility", "hidden");
$(".value", ev.delegateTarget).focus();
});
},


/**
* Initialize the catalog filter actions
*/
Expand All @@ -814,6 +858,7 @@ AimeosCatalogFilter = {
this.setupAttributeItemSubmit();

this.setupFormChecks();
this.setupSearchTextReset();
this.setupSearchAutocompletion();
}
};
Expand Down
96 changes: 71 additions & 25 deletions public/themes/elegance/aimeos.css
@@ -1,6 +1,6 @@
/*
* Aimeos elegance template CSS
*
*
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2014-2016
*/
Expand Down Expand Up @@ -77,7 +77,7 @@
.aimeos .standardbutton::-moz-focus-inner,
.aimeos .minibutton::-moz-focus-inner {
padding: 0;
border: 0;
border: 0;
}

.aimeos .btn-action {
Expand All @@ -94,7 +94,7 @@
background-color: #AAA;
box-shadow: none;
cursor: not-allowed;

}

.aimeos .btn-disabled:hover {
Expand Down Expand Up @@ -390,14 +390,46 @@
padding: 0 1em;
height: 1.525em;
min-width: 5em;
width: 80%;
width: 70%;
}

.catalog-filter-search .value:focus,
.catalog-filter-search .reset:focus {
outline-style: none;
}

.catalog-filter-search .reset {
height: 1.525em;
vertical-align: top;
background-color: #FFFFFF;
border-style: none;
border: none;
width: 10%;
}

.catalog-filter-search .reset .symbol {
vertical-align: top;
font-weight: bold;
font-size: 105%;
color: #AAAAAA;
}

.catalog-filter-search .value[value=''] + .reset .symbol {
visibility: hidden;
}

.catalog-filter-search .reset .symbol:before {
content: "⨯";
}

.catalog-filter-search button.standardbutton {
line-height: 1.525em;
vertical-align: top;
background: none;
box-shadow: none;
border-radius: 0;
border: 0 none;
height: 1.525em;
min-width: 2em;
padding: 0;
margin: 0;
Expand Down Expand Up @@ -674,7 +706,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
.catalog-stage-breadcrumb li {
display: inline;
white-space: nowrap;
}
}

.catalog-stage-breadcrumb li:after {
content: ' / ';
Expand Down Expand Up @@ -740,7 +772,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
}

.catalog-list .product a {
display: inline-block;
display: inline-block;
text-decoration: none;
}

Expand Down Expand Up @@ -891,7 +923,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
text-align: center;
margin: 2em 0;
}

.catalog-list-promo .header {
text-align: left;
border: 0 none;
Expand Down Expand Up @@ -922,6 +954,25 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
clear: both;
}

/* Product list type switcher */
.catalog-list-type {
text-align: right;
}

.catalog-list-type .type-item {
padding: 0.5em;
}

.catalog-list-type .type-grid:after {
font: normal normal normal 20px/1 FontAwesome;
content: "\f00a";
}

.catalog-list-type .type-list:after {
font: normal normal normal 20px/1 FontAwesome;
content: "\f00b";
}


/* Product details */

Expand Down Expand Up @@ -1030,7 +1081,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
}

.catalog-detail-image .next-thumbs {
background: url(media/arrow_small_bottom.png) no-repeat;
background: url(media/arrow_small_bottom.png) no-repeat;
}

.catalog-detail-image .prev-thumbs.disabled,
Expand Down Expand Up @@ -1213,10 +1264,13 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {

.catalog-list-items .addbasket input,
.catalog-detail-basket .group input {
vertical-align: middle;
text-align: center;
height: 1.6em;
width: 5em;
vertical-align: middle;
border: 1px solid #B0A060;
line-height: normal;
font-size: 125%;
padding: 0.2em;
width: 4em;
}

/* services */
Expand Down Expand Up @@ -1435,7 +1489,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
.catalog-detail-additional .properties td {
padding: 1%;
width: 48%;
}
}

.catalog-detail-additional .attributes .media-list {
display: inline-block;
Expand All @@ -1447,7 +1501,7 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {

.catalog-detail-additional .attributes img {
height: 1em;
}
}

/* Product detail, additional download section */
.catalog-detail-additional .downloads .media-image {
Expand Down Expand Up @@ -2053,8 +2107,8 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
clear: both;
}

.checkout-standard-address .form-list .form-item {
display: none;
.checkout-standard-address .form-list .form-item {
display: none;
}

.checkout-standard-address .form-list .mandatory,
Expand Down Expand Up @@ -2128,11 +2182,6 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
margin: 1em;
}

.checkout-standard-delivery .button-group a.standardbutton,
.checkout-standard-payment .button-group a.standardbutton {
margin: 0 1em 0 0;
}

/* Checkout summary */
.checkout-standard-summary h3 {
display: inline-block;
Expand All @@ -2148,10 +2197,6 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
padding: 0 0 1em 0;
}

.checkout-standard-summary .button-group a.standardbutton {
margin: 0 1em 0 0;
}

.checkout-standard-summary .modify {
float: right;
}
Expand Down Expand Up @@ -2180,8 +2225,9 @@ html.no-js .catalog-filter-attribute:hover .attribute-lists {
padding: 0.5em 0;
}

.checkout-standard-summary-option label,
.checkout-standard-summary-option input {
display: inline-block;
display: inline;
}

.checkout-standard-summary-option input[type="checkbox"] {
Expand Down

0 comments on commit ea9d3c9

Please sign in to comment.