* Sets proper modification state for model controller according to * current/master value.
()
| 88 | * current/master value. |
| 89 | */ |
| 90 | function onInputValueChanged () { |
| 91 | |
| 92 | if (!masterValueIsSet) { |
| 93 | initializeMasterValue(); |
| 94 | } |
| 95 | |
| 96 | var modified = !compare(modelCtrl.$modelValue, modelCtrl.masterValue); |
| 97 | |
| 98 | // If modified flag has changed. |
| 99 | if (modelCtrl.modified !== modified) { |
| 100 | |
| 101 | // Setting new flag. |
| 102 | modelCtrl.modified = modified; |
| 103 | |
| 104 | // Notifying the form. |
| 105 | if (formCtrl && 'function' === typeof formCtrl.$$onChildModelModifiedStateChanged) { |
| 106 | formCtrl.$$onChildModelModifiedStateChanged(modelCtrl); |
| 107 | } |
| 108 | |
| 109 | // Re-decorating the element. |
| 110 | updateCssClasses(); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Initializes master value if required. |
nothing calls this directly
no test coverage detected