Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/develop' into MAGETWO-50528
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Kolesov committed Apr 28, 2016
2 parents c5bee07 + 2b0d791 commit dfea096
Show file tree
Hide file tree
Showing 17 changed files with 1,474 additions and 1,187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ define([
return this.relatedData.slice(this.startIndex, this.startIndex + this.pageSize);
},

/**
* Get number of columns
*
* @returns {Number} columns
*/
getColumnsCount: function () {
return this.labels().length + (this.dndConfig.enabled ? 1 : 0);
},

/**
* Processing pages before addChild
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
</label>

<div class="admin__field-control" data-role="grid-wrapper" attr="'data-index': index">

<div class="admin__control-table-pagination" visible="!!$data.recordData().length">
<div class="admin__data-grid-pager">
<button class="action-previous" type="button" data-bind="attr: {title: $t('Previous Page')}, click: previousPage, disable: isFirst()"></button>
<input class="admin__control-text" type="number" data-bind="attr: {id: ++ko.uid}, value: currentPage">
<label class="admin__control-support-text" data-bind="attr: {for: ko.uid}, text: 'of ' + pages()"></label>
<button class="action-next" type="button" data-bind="attr: {title: $t('Next Page')}, click: nextPage, disable: isLast()"></button>
</div>
</div>

<div class="admin__control-table-wrapper">
<div data-role="spinner"
class="admin__data-grid-loading-mask"
Expand All @@ -28,44 +18,59 @@
<span repeat="8"/>
</div>
</div>

<table class="admin__dynamic-rows admin__control-table" data-role="grid" attr="{'data-index': index}">
<thead if="element.columnsHeader">
<tr>
<th if="dndConfig.enabled"/>
<th repeat="foreach: labels, item: '$label'"
text="$label().label"
css="setClasses($label())"
visible="$label().visible"
disable="$label().disabled"
attr="{'data-name': name}"/>
</th>
</tr>
<tr>
<th if="dndConfig.enabled"/>
<th repeat="foreach: labels, item: '$label'"
text="$label().label"
css="setClasses($label())"
visible="$label().visible"
disable="$label().disabled"
attr="{'data-name': name}"/>
</th>
</tr>
</thead>

<tbody>
<tr class="data-row" repeat="foreach: elems, item: '$record'">
<td if="dndConfig.enabled"
class="col-draggable"
template="name: dndConfig.template, data: dnd"/>
<tr class="data-row" repeat="foreach: elems, item: '$record'">
<td if="dndConfig.enabled"
class="col-draggable"
template="name: dndConfig.template, data: dnd"/>

<!-- ko fastForEach: { data: $record().elems, as: 'elem'} -->
<td if="elem.template"
css="$parent.setClasses(elem)"
visible="elem.visible"
disable="elem.disabled"
template="elem.template"/>
<!-- /ko -->
</tr>
<!-- ko fastForEach: { data: $record().elems, as: 'elem'} -->
<td if="elem.template"
css="$parent.setClasses(elem)"
visible="elem.visible"
disable="elem.disabled"
template="elem.template"/>
<!-- /ko -->
</tr>
</tbody>
</table>
</div>

<div class="admin__control-table-action" if="element.addButton">
<button attr="{disabled: disabled, 'data-action': 'add_new_row'}"
type="button"
click="processingAddChild.bind($data, false, false, false)">
<span text="addButtonLabel"/>
</button>
<tfoot>
<tr>
<td attr="{'colspan': element.getColumnsCount()}">
<button if="element.addButton"
attr="{disabled: disabled, 'data-action': 'add_new_row'}"
type="button"
click="processingAddChild.bind($data, false, false, false)">
<span text="addButtonLabel"/>
</button>

<div class="admin__control-table-pagination" visible="!!$data.recordData().length && (pages() > 1)">
<div class="admin__data-grid-pager">
<button class="action-previous" type="button" data-bind="attr: {title: $t('Previous Page')}, click: previousPage, disable: isFirst()"></button>
<input class="admin__control-text" type="number" data-bind="attr: {id: ++ko.uid}, value: currentPage">
<label class="admin__control-support-text" data-bind="attr: {for: ko.uid}, text: 'of ' + pages()"></label>
<button class="action-next" type="button" data-bind="attr: {title: $t('Next Page')}, click: nextPage, disable: isLast()"></button>
</div>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
&.admin__fieldset {
padding: 0;

.admin__field {
> .admin__field {
margin-left: -@temp_gutter;
}
}
Expand All @@ -22,6 +22,16 @@
text-align: left;
}
}

[class*='field-website_label'] {
.admin__field-label {
text-align: right;
}

.admin__field-tooltip {
margin: -.2rem 0 0 -@indent__m;
}
}
}

.store-scope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
font-size: @dashboard__font-size__base;
width: 100%;

tr {
&._clickable {
cursor: pointer;
}
}

th,
td {
padding: 1rem 0 1rem 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
}
}

.catalog-category-edit {
.catalog-category-edit,
.catalog-category-add {
// TODO: refactor trees
.x-tree.tree-wrapper {
overflow-x: auto;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// /**
// * Copyright © 2016 Magento. All rights reserved.
// * See COPYING.txt for license details.
// */

.admin__field-amount {
.admin__control-table {
width: auto;
}

tbody {
.admin__control-text {
min-width: @field-size__s;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@
padding-top: 0;
}
}

td {
border-top: 1px solid @control-table-cell__border-color;
}

.admin__control-table-pagination {
float: right;
padding-bottom: 0;
}

.action-previous {
margin-right: .5rem;
}

.action-next {
margin-left: .9rem;
}
}

tr {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,93 @@
* See COPYING.txt for license details.
*/

.fotorama-video-container {
&:after {
background: url(../Magento_ProductVideo/img/gallery-sprite.png) bottom right;
//
// Common
// _____________________________________________

& when (@media-common = true) {
.fotorama-video-container {
&:after {
background: url(../Magento_ProductVideo/img/gallery-sprite.png) bottom right;
bottom: 0;
content: '';
height: 100px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 12px;
width: 100px;
}

.magnify-lens {
display: none !important;
}

&.video-unplayed {
&:hover {
img {
opacity: 0.6;
}

&:after {
transform: scale(1.25);
}
}
}
}

.video-thumb-icon:after {
background: url(../Magento_ProductVideo/img/gallery-sprite.png) bottom left;
bottom: 0;
content: '';
height: 100px;
height: 40px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 12px;
width: 100px;
top: 10px;
width: 49px;
}

.magnify-lens {
display: none !important;
}

&.video-unplayed {
&:hover {
img {
opacity: 0.6;
}
.product-video {
height: 75%;
left: 0;
position: absolute;
top: 0;
width: 100%;
right: 0;
bottom: 0;
margin: auto;

&:after {
transform: scale(1.25);
}
iframe {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 9999;
}
}
}

.video-thumb-icon:after {
background: url(../Magento_ProductVideo/img/gallery-sprite.png) bottom left;
bottom: 0;
content: '';
height: 40px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 10px;
width: 49px;
}

.product-video {
height: 75%;
left: 0;
position: absolute;
top: 0;
width: 100%;
right: 0;
bottom: 0;
margin: auto;
iframe {
height: 100%;
.fotorama__stage__shaft:focus .fotorama__stage__frame.fotorama__active:after {
bottom: 0;
content: '';
height: 100px;
left: 0;
margin: auto;
position: absolute;
top: 0;
width: 100%;
z-index: 9999;
right: 0;
top: 12px;
width: 100px;
}
}

//
// Mobile
// _____________________________________________

// @TODO UI: check possibility to use .media-width() mixin
@media only screen
and (min-device-width : 320px)
and (max-device-width : 780px)
Expand All @@ -75,15 +99,3 @@ and (orientation : landscape) {
width: 81%;
}
}

.fotorama__stage__shaft:focus .fotorama__stage__frame.fotorama__active:after {
bottom: 0;
content: '';
height: 100px;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 12px;
width: 100px;
}
Loading

0 comments on commit dfea096

Please sign in to comment.