Server IP : 192.185.129.71 / Your IP : 52.15.174.103 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/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
/* 3.0.5 */ var expenseDropzone;function projectFileGoogleDriveSave(e){saveProjectExternalFile(e,"gdrive")}function saveProjectExternalFile(e,t){$.post(admin_url+"projects/add_external_file",{files:e,project_id:project_id,external:t,visible_to_customer:$("#pf_visible_to_customer").prop("checked")}).done((function(){var e=window.location.href;window.location.href=e.split("?")[0]+"?group=project_files"}))}function milestones_switch_view(){$("#milestones-table").toggleClass("hide"),$(".project-milestones-kanban").toggleClass("hide"),$.fn.DataTable.isDataTable(".table-milestones")||initDataTable(".table-milestones",admin_url+"projects/milestones/"+project_id)}function manage_discussion(e){var t=$(e).serialize(),i=e.action;return $.post(i,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"),$("#discussion_form").find('button[type="submit"]').button("reset")})),!1}function manage_timesheets(e){var t=$(e).serialize(),i=e.action;$.post(i,t).done((function(e){1==(e=JSON.parse(e)).success?alert_float("success",e.message):alert_float("warning",e.message),setTimeout((function(){window.location.reload()}),1e3)}))}function edit_timesheet(e,t){$('#timesheet select[name="timesheet_staff_id"]').attr("data-staff_id",$(e).attr("data-timesheet_staff_id")),$('select[name="timesheet_task_id"]').selectpicker("val",$(e).attr("data-timesheet_task_id")),$('input[name="timer_id"]').val(t),$('input[name="start_time"]').val($(e).attr("data-start_time")),$('input[name="end_time"]').val($(e).attr("data-end_time")),$('#timesheet textarea[name="note"]').val($(e).attr("data-note")),$('select[name="timesheet_task_id"]').change(),$("#timesheet").modal("show"),setTimeout((function(){var t=$(e).attr("data-tags").split(",");for(var i in t)$("#timesheet #tags").tagit("createTag",t[i])}),500)}function new_discussion(){$("#discussion").modal("show"),$("#discussion .edit-title").addClass("hide")}function new_milestone(){$("#milestone").modal("show"),$("#milestone .edit-title").addClass("hide")}function new_timesheet(){$("#timesheet").modal("show")}function edit_milestone(e,t){var i=$(e).data("description-visible-to-customer"),a=$(e).data("hide-from-customer");1==i?$('input[name="description_visible_to_customer"]').prop("checked",!0):$('input[name="description_visible_to_customer"]').prop("checked",!1),$('input[name="hide_from_customer"]').prop("checked",1==a),$("#additional_milestone").append(hidden_input("id",t)),$('#milestone input[name="name"]').val($(e).data("name")),$('#milestone input[name="start_date"]').val($(e).data("start_date")),$('#milestone input[name="due_date"]').val($(e).data("due_date")),$('#milestone input[name="milestone_order"]').val($(e).data("order")),$('#milestone textarea[name="description"]').val($(e).data("description")),$("#milestone").modal("show"),$("#milestone .add-title").addClass("hide")}function edit_discussion(e,t){$("#additional_discussion").append(hidden_input("id",t)),$('#discussion input[name="subject"]').val($(e).data("subject")),$('#discussion textarea[name="description"]').val($(e).data("description"));var i=0!=$(e).data("show-to-customer");$('#discussion input[name="show_to_customer"]').prop("checked",i),$("#discussion").modal("show"),$("#discussion .add-title").addClass("hide")}function mass_stop_timers(e){requestGetJSON("projects/mass_stop_timers/"+project_id+"/"+e).done((function(e){alert_float(e.type,e.message),setTimeout((function(){$("body").find(".modal-backdrop").eq(0).remove(),init_timers(),reload_tasks_tables(),pre_invoice_project()}),500)}))}function pre_invoice_project(){requestGet("projects/get_pre_invoice_project_info/"+project_id).done((function(e){$("#pre_invoice_project").html(e),$("#pre_invoice_project_settings").modal("show")}))}function invoice_project(e){$("#pre_invoice_project_settings").modal("hide");var t={};t.type=$('input[name="invoice_data_type"]:checked').val(),t.timesheets_include_notes=$('input[name="timesheets_include_notes"]:checked').val(),t.project_id=e,t.tasks=$("#tasks_who_will_be_billed input:checkbox:checked").map((function(){return $(this).val()})).get(),t.expenses=$("#expenses_who_will_be_billed .expense-to-bill input:checkbox:checked").map((function(){return $(this).val()})).get(),t.expenses_add_note=$("#expenses_who_will_be_billed .expense-add-note input:checkbox:checked").map((function(){return $(this).val()})).get(),t.expenses_add_name=$("#expenses_who_will_be_billed .expense-add-name input:checkbox:checked").map((function(){return $(this).val()})).get(),$.post(admin_url+"projects/get_invoice_project_data/",t).done((function(e){$("#invoice_project").html(e),$("#invoice-project-modal").modal({show:!0,backdrop:"static"})}))}function delete_project_discussion(e){confirm_delete()&&requestGetJSON("projects/delete_discussion/"+e).done((function(e){alert_float(e.alert_type,e.message),$(".table-project-discussions").DataTable().ajax.reload(null,!1)}))}function projectExpenseSubmitHandler(e){return $.post(e.action,$(e).serialize()).done((function(e){(e=JSON.parse(e)).expenseid&&void 0!==expenseDropzone&&expenseDropzone.getQueuedFiles().length>0?(expenseDropzone.options.url=admin_url+"expenses/add_expense_attachment/"+e.expenseid,expenseDropzone.processQueue()):window.location.assign(e.url)})),!1}function view_project_file(e,t){$("#project_file_data").empty(),$("#project_file_data").load(admin_url+"projects/file/"+e+"/"+project_id,(function(e,t,i){"error"==t&&alert_float("danger",i.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(),$.post(admin_url+"projects/update_file_data/",t)}function project_mark_as_modal(e,t,i){$("#mark_tasks_finished_modal").modal("show"),$("#project_mark_status_confirm").attr("data-status-id",e),$("#project_mark_status_confirm").attr("data-project-id",project_id);var a=$("#project_marked_as_finished_email_to_contacts");4==e?a.length>0&&a.parents(".project_marked_as_finished").removeClass("hide"):a.length>0&&(a.prop("checked",!1),a.parents(".project_marked_as_finished").addClass("hide"));var n=$(".recurring-tasks-notice");if(4==e||5==e||3==e){if(n.length){var s=n.data("notice-text");s=s.replace("{0}",$(i).data("name")),n.html(s),n.append('<input type="hidden" name="cancel_recurring_tasks" value="true">'),n.removeClass("hide")}$("#mark_all_tasks_as_completed").prop("checked",!0)}else n.html("").addClass("hide"),$("#mark_all_tasks_as_completed").prop("checked",!1)}function project_files_bulk_action(e){if(confirm_delete()){var t=$("#mass_delete").prop("checked"),i=[],a={};0==t||void 0===t?a.visible_to_customer=$("#bulk_pf_visible_to_customer").prop("checked"):a.mass_delete=!0;var n=$(".table-project-files").find("tbody tr");$.each(n,(function(){var e=$($(this).find("td").eq(0)).find("input");1==e.prop("checked")&&i.push(e.val())})),a.ids=i,$(e).addClass("disabled"),setTimeout((function(){$.post(admin_url+"projects/bulk_action_files",a).done((function(){window.location.reload()}))}),200)}}function gantt_filter(){var e=$('select[name="gantt_task_status"]').selectpicker("val"),t=$('select[name="gantt_type"]').selectpicker("val"),i=[];i.gantt_type=t,i.group="project_gantt",e&&(i.gantt_task_status=e),window.location.href=buildUrl(admin_url+"projects/view/"+project_id,i)}function confirm_project_status_change(e){var t={};if($(e).attr("disabled",!0),t.project_id=$(e).data("project-id"),t.status_id=$(e).data("status-id"),4==t.status_id){var i=$("#project_marked_as_finished_email_to_contacts");i.length>0&&(t.send_project_marked_as_finished_email_to_contacts=!0===i.prop("checked")?1:0)}t.mark_all_tasks_as_completed=!0===$("#mark_all_tasks_as_completed").prop("checked")?1:0,t.cancel_recurring_tasks=$('input[name="cancel_recurring_tasks"]').val(),t.cancel_recurring_tasks?t.cancel_recurring_tasks=!0:t.cancel_recurring_tasks=!1,t.notify_project_members_status_change=!0===$("#notify_project_members_status_change").prop("checked")?1:0,$.post(admin_url+"projects/mark_as",t).done((function(e){e=JSON.parse(e),alert_float(!0===e.success?"success":"warning",e.message),setTimeout((function(){window.location.reload()}),1500)})).fail((function(e){window.location.reload()}))}function milestones_kanban_update(e,t){if(t===e.item.parent()[0]){data={},data.order=[],data.milestone_id=$(e.item.parent()[0]).parents(".milestone-column").data("col-status-id"),data.task_id=$(e.item).data("task-id");var i=$(e.item.parent()[0]).parents(".milestone-column").find(".task"),a=0;$.each(i,(function(){data.order.push([$(this).data("task-id"),a]),a++})),check_kanban_empty_col("[data-task-id]"),setTimeout((function(){$.post(admin_url+"projects/update_task_milestone",data)}),50)}}function milestones_kanban(){init_kanban("projects/milestones_kanban",milestones_kanban_update,".project-milestone",445,360,after_milestones_kanban)}function after_milestones_kanban(){$("#kan-ban").sortable({helper:"clone",item:".kan-ban-col",cancel:".milestone-not-sortable",update:function(e,t){if($(t.item).next('ul.kan-ban-col[data-col-status-id="0"]').length)return $(this).sortable("cancel"),!1;var i={order:[]},a=$(".kan-ban-col"),n=0;$.each(a,(function(){i.order.push([$(this).data("col-status-id"),n]),n++})),$.post(admin_url+"projects/update_milestones_order",i)}});for(var e=-10;e<$(".task-phase").not(".color-not-auto-adjusted").length/2;e++){$(".task-phase:eq("+(e+10)+")").not(".color-not-auto-adjusted").css("background",color(120-13*e,169-13*e,56-13*e)).css("border","1px solid "+color(120-12*e,169-12*e,56-12*e))}}function _maybe_remove_task_from_project_milestone(e){var t=$(".milestone-column");$("body").hasClass("project")&&t.length>0&&1==$("#exclude_completed_tasks").prop("checked")&&t.find('[data-task-id="'+e+'"]').remove()}Dropzone.options.projectFilesUpload=!1,Dropzone.options.projectExpenseForm=!1,$((function(){init_ajax_search("customer","#clientid_copy_project.ajax-search"),$("ul.project-actions li:first-child").next("li.divider").remove();var e=get_url_param("file_id");e&&view_project_file(e,project_id);var t=$("#project_file_data, #discussion-comments");t.on("focus",'[contenteditable="true"]',(function(){$.Shortcuts.stop()})),t.on("focusout",'[contenteditable="true"]',(function(){$.Shortcuts.start()})),$("body").on("show.bs.modal","._project_file",(function(){discussion_comments("#project-file-discussion",discussion_id,"file")})),$("body").on("shown.bs.modal","._project_file",(function(){var e=$("body").find("._project_file .modal-content").height()-165,t=$(".project_file_area iframe");t.length>0&&t.css("height",e),is_mobile()||$(".project_file_area,.project_file_discusssions_area").css("height",e)})),$("body").on("shown.bs.modal","#milestone",(function(){$("#milestone").find('input[name="name"]').focus()})),initDataTable(".table-credit-notes",admin_url+"credit_notes/table?project_id="+project_id,["undefined"],["undefined"],void 0,[0,"desc"]);var i={};if($.each($("._hidden_inputs._filters input"),(function(){i[$(this).attr("name")]='[name="'+$(this).attr("name")+'"]'})),initDataTable(".table-contracts",admin_url+"contracts/table?project_id="+project_id,void 0,void 0,i,[6,"desc"]),$("#timesheetsChart").length>0&&"undefined"!=typeof project_overview_chart){var a={type:"bar",data:{},options:{responsive:!0,maintainAspectRatio:!1,tooltips:{enabled:!0,mode:"single",callbacks:{label:function(e,t){return decimalToHM(e.yLabel)}}},scales:{yAxes:[{ticks:{beginAtZero:!0,min:0,userCallback:function(e,t,i){return decimalToHM(e)}}}]}}};a.data=project_overview_chart.data;var n=document.getElementById("timesheetsChart");timesheetsChart=new Chart(n,a)}milestones_kanban(),$("#project_top").on("change",(function(){var e=$(this).val(),t=get_url_param("group");t=t?"?group="+t:"",window.location.href=admin_url+"projects/view/"+e+t})),"undefined"!=typeof Dropbox&&$("#dropbox-chooser").length>0&&document.getElementById("dropbox-chooser").appendChild(Dropbox.createChooseButton({success:function(e){saveProjectExternalFile(e,"dropbox")},linkType:"preview",extensions:app.options.allowed_files.split(",")})),$("body").on("click",".milestone-column .cpicker,.milestone-column .reset_milestone_color",(function(e){e.preventDefault();var t=$(this).data("color"),i=$(this),a=i.parents(".milestone-column").data("col-status-id");$.post(admin_url+"projects/change_milestone_color",{color:t,milestone_id:a}).done((function(){if(""==t)window.location.reload();else{var e=i.parents(".milestone-column");e.find(".reset_milestone_color").removeClass("hide"),e.find(".panel-heading").addClass("color-white").removeClass("task-phase"),e.find(".edit-milestone-phase").addClass("color-white")}}))})),$("#project-files-upload").length>0&&new Dropzone("#project-files-upload",appCreateDropzoneOptions({paramName:"file",uploadMultiple:!0,parallelUploads:20,maxFiles:20,accept:function(e,t){t()},success:function(e,t){0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length&&(window.location.href=admin_url+"projects/view/"+project_id+"?group=project_files")},sending:function(e,t,i){i.append("visible_to_customer",$('input[name="visible_to_customer"]').prop("checked"))}})),$("#project-expense-form").length>0&&(expenseDropzone=new Dropzone("#project-expense-form",appCreateDropzoneOptions({autoProcessQueue:!1,clickable:"#dropzoneDragArea",previewsContainer:".dropzone-previews",addRemoveLinks:!0,maxFiles:1,success:function(e,t){0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length&&window.location.reload()}}))),appValidateForm($("#project-expense-form"),{category:"required",date:"required",amount:"required",currency:"required"},projectExpenseSubmitHandler);var s={};$.each($("._hidden_inputs._filters input"),(function(){s[$(this).attr("name")]='[name="'+$(this).attr("name")+'"]'})),_table_api=initDataTable(".table-project-expenses",admin_url+"projects/expenses/"+project_id,"undefined","undefined",s,[5,"desc"]),_table_api&&_table_api.column(0).visible(!1,!1).columns.adjust(),init_rel_tasks_table(project_id,"project"),initDataTable(".table-notes",admin_url+"projects/notes/"+project_id,[4],[4],"undefined",[1,"desc"]);var o={};$.each($("._hidden_inputs._filters.timesheets_filters input"),(function(){o[$(this).attr("name")]='[name="'+$(this).attr("name")+'"]'})),initDataTable(".table-timesheets",admin_url+"projects/timesheets/"+project_id,[8],[8],o,[3,"desc"]),initDataTable(".table-project-discussions",admin_url+"projects/discussions/"+project_id,void 0,void 0,"undefined",[1,"desc"]),appValidateForm($("#milestone_form"),{name:"required",start_date:"required",due_date:"required"});var r=$("#milestone_form"),d=r.find("#start_date");d.on("changed.bs.select",(function(e){r.find("#due_date").data("data-date-min-date",d.val())})),appValidateForm($("#discussion_form"),{subject:"required"},manage_discussion);var c={},l=$("#timesheet_form").find("select");$.each(l,(function(){var e=$(this).attr("name");c[e]="required"}));var _={required:{depends:function(e){if($(".timesheet-date-toggler-text").is(":visible"))return!1;var t=$('label[for="timesheet_duration"]');return t.length>0&&0==t.find(".req").length&&t.prepend('<small class="req text-danger">* </small>'),!0}}};c.start_time=_,c.end_time=_,c.timesheet_duration={required:{depends:function(e){return!!$(".timesheet-date-toggler-text").is(":visible")}}},appValidateForm($("#timesheet_form"),c,manage_timesheets),$("#discussion").on("hidden.bs.modal",(function(e){var t=$("#discussion");t.find('input[name="id"]').remove(),t.find('input[name="subject"]').val(""),t.find('textarea[name="description"]').val(""),t.find('input[name="show_to_customer"]').prop("checked",!0),t.find(".add-title").removeClass("hide"),t.find(".edit-title").removeClass("hide")})),$("#milestone").on("hidden.bs.modal",(function(e){$("#additional_milestone").html(""),$('#milestone input[name="due_date"]').val(""),$('#milestone input[name="name"]').val(""),$('#milestone input[name="milestone_order"]').val($(".table-milestones tbody tr").length+1),$('#milestone textarea[name="description"]').val(""),$('#milestone input[name="description_visible_to_customer"]').prop("checked",!1),$('#milestone input[name="hide_from_customer"]').prop("checked",!1),$("#milestone .add-title").removeClass("hide"),$("#milestone .edit-title").removeClass("hide")})),$("#timesheet").on("hidden.bs.modal",(function(e){var t=$("#timesheet");t.find('select[name="timesheet_staff_id"]').removeAttr("data-staff_id"),t.find('select[name="timesheet_staff_id"]').empty(),t.find('select[name="timesheet_staff_id"]').selectpicker("refresh"),t.find('select[name="timesheet_task_id"]').selectpicker("val",""),t.find('textarea[name="note"]').val(""),t.find("#timesheet_duration").val(""),t.find("#tags").tagit("removeAll"),$('input[name="timer_id"]').val("")})),$('#timesheet select[name="timesheet_task_id"]').on("change",(function(){var e,t=$('#timesheet select[name="timesheet_staff_id"]'),i=$(this).val();if(""==i)return t.html(""),void t.selectpicker("refresh");t.attr("data-staff_id")&&(e=t.attr("data-staff_id")),requestGet("projects/timesheet_task_assignees/"+i+"/"+project_id+"/"+e).done((function(e){t.html(e),t.selectpicker("refresh")}))})),$("body").on("change","#project_invoice_select_all_tasks,#project_invoice_select_all_expenses",(function(){var e,t=$(this).prop("checked");e=$(this).hasClass("invoice_select_all_expenses")?'input[name="expenses[]"]':'input[name="tasks[]"]',1==t?$(e).not(":disabled").prop("checked",!0):$(e).not(":disabled").prop("checked",!1)})),$("body").on("change",'input[name="invoice_data_type"]',(function(){"timesheets_individualy"==$(this).val()?$("#timesheets_bill_include_notes").removeClass("hide"):$("#timesheets_bill_include_notes").addClass("hide")})),$('input[name="members"].copy').on("change",(function(){var e=$(this).prop("checked"),t=$('input[name="tasks"].copy').prop("checked");e?t&&($('input[name="task_include_assignees"]').prop("checked",!0),$('input[name="task_include_followers"]').prop("checked",!0)):t&&($('input[name="task_include_assignees"]').prop("checked",!1),$('input[name="task_include_followers"]').prop("checked",!1))}))}));