diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-01-31 18:28:26 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-02-01 07:56:38 +0100 |
commit | 4846aea9517d1bda4293e3064179f777c1d07aa1 (patch) | |
tree | 8e4b8152b20e054b4998f304a93b16f6bb2afa88 /core/js/js.js | |
parent | 4fcadd27b05f0b2c2d1e56a15235670ade12e888 (diff) | |
download | nextcloud-server-4846aea9517d1bda4293e3064179f777c1d07aa1.tar.gz nextcloud-server-4846aea9517d1bda4293e3064179f777c1d07aa1.zip |
Move OC.msg to the server bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/core/js/js.js b/core/js/js.js index 0dce992290a..c542e95cad0 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -973,99 +973,6 @@ OC.addStyle.loaded=[]; OC.addScript.loaded=[]; /** - * A little class to manage a status field for a "saving" process. - * It can be used to display a starting message (e.g. "Saving...") and then - * replace it with a green success message or a red error message. - * - * @namespace OC.msg - */ -OC.msg = { - /** - * Displayes a "Saving..." message in the given message placeholder - * - * @param {Object} selector Placeholder to display the message in - */ - startSaving: function(selector) { - this.startAction(selector, t('core', 'Saving...')); - }, - - /** - * Displayes a custom message in the given message placeholder - * - * @param {Object} selector Placeholder to display the message in - * @param {string} message Plain text message to display (no HTML allowed) - */ - startAction: function(selector, message) { - $(selector).text(message) - .removeClass('success') - .removeClass('error') - .stop(true, true) - .show(); - }, - - /** - * Displayes an success/error message in the given selector - * - * @param {Object} selector Placeholder to display the message in - * @param {Object} response Response of the server - * @param {Object} response.data Data of the servers response - * @param {string} response.data.message Plain text message to display (no HTML allowed) - * @param {string} response.status is being used to decide whether the message - * is displayed as an error/success - */ - finishedSaving: function(selector, response) { - this.finishedAction(selector, response); - }, - - /** - * Displayes an success/error message in the given selector - * - * @param {Object} selector Placeholder to display the message in - * @param {Object} response Response of the server - * @param {Object} response.data Data of the servers response - * @param {string} response.data.message Plain text message to display (no HTML allowed) - * @param {string} response.status is being used to decide whether the message - * is displayed as an error/success - */ - finishedAction: function(selector, response) { - if (response.status === "success") { - this.finishedSuccess(selector, response.data.message); - } else { - this.finishedError(selector, response.data.message); - } - }, - - /** - * Displayes an success message in the given selector - * - * @param {Object} selector Placeholder to display the message in - * @param {string} message Plain text success message to display (no HTML allowed) - */ - finishedSuccess: function(selector, message) { - $(selector).text(message) - .addClass('success') - .removeClass('error') - .stop(true, true) - .delay(3000) - .fadeOut(900) - .show(); - }, - - /** - * Displayes an error message in the given selector - * - * @param {Object} selector Placeholder to display the message in - * @param {string} message Plain text error message to display (no HTML allowed) - */ - finishedError: function(selector, message) { - $(selector).text(message) - .addClass('error') - .removeClass('success') - .show(); - } -}; - -/** * Initializes core */ function initCore() { |