diff --git a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js index 21ab03ff8c0..d04ecdfc9f5 100644 --- a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js +++ b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js @@ -472,12 +472,16 @@ Y.namespace('M.editor_atto.Editor').init = function(config) { * A notify function for the Atto editor. * * @module moodle-editor_atto-notify - * @submodule notify-base + * @submodule notify * @package editor_atto * @copyright 2014 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +var LOGNAME_NOTIFY = 'moodle-editor_atto-editor-notify', + NOTIFY_INFO = 'info', + NOTIFY_WARNING = 'warning'; + function EditorNotify() {} EditorNotify.ATTRS= { @@ -486,10 +490,10 @@ EditorNotify.ATTRS= { EditorNotify.prototype = { /** - * A single Y.Overlay for this editor. There is only ever one - it is replaced if a new message comes in. + * A single Y.Node for this editor. There is only ever one - it is replaced if a new message comes in. * * @property messageOverlay - * @type {Y.Overlay} + * @type {Node} */ messageOverlay: null, @@ -521,12 +525,15 @@ EditorNotify.prototype = { * Show a notification in a floaty overlay somewhere in the atto editor text area. * * @method showMessage - * @param {String} message - The translated message (use get_string) - * @param {String} type - Must be either "info" or "warning" - * @param {Integer} timeout - Time in milliseconds to show this message for. + * @param {String} message The translated message (use get_string) + * @param {String} type Must be either "info" or "warning" + * @param {Number} timeout Time in milliseconds to show this message for. * @chainable */ showMessage: function(message, type, timeout) { + var messageTypeIcon = '', + intTimeout, + bodyContent; if (this.messageOverlay === null) { this.messageOverlay = Y.Node.create('
'); @@ -543,29 +550,28 @@ EditorNotify.prototype = { this.hideTimer.cancel(); } - var messageTypeIcon = ''; - if (type === "warning") { + if (type === NOTIFY_WARNING) { messageTypeIcon = '' + M.util.get_string('warning', 'moodle') + ''; - } else if (type === "info") { + } else if (type === NOTIFY_INFO) { messageTypeIcon = '' + M.util.get_string('info', 'moodle') + ''; } else { - Y.log('Invalid message type specified: ' + type + '. Must be either "info" or "warning".', 'debug'); + Y.log('Invalid message type specified: ' + type + '. Must be either "info" or "warning".', 'debug', LOGNAME_NOTIFY); } // Parse the timeout value. - var inttimeout = parseInt(timeout, 10); - if (inttimeout <= 0) { - inttimeout = 60000; + intTimeout = parseInt(timeout, 10); + if (intTimeout <= 0) { + intTimeout = 60000; } // Convert class to atto_info (for example). type = 'atto_' + type; - var bodyContent = Y.Node.create('