2016-02-26 15:29:27 -05:00
|
|
|
define([], function () {
|
2016-10-02 02:46:32 -04:00
|
|
|
'use strict';
|
2016-02-26 15:29:27 -05:00
|
|
|
|
|
|
|
function replaceAll(str, find, replace) {
|
|
|
|
|
|
|
|
return str.split(find).join(replace);
|
|
|
|
}
|
|
|
|
|
|
|
|
return function (options) {
|
|
|
|
|
|
|
|
if (typeof options === 'string') {
|
|
|
|
options = {
|
|
|
|
text: options
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
var text = replaceAll(options.text || '', '<br/>', '\n');
|
|
|
|
|
|
|
|
alert(text);
|
|
|
|
|
|
|
|
return Promise.resolve();
|
|
|
|
};
|
|
|
|
});
|