Skip to content

Commit

Permalink
Merge pull request #469 from magento-webdev/PR
Browse files Browse the repository at this point in the history
[WD] Bugfixes
  • Loading branch information
vpelipenko committed Jul 15, 2015
2 parents 770a753 + 9026b70 commit edfcdf1
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
<button data-role="review-save"
type="submit"
data-bind="
attr: {title: $t('Place order')},
attr: {title: $t('Place Order')},
enable: (getCode() == isChecked()),
click: placeOrder,
css: {disabled: !isPlaceOrderActionAllowed()}
"
class="action primary checkout"
disabled>
<span data-bind="text: $t('Place order')"></span>
<span data-bind="text: $t('Place Order')"></span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
<button data-role="review-save"
type="submit"
data-bind="
attr: {title: $t('Place order')},
attr: {title: $t('Place Order')},
enable: (getCode() == isChecked()),
click: placeOrder,
css: {disabled: !isPlaceOrderActionAllowed()}
"
class="action primary checkout"
disabled>
<span data-bind="text: $t('Place order')"></span>
<span data-bind="text: $t('Place Order')"></span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,26 @@
<span><!-- ko text: $t('Card Verification Number')--><!-- /ko --></span>
</label>
<div class="control">
<input type="number" class="input-text cvv" name="payment[cc_cid]" value=""
data-bind="attr: {id: getCode() + '_cc_cid', title: $t('Card Verification Number'), 'data-container': getCode() + '-cc-cvv', 'data-validate': JSON.stringify({'required-number':true, 'validate-cc-cvn':'#' + getCode() + '_cc_type'})},
enable: true,
value: creditCardVerificationNumber"/>
<div class="note">
<a href="#" class="action cvv" data-bind="attr: {title: $t('What is this?')}, mageInit:{'tooltip': {'content': getCvvImageHtml()}}"><span><!-- ko text: $t('What is this?')--><!-- /ko --></span></a>
<input type="number"
class="input-text cvv"
name="payment[cc_cid]"
value=""
data-bind="attr: {id: getCode() + '_cc_cid',
title: $t('Card Verification Number'),
'data-container': getCode() + '-cc-cvv',
'data-validate': JSON.stringify({'required-number':true, 'validate-cc-cvn':'#' + getCode() + '_cc_type'})},
enable: true,
value: creditCardVerificationNumber" />
<div class="field-tooltip toggle">
<span class="field-tooltip-action action-cvv"
tabindex="0"
data-toggle="dropdown"
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
<span><!-- ko text: $t('What is this?')--><!-- /ko --></span>
</span>
<div class="field-tooltip-content"
data-target="dropdown"
data-bind="html: getCvvImageHtml()"></div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,27 @@
<span><!-- ko text: $t('Card Verification Number')--><!-- /ko --></span>
</label>
<div class="control _with-tooltip">
<input type="number" autocomplete="off" class="input-text cvv" name="payment[cc_cid]" value=""
data-bind="attr: {id: getCode() + '_cc_cid', title: $t('Card Verification Number'), 'data-container': getCode() + '-cc-cvv', 'data-validate': JSON.stringify({'required-number':true, 'validate-card-cvv':'#' + getCode() + '_cc_type'})},
enable: isActive($parents),
value: creditCardVerificationNumber"/>
<input type="number"
autocomplete="off"
class="input-text cvv"
name="payment[cc_cid]"
value=""
data-bind="attr: {id: getCode() + '_cc_cid',
title: $t('Card Verification Number'),
'data-container': getCode() + '-cc-cvv',
'data-validate': JSON.stringify({'required-number':true, 'validate-card-cvv':'#' + getCode() + '_cc_type'})},
enable: isActive($parents),
value: creditCardVerificationNumber" />
<div class="field-tooltip toggle">
<span class="field-tooltip-action action-cvv" data-bind="attr: {title: $t('What is this?')}">
<span class="field-tooltip-action action-cvv"
tabindex="0"
data-toggle="dropdown"
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
<span><!-- ko text: $t('What is this?')--><!-- /ko --></span>
</span>
<div class="field-tooltip-content" data-bind="html: getCvvImageHtml()"></div>
<div class="field-tooltip-content"
data-target="dropdown"
data-bind="html: getCvvImageHtml()"></div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<div class="actions-toolbar" id="review-buttons-container">
<div class="primary">
<button data-role="review-save" type="submit"
data-bind="attr: {title: $t('Place order')}"
data-bind="attr: {title: $t('Place Order')}"
class="button action primary checkout">
<span data-bind="text: $t('Place order')"></span>
<span data-bind="text: $t('Place Order')"></span>
</button>
<button type="submit" id="originalPlaceOrder" class="hidden"
data-bind="click: originalPlaceOrder($parents[1])"></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
<button data-role="review-save"
type="submit"
data-bind="
attr: {title: $t('Place order')},
attr: {title: $t('Place Order')},
enable: (getCode() == isChecked()),
click: placeOrder,
css: {disabled: !isPlaceOrderActionAllowed()}
"
class="action primary checkout"
disabled>
<span data-bind="text: $t('Place order')"></span>
<span data-bind="text: $t('Place Order')"></span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
* See COPYING.txt for license details.
*/
-->
<div class="shipping-policy-block field-tooltip" data-bind="visible: config.isEnabled">
<span class="field-tooltip-action">
<div class="shipping-policy-block field-tooltip"
data-bind="visible: config.isEnabled">
<span class="field-tooltip-action"
tabindex="0"
data-toggle="dropdown"
data-bind="mageInit: {'dropdown':{'activeClass': '_active'}}">
<!-- ko text: $t('See our Shipping Policy') --><!-- /ko -->
</span>
<div class="field-tooltip-content">
<div class="field-tooltip-content"
data-target="dropdown">
<span data-bind="html: config.shippingPolicyContent"></span>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@
*/
-->
<div class="field-tooltip toggle">
<a class="field-tooltip-action action-help" target="_blank" data-bind="attr: {href: tooltip.link}">
</a>
<div class="field-tooltip-content">

