HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: //proc/self/cwd/nueva/modules/roja45quotationsprofree/views/js/roja45quotationspro17.js
/**
 * roja45quotationsprofree.js.
 *
 * @author    Roja45
 * @copyright 2016 Roja45
 * @license   license.txt
 *
 * 2016 ROJA45 - All rights reserved.
 *
 * DISCLAIMER
 * Changing this file will render any support provided by us null and void.
 */

$(document).ready(function () {
    $('article.product-miniature .roja45quotationsprofree.product.enabled').each(function (index, element) {
        var ele = $(this).closest('article');
        var id_product = parseInt(ele.attr('data-id-product'));
        var id_product_attribute = parseInt(ele.attr('data-id-product-attribute'));
        var url = ele.find('.product-description a').attr('href');
        ele.find('ul.product-flags').append('<li class="product-flag quote">' + roja45quotationspro_quote_link_text + '</li>');
    });

    $(".datepicker").each(function() {
        var format = $(this).attr('data-format');
        $(this).datepicker({
            prevText: '',
            nextText: '',
            dateFormat: format
        });
    });
});

roja45quotationsprofree = {
    quotationpro_addlabel: function (ele, id_product) {
        if (id_product && (roja45quotationspro_show_label == 1)) {
            var url = ele.closest('.ajax_block_product').find('.product_img_link').attr('href');
            ele.closest('.ajax_block_product').find('.product-image-container').append('<a class="quote-box ' + roja45quotationspro_label_position + '" href="' + url + '"><span class="quote-label">' + roja45quotationspro_quote_link_text + '</span></a>');
        }
    },

    displaySuccessMsg : function ( msgs ) {
        $.each(msgs, function(index, value) {
            $.growl({
                title: roja45quotationspro_success_title,
                message: value,
                duration: 3000,
                style: 'notice'
            });
        });
    },

    displayWarningMsg : function ( msgs ) {
        $.each(msgs, function(index, value) {
            $.growl({
                title: roja45quotationspro_warning_title,
                message: value,
                duration: 5000,
                style: 'warning'
            });
        });
    },

    displayErrorMsg : function ( msgs ) {
        $.each(msgs, function(index, value) {
            $.growl({
                title: roja45quotationspro_error_title,
                message: value,
                duration: 10000,
                style: 'error'
            });
        });
    }
}