Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/.././././js/./././customer
الملفات الموجودة في هذا الـ Path:
.
..
campaign.js
campaign_statistic.js
compose.js
contact.js
dashboard.js
domain.js
email_account.js
email_template.js
form.js
group.js
inbox.js
label.js
lead_finder.js
list_builder.js
queue.js
sender.js
sent.js
settings.js
ticket.js

مشاهدة ملف: email_template.js

"use strict";
$('#emailTemplate').DataTable({
    processing: true,
    serverSide: true,
    responsive:true,
    ajax:'/get/all/email/template',
    columns: [
        { "data": "title" },
        { "data": "status" },
        { "data": "action" },
    ]
});
$(document).ready(function() {
    $('#summernote').summernote();
});

$(document).on('click', '.preview_template', function (e) {
    const template = $(this).attr('data-template');
    $('#templatePreviewModal').modal('show');
    $('#modalBody').html(template);
});


$('.add_tool').on('click', function (e) {
    console.log(e);
    var curPos = document.getElementById("summernote").selectionStart;
    let x = $("#summernote").val();
    let text_to_insert = $(this).attr('data-name');
    $("#summernote").val(
        x.slice(0, curPos) + text_to_insert + x.slice(curPos));

});

$(document).on('keyup or click', '#summernote', function (e){
    const character = $('#summernote').val().length;

    var messageValue = $("#summernote").val();
    var div = parseInt(parseInt(messageValue.length - 1) / 160) + 1;
    if (div <= 1) {
        $("#count").text("Characters left: " + (160 - messageValue.length));
    } else $("#count").text("Characters left: " + (160 * div - messageValue.length) + "/" + div);
});