<!-- ko if: (tooltip.link)-->
<a class="field-tooltip-action action-help"
target="_blank"
data-toggle="dropdown"
data-bind="attr: {href: tooltip.link}, mageInit: {'dropdown':{'activeClass': '_active'}}"></a>
<!-- /ko -->

<!-- ko if: (!tooltip.link)-->
<span class="field-tooltip-action action-help"
tabindex="0"
data-toggle="dropdown"
data-bind="mageInit: {'dropdown':{'activeClass': '_active'}}"></span>
<!-- /ko -->

<div class="field-tooltip-content"
data-target="dropdown">
<!-- ko text: tooltip.description --><!-- /ko -->
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@
}
}

.ui-widget-overlay {
&:extend(.abs-modal-overlay all);
}

.overlay_magento {
&:extend(.abs-modal-overlay all);
z-index: 800 !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@
& when (@media-common = true) {

.field-tooltip {
cursor: pointer;
position: absolute;
right: 0;
top: 1px;

&:hover {
&._active {
.css(z-index, @checkout-tooltip__hover__z-index);
cursor: pointer;

.field-tooltip-content {
display: block;
}
Expand All @@ -56,19 +57,23 @@

.field-tooltip-action {
.icon-font(
@checkout-tooltip-icon__content,
@_icon-font-size: @checkout-tooltip-icon__font-size,
@_icon-font-text-hide: true,
@_icon-font-color: @checkout-tooltip-icon__color,
@_icon-font-color-hover: @checkout-tooltip-icon__hover__color,
@_icon-font-color-active: false
@checkout-tooltip-icon__content,
@_icon-font-size: @checkout-tooltip-icon__font-size,
@_icon-font-text-hide: true,
@_icon-font-color: @checkout-tooltip-icon__color,
@_icon-font-color-hover: @checkout-tooltip-icon__hover__color,
@_icon-font-color-active: false
);

&:focus {
&:before {
.css(color, @checkout-tooltip-icon__hover__color);
}
+ .field-tooltip-content {
display: block;
._keyfocus & {
.css(z-index, @checkout-tooltip__hover__z-index);
+ .field-tooltip-content {
display: block;
}
&:before {
.css(color, @checkout-tooltip-icon__hover__color);
}
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions app/design/frontend/Magento/blank/web/css/source/_extends.less
Original file line number Diff line number Diff line change
Expand Up @@ -1046,18 +1046,6 @@
input {
.css(margin-right, @indent__s);
width: calc(~"100% - (@{checkout-tooltip-icon__font-size} + @{indent__s} + @{indent__xs})");
&:focus {
+ .field-tooltip {
.field-tooltip-action {
&:before {
.css(color, @checkout-tooltip-icon__hover__color);
}
}
.field-tooltip-content {
display: block;
}
}
}
}
}

Expand Down
12 changes: 0 additions & 12 deletions app/design/frontend/Magento/luma/web/css/source/_extends.less
Original file line number Diff line number Diff line change
Expand Up @@ -1434,18 +1434,6 @@
input {
.css(margin-right, @indent__s);
width: calc(~"100% - (@{checkout-tooltip-icon__font-size} + @{indent__s} + @{indent__xs})");
&:focus {
+ .field-tooltip {
.field-tooltip-action {
&:before {
.css(color, @checkout-tooltip-icon__hover__color);
}
}
.field-tooltip-content {
display: block;
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/dropdowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ define([
if(options.autoclose === true) {
self.reset({elems: actionElem.not(elem)});
}
self[elem.hasClass('active') ? 'closeDropdown' : 'openDropdown'](elem);
self[elem.hasClass(options.activeClass) ? 'closeDropdown' : 'openDropdown'](elem);

return false;
});
Expand Down

0 comments on commit edfcdf1

Please sign in to comment.