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
/** | |
* The button text to use to accept the alert. | |
* | |
* @attribute yesLabel | |
* @type String | |
* @default 'Ok' | |
*/ | |
yesLabel : { | |
validator : Y.Lang.isString, | |
setter : function(txt) { | |
if (!txt) { | |
txt = 'Ok'; | |
} | |
return txt; | |
}, | |
value : 'Ok' | |
} |
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
/** | |
* The button text to use to accept the alert. | |
* | |
* @attribute yesLabel | |
* @type Object | |
* @default { | |
* identifier: 'ok', | |
* component: 'moodle | |
* } | |
} | |
*/ | |
yesLabel : { | |
value : { | |
identifier: 'ok', | |
component: 'moodle' | |
} | |
getter: function(value) { | |
if (typeof value === 'object') { | |
return M.util.get_string( | |
value.identifier || 'ok', | |
value.component || 'moodle' | |
); | |
} else { | |
Y.log("Found a deprecated yesLabel value of '" + value "'", 'warn', 'moodle-core-notification-alert'); | |
return value; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment