MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.15.145.231
Web Server : Apache
System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : svymadmin ( 4072)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/assets/themes/perfex/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/assets/themes/perfex/js/clients.min.js
/* 3.0.5 */ 
$.fn.dataTable.ext.type.order["task-status-pre"]=function(e){switch(e){case"2":return 1;case"4":return 2;case"3":return 3;case"1":return 4;case"5":return 6}return 5};var salesChart,project_id=$('input[name="project_id"]').val(),discussion_user_profile_image_url=$('input[name="discussion_user_profile_image_url"]').val(),discussion_id=$('input[name="discussion_id"]').val();function new_discussion(){$("#discussion").modal("show"),$("#discussion .edit-title").addClass("hide")}function manage_discussion(e){var t=$(e).serialize(),a=e.action;return $.post(a,t).done((function(e){1==(e=JSON.parse(e)).success&&alert_float("success",e.message),$(".table-project-discussions").DataTable().ajax.reload(null,!1),$("#discussion").modal("hide")})),!1}function remove_task_comment(e){$.get(site_url+"clients/remove_task_comment/"+e,(function(e){1==e.success&&window.location.reload()}),"json")}function edit_task_comment(e){$('[data-edit-comment="'+e+'"]').removeClass("hide"),$('[data-comment-content="'+e+'"]').addClass("hide")}function cancel_edit_comment(e){$('[data-edit-comment="'+e+'"]').addClass("hide"),$('[data-comment-content="'+e+'"]').removeClass("hide")}function save_edited_comment(e){var t={};t.id=e,t.content=$('[data-edit-comment="'+e+'"]').find("textarea").val(),$.post(site_url+"clients/edit_comment",t).done((function(t){1==(t=JSON.parse(t)).success?window.location.reload():cancel_edit_comment(e)}))}function initDataTable(){appDataTableInline()}function dt_custom_view(e,t,a){var o=$(e).DataTable();Array.isArray(a)?o.column(t).search(a.join("|"),!0,!1).draw():o.column(t).search(a).draw()}function fix_phases_height(){if(!is_mobile()){var e=Math.max.apply(null,$("div.tasks-phases .panel-body").map((function(){return $(this).outerHeight()})).get());$("div.tasks-phases .panel-body").css("min-height",e+"px")}}function taskTable(){$(".tasks-table").toggleClass("hide"),$(".tasks-phases").toggleClass("hide")}function discussion_comments(e,t,a){var o=_get_jquery_comments_default_config(app.lang.discussions_lang),n={getComments:function(e,o){$.post(site_url+"clients/project/"+project_id,{action:"discussion_comments",discussion_id:t,discussion_type:a}).done((function(t){t=JSON.parse(t),e(t)}))},postComment:function(e,o,n){e.action="new_discussion_comment",e.discussion_id=t,e.discussion_type=a,$.ajax({type:"post",url:site_url+"clients/project/"+project_id,data:e,success:function(e){e=JSON.parse(e),o(e)},error:n})},putComment:function(e,t,a){e.action="update_discussion_comment",$.ajax({type:"post",url:site_url+"clients/project/"+project_id,data:e,success:function(e){e=JSON.parse(e),t(e)},error:a})},deleteComment:function(e,t,a){$.ajax({type:"post",url:site_url+"clients/project/"+project_id,success:t,error:a,data:{id:e.id,action:"delete_discussion_comment"}})},uploadAttachments:function(e,o,n){var i=0,s=[],r=function(){++i==e.length&&(0==s.length?n():(s=JSON.parse(s),o(s)))};$(e).each((function(e,o){if(o.file.size&&o.file.size>app.max_php_ini_upload_size_bytes)alert_float("danger",app.lang.file_exceeds_max_filesize),r();else{var n=new FormData;$(Object.keys(o)).each((function(e,t){var a=o[t];a&&n.append(t,a)})),n.append("action","new_discussion_comment"),n.append("discussion_id",t),n.append("discussion_type",a),"undefined"!=typeof csrfData&&n.append(csrfData.token_name,csrfData.hash),$.ajax({url:site_url+"clients/project/"+project_id,type:"POST",data:n,cache:!1,contentType:!1,processData:!1,success:function(e){s.push(e),r()},error:function(e){var t=JSON.parse(e.responseText);alert_float("danger",t.message),r()}})}}))}},i=$.extend({},o,n);$(e).comments(i)}function view_project_file(e,t){$.post(site_url+"clients/project/"+t,{action:"get_file",id:e,project_id:t}).done((function(e){$("#project_file_data").html(e)})).fail((function(e){alert_float("danger",e.statusText)}))}function update_file_data(e){var t={};t.id=e,t.subject=$('body input[name="file_subject"]').val(),t.description=$('body textarea[name="file_description"]').val(),t.action="update_file_data",$.post(site_url+"clients/project/"+project_id,t)}function render_customer_statement(){var e=$("#range").selectpicker("val"),t=new Array,a=!1;if("period"!=e)t=JSON.parse(e);else{if(t[0]=$('input[name="period-from"]').val(),t[1]=$('input[name="period-to"]').val(),""==t[0]||""==t[1])return!1;a=!0}var o=site_url+"clients/statement",n=new Array;n.from=t[0],n.to=t[1],a&&(n.custom_period=!0),window.location.href=buildUrl(o,n)}function client_home_chart(){var e=$("#client-home-chart");if(0!=e.length){void 0!==salesChart&&salesChart.destroy();var t={},a=$("#currency"),o=$("#payments_year");a.length>0&&(t.report_currency=$('select[name="currency"]').val()),o.length>0&&(t.year=$("#payments_year").val()),$.post(site_url+"clients/client_home_chart",t).done((function(t){t=JSON.parse(t),salesChart=new Chart(e,{type:"bar",data:t,options:{responsive:!0,maintainAspectRatio:!1}})}))}}function projectFileGoogleDriveSave(e){projectExternalFileUpload(e,"gdrive")}function customerFileGoogleDriveSave(e){customerExternalFileUpload(e,"gdrive")}function taskFileGoogleDriveSave(e){taskExternalFileUpload(e,"gdrive")}function projectExternalFileUpload(e,t){$.post(site_url+"clients/project/"+project_id,{files:e,external:t,action:"project_external_file"}).done((function(){var e=window.location.href;window.location.href=e.split("?")[0]+"?group=project_files"}))}function taskExternalFileUpload(e,t){$.post(site_url+"clients/project/"+project_id,{files:e,task_id:$('input[name="task_id"]').val(),external:t,action:"add_task_external_file"}).done((function(){window.location.reload()}))}function customerExternalFileUpload(e,t){$.post(site_url+"clients/upload_files",{files:e,external:t}).done((function(){window.location.reload()}))}function task_attachments_toggle(){var e=$("#task").find(".task_attachments_wrapper");e.find(".task-attachments-more").toggleClass("hide"),e.find(".task-attachments-less").toggleClass("hide")}function init_tabs_scrollable(){"true"!=isRTL?($(window).width()<=768&&$("body").find(".toggle_view").remove(),$(".horizontal-scrollable-tabs").horizontalTabs()):($(".arrow-left, .arrow-right").css("display","none"),$(".horizontal-scrollable-tabs").removeClass("horizontal-scrollable-tabs"),$(".nav-tabs-horizontal").removeClass("nav-tabs-horizontal"))}Dropzone.options.projectFilesUpload=!1,Dropzone.options.taskFileUpload=!1,Dropzone.options.filesUpload=!1,"1"==app.options.enable_google_picker&&($.fn.googleDrivePicker.defaults.clientId=app.options.google_client_id,$.fn.googleDrivePicker.defaults.developerKey=app.options.google_api),$((function(){moment.locale(app.locale),moment().tz(app.options.timezone).format(),fix_phases_height(),initDataTable(),client_home_chart(),init_tabs_scrollable(),$('select[name="currency"],select[name="payments_years"]').on("change",(function(){client_home_chart()})),$("#open-new-ticket-form").appFormValidator(),$("#ticket-reply").appFormValidator(),$("#task-form").appFormValidator(),$("#discussion_form").appFormValidator({rules:{subject:"required"}});var e=get_url_param("file_id");if(e&&view_project_file(e,project_id),discussion_comments("#discussion-comments",discussion_id,"regular"),$("body").on("show.bs.modal","._project_file",(function(){discussion_comments("#project-file-discussion",discussion_id,"file")})),"undefined"!=typeof Dropbox&&($("#dropbox-chooser-task").length>0&&document.getElementById("dropbox-chooser-task").appendChild(Dropbox.createChooseButton({success:function(e){taskExternalFileUpload(e,"dropbox")},linkType:"preview",extensions:app.options.allowed_files.split(",")})),$("#files-upload").length>0&&document.getElementById("dropbox-chooser-files").appendChild(Dropbox.createChooseButton({success:function(e){customerExternalFileUpload(e,"dropbox")},linkType:"preview",extensions:app.options.allowed_files.split(",")})),"undefined"!=typeof Dropbox&&$("#dropbox-chooser-project-files").length>0&&document.getElementById("dropbox-chooser-project-files").appendChild(Dropbox.createChooseButton({success:function(e){projectExternalFileUpload(e,"dropbox")},linkType:"preview",extensions:app.options.allowed_files.split(",")}))),$("#calendar").length){var t={headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay"},editable:!1,dayMaxEventRows:parseInt(app.options.calendar_events_limit)+1,views:{day:{dayMaxEventRows:!1}},initialView:app.options.default_view_calendar,moreLinkClick:function(e){a.gotoDate(e.date),a.changeView("dayGridDay"),setTimeout((function(){$(".fc-popover-close").click()}),250)},loading:function(e,t){e?$(".dt-loader").removeClass("hide"):$(".dt-loader").addClass("hide")},direction:"true"==isRTL?"rtl":"ltr",eventStartEditable:!1,firstDay:parseInt(app.options.calendar_first_day),events:function(e,t,a){return $.getJSON(site_url+"clients/get_calendar_data",{start:e.startStr,end:e.endStr}).then((function(e){t(e.map((function(e){return $.extend({},e,{start:e.start||e.date,end:e.end||e.date})})))}))},eventDidMount:function(e){var t=$(e.el);t.attr("title",e.event.extendedProps._tooltip),t.attr("onclick",e.event.extendedProps.onclick),t.attr("data-toggle","tooltip")}},a=new FullCalendar.Calendar(document.getElementById("calendar"),t);a.render()}var o=get_url_param("group");o&&($("body").find(".nav-tabs li").removeClass("active"),$("body").find('.nav-tabs [data-group="'+o+'"]').parents("li").addClass("active"));for(var n=-10;n<$(".task-phase").not(".color-not-auto-adjusted").length/2;n++){$(".task-phase:eq("+(n+10)+")").not(".color-not-auto-adjusted").css("background",color(120-13*n,169-13*n,56-13*n)).css("border","1px solid "+color(120-13*n,169-13*n,56-13*n))}$(".project-progress").circleProgress({fill:{gradient:["#84c529","#84c529"]}}).on("circle-animation-progress",(function(e,t,a){$(this).find("strong.project-percent").html(parseInt(100*a)+"<i>%</i>")}));$(".toggle-change-ticket-status").on("click",(function(){$(".ticket-status,.ticket-status-inline").toggleClass("hide")})),$("#ticket_status_single").on("change",(function(){data={},data.status_id=$(this).val(),data.ticket_id=$('input[name="ticket_id"]').val(),$.post(site_url+"clients/change_ticket_status/",data).done((function(){window.location.reload()}))})),"undefined"!=typeof contracts_by_type&&new Chart($("#contracts-by-type-chart"),{type:"bar",data:JSON.parse(contracts_by_type),options:{responsive:!0,maintainAspectRatio:!1,scales:{yAxes:[{display:!0,ticks:{beginAtZero:!0}}]}}}),$("#files-upload").length>0&&createDropzone("#files-upload"),$("#task-file-upload").length>0&&createDropzone("#task-file-upload",{sending:function(e,t,a){a.append("action","upload_task_file"),a.append("task_id",$('input[name="task_id"]').val())}}),$("#project-files-upload").length>0&&createDropzone("#project-files-upload",{sending:function(e,t,a){a.append("action","upload_file")}}),$('body.viewinvoice input[name="amount"]').on("keyup",(function(){var e=$(this).data("total"),t=$(this).val(),a=$(this).parents(".form-group");t>e?(a.addClass("has-error"),0==a.find("p.text-danger").length&&(a.append('<p class="text-danger">Maximum pay value passed</p>'),$(this).parents("form").find('input[name="make_payment"]').attr("disabled",!0))):(a.removeClass("has-error"),a.find("p.text-danger").remove(),$(this).parents("form").find('input[name="make_payment"]').attr("disabled",!1))})),$("#discussion").on("hidden.bs.modal",(function(e){$('#discussion input[name="subject"]').val(""),$('#discussion textarea[name="description"]').val(""),$("#discussion .add-title").removeClass("hide"),$("#discussion .edit-title").removeClass("hide")}))}));

MMCT - 2023