Skip to content

Commit

Permalink
PT-1134: Fix validation on icon click (VirtoCommerce#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
akak1977 authored May 13, 2021
1 parent efa2d55 commit 35c75b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ angular.module('platformWebApp').controller('platformWebApp.settingDictionaryCon
$scope.selectItem(null);
$scope.applyOrder();
}
else {
setTimeout(() => $('#dictValue').focus());
}
};

$scope.inputKeyUp = function ($event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
<td class="table-col" ng-click="data.$selected=!data.$selected">
<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{'ui-grid-row-selected': data.$selected}">&nbsp;</div>
</td>
<td class="table-col" ng-click="selectItem(data);">
<td class="table-col" ng-click="!error && selectItem(data)">
<div ng-if="data===selectedItem">
<div class="form-input">
<div class="form-input" ng-if="blade.currentEntity.valueType !== 'Number'">
<input id="dictValue" autocomplete="off" required ng-model="editValue.value" maxlength="512" ng-blur="selectItem(null)" ng-keyup="inputKeyUp($event)" />
<input id="dictValue" autocomplete="off" required ng-model="editValue.value" maxlength="512" ng-blur="!error && selectItem(null)" ng-keyup="inputKeyUp($event)" />
</div>
<div class="form-input __number" ng-if="blade.currentEntity.valueType === 'Number'">
<input id="dictValue" autocomplete="off" smart-float required ng-model="editValue.value" maxlength="36" num-type="float" ng-blur="selectItem(null)" ng-keyup="inputKeyUp($event)"/>
<input id="dictValue" autocomplete="off" smart-float required ng-model="editValue.value" maxlength="36" num-type="float" ng-blur="!error && selectItem(null)" ng-keyup="inputKeyUp($event)"/>
</div>
<button ng-mousedown="applyValue()" type="button" class="btn">
<i class="btn-ico fas fa-save" ng-class="icon"></i>
Expand Down

0 comments on commit 35c75b8

Please sign in to comment.