<commit_before>/**
 * @fileOverview jquery plugin, provides simple notification (with timeout and close button). jQuery UI themes compatible.
 *               <p>License MIT
 *               <br />Copyright 2012 <NAME> <a href="http://pontikis.net">http://pontikis.net</a>
 *               <br />Project page <a href="http:///pontikis.net/labs/jui_alert">http://pontikis.net/labs/jui_alert</a>
 * @version 2.0.0 (26 Jan 2013)
 * @author <NAME> http://pontikis.net
 * @requires jquery (>=1.6), jquery-ui (>=1.8)
 */

/**
 * See <a href="http://jquery.com">http://jquery.com</a>.
 * @name $
 * @class
 * See the jQuery Library  (<a href="http://jquery.com">http://jquery.com</a>) for full details.  This just
 * documents the function and classes that are added to jQuery by this plug-in.
 */

/**
 * See <a href="http://jquery.com">http://jquery.com</a>
 * @name fn
 * @class
 * See the jQuery Library  (<a href="http://jquery.com">http://jquery.com</a>) for full details.  This just
 * documents the function and classes that are added to jQuery by this plug-in.
 * @memberOf $
 */

/** the foolowing is OPTIONAL in case private methods will be documented  */
/**
 * Pseudo-Namespace containing private methods (for documentation purposes)
 * @name _private_methods
 * @namespace
 */
