Added form-level change event

This commit is contained in:
Henry
2016-02-08 17:46:21 -08:00
parent 9371fcbc4c
commit be031285b9
7 changed files with 18 additions and 23 deletions

View File

@@ -23,7 +23,7 @@
<input type="checkbox"
name="mctControl"
ng-model="ngModel[field]"
ng-change="structure.onchange(ngModel[field])"
ng-change="ngChange()"
ng-disabled="ngDisabled">
<em></em>
</label>

View File

@@ -24,7 +24,7 @@
name="mctControl"
ng-model="ngModel[field]"
ng-disabled="ngDisabled"
ng-change="structure.onchange(ngModel[field])"
ng-change="ngChange()"
ng-value="structure.value">
<em></em>
</label>

View File

@@ -24,7 +24,7 @@
ng-model="ngModel[field]"
ng-options="opt.value as opt.name for opt in options"
ng-required="ngRequired"
ng-change="structure.onchange(ngModel[field])"
ng-change="ngChange()"
name="mctControl">
<option value="" ng-show="!ngModel[field]">- Select One -</option>
</select>

View File

@@ -25,7 +25,7 @@
ng-required="ngRequired"
ng-model="ngModel[field]"
ng-pattern="ngPattern"
ng-change="structure.onchange(ngModel[field])"
ng-change="ngChange()"
size="{{structure.size}}"
name="mctControl">
</span>

View File

@@ -41,7 +41,7 @@
<mct-control key="row.control"
ng-model="ngModel"
ng-required="row.required"
ng-change="row.onchange"
ng-change="row.onchange(ngModel[row.key]); structure.onchange(ngModel)"
ng-pattern="getRegExp(row.pattern)"
options="row.options"
structure="row"

View File

@@ -97,6 +97,8 @@ define(
// Set of choices (if any)
options: "=",
ngChange: "&",
// Structure (subtree of Form Structure)
structure: "=",