Skip to content

Commit

Permalink
Merge pull request #267 from magento-frontend/bugs
Browse files Browse the repository at this point in the history
[Frontend] Bugs
  • Loading branch information
Yaroslav Onischenko authored Aug 22, 2016
2 parents 4df438c + 678bb29 commit ea342f1
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Search String</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
</argument>
</field>
Expand All @@ -82,6 +85,9 @@
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Theme Name</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
</argument>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
title: $parent.deleteButtonLabel
}
">
<span data-bind="text: $parent.deleteButtonLabel"></span>
<span translate="$parent.deleteButtonLabel"></span>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="action-secondary"
type="button"
click="processingAddChild.bind($data, false, false, false)">
<span text="addButtonLabel"/>
<span translate="addButtonLabel"/>
</button>
</div>

Expand All @@ -30,7 +30,7 @@
css="element.setClasses(element)"
attr="'data-index': index">
<label if="element.label" class="admin__field-label" attr="for: element.uid">
<span text="element.label"/>
<span translate="element.label"/>
</label>

<div class="admin__field-control" data-role="grid-wrapper">
Expand All @@ -51,7 +51,7 @@

<th repeat="foreach: labels, item: '$label'"
class="data-grid-th"
text="$label().label"
translate="$label().label"
visible="$label().visible"
disable="$label().disabled"
css="setClasses($label())">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
title: $parent.deleteButtonLabel
}
">
<span data-bind="text: $parent.deleteButtonLabel"></span>
<span translate="$parent.deleteButtonLabel"></span>
</button>
6 changes: 5 additions & 1 deletion app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ define([
* @returns {Object}
*/
function removeEmpty(data) {
return utils.mapRecursive(data, utils.removeEmptyValues.bind(utils));
var result = utils.mapRecursive(data, utils.removeEmptyValues.bind(utils));

return utils.mapRecursive(result, function (value) {
return _.isString(value) ? value.trim() : value;
});
}

return Collection.extend({
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Ui/view/base/web/js/grid/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define([
apply: function (value) {
value = value || this.inputValue;

this.value = this.inputValue = value;
this.value = this.inputValue = value.trim();

return this;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ define([
}

tooltip.setContent.apply(null, arguments);

return false;
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
title: $parent.deleteButtonLabel
}
">
<span data-bind="text: $parent.deleteButtonLabel"></span>
<span translate="$parent.deleteButtonLabel"></span>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<div class="admin__field" css="element.setClasses(element)">
<label if="element.label" class="admin__field-label" attr="for: element.uid">
<span text="element.label"/>
<span translate="element.label"/>
</label>

<div class="admin__field-control" data-role="grid-wrapper">
Expand All @@ -22,7 +22,7 @@

<thead if="element.columnsHeader">
<tr data-bind="foreach: {data: labels, as: 'label'}">
<th text="label.config.label"
<th translate="label.config.label"
css="item.columnsHeaderClasses">
</th>
</tr>
Expand All @@ -39,7 +39,7 @@
<render args="name: $parents[1].dndConfig.template, data: $parents[1].dnd"
if="$parents[1].dndConfig.enabled" />

<span text="$parent.getLabel(elem)" />
<span translate="$parent.getLabel(elem)" />
</div>

<button class="action-delete"
Expand All @@ -48,7 +48,7 @@
click="function(){
$parents[1].deleteRecord($parent.index, $parent.recordId)
}">
<span text="'Delete'"/>
<span translate="'Delete'"/>
</button>
</div>

Expand All @@ -66,7 +66,7 @@
<button attr="{disabled: disabled}"
type="button"
click="addChild.bind($data, false, false)">
<span text="addButtonLabel"/>
<span translate="addButtonLabel"/>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<div class="admin__field" visible="visible" disable="disabled" css="element.setClasses(element)">
<label if="element.label" class="admin__field-label" attr="for: element.uid">
<span text="element.label"/>
<span translate="element.label"/>
</label>

<div class="admin__field-control" data-role="grid-wrapper" attr="'data-index': index">
Expand All @@ -24,7 +24,7 @@
<tr>
<th if="dndConfig.enabled"/>
<th repeat="foreach: labels, item: '$label'"
text="$label().label"
translate="$label().label"
css="setClasses($label())"
visible="$label().visible"
disable="$label().disabled"
Expand Down Expand Up @@ -56,7 +56,7 @@
attr="{disabled: disabled, 'data-action': 'add_new_row'}"
type="button"
click="processingAddChild.bind($data, false, false, false)">
<span text="addButtonLabel"/>
<span translate="addButtonLabel"/>
</button>

<div class="admin__control-table-pagination" visible="!!$data.recordData().length && (pages() > 1)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
css="element.setClasses(element)"
attr="'data-index': index">
<label if="element.label" class="admin__field-label" attr="for: element.uid">
<span text="element.label"/>
<span translate="element.label"/>
</label>

<div class="admin__field-control" data-role="grid-wrapper">
Expand Down Expand Up @@ -40,7 +40,7 @@

<th repeat="foreach: labels, item: '$label'"
class="data-grid-th"
text="$label().label"
translate="$label().label"
visible="$label().visible"
disable="$label().disabled"
css="$label().columnsHeaderClasses">
Expand Down Expand Up @@ -73,7 +73,7 @@
<button attr="{disabled: disabled}"
type="button"
click="addChild.bind($data, false, false)">
<span text="addButtonLabel"/>
<span translate="addButtonLabel"/>
</button>
</div>
<render args="fallbackResetTpl" if="$data.showFallbackReset && $data.isDifferedFromDefault"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<div class="admin__field" visible="visible" css="$data.additionalClasses">
<label class="admin__field-label" if="$data.label" attr="for: uid">
<span text="label" attr="'data-config-scope': $data.scopeLabel"/>
<span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
</label>

<div class="admin__field-control" css="'_with-tooltip': $data.tooltip">
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Ui/view/base/web/templates/form/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
css="$data.additionalClasses"
attr="'data-index': index">
<label class="admin__field-label" if="$data.label" visible="$data.labelVisible" attr="for: uid">
<span text="label" attr="'data-config-scope': $data.scopeLabel"/>
<span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
</label>
<div class="admin__field-control"
css="'_with-tooltip': $data.tooltip, '_with-reset': $data.showFallbackReset && $data.isDifferedFromDefault">
Expand All @@ -33,7 +33,7 @@
<label class="admin__field-error" if="error" attr="for: uid" text="error"/>

<div class="admin__field-note" if="$data.notice" attr="id: noticeId">
<span text="notice"/>
<span translate="notice"/>
</div>

<div class="admin__additional-info" if="$data.additionalInfo" html="$data.additionalInfo"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'_changed': changed,
'_loading': loading,
'_error': error">
<span text="label"/>
<span translate="label"/>
<span class="admin__page-nav-item-messages" if="collapsible">
<span class="admin__page-nav-item-message _changed">
<span class="admin__page-nav-item-message-icon"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
_draggable: draggable,
_ascend: sorting === 'asc',
_descend: sorting === 'desc'">
<span class="data-grid-cell-content" text="label"/>
<span class="data-grid-cell-content" translate="label"/>
</th>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ko-checked="$col().visible"
attr="id: ++ko.uid"/>
<label class="admin__field-label"
text="$col().label"
translate="$col().label"
attr="for: ko.uid, title: $col().label"/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/
-->
<legend class="admin__form-field-legend">
<span text="label"/>
<span translate="label"/>
</legend>
<div class="admin__form-field" outereach="elems" render=""/>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="admin__form-field-label"
data-bind="attr: {for: uid}
">
<span data-bind="text: label"></span>
<span translate="label"></span>
</label>
<!-- /ko -->
<div
Expand Down Expand Up @@ -60,7 +60,7 @@
<div class="admin__action-multiselect-text"
data-bind="
visible: !hasData(),
text: selectedPlaceholders.defaultPlaceholder
i18n: selectedPlaceholders.defaultPlaceholder
">
</div>
<!-- ko foreach: { data: getSelected(), as: 'option'} -->
Expand All @@ -74,11 +74,7 @@
tabindex="-1"
data-bind="click: $parent.removeSelected.bind($parent, value)
">
<span
class="action-close-text"
data-bind="text: 'Close'
">
</span>
<span class="action-close-text" translate="'Close'"></span>
</button>
</span>
<!-- /ko -->
Expand Down Expand Up @@ -177,7 +173,7 @@
data-action="close-advanced-select"
type="button"
data-bind="click: outerClick">
<span data-bind="text: closeBtnLabel"></span>
<span translate="closeBtnLabel"></span>
</button>
</div>
<!-- /ko -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/
-->
<label class="admin__form-field-label" attr="for: uid">
<span text="label"/>
<span translate="label"/>
</label>
<div class="admin__form-field-control" render="elementTmpl"/>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
css="_required: required"
attr="'data-index': index">
<legend class="admin__field-label" if="showLabel">
<span text="label" attr="'data-config-scope': $data.scopeLabel"/>
<span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
</legend>

<div class="admin__field-control" css="$data.additionalClasses">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<!-- /ko -->

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

<label class="label" data-bind="attr: { for: element.uid }">
<!-- ko if: element.label -->
<span data-bind="text: element.label"></span>
<span translate="element.label"></span>
<!-- /ko -->
</label>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<fieldset class="field" data-bind="css: additionalClasses">
<legend class="label">
<span data-bind="text: element.label"></span>
<span translate="element.label"></span>
</legend>
<div class="control">
<!-- ko foreach: { data: elems, as: 'element' } -->
Expand Down

0 comments on commit ea342f1

Please sign in to comment.