{"size": 2483, "ext": "js", "max_stars_repo_path": "web/backend/assets/js/main.js", "max_stars_repo_name": "ochui/cashlen", "max_stars_repo_stars_event_min_datetime": "2021-06-23T18:13:55.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-23T18:13:55.000Z", "max_issues_repo_path": "web/backend/assets/js/main.js", "max_issues_repo_name": "ochui/cashlen", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "web/backend/assets/js/main.js", "max_forks_repo_name": "ochui/cashlen", "max_forks_repo_forks_event_min_datetime": "2020-10-04T08:39:39.000Z", "max_forks_repo_forks_event_max_datetime": "2020-10-04T08:39:39.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.8720930233, "max_line_length": 97, "alphanum_fraction": 0.5602094241}
var csrfTokenJsFile = "";
$(document).ready(function () {
    csrfTokenJsFile = $('meta[name="csrf-token"]').attr("content");
});

function toggleMenu(){
    if($(document).width()<=767){
        $("body").removeClass("sidenav-toggled");
    }else {
        //$("body").addClass("sidenav-toggled");
    }
}
$(document).ready(function () {
    $(".demo-accordion").accordionjs();
    toggleMenu();
    if($('.copy-to-clipboard').length>0) {
        let clipboard = new ClipboardJS('.copy-to-clipboard');
        clipboard.on('success', function (e) {
            $.growl.notice({title: 'Success', message: "Content has been copied to clipboard."});
        });
    }
});
/*$(document).on("mouseleave",".app-sidebar",function () {
    $("body").addClass("sidenav-toggled");
});*/
$(document).on("click","#closeMenu",function (e) {
    e.preventDefault();
    $("body").removeClass("sidenav-toggled");
    return false;
});
$(window).resize(function(){
    toggleMenu();
});
$(document).on("mouseenter",".showInfoBox",function (e) {
    var obj = $(this);
    var leftPos = e.originalEvent.clientX;
    var topPos = e.originalEvent.clientY;
    var elem = obj.closest(".team-logo-box");
    var mainElement = elem.find(".team-user-info");
    var elemWidth = mainElement.width();
    if(mainElement.css("display")!='block') {
        leftPos = leftPos - 100;
        topPos = topPos - 150;
        mainElement.show().css({"left": leftPos + "px", "top": topPos + "px"});
    }
});
$(document).on("mouseleave",".showInfoBox",function () {
    var obj = $(this);
    var elem =obj.closest(".team-logo-box");
    elem.find(".team-user-info").hide();
});
$(window).on("load",function () {
   $(".img-load-bg").each(function () {
      var obj = $(this);
      var bgImg = obj.attr("data-src");
       obj.css('background','url("'+bgImg+'")');
   });
});

$(document).on("change",".change-row-status",function(){

    var current=$(this);
    var id=$(this).val();
    var status=$(this).prop("checked");
    var table=$(this).attr("data-table");
    var dataColumn=$(this).attr("data-column");

    $.post(baseUrl+"admin/change-row-status",{
        id:id,
        table:table,
        status:status,
        column:dataColumn,
        _csrf : csrfTokenJsFile
    },function(r){
        var obj=$.parseJSON(r);
        if(obj.status=="success")
        {
            if(obj.data!=undefined)
            {
                current.parent().html(obj.data);
            }
        }
    });

});
