From 8cea6cca586a131608831ddc50a3f3c1fb37535a Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Thu, 5 Feb 2026 15:37:23 -0500 Subject: [PATCH] Remove Noty.js (CO-2931) --- NOTICE | 4 - app/templates/layout/default.php | 3 - app/webroot/css/co-base.css | 11 - app/webroot/js/comanage/match-lib.js | 11 - app/webroot/js/jquery/noty/LICENSE.txt | 20 - app/webroot/js/jquery/noty/jquery.noty.js | 545 ------- app/webroot/js/jquery/noty/layouts/bottom.js | 30 - .../js/jquery/noty/layouts/bottomCenter.js | 38 - .../js/jquery/noty/layouts/bottomLeft.js | 39 - .../js/jquery/noty/layouts/bottomRight.js | 39 - app/webroot/js/jquery/noty/layouts/center.js | 53 - .../js/jquery/noty/layouts/centerLeft.js | 58 - .../js/jquery/noty/layouts/centerRight.js | 58 - app/webroot/js/jquery/noty/layouts/inline.js | 27 - app/webroot/js/jquery/noty/layouts/top.js | 30 - .../js/jquery/noty/layouts/topCenter.js | 37 - app/webroot/js/jquery/noty/layouts/topLeft.js | 39 - .../js/jquery/noty/layouts/topRight.js | 39 - .../noty/packaged/jquery.noty.packaged.js | 1447 ----------------- .../noty/packaged/jquery.noty.packaged.min.js | 1 - app/webroot/js/jquery/noty/promise.js | 432 ----- app/webroot/js/jquery/noty/themes/comanage.js | 156 -- app/webroot/js/jquery/noty/themes/default.js | 184 --- 23 files changed, 3301 deletions(-) delete mode 100755 app/webroot/js/jquery/noty/LICENSE.txt delete mode 100644 app/webroot/js/jquery/noty/jquery.noty.js delete mode 100644 app/webroot/js/jquery/noty/layouts/bottom.js delete mode 100644 app/webroot/js/jquery/noty/layouts/bottomCenter.js delete mode 100644 app/webroot/js/jquery/noty/layouts/bottomLeft.js delete mode 100644 app/webroot/js/jquery/noty/layouts/bottomRight.js delete mode 100644 app/webroot/js/jquery/noty/layouts/center.js delete mode 100644 app/webroot/js/jquery/noty/layouts/centerLeft.js delete mode 100644 app/webroot/js/jquery/noty/layouts/centerRight.js delete mode 100644 app/webroot/js/jquery/noty/layouts/inline.js delete mode 100644 app/webroot/js/jquery/noty/layouts/top.js delete mode 100644 app/webroot/js/jquery/noty/layouts/topCenter.js delete mode 100644 app/webroot/js/jquery/noty/layouts/topLeft.js delete mode 100644 app/webroot/js/jquery/noty/layouts/topRight.js delete mode 100644 app/webroot/js/jquery/noty/packaged/jquery.noty.packaged.js delete mode 100644 app/webroot/js/jquery/noty/packaged/jquery.noty.packaged.min.js delete mode 100644 app/webroot/js/jquery/noty/promise.js delete mode 100644 app/webroot/js/jquery/noty/themes/comanage.js delete mode 100644 app/webroot/js/jquery/noty/themes/default.js diff --git a/NOTICE b/NOTICE index 2b4c8eb62..974b091ef 100644 --- a/NOTICE +++ b/NOTICE @@ -68,9 +68,5 @@ files and utilities for further information: Open Sans (app/webroot/css/fonts/opensans) Apache 2.0 https://fonts.google.com/specimen/Open+Sans - - noty (app/webroot/js/jquery/noty) - MIT License - http://ned.im/noty --------------------------------------------------------------------------- diff --git a/app/templates/layout/default.php b/app/templates/layout/default.php index daab66227..42a32d38b 100644 --- a/app/templates/layout/default.php +++ b/app/templates/layout/default.php @@ -162,9 +162,6 @@ Html->script([ 'bootstrap/bootstrap.bundle.min.js', 'js-cookie/js.cookie-2.1.3.min.js', - 'jquery/noty/jquery.noty.js', - 'jquery/noty/layouts/topCenter.js', - 'jquery/noty/themes/comanage.js', 'comanage/match-lib.js', 'comanage/match-onload.js' ]) . "\n" ?> diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 99e6ef9a0..c3e2a5fc8 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -328,17 +328,6 @@ body.logged-in #top-menu { clear: both; padding: 1em 0; } -/* NOTICES */ -.noty_text { - letter-spacing: 0.3px; - font-size: 14px; -} -.noty_text .material-icons { - font-size: 20px !important; - padding: 0; - margin: 0 4px 0 -10px; - vertical-align: text-bottom; -} /* ALERT MESSAGES */ #flash-messages { margin: 0; diff --git a/app/webroot/js/comanage/match-lib.js b/app/webroot/js/comanage/match-lib.js index 6ea3af8a4..18dade7ba 100644 --- a/app/webroot/js/comanage/match-lib.js +++ b/app/webroot/js/comanage/match-lib.js @@ -24,17 +24,6 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -// Generate flash notifications for messages -function generateFlash(text, type) { - var n = noty({ - text: text, - type: type, - dismissQueue: true, - layout: 'topCenter', - theme: 'comanage' - }); -} - // Generate a loading animation by revealing a persistent hidden div with CSS animation. // An element's onclick action will trigger this to appear if it has the class "spin" class on an element. // (See Template/Elements/javascript.ctp) diff --git a/app/webroot/js/jquery/noty/LICENSE.txt b/app/webroot/js/jquery/noty/LICENSE.txt deleted file mode 100755 index 686993990..000000000 --- a/app/webroot/js/jquery/noty/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2012 Nedim Arabacı - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/app/webroot/js/jquery/noty/jquery.noty.js b/app/webroot/js/jquery/noty/jquery.noty.js deleted file mode 100644 index 23877779d..000000000 --- a/app/webroot/js/jquery/noty/jquery.noty.js +++ /dev/null @@ -1,545 +0,0 @@ -/*! - @package noty - jQuery Notification Plugin - @version version: 2.3.7 - @contributors https://github.com/needim/noty/graphs/contributors - - @documentation Examples and Documentation - http://needim.github.com/noty/ - - @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php - */ - - if(typeof Object.create !== 'function') { - Object.create = function(o) { - function F() { - } - - F.prototype = o; - return new F(); - }; - } - - var NotyObject = { - - init: function(options) { - - // Mix in the passed in options with the default options - this.options = $.extend({}, $.noty.defaults, options); - - this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout]; - - if($.noty.themes[this.options.theme]) - this.options.theme = $.noty.themes[this.options.theme]; - else - options.themeClassName = this.options.theme; - - delete options.layout; - delete options.theme; - - this.options = $.extend({}, this.options, this.options.layout.options); - this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random() * 1000000)); - - this.options = $.extend({}, this.options, options); - - // Build the noty dom initial structure - this._build(); - - // return this so we can chain/use the bridge with less code. - return this; - }, // end init - - _build: function() { - - // Generating noty bar - var $bar = $('
').attr('id', this.options.id); - $bar.append(this.options.template).find('.noty_text').html(this.options.text); - - this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar; - - if(this.options.themeClassName) - this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type); - - // Set buttons if available - if(this.options.buttons) { - - // If we have button disable closeWith & timeout options - this.options.closeWith = []; - this.options.timeout = false; - - var $buttons = $('
').addClass('noty_buttons'); - - (this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons); - - var self = this; - - $.each(this.options.buttons, function(i, button) { - var $button = $('