fixes: U4-7905 val-highlight directive not highlighting error fields (red border) in 7.4.0
This commit is contained in:
@@ -8,9 +8,9 @@ function valHighlight($timeout) {
|
||||
return {
|
||||
restrict: "A",
|
||||
link: function (scope, element, attrs, ctrl) {
|
||||
|
||||
|
||||
attrs.$observe("valHighlight", function (newVal) {
|
||||
if (newVal === true) {
|
||||
if (newVal === "true") {
|
||||
element.addClass("highlight-error");
|
||||
$timeout(function () {
|
||||
//set the bound scope property to false
|
||||
@@ -25,4 +25,4 @@ function valHighlight($timeout) {
|
||||
}
|
||||
};
|
||||
}
|
||||
angular.module('umbraco.directives.validation').directive("valHighlight", valHighlight);
|
||||
angular.module('umbraco.directives.validation').directive("valHighlight", valHighlight);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="umb-editor" ng-controller="Umbraco.PrevalueEditors.MultiValuesController">
|
||||
<div class="control-group">
|
||||
<input name="newItem" type="text" ng-model="newItem" val-highlight="hasError" />
|
||||
<input name="newItem" type="text" ng-model="newItem" val-highlight="{{hasError}}" />
|
||||
<button class="btn btn-small" ng-click="add($event)">Add</button>
|
||||
</div>
|
||||
<div ui-sortable="sortableOptions">
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
<div class="control-group">
|
||||
<label>Alias</label>
|
||||
<input name="newItem.alias" type="text"
|
||||
ng-model="newItem.alias" val-highlight="hasError" />
|
||||
ng-model="newItem.alias" val-highlight="{{hasError}}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>Size</label>
|
||||
<input name="newItem.width" type="number" placeholder="Width"
|
||||
ng-model="newItem.width" class="umb-editor-tiny" val-highlight="hasError" />
|
||||
ng-model="newItem.width" class="umb-editor-tiny" val-highlight="{{hasError}}" />
|
||||
×
|
||||
<input name="newItem.height" type="number" placeholder="Height"
|
||||
ng-model="newItem.height" class="umb-editor-tiny" val-highlight="hasError" />
|
||||
ng-model="newItem.height" class="umb-editor-tiny" val-highlight="{{hasError}}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
@@ -46,4 +46,4 @@
|
||||
<button class="btn btn-small" ng-click="newItem = {}" prevent-default>Add new crop</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="text" ng-model="newCaption" localize="placeholder" placeholder="@relatedlinks_captionPlaceholder" val-highlight="hasError" /></td>
|
||||
<td><input type="text" ng-model="newCaption" localize="placeholder" placeholder="@relatedlinks_captionPlaceholder" val-highlight="{{hasError}}" /></td>
|
||||
<td>
|
||||
<div ng-show="addExternal">
|
||||
<input type="text" ng-model="newLink" localize="placeholder" placeholder="@relatedlinks_externalLinkPlaceholder" />
|
||||
|
||||
Reference in New Issue
Block a user