-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from offirgolan/validation-hooks
Validation hooks
- Loading branch information
Showing
3 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
let Config = { | ||
import Ember from 'ember'; | ||
|
||
const Config = Ember.Object.extend(); | ||
|
||
Config.reopenClass({ | ||
formValidationSuccessIcon: 'glyphicon glyphicon-ok', | ||
formValidationErrorIcon: 'glyphicon glyphicon-remove', | ||
formValidationWarningIcon: 'glyphicon glyphicon-warning-sign', | ||
formValidationInfoIcon: 'glyphicon glyphicon-info-sign', | ||
insertEmberWormholeElementToDom: true, | ||
|
||
load(config) { | ||
for (let property in this) { | ||
if (this.hasOwnProperty(property) && typeof this[property] !== 'function' && typeof config[property] !== 'undefined') { | ||
load(config = {}) { | ||
for (let property in config) { | ||
if (this.hasOwnProperty(property) && typeof this[property] !== 'function') { | ||
this[property] = config[property]; | ||
} | ||
} | ||
} | ||
}; | ||
}); | ||
|
||
export default Config; |