"use strict";
(function($) {

    var pluginName = 'jui_alert';

    /* public methods ------------------------------------------------------- */
    var methods = {

        /**
         * @lends $.fn.jui_alert
         */
        init: function(options) {

            var elem = this;

            return this.each(function() {

                /**
                 * settings and defaults
                 * using $.extend, settings modification will affect elem.data() and vice versa
                 */
                var settings = elem.data(pluginName);
                if(typeof(settings) == 'undefined') {
                    var defaults = elem.jui_alert('getDefaults');
                    settings = $.extend({}, defaults, options);
                } else {
                    settings = $.extend({}, settings, options);
                }
                elem.data(pluginName, settings);

                var container_id = elem.attr("id");

                var timer;
                var btn_close_id = create_id(settings.close_btn_id_prefix, container_id);
                var btn_cancel_timer_id = create_id(settings.timer_btn_id_prefix, container_id);

                var html = '';

                elem.removeClass().addClass(settings.containerClass);


                html += '<div class="' + settings.messageAreaClass + '">';

                html += '<p class="' + settings.buttonsAreaClass + '">';
                html += '<a id="' + btn_close_id + '" href="javascript:void(0);" class="' + settings.btnCloseClass + '" title="' + rsc_jui_alert.close + '">' + rsc_jui_alert.close + '</a>';
                if(settings.timeout > 0) {
                    html += '<a id="' + btn_cancel_timer_id + '" href="javascript:void(0);" class="' + settings.btnTimerOnClass + '" title="' + rsc_jui_alert.freeze_message + '">' + rsc_jui_alert.freeze_message + '</a>';
                }
                html += '</p>';

                html += '<p class="' + settings.messageBodyClass + '">';
                if(settings.messageIconClass) {
                    html += '<span class="' + settings.messageIconClass + '"></span>';
                }
                html += settings.message;
                html += '</p>';

                html += '</div>';

                elem.html(html);

                var elem_btn_close = $("#" + btn_close_id);
                var elem_btn_cancel_timer = $("#" + btn_cancel_timer_id);

                if(settings.timeout > 0) {
                    timer = setTimeout(function() {
                        elem_btn_close.click();
                    }, settings.timeout);
                }

                elem_btn_close.click(function() {
                    elem.html('');
                });

                elem_btn_cancel_timer.click(function() {
                    $(this).removeClass(settings.btnTimerOnClass).addClass(settings.btnTimerOffClass);
                    $(this).prop("title", "");
                    clearTimeout(timer);
                });

                var effects = ["slide", "bounce", "shake", "pulsate"];
                if($.inArray(settings.use_effect.effect_name, effects) > -1) {
                    elem.effect(settings.use_effect.effect_name, settings.use_effect.effect_options, settings.use_effect.effect_duration);
                }

            });

        },

        /**
         * Get default values
         * @example $(element).jui_alert('getDefaults');
         * @return {Object}
         */<commit_msg>Remove all classes before message will disappear<commit_after>/**
 * @fileOverview jquery plugin, provides simple notification (with timeout and close button). jQuery UI themes compatible.
 *               <p>License MIT
 *               <br />Copyright 2012 <NAME> <a href="http://pontikis.net">http://pontikis.net</a>
 *               <br />Project page <a href="http:///pontikis.net/labs/jui_alert">http://pontikis.net/labs/jui_alert</a>
 * @version 2.0.0 (26 Jan 2013)
 * @author <NAME> http://pontikis.net
 * @requires jquery (>=1.6), jquery-ui (>=1.8)
 */

/**
 * See <a href="http://jquery.com">http://jquery.com</a>.
 * @name $
 * @class
 * See the jQuery Library  (<a href="http://jquery.com">http://jquery.com</a>) for full details.  This just
 * documents the function and classes that are added to jQuery by this plug-in.
 */

/**
 * See <a href="http://jquery.com">http://jquery.com</a>
 * @name fn
 * @class
 * See the jQuery Library  (<a href="http://jquery.com">http://jquery.com</a>) for full details.  This just
 * documents the function and classes that are added to jQuery by this plug-in.
 * @memberOf $
 */

/** the foolowing is OPTIONAL in case private methods will be documented  */
/**
 * Pseudo-Namespace containing private methods (for documentation purposes)
 * @name _private_methods
 * @namespace
 */
"use strict";
(function($) {

    var pluginName = 'jui_alert';

    /* public methods ------------------------------------------------------- */
    var methods = {

        /**
         * @lends $.fn.jui_alert
         */
        init: function(options) {

            var elem = this;

            return this.each(function() {

                /**
                 * settings and defaults
                 * using $.extend, settings modification will affect elem.data() and vice versa
                 */
                var settings = elem.data(pluginName);
                if(typeof(settings) == 'undefined') {
                    var defaults = elem.jui_alert('getDefaults');
                    settings = $.extend({}, defaults, options);
                } else {
                    settings = $.extend({}, settings, options);
                }
                elem.data(pluginName, settings);

                var container_id = elem.attr("id");

                var timer;
                var btn_close_id = create_id(settings.close_btn_id_prefix, container_id);
                var btn_cancel_timer_id = create_id(settings.timer_btn_id_prefix, container_id);

                var html = '';

                elem.removeClass().addClass(settings.containerClass);


                html += '<div class="' + settings.messageAreaClass + '">';

                html += '<p class="' + settings.buttonsAreaClass + '">';
                html += '<a id="' + btn_close_id + '" href="javascript:void(0);" class="' + settings.btnCloseClass + '" title="' + rsc_jui_alert.close + '">' + rsc_jui_alert.close + '</a>';
                if(settings.timeout > 0) {
                    html += '<a id="' + btn_cancel_timer_id + '" href="javascript:void(0);" class="' + settings.btnTimerOnClass + '" title="' + rsc_jui_alert.freeze_message + '">' + rsc_jui_alert.freeze_message + '</a>';
                }
                html += '</p>';

                html += '<p class="' + settings.messageBodyClass + '">';
                if(settings.messageIconClass) {
                    html += '<span class="' + settings.messageIconClass + '"></span>';
                }
                html += settings.message;
                html += '</p>';

                html += '</div>';

                elem.html(html);

                var elem_btn_close = $("#" + btn_close_id);
                var elem_btn_cancel_timer = $("#" + btn_cancel_timer_id);

                if(settings.timeout > 0) {
                    timer = setTimeout(function() {
                        elem_btn_close.click();
                    }, settings.timeout);
                }

                elem_btn_close.click(function() {
                    elem.removeClass();
                    elem.html('');
                });

                elem_btn_cancel_timer.click(function() {
                    $(this).removeClass(settings.btnTimerOnClass).addClass(settings.btnTimerOffClass);
                    $(this).prop("title", "");
                    clearTimeout(timer);
                });

                var effects = ["slide", "bounce", "shake", "pulsate"];
                if($.inArray(settings.use_effect.effect_name, effects) > -1) {
                    elem.effect(settings.use_effect.effect_name, settings.use_effect.effect_options, settings.use_effect.effect_duration);
                }

            });

        },

        /**
         * Get default values
         * @example $(element).jui_alert('getDefaults');
         * @return {Object}
         */
{'fraction_non_alphanumeric': 0.15614307931570762, 'fraction_numerical': 0.004561949196474857, 'mean_word_length': 1.750499001996008, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1505203', 'n_tokens_mistral': 2724, 'n_tokens_neox': 2523, 'n_words': 563}