X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ang%2FcrmUi.js;h=a66334015a256336d4a7bd7af57d51e46706544d;hb=b30f83363ce13a47f898a883ba85d600a422f69a;hp=6a54b58b7bf8d39ba23baee0dac7992c5631227f;hpb=1d924612b62f843699d1ced09d9771d3b70575a5;p=civicrm-core.git
diff --git a/ang/crmUi.js b/ang/crmUi.js
index 6a54b58b7b..a66334015a 100644
--- a/ang/crmUi.js
+++ b/ang/crmUi.js
@@ -124,7 +124,7 @@
// example:
{{mydata}}
// example:
// example:
- // example: {{mydata}}
+ // example: {{mydata}}
.directive('crmUiField', function() {
// Note: When writing new templates, the "label" position is particular. See/patch "var label" below.
var templateUrls = {
@@ -255,7 +255,7 @@
// immediately for initialization. Use retries/retryDelay to initialize such elements.
var init = function (retries, retryDelay) {
var input = $('#' + id);
- if (input.length === 0) {
+ if (input.length === 0 && !attrs.crmUiForceRequired) {
if (retries) {
$timeout(function(){
init(retries-1, retryDelay);
@@ -264,6 +264,11 @@
return;
}
+ if (attrs.crmUiForceRequired) {
+ scope.crmIsRequired = true;
+ return;
+ }
+
var tgtScope = scope;//.$parent;
if (attrs.crmDepth) {
for (var i = attrs.crmDepth; i > 0; i--) {
@@ -617,7 +622,6 @@
element.crmSelect2(scope.crmUiSelect || {});
if (ngModel) {
element.on('change', refreshModel);
- $timeout(ngModel.$render);
}
}
@@ -794,11 +798,7 @@
};
this.isSelectable = function(step) {
if (step.selected) return false;
- var result = false;
- angular.forEach(steps, function(otherStep, otherKey) {
- if (step === otherStep && otherKey <= maxVisited) result = true;
- });
- return result;
+ return this.$validStep();
};
/*** @param Object step the $scope of the step */