Changeset 3079882
- Timestamp:
- 05/01/2024 01:10:10 PM (2 years ago)
- Location:
- taskbuilder
- Files:
-
- 320 added
- 99 edited
-
tags/3.0.0 (added)
-
tags/3.0.0/asset (added)
-
tags/3.0.0/asset/css (added)
-
tags/3.0.0/asset/css/admin.css (added)
-
tags/3.0.0/asset/css/modal.css (added)
-
tags/3.0.0/asset/css/public.css (added)
-
tags/3.0.0/asset/css/wppm_bootstrap.css (added)
-
tags/3.0.0/asset/images (added)
-
tags/3.0.0/asset/images/Edit-01.svg (added)
-
tags/3.0.0/asset/images/Preloader.gif (added)
-
tags/3.0.0/asset/images/add.svg (added)
-
tags/3.0.0/asset/images/add_new.svg (added)
-
tags/3.0.0/asset/images/add_new1.svg (added)
-
tags/3.0.0/asset/images/add_new2.svg (added)
-
tags/3.0.0/asset/images/admin2.png (added)
-
tags/3.0.0/asset/images/ajax-loading.gif (added)
-
tags/3.0.0/asset/images/bin.svg (added)
-
tags/3.0.0/asset/images/calendar.svg (added)
-
tags/3.0.0/asset/images/cancel.svg (added)
-
tags/3.0.0/asset/images/cancel_icon.svg (added)
-
tags/3.0.0/asset/images/cf.svg (added)
-
tags/3.0.0/asset/images/checked.svg (added)
-
tags/3.0.0/asset/images/checklist.svg (added)
-
tags/3.0.0/asset/images/chevron_left.svg (added)
-
tags/3.0.0/asset/images/chevron_left1.svg (added)
-
tags/3.0.0/asset/images/chevron_right.svg (added)
-
tags/3.0.0/asset/images/chevron_right1.svg (added)
-
tags/3.0.0/asset/images/clone.svg (added)
-
tags/3.0.0/asset/images/clone_project.svg (added)
-
tags/3.0.0/asset/images/cross.svg (added)
-
tags/3.0.0/asset/images/cross1.svg (added)
-
tags/3.0.0/asset/images/cross_icon.svg (added)
-
tags/3.0.0/asset/images/cross_icon1.svg (added)
-
tags/3.0.0/asset/images/custom_fields.svg (added)
-
tags/3.0.0/asset/images/delete 1.svg (added)
-
tags/3.0.0/asset/images/delete.svg (added)
-
tags/3.0.0/asset/images/delete2.svg (added)
-
tags/3.0.0/asset/images/delete_task.svg (added)
-
tags/3.0.0/asset/images/deletebasket.svg (added)
-
tags/3.0.0/asset/images/duplicate.svg (added)
-
tags/3.0.0/asset/images/edit.svg (added)
-
tags/3.0.0/asset/images/edit1.svg (added)
-
tags/3.0.0/asset/images/edit_01.svg (added)
-
tags/3.0.0/asset/images/edit_icon.svg (added)
-
tags/3.0.0/asset/images/editproject.svg (added)
-
tags/3.0.0/asset/images/filter.svg (added)
-
tags/3.0.0/asset/images/find.svg (added)
-
tags/3.0.0/asset/images/finder.svg (added)
-
tags/3.0.0/asset/images/gantt_chart.svg (added)
-
tags/3.0.0/asset/images/grid_view.svg (added)
-
tags/3.0.0/asset/images/iconfinder_cancel_1894664.svg (added)
-
tags/3.0.0/asset/images/list (copy).svg (added)
-
tags/3.0.0/asset/images/list-symbol.svg (added)
-
tags/3.0.0/asset/images/list.svg (added)
-
tags/3.0.0/asset/images/list_view.svg (added)
-
tags/3.0.0/asset/images/listv.svg (added)
-
tags/3.0.0/asset/images/loader.gif (added)
-
tags/3.0.0/asset/images/loaderImage.gif (added)
-
tags/3.0.0/asset/images/loading_buffer.svg (added)
-
tags/3.0.0/asset/images/pencil_edit.svg (added)
-
tags/3.0.0/asset/images/plus.svg (added)
-
tags/3.0.0/asset/images/plus_circle.svg (added)
-
tags/3.0.0/asset/images/plus_circle1.svg (added)
-
tags/3.0.0/asset/images/plus_icon.svg (added)
-
tags/3.0.0/asset/images/pro_list.svg (added)
-
tags/3.0.0/asset/images/proj.png (added)
-
tags/3.0.0/asset/images/proj1.png (added)
-
tags/3.0.0/asset/images/projct.png (added)
-
tags/3.0.0/asset/images/refresh.svg (added)
-
tags/3.0.0/asset/images/reports-icon.svg (added)
-
tags/3.0.0/asset/images/search.svg (added)
-
tags/3.0.0/asset/images/sort_down_icon.svg (added)
-
tags/3.0.0/asset/images/sort_up_icon.svg (added)
-
tags/3.0.0/asset/images/success.svg (added)
-
tags/3.0.0/asset/images/task.png (added)
-
tags/3.0.0/asset/images/task1.png (added)
-
tags/3.0.0/asset/images/task2.png (added)
-
tags/3.0.0/asset/images/task_list.svg (added)
-
tags/3.0.0/asset/images/tasklist.svg (added)
-
tags/3.0.0/asset/images/time-tracker.svg (added)
-
tags/3.0.0/asset/images/trash.svg (added)
-
tags/3.0.0/asset/images/trash_bin.svg (added)
-
tags/3.0.0/asset/images/trashb.svg (added)
-
tags/3.0.0/asset/images/user.svg (added)
-
tags/3.0.0/asset/images/user_group.svg (added)
-
tags/3.0.0/asset/images/users.svg (added)
-
tags/3.0.0/asset/images/vertical_dot.svg (added)
-
tags/3.0.0/asset/images/warning-triangle.svg (added)
-
tags/3.0.0/asset/images/wppm_visibility.svg (added)
-
tags/3.0.0/asset/js (added)
-
tags/3.0.0/asset/js/admin.js (added)
-
tags/3.0.0/asset/js/modal.js (added)
-
tags/3.0.0/asset/js/public.js (added)
-
tags/3.0.0/asset/lib (added)
-
tags/3.0.0/asset/lib/DataTables (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25 (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images/sort_asc.png (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images/sort_asc_disabled.png (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images/sort_both.png (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images/sort_desc.png (added)
-
tags/3.0.0/asset/lib/DataTables/DataTables-1.10.25/images/sort_desc_disabled.png (added)
-
tags/3.0.0/asset/lib/DataTables/datatables.min.css (added)
-
tags/3.0.0/asset/lib/DataTables/datatables.min.js (added)
-
tags/3.0.0/asset/lib/dragula (added)
-
tags/3.0.0/asset/lib/dragula/dragula.min.css (added)
-
tags/3.0.0/asset/lib/dragula/dragula.min.js (added)
-
tags/3.0.0/asset/lib/flatpickr (added)
-
tags/3.0.0/asset/lib/flatpickr/LICENSE.md (added)
-
tags/3.0.0/asset/lib/flatpickr/flatpickr.js (added)
-
tags/3.0.0/asset/lib/flatpickr/flatpickr.min.css (added)
-
tags/3.0.0/asset/lib/gpopover (added)
-
tags/3.0.0/asset/lib/gpopover/LICENSE (added)
-
tags/3.0.0/asset/lib/gpopover/README.md (added)
-
tags/3.0.0/asset/lib/gpopover/jquery.gpopover.css (added)
-
tags/3.0.0/asset/lib/gpopover/jquery.gpopover.js (added)
-
tags/3.0.0/asset/lib/select2 (added)
-
tags/3.0.0/asset/lib/select2/select2.min.css (added)
-
tags/3.0.0/asset/lib/select2/select2.min.js (added)
-
tags/3.0.0/includes (added)
-
tags/3.0.0/includes/EDD_SL_Plugin_Updater.php (added)
-
tags/3.0.0/includes/actions (added)
-
tags/3.0.0/includes/actions/wppm_check_cron_attachment.php (added)
-
tags/3.0.0/includes/admin (added)
-
tags/3.0.0/includes/admin/addons.php (added)
-
tags/3.0.0/includes/admin/attachment (added)
-
tags/3.0.0/includes/admin/attachment/wppm_download_attachment.php (added)
-
tags/3.0.0/includes/admin/email_notifications (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_email_notifications.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_change_project_status.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_project_created.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_set_change_task_status.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_set_project_users.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_set_task_users.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_submit_proj_comment.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_submit_task_comment.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_en_task_created.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_get_edit_email_notification.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_get_en_general_setting.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_get_en_task_notifications.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_get_templates.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_set_edit_email_notification.php (added)
-
tags/3.0.0/includes/admin/email_notifications/wppm_set_en_general_setting.php (added)
-
tags/3.0.0/includes/admin/licenses.php (added)
-
tags/3.0.0/includes/admin/projects (added)
-
tags/3.0.0/includes/admin/projects/filters (added)
-
tags/3.0.0/includes/admin/projects/filters/wppm_project_search_filter.php (added)
-
tags/3.0.0/includes/admin/projects/get_users.php (added)
-
tags/3.0.0/includes/admin/projects/open_project (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_change_project_visibility.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_delete_proj_thread.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_drag_and_drop_card.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_edit_project_creator.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_edit_project_details.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_edit_project_status.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_edit_project_thread.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_get_project_tasks.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_get_project_visibility.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_proj_thread_attachment_remove.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_change_proj_end_date.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_change_proj_start_date.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_change_project_details.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_change_project_raised_by.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_change_project_status.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_delete_proj_thread.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_edit_proj_thread.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_set_project_users.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_submit_project_comment.php (added)
-
tags/3.0.0/includes/admin/projects/open_project/wppm_view_project_tasks.php (added)
-
tags/3.0.0/includes/admin/projects/projects.php (added)
-
tags/3.0.0/includes/admin/projects/projects_list.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_add_new_project.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_create_project.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_filter_autocomplete.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_get_delete_project.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_open_project.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_set_delete_project.php (added)
-
tags/3.0.0/includes/admin/projects/wppm_set_project_meta.php (added)
-
tags/3.0.0/includes/admin/settings (added)
-
tags/3.0.0/includes/admin/settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_add_task_priority.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_delete_category.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_delete_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_delete_task_priority.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_delete_task_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_add_category.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_add_proj_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_add_task_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_advanced_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_grid_view.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_individual_proj.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_individual_task.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_modal_popup.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_proj_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_ap_task_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_appearance_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_category_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_edit_category.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_edit_priority.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_edit_proj_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_edit_task_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_general_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_priority_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_proj_status_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_get_task_status_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_grid_view.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_individual_proj.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_individual_task.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_modal_popup.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_proj_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_reset_ap_task_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_add_category.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_add_priority.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_add_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_add_task_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_advanced_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_grid_view.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_individual_proj.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_individual_task.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_modal_popup.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_proj_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_ap_task_list.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_category_order.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_edit_category.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_edit_priority.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_edit_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_edit_task_status.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_general_settings.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_priority_order.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_status_order.php (added)
-
tags/3.0.0/includes/admin/settings/wppm_set_task_status_order.php (added)
-
tags/3.0.0/includes/admin/tasks (added)
-
tags/3.0.0/includes/admin/tasks/open_task (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist_item.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist/wppm_delete_checklist.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist/wppm_remove_checklist_item.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/checklist/wppm_set_checklist_progress.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_clone_task.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_delete_task_thread.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_edit_task_creator.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_edit_task_details.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_edit_task_status.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_edit_task_thread.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_open_task.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_change_raised_by.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_change_task_details.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_change_task_end_date.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_change_task_start_date.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_change_task_status.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_clone_task.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_delete_thread.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_edit_task_thread.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_set_task_users.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_submit_task_comment.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_thread_attachment_remove.php (added)
-
tags/3.0.0/includes/admin/tasks/open_task/wppm_upload_file.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_add_new_task.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_create_task.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_get_delete_task.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_get_task_users.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_set_delete_task.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_tasks.php (added)
-
tags/3.0.0/includes/admin/tasks/wppm_tasks_list.php (added)
-
tags/3.0.0/includes/class-wppm-admin.php (added)
-
tags/3.0.0/includes/class-wppm-frontend.php (added)
-
tags/3.0.0/includes/class-wppm-functions.php (added)
-
tags/3.0.0/includes/class-wppm_import_emails.php (added)
-
tags/3.0.0/includes/frontend (added)
-
tags/3.0.0/includes/frontend/shortcode.php (added)
-
tags/3.0.0/includes/frontend/wppm_set_user_login.php (added)
-
tags/3.0.0/includes/frontend/wppm_sign_in.php (added)
-
tags/3.0.0/includes/frontend/wppm_tasks_shortcode.php (added)
-
tags/3.0.0/includes/replace_macro.php (added)
-
tags/3.0.0/includes/replace_task_macro.php (added)
-
tags/3.0.0/includes/wppm-install.php (added)
-
tags/3.0.0/includes/wppm_actions.php (added)
-
tags/3.0.0/includes/wppm_cron.php (added)
-
tags/3.0.0/lang (added)
-
tags/3.0.0/lang/taskbuilder-fr_FR.mo (added)
-
tags/3.0.0/lang/taskbuilder.pot (added)
-
tags/3.0.0/readme.txt (added)
-
tags/3.0.0/taskbuilder.php (added)
-
trunk/asset/css/admin.css (modified) (12 diffs)
-
trunk/asset/css/public.css (modified) (1 diff)
-
trunk/asset/js/admin.js (modified) (23 diffs)
-
trunk/includes/admin/email_notifications/wppm_email_notifications.php (modified) (2 diffs)
-
trunk/includes/admin/email_notifications/wppm_en_submit_proj_comment.php (added)
-
trunk/includes/admin/email_notifications/wppm_get_edit_email_notification.php (modified) (1 diff)
-
trunk/includes/admin/email_notifications/wppm_get_en_general_setting.php (modified) (1 diff)
-
trunk/includes/admin/email_notifications/wppm_set_edit_email_notification.php (modified) (1 diff)
-
trunk/includes/admin/email_notifications/wppm_set_en_general_setting.php (modified) (1 diff)
-
trunk/includes/admin/licenses.php (modified) (1 diff)
-
trunk/includes/admin/projects/get_users.php (modified) (2 diffs)
-
trunk/includes/admin/projects/open_project/wppm_change_project_visibility.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_delete_proj_thread.php (added)
-
trunk/includes/admin/projects/open_project/wppm_drag_and_drop_card.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_edit_project_creator.php (modified) (2 diffs)
-
trunk/includes/admin/projects/open_project/wppm_edit_project_details.php (modified) (3 diffs)
-
trunk/includes/admin/projects/open_project/wppm_edit_project_status.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_edit_project_thread.php (added)
-
trunk/includes/admin/projects/open_project/wppm_get_project_tasks.php (modified) (3 diffs)
-
trunk/includes/admin/projects/open_project/wppm_get_project_visibility.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_proj_thread_attachment_remove.php (added)
-
trunk/includes/admin/projects/open_project/wppm_set_change_proj_end_date.php (added)
-
trunk/includes/admin/projects/open_project/wppm_set_change_proj_start_date.php (added)
-
trunk/includes/admin/projects/open_project/wppm_set_change_project_details.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_set_change_project_raised_by.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_set_change_project_status.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_set_delete_proj_thread.php (added)
-
trunk/includes/admin/projects/open_project/wppm_set_edit_proj_thread.php (added)
-
trunk/includes/admin/projects/open_project/wppm_set_project_users.php (modified) (1 diff)
-
trunk/includes/admin/projects/open_project/wppm_submit_project_comment.php (added)
-
trunk/includes/admin/projects/open_project/wppm_view_project_tasks.php (modified) (17 diffs)
-
trunk/includes/admin/projects/projects.php (modified) (2 diffs)
-
trunk/includes/admin/projects/projects_list.php (modified) (3 diffs)
-
trunk/includes/admin/projects/wppm_add_new_project.php (modified) (1 diff)
-
trunk/includes/admin/projects/wppm_create_project.php (modified) (2 diffs)
-
trunk/includes/admin/projects/wppm_get_delete_project.php (modified) (1 diff)
-
trunk/includes/admin/projects/wppm_open_project.php (modified) (9 diffs)
-
trunk/includes/admin/projects/wppm_set_delete_project.php (modified) (1 diff)
-
trunk/includes/admin/settings.php (modified) (3 diffs)
-
trunk/includes/admin/settings/wppm_add_task_priority.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_delete_category.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_delete_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_delete_task_priority.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_delete_task_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_add_category.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_add_proj_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_add_task_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_advanced_settings.php (modified) (2 diffs)
-
trunk/includes/admin/settings/wppm_get_ap_grid_view.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_individual_proj.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_individual_task.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_modal_popup.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_proj_list.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_settings.php (added)
-
trunk/includes/admin/settings/wppm_get_ap_task_list.php (added)
-
trunk/includes/admin/settings/wppm_get_appearance_settings.php (added)
-
trunk/includes/admin/settings/wppm_get_category_settings.php (modified) (6 diffs)
-
trunk/includes/admin/settings/wppm_get_edit_category.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_edit_priority.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_edit_proj_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_edit_task_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_get_general_settings.php (modified) (2 diffs)
-
trunk/includes/admin/settings/wppm_get_priority_settings.php (modified) (6 diffs)
-
trunk/includes/admin/settings/wppm_get_proj_status_settings.php (modified) (6 diffs)
-
trunk/includes/admin/settings/wppm_get_task_status_settings.php (modified) (6 diffs)
-
trunk/includes/admin/settings/wppm_reset_ap_grid_view.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_individual_proj.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_individual_task.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_modal_popup.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_proj_list.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_settings.php (added)
-
trunk/includes/admin/settings/wppm_reset_ap_task_list.php (added)
-
trunk/includes/admin/settings/wppm_set_add_category.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_add_priority.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_add_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_add_task_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_advanced_settings.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_ap_grid_view.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_individual_proj.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_individual_task.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_modal_popup.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_proj_list.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_settings.php (added)
-
trunk/includes/admin/settings/wppm_set_ap_task_list.php (added)
-
trunk/includes/admin/settings/wppm_set_category_order.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_edit_category.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_edit_priority.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_edit_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_edit_task_status.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_general_settings.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_priority_order.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_status_order.php (modified) (1 diff)
-
trunk/includes/admin/settings/wppm_set_task_status_order.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist_item.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/checklist/wppm_delete_checklist.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/checklist/wppm_remove_checklist_item.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/checklist/wppm_set_checklist_progress.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_clone_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_delete_task_thread.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_edit_task_creator.php (modified) (2 diffs)
-
trunk/includes/admin/tasks/open_task/wppm_edit_task_details.php (modified) (3 diffs)
-
trunk/includes/admin/tasks/open_task/wppm_edit_task_status.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_edit_task_thread.php (modified) (3 diffs)
-
trunk/includes/admin/tasks/open_task/wppm_open_task.php (modified) (12 diffs)
-
trunk/includes/admin/tasks/open_task/wppm_set_change_raised_by.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_change_task_details.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_change_task_end_date.php (added)
-
trunk/includes/admin/tasks/open_task/wppm_set_change_task_start_date.php (added)
-
trunk/includes/admin/tasks/open_task/wppm_set_change_task_status.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_clone_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_delete_thread.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_edit_task_thread.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_set_task_users.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_submit_task_comment.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_thread_attachment_remove.php (modified) (1 diff)
-
trunk/includes/admin/tasks/open_task/wppm_upload_file.php (modified) (1 diff)
-
trunk/includes/admin/tasks/wppm_add_new_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/wppm_create_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/wppm_get_delete_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/wppm_get_task_users.php (modified) (2 diffs)
-
trunk/includes/admin/tasks/wppm_set_delete_task.php (modified) (1 diff)
-
trunk/includes/admin/tasks/wppm_tasks.php (modified) (2 diffs)
-
trunk/includes/admin/tasks/wppm_tasks_list.php (modified) (10 diffs)
-
trunk/includes/class-wppm-admin.php (modified) (12 diffs)
-
trunk/includes/class-wppm-functions.php (modified) (7 diffs)
-
trunk/includes/frontend/shortcode.php (modified) (2 diffs)
-
trunk/includes/frontend/wppm_tasks_shortcode.php (modified) (4 diffs)
-
trunk/includes/replace_macro.php (modified) (3 diffs)
-
trunk/includes/wppm-install.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/taskbuilder.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
taskbuilder/trunk/asset/css/admin.css
r2981294 r3079882 154 154 border: none !important; 155 155 } 156 .wppm_thread {156 .wppm_thread,.wppm_proj_thread{ 157 157 background-color: #FFFFFF; 158 158 color: #000000; … … 218 218 } 219 219 .wppm_widget{ 220 display: flex; 221 flex-direction: column; 222 width: 100%; 223 min-width: 100%; 224 max-width: 100%; 225 box-sizing: border-box; 226 margin-bottom: 15px; 220 227 border: 1px solid #eee !important; 228 } 229 .wppm-widget-header { 230 display: flex; 231 align-items: center; 232 padding: 10px; 233 } 234 .wppm-widget-header span { 235 display: flex; 236 align-items: center; 237 margin-left: 5px; 238 cursor: pointer; 239 } 240 .wppm-widget-header h4 { 241 flex-grow: 1; 242 margin: 0px !important; 243 } 244 .wppm-widget-body { 245 display: flex; 246 flex-direction: column; 247 padding: 10px 10px 0; 221 248 } 222 249 .wppm-btn{ … … 521 548 } 522 549 } 523 .wppm_task_name_grid_view, .wppm_task_due_date_grid_view, .wppm_empty_container {550 .wppm_task_name_grid_view, .wppm_task_due_date_grid_view, .wppm_empty_container, .wppm_proj_name_grid_view{ 524 551 font-family: "OpenSans-Semibold","Helvetica Neue",Arial,Helvetica,sans-serif; 525 552 font-size: 14px; … … 672 699 border: 1px solid #eee !important; 673 700 } 701 .wppm_proj_thread{ 702 background-color: #FFFFFF; 703 border: 1px solid #eee !important; 704 } 705 674 706 .wppm_progress_bar_container{ 675 707 margin-bottom: 6px; … … 793 825 padding: 10px; 794 826 } 827 #wppm_proj_comment_btn{ 828 display:none; 829 padding: 10px; 830 } 795 831 #wppm_activity_container{ 796 832 background-color:#ffffff; … … 799 835 } 800 836 .wppm_task_discussion{ 837 font: 18px "Helvetica Neue",Helvetica,Arial,sans-serif; 838 } 839 .wppm_proj_discussion{ 801 840 font: 18px "Helvetica Neue",Helvetica,Arial,sans-serif; 802 841 } … … 839 878 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 840 879 } 880 #wppm_proj_comment{ 881 width: 80%; 882 height: 30px; 883 padding: 5px; 884 margin-bottom: 15px; 885 overflow: hidden; 886 border: 1px solid #eee; 887 color:#eee; 888 margin-top: 10px; 889 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 890 } 841 891 .wppm_attachment_title{ 842 892 font: 15px "Helvetica Neue",Helvetica,Arial,sans-serif; … … 870 920 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 871 921 } 922 #wppm_proj_attach_file{ 923 color:#301db7; 924 cursor:pointer; 925 font-weight: normal; 926 text-decoration-line: underline; 927 text-decoration-style: dotted; 928 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 929 } 930 #wppm_individual_cancel_proj_comment_btn{ 931 float:right; 932 background-color:#ffffff; 933 margin-left: 5px; 934 margin-top:5px; 935 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 936 } 937 #wppm_individual_submit_proj_comment_btn{ 938 float:right; 939 margin-left: 5px; 940 margin-top:5px; 941 font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; 942 } 872 943 .wppm_thread_messege{ 873 944 font-size: 14px; … … 888 959 } 889 960 .widget_divider{ 890 margin-top: 4px !important; 891 margin-bottom: 6px !important; 961 margin:4px 0 6px 0px !important; 892 962 } 893 963 .wppm_individual_task_widget{ … … 1154 1224 } 1155 1225 1156 #wppm_task_filter{ 1226 #wppm_task_filter, #wppm_task_list_proj_filter 1227 { 1157 1228 border: 1px solid #ccc !important; 1158 1229 background-color:#FFFFFF; … … 1165 1236 margin-right: 5px; 1166 1237 margin-bottom: 10px; 1238 margin: 0 5px 10px 10px; 1167 1239 } 1168 1240 .wppm-filter-item select { … … 1217 1289 font: 15px "Helvetica Neue",Arial,Helvetica,sans-serif !important; 1218 1290 } 1291 1292 #wppm_proj_discussion_container{ 1293 background-color: #ffffff; 1294 border: 1px solid #eee !important; 1295 } 1296 .wppm-setting-tab-container { 1297 display: flex; 1298 flex-wrap: wrap; 1299 width: 100%; 1300 align-items: center; 1301 margin-bottom: 10px; 1302 background-color:#F0F0F1; 1303 } 1304 .wppm-setting-tab-container button { 1305 padding: 7px 15px; 1306 font-size: 16px; 1307 font-weight: normal; 1308 border: none !important; 1309 color: #6A6A6A; 1310 background-color: transparent; 1311 cursor: pointer; 1312 border-radius: 16px; 1313 margin: 10 0 5px 5px; 1314 } 1315 .wppm-setting-tab-container button.active, 1316 .wppm-setting-tab-container button:hover { 1317 color: #fff; 1318 background-color: #FFA04A; 1319 } 1320 .wppm-input-group { 1321 width: 100%; 1322 display: flex; 1323 flex-direction: column; 1324 padding-bottom: 15px; 1325 box-sizing: border-box; 1326 } 1327 .wppm-input-group .label-container { 1328 display: flex; 1329 align-items: center; 1330 color: #000; 1331 margin-bottom: 2px; 1332 } 1333 .wppm-input-group label { 1334 font-size: 12px; 1335 font-weight: 600; 1336 margin-right: 5px; 1337 } 1338 .wppm-input-group .label-container svg { 1339 width: 12px; 1340 margin-left: 5px; 1341 } 1342 .wppm-input-group input[type="text"], 1343 .wppm-input-group select { 1344 width: 100%; 1345 max-width: 100%; 1346 } 1347 .wppm-input-group .checkbox-group, 1348 .wppm-input-group .radio-group { 1349 width: 100%; 1350 display: flex; 1351 flex-wrap: wrap; 1352 align-items: center; 1353 } 1354 .wppm-input-group .checkbox-group div, 1355 .wppm-input-group .radio-group div { 1356 width: 250px; 1357 display: flex; 1358 flex-wrap: wrap; 1359 align-items: center; 1360 margin: 0 10px 5px 0; 1361 } 1362 .wppm-input-group .checkbox-group div input, 1363 .wppm-input-group .radio-group div input { 1364 margin: 0 5px 0 0 !important; 1365 } 1366 .wppm-input-group .checkbox-group div span, 1367 .wppm-input-group .radio-group div span { 1368 font-size: 12px; 1369 font-weight: 300; 1370 } 1371 .wppm-input-group .required-char { 1372 font-size: 12px; 1373 color: #ff0000; 1374 } 1375 .wppm-input-group .divide-bar { 1376 width: 100%; 1377 display: flex; 1378 flex-wrap: grid; 1379 align-items: center; 1380 } -
taskbuilder/trunk/asset/css/public.css
r2611331 r3079882 57 57 word-break: break-word; 58 58 } 59 60 .wppm_bootstrap .wppm_proj_thread{ 61 word-break: break-word; 62 } -
taskbuilder/trunk/asset/js/admin.js
r2981294 r3079882 63 63 if (!flag) return; 64 64 65 var data = { action: 'wppm_delete_category', cat_id }; 65 var data = { action: 'wppm_delete_category', 66 cat_id, 67 _ajax_nonce:jQuery('#wppm_delete_cat_ajax_nonce').val() 68 }; 66 69 jQuery.post(wppm_admin.ajax_url, data, function (res) { 67 70 wppm_get_category_settings(); … … 98 101 if (!flag) return; 99 102 100 var data = { action: 'wppm_delete_status', status_id }; 103 var data = { action: 'wppm_delete_status', status_id, 104 _ajax_nonce:jQuery('#wppm_delete_pstatus_ajax_nonce').val() 105 }; 101 106 jQuery.post(wppm_admin.ajax_url, data, function (res) { 102 107 wppm_get_proj_status_settings(); … … 214 219 if (!flag) return; 215 220 216 var data = { action: 'wppm_delete_task_priority', priority_id }; 221 var data = { action: 'wppm_delete_task_priority', priority_id, 222 _ajax_nonce:jQuery('#wppm_delete_tprio_ajax_nonce').val() 223 }; 217 224 jQuery.post(wppm_admin.ajax_url, data, function (res) { 218 225 wppm_get_task_prioriy_settings(); … … 249 256 if (!flag) return; 250 257 251 var data = { action: 'wppm_delete_task_status', status_id }; 258 var data = { action: 'wppm_delete_task_status', status_id, 259 _ajax_nonce: jQuery('#wppm_delete_tstatus_ajax_nonce').val()}; 252 260 jQuery.post(wppm_admin.ajax_url, data, function (res) { 253 261 wppm_get_task_status_settings(); … … 319 327 task_id: task_id, 320 328 proj_id: proj_id, 321 checklist_name: jQuery('#wppm_checklist_label').val() 329 checklist_name: jQuery('#wppm_checklist_label').val(), 330 _ajax_nonce:jQuery('#wppm_checklist_ajax_nonce').val() 322 331 }; 323 332 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 341 350 checklist_id: checklist_id, 342 351 proj_id:proj_id, 343 label: jQuery('#wppm_checklist_item_label_'+checklist_id).val() 352 label: jQuery('#wppm_checklist_item_label_'+checklist_id).val(), 353 _ajax_nonce:jQuery('#wppm_checklist_item_ajax_nonce').val() 344 354 }; 345 355 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 357 367 var data = { 358 368 action: 'wppm_delete_checklist', 359 checklist_id: checklist_id 369 checklist_id: checklist_id, 370 _ajax_nonce:jQuery('#wppm_delete_checklist_ajax_nonce').val() 360 371 }; 361 372 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 374 385 action: 'wppm_remove_checklist_item', 375 386 item_id:item_id, 376 checklist_id: checklist_id 387 checklist_id: checklist_id, 388 _ajax_nonce:jQuery('#wppm_delete_checklist_item_ajax_nonce').val() 377 389 }; 378 390 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 403 415 checklist_id: checklist_id, 404 416 item_id:item_id, 405 checked_item: checked_item 417 checked_item: checked_item, 418 _ajax_nonce:jQuery('#wppm_checklist_progress_ajax_nonce').val() 406 419 }; 407 420 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 451 464 tinymce.remove('#wppm_task_comment'); 452 465 jQuery('#wppm_comment_btn').hide(); 466 } 467 468 function wppm_cancel_proj_comment(){ 469 tinyMCE. activeEditor. setContent(''); 470 tinymce.remove('#wppm_proj_comment'); 471 jQuery('#wppm_proj_comment_btn').hide(); 453 472 } 454 473 … … 473 492 wppm_open_task(id); 474 493 } 494 }); 495 } 496 497 function wppm_submit_proj_comment(proj_id){ 498 var dataform = new FormData(jQuery('#wppm_open_project')[0]); 499 jQuery('#wppm_load_individual_project_container').html(wppm_admin.loading_html); 500 dataform.append('action','wppm_submit_proj_comment'); 501 var comment_body = tinyMCE.get('wppm_proj_comment').getContent().trim(); 502 dataform.append('comment_body',comment_body); 503 dataform.append('proj_id',proj_id); 504 jQuery.ajax({ 505 url: wppm_admin.ajax_url, 506 type: 'POST', 507 data: dataform, 508 processData: false, 509 contentType: false 510 }) 511 .done(function (response_str) { 512 wppm_open_project(proj_id); 475 513 }); 476 514 } … … 664 702 } 665 703 704 function wppm_edit_proj_thread(comment_id,proj_id){ 705 wppm_modal_open('Edit Thread'); 706 var data = { 707 action: 'wppm_edit_proj_thread', 708 comment_id:comment_id, 709 proj_id: proj_id 710 } 711 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { 712 var response = JSON.parse(response_str); 713 jQuery('#wppm_popup_body').html(response.body); 714 jQuery('#wppm_popup_footer').html(response.footer); 715 }); 716 } 717 666 718 function wppm_set_edit_task_thread(task_id,proj_id){ 667 719 var dataform = new FormData(jQuery('#frm_edit_task_thread')[0]); … … 686 738 } 687 739 740 function wppm_set_edit_proj_thread(proj_id,){ 741 var dataform = new FormData(jQuery('#frm_edit_proj_thread')[0]); 742 var comment_body = tinyMCE.get('wppm_edit_proj_thread_editor').getContent().trim(); 743 dataform.append('wppm_edit_proj_thread', comment_body); 744 wppm_modal_close(); 745 jQuery('#wppm_task_container').html(wppm_admin.loading_html); 746 jQuery.ajax({ 747 url: wppm_admin.ajax_url, 748 type: 'POST', 749 data: dataform, 750 processData: false, 751 contentType: false 752 }) 753 .done(function (response_str) { 754 wppm_open_project(proj_id); 755 }); 756 } 757 688 758 function wppm_delete_thread(comment_id,task_id,proj_id){ 689 759 wppm_modal_open('Delete Thread'); … … 692 762 comment_id:comment_id, 693 763 task_id: task_id, 764 proj_id:proj_id 765 } 766 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { 767 var response = JSON.parse(response_str); 768 jQuery('#wppm_popup_body').html(response.body); 769 jQuery('#wppm_popup_footer').html(response.footer); 770 }); 771 } 772 773 function wppm_delete_proj_thread(comment_id,proj_id){ 774 wppm_modal_open('Delete Thread'); 775 var data = { 776 action: 'wppm_delete_proj_thread', 777 comment_id:comment_id, 694 778 proj_id:proj_id 695 779 } … … 718 802 wppm_open_task(task_id); 719 803 } 804 }); 805 } 806 807 function wppm_set_delete_proj_thread(proj_id){ 808 var dataform = new FormData(jQuery('#frm_delete_proj_thread')[0]); 809 wppm_modal_close(); 810 jQuery('#wppm_task_container').html(wppm_admin.loading_html); 811 jQuery.ajax({ 812 url: wppm_admin.ajax_url, 813 type: 'POST', 814 data: dataform, 815 processData: false, 816 contentType: false 817 }) 818 .done(function (response_str) { 819 wppm_open_project(proj_id); 720 820 }); 721 821 } … … 1052 1152 attachment : attachment, 1053 1153 comment_id : comment_id, 1054 task_id:task_id 1154 task_id:task_id, 1155 _ajax_nonce : jQuery('#wppm_ajax_nonce').val() 1055 1156 }; 1056 1157 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 1065 1166 } 1066 1167 1168 function wppm_proj_thread_attachment_remove(obj,attachment,comment_id,id){ 1169 if( confirm(wppm_admin.confirm) ){ 1170 var data = { 1171 action: 'wppm_remove_proj_thread_attachment', 1172 attachment : attachment, 1173 comment_id : comment_id, 1174 proj_id:id, 1175 _ajax_nonce:jQuery('#wppm_proj_thread_attachment_remove').val() 1176 }; 1177 jQuery.post(wppm_admin.ajax_url, data, function(response) { 1178 jQuery(obj).parent('td').parent('tr').remove(); 1179 wppm_open_project(id); 1180 }); 1181 } 1182 } 1183 1067 1184 function wppm_open_project(id){ 1068 1185 jQuery('#wppm_project_list').hide(); … … 1105 1222 1106 1223 function wppm_set_clone_task(){ 1107 var data = { 1108 action: 'wppm_set_clone_task', 1109 task_id: jQuery("input[name=task_id]").val(), 1110 task_name:jQuery("input[name=task_name]").val() 1111 } 1112 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { 1224 var dataform = new FormData(jQuery('#frm_edit_clone_task_name')[0]); 1225 jQuery.ajax({ 1226 url: wppm_admin.ajax_url, 1227 type: 'POST', 1228 data: dataform, 1229 processData: false, 1230 contentType: false 1231 }) 1232 .done(function (response_str) { 1113 1233 wppm_modal_close(); 1114 1234 wppm_get_task_list(); … … 1152 1272 jQuery('.wppm_setting_col2').html(response); 1153 1273 }); 1274 } 1275 1276 function wppm_get_appearance_settings(){ 1277 jQuery('.wppm_setting_pills li').removeClass('active'); 1278 jQuery('#wppm_settings_appearance').addClass('active'); 1279 var data = { 1280 action: 'wppm_get_appearance_settings' 1281 }; 1282 jQuery.post(wppm_admin.ajax_url, data, function(response) { 1283 jQuery('.wppm_setting_col2').html(response); 1284 }); 1285 } 1286 1287 function wppm_get_ap_proj_list(current_tab_class) { 1288 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1289 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1290 jQuery('.wppm-setting-section-body').html(wppm_admin.loading_html); 1291 var data = { action: 'wppm_get_ap_proj_list' , 1292 current_tab:current_tab_class 1293 }; 1294 jQuery.post( 1295 wppm_admin.ajax_url, 1296 data, 1297 function (response) { 1298 jQuery( '.wppm-setting-section-body' ).html( response ); 1299 } 1300 ); 1301 } 1302 1303 function wppm_get_ap_modal_popup(current_tab_class){ 1304 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1305 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1306 jQuery('.wppm-setting-section-body').html(wppm_admin.loading_html); 1307 var data = { action: 'wppm_get_ap_modal_popup' , 1308 current_tab:current_tab_class }; 1309 jQuery.post( 1310 wppm_admin.ajax_url, 1311 data, 1312 function (response) { 1313 jQuery( '.wppm-setting-section-body' ).html( response ); 1314 } 1315 ); 1316 } 1317 1318 function wppm_get_ap_task_list(current_tab_class){ 1319 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1320 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1321 jQuery( '.wppm-setting-section-body').html(wppm_admin.loading_html); 1322 var data = { action: 'wppm_get_ap_task_list' , 1323 current_tab:current_tab_class 1324 }; 1325 jQuery.post( 1326 wppm_admin.ajax_url, 1327 data, 1328 function (response) { 1329 jQuery( '.wppm-setting-section-body' ).html( response ); 1330 } 1331 ); 1332 } 1333 1334 function wppm_get_ap_individual_proj(current_tab_class){ 1335 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1336 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1337 jQuery( '.wppm-setting-section-body').html(wppm_admin.loading_html); 1338 var data = { action: 'wppm_get_ap_individual_proj' , 1339 current_tab:current_tab_class 1340 }; 1341 jQuery.post( 1342 wppm_admin.ajax_url, 1343 data, 1344 function (response) { 1345 jQuery( '.wppm-setting-section-body' ).html( response ); 1346 } 1347 ); 1348 } 1349 1350 function wppm_get_ap_individual_task(current_tab_class){ 1351 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1352 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1353 jQuery( '.wppm-setting-section-body').html(wppm_admin.loading_html); 1354 var data = { action: 'wppm_get_ap_individual_task' , 1355 current_tab:current_tab_class 1356 }; 1357 jQuery.post( 1358 wppm_admin.ajax_url, 1359 data, 1360 function (response) { 1361 jQuery( '.wppm-setting-section-body' ).html( response ); 1362 } 1363 ); 1364 } 1365 1366 function wppm_get_ap_grid_view(current_tab_class){ 1367 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1368 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1369 jQuery( '.wppm-setting-section-body').html(wppm_admin.loading_html); 1370 var data = { action: 'wppm_get_ap_grid_view' , 1371 current_tab:current_tab_class 1372 }; 1373 jQuery.post( 1374 wppm_admin.ajax_url, 1375 data, 1376 function (response) { 1377 jQuery( '.wppm-setting-section-body' ).html( response ); 1378 } 1379 ); 1380 } 1381 1382 function wppm_get_ap_settings(current_tab_class){ 1383 jQuery( '.wppm-setting-tab-container button' ).removeClass( 'active' ); 1384 jQuery( '.wppm-setting-tab-container button.' + current_tab_class ).addClass( 'active' ); 1385 jQuery( '.wppm-setting-section-body').html(wppm_admin.loading_html); 1386 var data = { action: 'wppm_get_ap_settings' , 1387 current_tab:current_tab_class 1388 }; 1389 jQuery.post( 1390 wppm_admin.ajax_url, 1391 data, 1392 function (response) { 1393 jQuery( '.wppm-setting-section-body' ).html( response ); 1394 } 1395 ); 1396 } 1397 1398 function wppm_set_ap_settings(){ 1399 var form = jQuery( '.wppm-frm-ap-settings' )[0]; 1400 var dataform = new FormData( form ); 1401 jQuery('.wppm_submit_wait').show(); 1402 jQuery.ajax( 1403 { 1404 url: wppm_admin.ajax_url, 1405 type: 'POST', 1406 data: dataform, 1407 processData: false, 1408 contentType: false 1409 } 1410 ).done( 1411 function (response_str) { 1412 var response = JSON.parse(response_str); 1413 jQuery('.wppm_submit_wait').hide(); 1414 if (response.sucess_status=='1') { 1415 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1416 } 1417 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1418 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1419 } 1420 ); 1421 } 1422 1423 function wppm_set_ap_proj_list() { 1424 var form = jQuery( '.wppm-frm-ap-pl' )[0]; 1425 var dataform = new FormData( form ); 1426 jQuery('.wppm_submit_wait').show(); 1427 jQuery.ajax( 1428 { 1429 url: wppm_admin.ajax_url, 1430 type: 'POST', 1431 data: dataform, 1432 processData: false, 1433 contentType: false 1434 } 1435 ).done( 1436 function (response_str) { 1437 var response = JSON.parse(response_str); 1438 jQuery('.wppm_submit_wait').hide(); 1439 if (response.sucess_status=='1') { 1440 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1441 } 1442 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1443 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1444 } 1445 ); 1446 } 1447 1448 function wppm_set_ap_task_list(){ 1449 var form = jQuery( '.wppm-frm-ap-tl' )[0]; 1450 var dataform = new FormData( form ); 1451 jQuery('.wppm_submit_wait').show(); 1452 jQuery.ajax( 1453 { 1454 url: wppm_admin.ajax_url, 1455 type: 'POST', 1456 data: dataform, 1457 processData: false, 1458 contentType: false 1459 } 1460 ).done( 1461 function (response_str) { 1462 var response = JSON.parse(response_str); 1463 jQuery('.wppm_submit_wait').hide(); 1464 if (response.sucess_status=='1') { 1465 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1466 } 1467 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1468 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1469 } 1470 ); 1471 } 1472 1473 function wppm_set_ap_individual_proj(){ 1474 var form = jQuery( '.wppm-frm-ap-individual_pl' )[0]; 1475 var dataform = new FormData( form ); 1476 jQuery('.wppm_submit_wait').show(); 1477 jQuery.ajax( 1478 { 1479 url: wppm_admin.ajax_url, 1480 type: 'POST', 1481 data: dataform, 1482 processData: false, 1483 contentType: false 1484 } 1485 ).done( 1486 function (response_str) { 1487 var response = JSON.parse(response_str); 1488 jQuery('.wppm_submit_wait').hide(); 1489 if (response.sucess_status=='1') { 1490 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1491 } 1492 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1493 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1494 } 1495 ); 1496 } 1497 1498 function wppm_set_ap_individual_task(){ 1499 var form = jQuery( '.wppm-frm-ap-individual_tl' )[0]; 1500 var dataform = new FormData( form ); 1501 jQuery('.wppm_submit_wait').show(); 1502 jQuery.ajax( 1503 { 1504 url: wppm_admin.ajax_url, 1505 type: 'POST', 1506 data: dataform, 1507 processData: false, 1508 contentType: false 1509 } 1510 ).done( 1511 function (response_str) { 1512 var response = JSON.parse(response_str); 1513 jQuery('.wppm_submit_wait').hide(); 1514 if (response.sucess_status=='1') { 1515 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1516 } 1517 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1518 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1519 } 1520 ); 1521 } 1522 1523 function wppm_set_ap_modal_popup(){ 1524 var form = jQuery( '.wppm-frm-ap-modal_popup' )[0]; 1525 var dataform = new FormData( form ); 1526 jQuery('.wppm_submit_wait').show(); 1527 jQuery.ajax( 1528 { 1529 url: wppm_admin.ajax_url, 1530 type: 'POST', 1531 data: dataform, 1532 processData: false, 1533 contentType: false 1534 } 1535 ).done( 1536 function (response_str) { 1537 var response = JSON.parse(response_str); 1538 jQuery('.wppm_submit_wait').hide(); 1539 if (response.sucess_status=='1') { 1540 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1541 } 1542 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1543 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1544 } 1545 ); 1546 } 1547 1548 function wppm_set_ap_grid_view(){ 1549 var form = jQuery( '.wppm-frm-ap-grid_view' )[0]; 1550 var dataform = new FormData( form ); 1551 jQuery('.wppm_submit_wait').show(); 1552 jQuery.ajax( 1553 { 1554 url: wppm_admin.ajax_url, 1555 type: 'POST', 1556 data: dataform, 1557 processData: false, 1558 contentType: false 1559 } 1560 ).done( 1561 function (response_str) { 1562 var response = JSON.parse(response_str); 1563 jQuery('.wppm_submit_wait').hide(); 1564 if (response.sucess_status=='1') { 1565 jQuery('#wppm_alert_success .wppm_alert_text').text(response.messege); 1566 } 1567 jQuery('#wppm_alert_success').slideDown('fast',function(){}); 1568 setTimeout(function(){ jQuery('#wppm_alert_success').slideUp('fast',function(){}); }, 3000); 1569 } 1570 ); 1154 1571 } 1155 1572 … … 1197 1614 action: 'wppm_change_project_visibility', 1198 1615 project_id:proj_id, 1199 project_visibility:project_visibility 1616 project_visibility:project_visibility, 1617 _ajax_nonce:jQuery('#wppm_proj_visibility_ajax_nonce').val() 1200 1618 }; 1201 1619 jQuery.post(wppm_admin.ajax_url, data, function() { … … 1234 1652 task_search:"", 1235 1653 sort_by:"task_name", 1236 order:"ASC" 1654 order:"ASC", 1655 wppm_proj_filter:0 1237 1656 }; 1238 1657 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 1260 1679 task_search:"", 1261 1680 sort_by:"task_name", 1262 order:"ASC" 1681 order:"ASC", 1682 wppm_proj_filter:"0" 1263 1683 }; 1264 1684 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 1280 1700 }); 1281 1701 } 1702 1703 function wppm_tasks_by_select_project(){ 1704 wppm_proj_filter = jQuery('#wppm_task_list_proj_filter').find(":selected").val(); 1705 jQuery('#wppm_task_container').html(wppm_admin.loading_html); 1706 var data = { 1707 action: 'wppm_get_task_list', 1708 wppm_proj_filter:wppm_proj_filter 1709 }; 1710 jQuery.post(wppm_admin.ajax_url, data, function(response) { 1711 jQuery('#wppm_task_container').html(response); 1712 }); 1713 } 1714 1715 function wppm_tasks_by_select_project_grid_view(){ 1716 wppm_proj_filter = jQuery('#wppm_task_list_proj_filter').find(":selected").val(); 1717 jQuery('#wppm_task_container').html(wppm_admin.loading_html); 1718 var data = { 1719 action: 'wppm_view_project_tasks', 1720 wppm_proj_filter:wppm_proj_filter 1721 }; 1722 jQuery.post(wppm_admin.ajax_url, data, function(response) { 1723 jQuery('#wppm_task_container').html(response); 1724 }); 1725 } 1726 1727 function wppm_reset_ap_proj_list(){ 1728 jQuery( "#wppm_reset_ap_proj_list_btn" ).text( wppm_admin.please_wait ); 1729 var _ajax_nonce = jQuery("#wppm_reset_ap_proj_list_nonce").val(); 1730 var data = { action: 'wppm_reset_ap_proj_list',_ajax_nonce }; 1731 jQuery.post( 1732 wppm_admin.ajax_url, 1733 data, 1734 function () { 1735 wppm_get_ap_proj_list('project-list'); 1736 } 1737 ); 1738 } 1739 1740 function wppm_reset_ap_task_list(){ 1741 jQuery( "#wppm_reset_ap_task_list_btn" ).text( wppm_admin.please_wait ); 1742 var _ajax_nonce = jQuery("#wppm_reset_ap_task_list_ajax_nonce").val(); 1743 var data = { action: 'wppm_reset_ap_task_list',_ajax_nonce }; 1744 jQuery.post( 1745 wppm_admin.ajax_url, 1746 data, 1747 function () { 1748 wppm_get_ap_task_list('task-list'); 1749 } 1750 ); 1751 } 1752 1753 function wppm_reset_ap_individual_proj(){ 1754 jQuery( "#wppm_reset_ap_individual_proj_btn" ).text( wppm_admin.please_wait ); 1755 var _ajax_nonce = jQuery( "#wppm_reset_ap_individual_proj_ajax_nonce").val(); 1756 var data = { action: 'wppm_reset_ap_individual_proj', 1757 _ajax_nonce, }; 1758 jQuery.post( 1759 wppm_admin.ajax_url, 1760 data, 1761 function () { 1762 wppm_get_ap_individual_proj('individual-project'); 1763 } 1764 ); 1765 } 1766 1767 function wppm_reset_ap_individual_task(){ 1768 jQuery( "#wppm_reset_ap_individual_task_btn" ).text( wppm_admin.please_wait ); 1769 var _ajax_nonce = jQuery( "#wppm_reset_ap_individual_task_ajax_nonce" ).val(); 1770 var data = { action: 'wppm_reset_ap_individual_task',_ajax_nonce }; 1771 jQuery.post( 1772 wppm_admin.ajax_url, 1773 data, 1774 function () { 1775 wppm_get_ap_individual_task('individual-task'); 1776 } 1777 ); 1778 } 1779 1780 function wppm_reset_ap_modal_popup(){ 1781 jQuery( "#wppm_reset_ap_modal_popup_btn" ).text( wppm_admin.please_wait ); 1782 var _ajax_nonce = jQuery( "#wppm_reset_ap_modal_popup_nonce" ).val(); 1783 var data = { action: 'wppm_reset_ap_modal_popup',_ajax_nonce }; 1784 jQuery.post( 1785 wppm_admin.ajax_url, 1786 data, 1787 function () { 1788 wppm_get_ap_modal_popup('modal-popup'); 1789 } 1790 ); 1791 } 1792 1793 function wppm_reset_ap_grid_view(){ 1794 jQuery( "#wppm_reset_ap_grid_view_btn" ).text( wppm_admin.please_wait ); 1795 var wppm_reset_grid_ajax_nonce = jQuery( "#wppm_reset_ap_grid_view_ajax_nonce" ).val(); 1796 var data = { 1797 action: 'wppm_reset_ap_grid_view', 1798 wppm_reset_grid_ajax_nonce:wppm_reset_grid_ajax_nonce 1799 }; 1800 jQuery.post(wppm_admin.ajax_url, data, function(response) { 1801 wppm_get_ap_grid_view('grid-view'); 1802 }); 1803 } 1804 1805 function wppm_reset_ap_settings(){ 1806 jQuery( "#wppm_reset_ap_settings_btn" ).text( wppm_admin.please_wait ); 1807 var _ajax_nonce = jQuery("#wppm_reset_ap_settings_nonce").val(); 1808 var data = { action: 'wppm_reset_ap_settings',_ajax_nonce }; 1809 jQuery.post( 1810 wppm_admin.ajax_url, 1811 data, 1812 function () { 1813 wppm_get_ap_settings('settings'); 1814 } 1815 ); 1816 } -
taskbuilder/trunk/includes/admin/email_notifications/wppm_email_notifications.php
r2611331 r3079882 4 4 5 5 global $wpdb,$wppmfunction; 6 $settings = get_option("wppm-ap-modal"); 7 $wppm_ap_settings = get_option("wppm-ap-settings"); 6 8 ?> 7 9 <div class="wppm_bootstrap"> … … 43 45 </div> 44 46 </div> 47 <style> 48 #wppm_popup_title{ 49 background-color: <?php echo esc_attr($settings['header-bg-color'])?>; 50 } 51 #wppm_popup_title h3{ 52 color:<?php echo esc_attr( $settings['header-text-color'])?>; 53 } 54 #wppm_popup_body{ 55 background-color: <?php echo esc_attr($settings['body-bg-color'])?>!important; 56 } 57 #wppm_popup_body label{ 58 color:<?php echo esc_attr( $settings['body-label-color'])?>; 59 } 60 #wppm_popup_body input{ 61 color:<?php echo esc_attr( $settings['body-text-color'])?>; 62 } 63 #wppm_popup_body select{ 64 color:<?php echo esc_attr( $settings['body-text-color'])?>; 65 } 66 #wppm_popup_body span { 67 color:<?php echo esc_attr( $settings['body-text-color'])?>; 68 } 69 #wppm_popup_body .select2-results__options { 70 color:<?php echo esc_attr( $settings['body-text-color'])?>; 71 } 72 #wppm_popup_footer{ 73 background-color: <?php echo esc_attr($settings['footer-bg-color'])?>!important; 74 } 75 .wppm_popup_action{ 76 background-color: <?php echo esc_attr($settings['action-btn-bg-color'])?>!important; 77 color:<?php echo esc_attr( $settings['action-btn-text-color'])?>!important; 78 } 79 .wppm_bootstrap .nav-pills > li.active > a, 80 .wppm_bootstrap .nav-pills > li.active > a:hover, 81 .wppm_bootstrap .nav-pills > li.active > a:focus { 82 color: <?php echo esc_attr( $wppm_ap_settings['tab-text-color'])?>!important; 83 background-color:<?php echo esc_attr($wppm_ap_settings['tab-background-color'])?>!important; 84 } 85 </style> 45 86 <!-- Pop-up snippet end --> 46 87 <script> -
taskbuilder/trunk/includes/admin/email_notifications/wppm_get_edit_email_notification.php
r2663532 r3079882 81 81 <img class="wppm_submit_wait" style="display:none;" src="<?php echo WPPM_PLUGIN_URL.'asset/images/[email protected]';?>"> 82 82 <input type="hidden" name="action" value="wppm_set_edit_email_notification" /> 83 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_email_notification' ) ); ?>"> 83 84 <input type="hidden" name="id" value="<?php echo htmlentities(esc_attr($id)) ?>" /> 84 85 </form> -
taskbuilder/trunk/includes/admin/email_notifications/wppm_get_en_general_setting.php
r2611331 r3079882 33 33 <span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="loading_icon"></span> 34 34 <input type="hidden" name="action" value="wppm_set_en_general_settings" /> 35 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_en_general_settings' ) ); ?>"> 35 36 </form> -
taskbuilder/trunk/includes/admin/email_notifications/wppm_set_edit_email_notification.php
r2663532 r3079882 6 6 if (!($current_user->ID && $current_user->has_cap('manage_options'))) { 7 7 exit; 8 } 9 if ( check_ajax_referer( 'wppm_set_edit_email_notification', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 8 11 } 9 12 $wppm_email_notificatins = get_option('wppm_email_notification'); -
taskbuilder/trunk/includes/admin/email_notifications/wppm_set_en_general_setting.php
r2611331 r3079882 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) { 8 8 exit; 9 } 10 if ( check_ajax_referer( 'wppm_set_en_general_settings', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 9 12 } 10 13 -
taskbuilder/trunk/includes/admin/licenses.php
r2611331 r3079882 3 3 exit; // Exit if accessed directly 4 4 } 5 6 5 $is_addons = apply_filters( 'wppm_is_add_on_installed', false ); 7 6 if($is_addons) { -
taskbuilder/trunk/includes/admin/projects/get_users.php
r2611331 r3079882 11 11 $users = explode(",",$project->users); 12 12 } 13 $settings = get_option("wppm-ap-modal"); 13 14 ob_start(); 14 15 ?> … … 58 59 </div> 59 60 <input type="hidden" name="action" value="wppm_set_project_users" /> 61 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_project_users' ) ); ?>"> 60 62 <input type="hidden" id="wppm_proj_id" name="proj_id" value="<?php echo esc_attr($proj_id) ?>" /> 61 63 </div> 62 64 </form> 65 <style> 66 li { 67 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 68 } 69 </style> 63 70 <script> 64 71 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_change_project_visibility.php
r2951988 r3079882 4 4 } 5 5 global $current_user,$wpdb,$wppmfunction; 6 if ( check_ajax_referer( 'wppm_change_project_visibility', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $project_id = isset($_POST['project_id']) ? sanitize_text_field($_POST['project_id']) : '' ; 7 10 if (!(($current_user->ID && $current_user->has_cap('manage_options')))) {exit;} -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_drag_and_drop_card.php
r2611331 r3079882 4 4 } 5 5 global $wpdb,$current_user, $wppmfunction; 6 6 if ( check_ajax_referer( 'wppm_drag_and_drop_card', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 7 9 $wppm_card = isset($_POST) && isset($_POST['el']) ? sanitize_text_field($_POST['el']) : ''; 8 10 if (!$wppm_card) {exit;} -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_edit_project_creator.php
r2611331 r3079882 8 8 $project_data = $wppmfunction->get_project($project_id); 9 9 $project_creator = get_userdata($project_data['created_by']); 10 $settings = get_option("wppm-ap-modal"); 10 11 ob_start(); 11 12 ?> … … 18 19 </div> 19 20 <input type="hidden" name="action" value="wppm_set_change_project_raised_by" /> 21 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_project_raised_by' ) ); ?>"> 20 22 <input type="hidden" name="wppm_user_id" id="wppm_user_id" value="<?php echo esc_attr($project_creator->ID) ?>"> 21 23 <input type="hidden" name="project_id" value="<?php echo htmlentities(esc_attr($project_id)) ?>" /> 22 24 </form> 25 <style> 26 li { 27 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 28 } 29 </style> 23 30 <script type="text/javascript"> 24 31 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_edit_project_details.php
r2663532 r3079882 12 12 $categories = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wppm_project_categories"); 13 13 $wppm_project_time = get_option('wppm_project_time'); 14 $settings = get_option("wppm-ap-modal"); 14 15 ob_start(); 15 16 ?> … … 81 82 82 83 <input type="hidden" name="action" value="wppm_set_change_project_details" /> 84 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_project_details' ) ); ?>"> 83 85 <input type="hidden" name="project_id" value="<?php echo htmlentities(esc_attr($id)) ?>" /> 84 86 </form> … … 116 118 convert_urls : true, 117 119 paste_as_text: true, 120 content_style: 121 `body { 122 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 123 }`, 118 124 setup: function (editor) { 119 125 } -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_edit_project_status.php
r2611331 r3079882 27 27 <?php do_action('wppm_after_edit_change_project_status',$project_id);?> 28 28 <input type="hidden" name="action" value="wppm_set_change_project_status" /> 29 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_project_status' ) ); ?>"> 29 30 <input type="hidden" id="wppm_project_id" name="project_id" value="<?php echo htmlentities(esc_attr($project_id)); ?>" /> 30 31 -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_get_project_tasks.php
r3042496 r3079882 5 5 global $current_user,$wpdb,$wppmfunction; 6 6 $project_id = isset($_POST['id']) ? intval(sanitize_text_field($_POST['id'])) : 0 ; 7 $appearance_settings = get_option("wppm-ap-task-list"); 7 8 $wppm_task_time = get_option('wppm_task_time'); 8 9 if($current_user->has_cap('manage_options')){ … … 25 26 <thead> 26 27 <tr> 27 <th class="wppm_table_header" ><?php echo esc_html_e('Task id','taskbuilder');?> </th>28 <th class="wppm_table_header" ><?php echo esc_html_e('Task Name','taskbuilder');?> </th>29 <th class="wppm_table_header" ><?php echo esc_html_e('Task Status','taskbuilder');?> </th>30 <th class="wppm_table_header" ><?php echo esc_html_e('Task Priority','taskbuilder');?> </th>31 <th class="wppm_table_header" ><?php echo esc_html_e('Assign To','taskbuilder');?> </th>32 <th class="wppm_table_header" ><?php echo esc_html_e('Start Date','taskbuilder');?> </th>33 <th class="wppm_table_header" ><?php echo esc_html_e('End Date','taskbuilder');?> </th>28 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Task id','taskbuilder');?> </th> 29 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>" <?php echo esc_attr($appearance_settings['list-header-text-color'])?>><?php echo esc_html_e('Task Name','taskbuilder');?> </th> 30 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Task Status','taskbuilder');?> </th> 31 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Task Priority','taskbuilder');?> </th> 32 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Assign To','taskbuilder');?> </th> 33 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Start Date','taskbuilder');?> </th> 34 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('End Date','taskbuilder');?> </th> 34 35 </tr> 35 36 </thead> … … 109 110 </div> 110 111 </form> 112 <style> 113 #tbl_project_tasks tr:nth-child(even){ 114 background-color:<?php echo esc_attr($appearance_settings['list-item-even-background-color'])?>; 115 color:<?php echo esc_attr($appearance_settings['list-item-even-text-color'])?>; 116 } 117 #tbl_project_tasks tr:nth-child(odd){ 118 background-color:<?php echo esc_attr($appearance_settings['list-item-odd-background-color'])?>; 119 color:<?php echo esc_attr($appearance_settings['list-item-odd-text-color'])?>; 120 } 121 #tbl_project_tasks tr:hover{ 122 background-color:<?php echo esc_attr($appearance_settings['list-item-hover-background-color'])?>; 123 } 124 #tbl_project_tasks tr:hover td{ 125 color: <?php echo esc_attr($appearance_settings['list-item-hover-text-color'])?>; 126 } 127 </style> 111 128 <script type="text/javascript"> 112 129 jQuery(document).ready(function() { -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_get_project_visibility.php
r2951988 r3079882 21 21 </div> 22 22 </div> 23 <input type="hidden" name="wppm_proj_visibility_ajax_nonce" id="wppm_proj_visibility_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_change_project_visibility' ) ); ?>"> 23 24 <script> 24 25 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_set_change_project_details.php
r2663532 r3079882 4 4 } 5 5 global $wpdb,$wppmfunction,$current_user; 6 if ( check_ajax_referer( 'wppm_set_change_project_details', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $project_id = isset($_POST['project_id']) ? sanitize_text_field($_POST['project_id']) : '' ; 7 10 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('change_project_details',$project_id))) {exit;} -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_set_change_project_raised_by.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wppmfunction,$wpdb; 6 7 if ( check_ajax_referer( 'wppm_set_change_project_raised_by', '_ajax_nonce', false ) != 1 ) { 8 wp_send_json_error( 'Unauthorised request!', 401 ); 9 } 6 10 $project_id = isset($_POST['project_id']) ? intval(sanitize_text_field($_POST['project_id'])) : ''; 7 11 -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_set_change_project_status.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wppmfunction,$wpdb; 6 6 if ( check_ajax_referer( 'wppm_set_change_project_status', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 7 9 $project_id = isset($_POST['project_id']) ? sanitize_text_field($_POST['project_id']) : ''; 8 10 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('change_project_status',$project_id))) {exit;} -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_set_project_users.php
r2611331 r3079882 4 4 } 5 5 global $wpdb,$wppmfunction,$current_user; 6 if ( check_ajax_referer( 'wppm_set_project_users', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $proj_id = isset($_POST['proj_id']) ? sanitize_text_field($_POST['proj_id']) : '' ; 7 10 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('assign_project_users',$proj_id))) {exit;} -
taskbuilder/trunk/includes/admin/projects/open_project/wppm_view_project_tasks.php
r3042496 r3079882 7 7 $total_no_of_rows = 0; 8 8 $totalrows_tasks = 0; 9 $appearance_settings = get_option("wppm-ap-grid-view"); 9 10 $page_no = isset($_POST['page_no']) ? intval(sanitize_text_field($_POST['page_no'])) : '0'; 10 11 $task_status = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_task_statuses ORDER BY load_order ASC" ); … … 12 13 $search_tag = isset($_POST['task_search']) ? sanitize_text_field($_POST['task_search']) : ''; 13 14 $filter_by = isset($_POST['wppm_task_filter']) ? sanitize_text_field($_POST['wppm_task_filter']) : "all"; 15 $proj_filter = isset($_POST['wppm_proj_filter']) ? sanitize_text_field($_POST['wppm_proj_filter']) : "0"; 14 16 $filters = array( 15 17 'search' => $search_tag, 16 'filter'=>$filter_by 18 'filter'=>$filter_by, 19 'proj_filter'=>$proj_filter 17 20 ); 18 21 $grid_view_filter = $filters ; 19 22 $tl_filters = isset( $_COOKIE['wppm_grid_view_filters'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['wppm_grid_view_filters'] ) ) : $grid_view_filter; 20 23 $current_date = date('Y-m-d'); 24 if($current_user->has_cap('manage_options')){ 25 $query = ( "SELECT * FROM {$wpdb->prefix}wppm_project ORDER BY project_name" ); 26 $where = ""; 27 }else{ 28 $query = ("SELECT Proj.* 29 FROM {$wpdb->prefix}wppm_project AS Proj 30 Left join {$wpdb->prefix}wppm_project_meta proj_meta ON Proj.id = proj_meta.project_id"); 31 $where = " where (FIND_IN_SET($current_user->ID,Proj.users)) OR (Proj.id = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1) Group by Proj.id ORDER BY project_name"; 32 } 33 $query.= $where; 34 $projects = $wpdb->get_results($query); 21 35 $wppm_tl_filter = "1=1"; 22 36 if(!is_array($tl_filters)){ … … 28 42 $search_tag = isset($_POST['task_search']) ? sanitize_text_field($_POST['task_search']) : $tl_filters_arr['search']; 29 43 $filter_by = isset($_POST['wppm_task_filter']) ? sanitize_text_field($_POST['wppm_task_filter']) : $tl_filters_arr['filter']; 44 $proj_filter = isset($_POST['wppm_proj_filter']) ? sanitize_text_field($_POST['wppm_proj_filter']) : $tl_filters_arr['proj_filter']; 30 45 $filters = array( 31 46 'search'=>$search_tag, 32 'filter'=>$filter_by 47 'filter'=>$filter_by, 48 'proj_filter' =>$proj_filter 33 49 ); 34 50 setcookie('wppm_grid_view_filters',wp_json_encode( $filters ),time() + 3600); … … 49 65 $wppm_tl_filter = "(FIND_IN_SET('$current_user->ID',Task.users)>0)"; 50 66 } 67 if($proj_filter!=0){ 68 $wppm_task_by_proj_filter = "Task.project = '$proj_filter'"; 69 }else{ 70 $wppm_task_by_proj_filter ="1=1"; 71 } 51 72 if(!empty($task_status)){ 52 73 foreach($task_status as $status) { … … 63 84 "); 64 85 $no_of_rows = ( "SELECT count(*) FROM ($query"); 65 $where = " where $wppm_tl_filter AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text') AND Task.status= $status->id";86 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text') AND Task.status= $status->id"; 66 87 } else{ 67 88 $query = ("SELECT Task.* … … 75 96 "); 76 97 $no_of_rows = ( "SELECT count(*) FROM ($query"); 77 $where = " where $wppm_tl_filter AND (((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text')) AND Task.status= $status->id";98 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND (((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text')) AND Task.status= $status->id"; 78 99 } 79 100 }else{ … … 83 104 "); 84 105 $no_of_rows = ( "SELECT count(*) FROM ($query"); 85 $where = " where $wppm_tl_filter AND Task.status= $status->id";106 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND Task.status= $status->id"; 86 107 }else{ 87 108 $query = ( "SELECT Task.* … … 92 113 "); 93 114 $no_of_rows = ( "SELECT count(*) FROM ($query"); 94 $where = " where $wppm_tl_filter AND ((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND Task.status= $status->id";115 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND ((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND Task.status= $status->id"; 95 116 } 96 117 } … … 129 150 <div class="col-sm-6"> 130 151 <span class="wppm-heading-inline"> <?php echo esc_html_e('Tasks','taskbuilder');?> </span> 131 <span class="wppm-add-new-btn btn-primary" onclick="wppm_add_new_task()" ><img class="wppm_add_new_task_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="add"><?php echo esc_html_e('Add New','taskbuilder');?></span>132 <span class="wppm-add-new-btn btn-primary" id="wppm_task_list" onclick="wppm_get_task_list()" ><span><img class="wppm_task_list_image" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/list-symbol.svg'); ?>" alt="list"></span><span><?php echo esc_html_e('Task List','taskbuilder');?></span></span>152 <span class="wppm-add-new-btn btn-primary" onclick="wppm_add_new_task()" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>"><img class="wppm_add_new_task_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="add"><?php echo esc_html_e('Add New','taskbuilder');?></span> 153 <span class="wppm-add-new-btn btn-primary" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>; id="wppm_task_list" onclick="wppm_get_task_list()" ><span><img class="wppm_task_list_image" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/list-symbol.svg'); ?>" alt="list"></span><span style="color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>"><?php echo esc_html_e('Task List','taskbuilder');?></span></span> 133 154 </div> 134 155 <div id="wppm_task_search" class="col-sm-6"> … … 137 158 </div> 138 159 </div> 139 <div class="row"> 140 <div class="col-sm-6" id="wppm_task_filter_container"> 141 <div class="wppm-filter-item"> 142 <label for="wppm_task_filter"> <?php echo esc_html_e('Filter','taskbuilder');?></label> 143 <select id="wppm_task_filter" name="wppm_task_filter" onchange="wppm_apply_task_filter_grid_view()"> 144 <option value="all"<?php echo ($filter_by == "all")? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 145 <option value="todo" <?php echo ($filter_by == "todo")? 'selected':""?>><?php echo esc_html_e('Todo','taskbuilder');?></option> 146 <option value="inprogress" <?php echo ($filter_by == "inprogress")? 'selected':""?>><?php echo esc_html_e('In Progress','taskbuilder');?></option> 147 <option value="hold" <?php echo ($filter_by == "hold")? 'selected':""?>><?php echo esc_html_e('Hold','taskbuilder');?></option> 160 <div id="wppm_task_filter_container"> 161 <div class="wppm-filter-item"> 162 <label for="wppm_task_filter"> <?php echo esc_html_e('Filter','taskbuilder');?></label> 163 <select id="wppm_task_filter" name="wppm_task_filter" onchange="wppm_apply_task_filter_grid_view()"> 164 <option value="all"<?php echo ($filter_by == "all")? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 165 <option value="todo" <?php echo ($filter_by == "todo")? 'selected':""?>><?php echo esc_html_e('Todo','taskbuilder');?></option> 166 <option value="inprogress" <?php echo ($filter_by == "inprogress")? 'selected':""?>><?php echo esc_html_e('In Progress','taskbuilder');?></option> 167 <option value="hold" <?php echo ($filter_by == "hold")? 'selected':""?>><?php echo esc_html_e('Hold','taskbuilder');?></option> 148 168 <option value="completed" <?php echo ($filter_by == "completed")? 'selected':""?>><?php echo esc_html_e('Completed','taskbuilder');?></option> 149 169 <option value="mine" <?php echo ($filter_by == "mine")? 'selected':""?>><?php echo esc_html_e('Mine','taskbuilder');?></option> 150 170 <option value="unassigned" <?php echo ($filter_by == "unassigned")? 'selected':""?>><?php echo esc_html_e('Unassigned','taskbuilder');?></option> 151 <option value="overdue" <?php echo ($filter_by == "overdue")? 'selected':""?>><?php echo esc_html_e('Overdue','taskbuilder');?></option> 152 </select> 153 </div> 154 <div class="wppm_display_submit"> 155 <div class="wppm-filter-actions"> 156 <span class="wppm-link" onclick="wppm_tl_reset_grid_view_filter()"> <?php echo esc_html_e('Reset','taskbuilder');?></span> 157 </div> 158 </div> 159 </div> 160 <div class="col-sm-6"> 161 <span id="wppm_list_view_btn" onclick="wppm_get_task_list()"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/listv.svg'); ?>" alt="list"><span style="margin-left:5px;"><?php echo esc_html_e('List view','taskbuilder');?></span></span> 162 </div> 163 </div> 171 <option value="overdue" <?php echo ($filter_by == "overdue")? 'selected':""?>><?php echo esc_html_e('Overdue','taskbuilder');?></option> 172 </select> 173 </div> 174 <div class="wppm-filter-item wppm_project_autocomplete_container"> 175 <label for="wppm_task_list_proj_filter"> 176 <?php echo esc_html_e('Project','taskbuilder');?> 177 </label><br> 178 <select searchable="search here" onchange="wppm_tasks_by_select_project_grid_view()" class="form-control" size="40" name="wppm_task_list_proj_filter" id="wppm_task_list_proj_filter"> 179 <option value="0" <?php echo ($proj_filter == 0)? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 180 <?php 181 if(!empty($projects)){ 182 foreach($projects as $proj) { 183 ?> 184 <option value="<?php echo esc_attr($proj->id)?>" <?php echo ($proj_filter == $proj->id)? 'selected':""?>><?php echo esc_html_e($proj->project_name,'taskbuilder');?></option> 185 <?php } 186 } ?> 187 </select> 188 </div> 189 <div class="wppm_display_submit"> 190 <div class="wppm-filter-actions"> 191 <span class="wppm-link" onclick="wppm_tl_reset_grid_view_filter()"> <?php echo esc_html_e('Reset','taskbuilder');?></span> 192 </div> 193 </div> 194 </div> 195 <div class="row"> 196 <div class="col-sm-12"> 197 <span id="wppm_list_view_btn" onclick="wppm_get_task_list()"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/listv.svg'); ?>" alt="list"><span style="margin-left:5px;"><?php echo esc_html_e('List view','taskbuilder');?></span></span> 198 </div> 199 </div> 164 200 <div class="wppm_task_container" id="wppm_task_container"> 165 201 <?php … … 205 241 Left join {$wpdb->prefix}wppm_checklist checklist ON Items.checklist_id = checklist.id 206 242 WHERE checklist.task_id = $task->id AND Items.checked=1"); 243 $project_data = $wppmfunction->get_project($task->project); 207 244 ?> 208 <div class="wppm_card_body" onclick="wppm_open_task(<?php echo esc_attr($task->id)?>)" id="wppm_draggable_card_<?php echo esc_attr($task->id)?>">245 <div class="wppm_card_body" style="background-color:<?php echo esc_attr($appearance_settings['grid-background-color'])?>!important;color:<?php echo esc_attr($appearance_settings['grid-header-text-color'])?>!important;" onclick="wppm_open_task(<?php echo esc_attr($task->id)?>)" id="wppm_draggable_card_<?php echo esc_attr($task->id)?>"> 209 246 <div class="row"> 210 247 <div class="col-sm-6"> … … 223 260 <div class="col-sm-12"> 224 261 <span class="wppm_task_name_grid_view"><?php echo esc_html_e($task->task_name,'taskbuilder');?></span> 262 <span class="wppm_proj_name_grid_view">(<?php echo esc_html_e($project_data['project_name'],'taskbuilder');?>)</span> 225 263 </div> 226 264 </div> … … 234 272 $task_users = explode(',',$task->users); 235 273 $i=0; 236 $project_data = $wppmfunction->get_project($task->project);237 274 if(!empty($project_data['users'])){ 238 275 $proj_users = explode(',',$project_data['users']); … … 285 322 ?> 286 323 <input type="hidden" action="wppm_drag_and_drop_card"> 324 <input type="hidden" name="wppm_drag_and_drop_card_ajax_nonce" id="wppm_drag_and_drop_card_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_drag_and_drop_card' ) ); ?>"> 287 325 </div> 288 326 <div class="row wppm_task_pagination_container"> … … 305 343 </div> 306 344 </form> 345 <style> 346 .select2-selection--single { 347 height: 30px!important; 348 } 349 .select2-dropdown:hover { 350 color: #23527c!important;; 351 } 352 .select2-results__options{ 353 font:15px "Helvetica Neue",Arial,Helvetica,sans-serif !important; 354 margin: 0!important; 355 line-height: inherit!important; 356 } 357 .select2-selection__rendered{ 358 font:15px "Helvetica Neue",Arial,Helvetica,sans-serif !important; 359 margin-top: 5px!important; 360 } 361 .select2-selection__rendered:hover{ 362 color: #2271b1 !important; 363 } 364 .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{ 365 background-color: #e85f08!important; 366 color: white !important; 367 } 368 .select2-container { 369 max-width: 150px !important; 370 min-width: 150px !important; 371 } 372 #wppm_task_filter{ 373 min-height: 30px !important; 374 max-height: 35px !important; 375 } 376 #wppm_view_project_task .wppm-add-new-btn:hover{ 377 background-color: <?php echo esc_attr($appearance_settings['menu-button-hover-color'])?>!important; 378 } 379 </style> 307 380 <script type="text/javascript"> 308 381 jQuery( document ).ready( function( jQuery ) { … … 333 406 el:el.id, 334 407 target: target.id, 335 source:source.id 408 source:source.id, 409 _ajax_nonce:jQuery("#wppm_drag_and_drop_card_ajax_nonce").val() 336 410 }; 337 411 jQuery.post(wppm_admin.ajax_url, data, function(response) { … … 339 413 }); 340 414 } 415 jQuery('#wppm_task_list_proj_filter').select2({ dropdownAutoWidth: true, width: 'auto' }); 416 jQuery('#wppm_task_list_proj_filter').val(<?php echo esc_attr($proj_filter) ?>); 417 341 418 </script> -
taskbuilder/trunk/includes/admin/projects/projects.php
r2611331 r3079882 3 3 exit; // Exit if accessed directly 4 4 } 5 $settings = get_option("wppm-ap-modal"); 5 6 ?> 6 7 <div class="wppm_bootstrap"> … … 25 26 <!-- Pop-up snippet end --> 26 27 </div> 28 <style> 29 #wppm_popup_title{ 30 background-color: <?php echo esc_attr($settings['header-bg-color'])?>; 31 } 32 #wppm_popup_title h3{ 33 color:<?php echo esc_attr( $settings['header-text-color'])?>; 34 } 35 #wppm_popup_body{ 36 background-color: <?php echo esc_attr($settings['body-bg-color'])?>!important; 37 } 38 #wppm_popup_body label{ 39 color:<?php echo esc_attr( $settings['body-label-color'])?>; 40 } 41 #wppm_popup_body input{ 42 color:<?php echo esc_attr( $settings['body-text-color'])?>; 43 } 44 #wppm_popup_body select{ 45 color:<?php echo esc_attr( $settings['body-text-color'])?>; 46 } 47 #wppm_popup_body span { 48 color:<?php echo esc_attr( $settings['body-text-color'])?>; 49 } 50 #wppm_popup_body .select2-results__options { 51 color:<?php echo esc_attr( $settings['body-text-color'])?>; 52 } 53 #wppm_popup_footer{ 54 background-color: <?php echo esc_attr($settings['footer-bg-color'])?>!important; 55 } 56 .wppm_popup_action{ 57 background-color: <?php echo esc_attr($settings['action-btn-bg-color'])?>!important; 58 color:<?php echo esc_attr( $settings['action-btn-text-color'])?>!important; 59 } 60 </style> 27 61 <script type="text/javascript"> 28 62 jQuery( document ).ready( function( jQuery ) { -
taskbuilder/trunk/includes/admin/projects/projects_list.php
r3035644 r3079882 6 6 $status = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_project_statuses" ); 7 7 $categories = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_project_categories" ); 8 $appearance_settings = get_option("wppm-ap-project-list"); 8 9 $proj_per_page = 20; 9 10 $page_no = (isset($_POST['page_no'])) ? intval(sanitize_text_field($_POST['page_no'])): '0'; … … 161 162 <table id="wppm_project_table" class="wppm_table table"> 162 163 <tr> 163 <th class="wppm_table_header" >164 <span id="wppm_proj_name_th" ><?php echo esc_html_e('Project','taskbuilder'); ?></span>164 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 165 <span id="wppm_proj_name_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Project','taskbuilder'); ?></span> 165 166 <img width="16" height="16" onclick="wppm_sort_up_project_list('project_name','ASC')" style = "<?php echo ($sort_by == 'project_name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_name_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 166 167 <img width="16" height="16" onclick="wppm_sort_up_project_list('project_name','DESC')" style = "<?php echo ($sort_by == 'project_name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_name_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 167 168 </th> 168 <th class="wppm_table_header" >169 <span id="wppm_project_status_th" ><?php echo esc_html_e('Status','taskbuilder'); ?></span>169 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 170 <span id="wppm_project_status_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Status','taskbuilder'); ?></span> 170 171 <img width="16" height="16" onclick="wppm_sort_up_project_list('status','ASC')" style = "<?php echo ($sort_by == 'proj_statuses.name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_status_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 171 172 <img width="16" height="16" onclick="wppm_sort_up_project_list('status','DESC')" style = "<?php echo ($sort_by == 'proj_statuses.name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_status_img" class="wppm_chevron_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 172 173 </th> 173 <th class="wppm_table_header"><?php echo esc_html_e('Users','taskbuilder'); ?></th> 174 <th class="wppm_table_header"> 175 <span id="wppm_project_category_th"><?php echo esc_html_e('Category','taskbuilder'); ?></span> 174 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 175 <span id="wppm_proj_list_users_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Users','taskbuilder'); ?></span></th> 176 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 177 <span id="wppm_project_category_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Category','taskbuilder'); ?></span> 176 178 <img width="16" height="16" onclick="wppm_sort_up_project_list('category','ASC')" style = "<?php echo ($sort_by == 'proj_categories.name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_cat_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 177 179 <img width="16" height="16" onclick="wppm_sort_up_project_list('category','DESC')" style = "<?php echo ($sort_by == 'proj_categories.name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_cat_img" class="wppm_chevron_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 178 180 </th> 179 181 <?php if($wppm_default_project_date==1){ ?> 180 <th class="wppm_table_header" >181 <span id="wppm_project_start_date_th" ><?php echo esc_html_e('Start Date','taskbuilder'); ?></span>182 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 183 <span id="wppm_project_start_date_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Start Date','taskbuilder'); ?></span> 182 184 <img width="16" height="16" onclick="wppm_sort_up_project_list('start_date','ASC')" style = "<?php echo ($sort_by == 'start_date' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_start_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 183 185 <img width="16" height="16" onclick="wppm_sort_up_project_list('start_date','DESC')" style = "<?php echo ($sort_by == 'start_date' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_start_date_img" class="wppm_chevron_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 184 186 </th> 185 <th class="wppm_table_header" >186 <span id="wppm_project_end_date_th" ><?php echo esc_html_e('End Date','taskbuilder'); ?></span>187 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 188 <span id="wppm_project_end_date_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('End Date','taskbuilder'); ?></span> 187 189 <img width="16" height="16" onclick="wppm_sort_up_project_list('end_date','ASC')" style = "<?php echo ($sort_by == 'end_date' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_end_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 188 190 <img width="16" height="16" onclick="wppm_sort_up_project_list('end_date','DESC')" style = "<?php echo ($sort_by == 'end_date' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_end_date_img" class="wppm_chevron_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 189 191 </th> 190 192 <?php } ?> 191 <th class="wppm_table_header" ><?php echo esc_html_e('No. of tasks','taskbuilder'); ?></th>192 <th class="wppm_table_header" ></th>193 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"><span style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('No. of tasks','taskbuilder'); ?></span></th> 194 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"></th> 193 195 </tr> 194 196 <tbody> … … 311 313 </div> 312 314 </form> 315 <style> 316 #wppm_project_table tr:nth-child(even) td{ 317 background-color:<?php echo esc_attr($appearance_settings['list-item-even-background-color'])?>!important; 318 color:<?php echo esc_attr($appearance_settings['list-item-even-text-color'])?>!important; 319 } 320 #wppm_project_table tr:nth-child(odd) td{ 321 background-color:<?php echo esc_attr($appearance_settings['list-item-odd-background-color'])?>!important; 322 color:<?php echo esc_attr($appearance_settings['list-item-odd-text-color'])?>!important; 323 } 324 #wppm_project_table tr:hover td{ 325 background-color:<?php echo esc_attr($appearance_settings['list-item-hover-background-color'])?>!important; 326 } 327 #wppm_project_table tr:hover td{ 328 color: <?php echo esc_attr($appearance_settings['list-item-hover-text-color'])?>!important; 329 } 330 </style> 313 331 <script type="text/javascript"> 314 332 jQuery( document ).ready( function( jQuery ) { -
taskbuilder/trunk/includes/admin/projects/wppm_add_new_project.php
r3019975 r3079882 110 110 <button type="button" class="wppm_reset_btn" id="wppm_submit_proj_reset_btn" onclick="wppm_add_new_project()"><?php echo esc_html_e('Reset Form','taskbuilder') ?></button> 111 111 <input type="hidden" name="action" value="wppm_create_project" /> 112 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_create_project' ) ); ?>"> 112 113 </div> 113 114 </div> -
taskbuilder/trunk/includes/admin/projects/wppm_create_project.php
r2951988 r3079882 3 3 exit; // Exit if accessed directly 4 4 } 5 global $wpdb, $wppmfunction; 5 global $wpdb, $wppmfunction, $current_user; 6 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) { 8 exit; 9 } 10 11 if ( check_ajax_referer( 'wppm_create_project', '_ajax_nonce', false ) != 1 ) { 12 wp_send_json_error( 'Unauthorised request!', 401 ); 13 } 6 14 // project name 7 15 $name = isset($_POST['name']) ? sanitize_text_field($_POST['name']) : ''; … … 35 43 36 44 $project_id = WPPM_Functions::create_project($args); 45 $auth_code = $wppmfunction->getRandomString(10); 37 46 $wppmfunction->add_project_meta($project_id,'public_project',$public_proj); 47 $wppmfunction->add_project_meta($project_id,'project_auth_code',$auth_code); 48 38 49 39 50 do_action('wppm_after_project_created',$project_id); -
taskbuilder/trunk/includes/admin/projects/wppm_get_delete_project.php
r2611331 r3079882 13 13 </div> 14 14 <input type="hidden" name="action" value="wppm_set_delete_project" /> 15 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_delete_project' ) ); ?>"> 15 16 <input type="hidden" name="project_id" value="<?php echo htmlentities(esc_attr($id))?>" /> 16 17 </form> -
taskbuilder/trunk/includes/admin/projects/wppm_open_project.php
r3035644 r3079882 7 7 $wppm_default_project_date = get_option('wppm_default_project_date'); 8 8 $wppm_public_projects_permission = get_option('wppm_public_projects_permission'); 9 $appearance_settings = get_option("wppm-ap-individual-project"); 10 $settings = get_option("wppm-ap-modal"); 9 11 $current_date = date('Y-m-d'); 10 12 $id = isset($_POST) && isset($_POST['id']) ? intval(sanitize_text_field($_POST['id'])) : 0; 11 if (!$id) {exit;} 13 if (!isset($id)) {exit;} 14 $auth_id = $wppmfunction->get_project_meta($id,'project_auth_code',true); 15 $auth_id = sanitize_text_field($auth_id); 12 16 $project = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}wppm_project where id = $id" ); 13 $users = explode(",",$project->users); 17 $project_comment = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_project_comment where proj_id=".$id." ORDER BY create_time DESC"); 18 if(isset($project->users)){ 19 $users = explode(",",$project->users); 20 }else{ 21 $users = ""; 22 } 14 23 $wppm_users_role = get_option('wppm_user_role'); 15 24 if(isset($project->status)){ … … 23 32 } 24 33 if($wppm_project_time == 1){ 25 $proj_start_date = $project->start_date;26 $proj_end_date = $project->end_date;34 $proj_start_date = isset($project->start_date)? $project->start_date:""; 35 $proj_end_date = isset($project->end_date) ? $project->end_date: "" ; 27 36 } elseif($wppm_project_time == 0){ 28 $psDate = new DateTime($project->start_date);29 $peDate = new DateTime($project->end_date);30 $proj_start_date = $psDate->format('Y-m-d');31 $proj_end_date = $peDate->format('Y-m-d');37 $psDate = isset($project->start_date) ? new DateTime($project->start_date): ""; 38 $peDate = isset($project->end_date) ? new DateTime($project->end_date):""; 39 $proj_start_date = !empty($psDate) ? $psDate->format('Y-m-d'):""; 40 $proj_end_date = !empty($peDate) ? $peDate->format('Y-m-d'):""; 32 41 } 33 42 … … 38 47 <span class="wppm-heading-inline"><?php echo esc_html_e('Project','taskbuilder');?></span> 39 48 <?php if($current_user->has_cap('manage_options')){ ?> 40 <span class="wppm-add-new-btn btn-primary" id="wppm_add_new_project_btn" onclick="wppm_add_new_project()"><span style="margin-right:5px;"><img id="wppm_add_new_project_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="plus_icon"></span><span><?php echo esc_html_e('Add New','taskbuilder');?></span></span>49 <span class="wppm-add-new-btn btn-primary" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>" id="wppm_add_new_project_btn" onclick="wppm_add_new_project()"><span style="margin-right:5px;"><img id="wppm_add_new_project_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="plus_icon"></span><span><?php echo esc_html_e('Add New','taskbuilder');?></span></span> 41 50 <?php } ?> 42 <span class="wppm-add-new-btn btn-primary" id="wppm_project_list" onclick="wppm_get_project_list()" ><span style="margin-right:5px;"><img id ="wppm_project_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/list-symbol.svg'); ?>" alt="list-symbol"></span><span><?php echo esc_html_e('Project List','taskbuilder');?></span></span>43 <span class="wppm-add-new-btn btn-primary" id="wppm_project_tasks" onclick="wppm_get_project_tasks(<?php echo esc_attr($id) ?>)"><span style="margin-right:5px;"><img id ="wppm_task_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/task_list.svg'); ?>" alt="task_list"></span><span><?php echo esc_html_e('Tasks','taskbuilder');?></span></span>51 <span class="wppm-add-new-btn btn-primary" id="wppm_project_list" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>" onclick="wppm_get_project_list()" ><span style="margin-right:5px;"><img id ="wppm_project_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/list-symbol.svg'); ?>" alt="list-symbol"></span><span><?php echo esc_html_e('Project List','taskbuilder');?></span></span> 52 <span class="wppm-add-new-btn btn-primary" id="wppm_project_tasks" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>" onclick="wppm_get_project_tasks(<?php echo esc_attr($id) ?>)"><span style="margin-right:5px;"><img id ="wppm_task_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/task_list.svg'); ?>" alt="task_list"></span><span><?php echo esc_html_e('Tasks','taskbuilder');?></span></span> 44 53 <?php $style = (($current_user->ID && $current_user->has_cap('manage_options')) || ($wppmfunction->has_project_permission('delete_project',$project->id)))? "display:inline":"display:none"; ?> 45 <span class="wppm-add-new-btn btn-primary" id="wppm_delete_project_btn" onclick="wppm_delete_project(<?php echo esc_attr($id) ?>)" style="<?php echo esc_attr($style) ?>"><span style="margin-right:5px;"><img id="wppm_delete_project_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/delete2.svg'); ?>" alt="delete"></span><span><?php echo esc_html_e('Delete','taskbuilder');?></span></span>54 <span class="wppm-add-new-btn btn-primary" id="wppm_delete_project_btn" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>;<?php echo esc_attr($style) ?>" onclick="wppm_delete_project(<?php echo esc_attr($id) ?>)"><span style="margin-right:5px;"><img id="wppm_delete_project_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/delete2.svg'); ?>" alt="delete"></span><span><?php echo esc_html_e('Delete','taskbuilder');?></span></span> 46 55 <?php $visibility_style = (($current_user->ID && $current_user->has_cap('manage_options')) && ($wppm_public_projects_permission==1))? "display:inline":"display:none"; ?> 47 <span class="wppm-add-new-btn btn-primary" id="wppm_project_visibility" onclick="wppm_get_project_visibility(<?php echo esc_attr($id) ?>)" style="<?php echo esc_attr($visibility_style) ?>"><span style="margin-right:5px;"><img id ="wppm_task_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/wppm_visibility.svg'); ?>" alt="project_visibility"></span><span><?php echo esc_html_e('Project Visibility','taskbuilder');?></span></span>56 <span class="wppm-add-new-btn btn-primary" id="wppm_project_visibility" style="background-color:<?php echo esc_attr($appearance_settings['menu-button-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['menu-button-text-color'])?>;<?php echo esc_attr($visibility_style) ?>" onclick="wppm_get_project_visibility(<?php echo esc_attr($id) ?>)"><span style="margin-right:5px;"><img id ="wppm_task_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/wppm_visibility.svg'); ?>" alt="project_visibility"></span><span><?php echo esc_html_e('Project Visibility','taskbuilder');?></span></span> 48 57 <?php echo do_action('wppm_after_open_project_buttons',$project->id);?> 49 58 </div> … … 55 64 <div class="row"> 56 65 <div class="col-sm-12"> 57 <span class="wppm_project_label"> <?php echo esc_html($project->project_name);66 <span class="wppm_project_label"> <?php echo isset($project->project_name) ? esc_html($project->project_name):""; 58 67 if (($wppmfunction->has_project_permission('change_project_details',$id)) || ($current_user->has_cap('manage_options'))) { ?> 59 68 <span id="wppm_individual_edit_project_subject" onclick="wppm_edit_proj_details(<?php echo esc_attr($id) ?>)" class="btn btn-sm wppm_action_btn" style="background-color:#FFFFFF !important;color:#000000 !important;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> … … 67 76 </div> 68 77 <div class="col-sm-9"> 69 <span class="wppm_project_details"><?php echo esc_html($project->date_created)?></span>78 <span class="wppm_project_details"><?php echo isset($project->date_created) ? esc_html($project->date_created):"" ?></span> 70 79 </div> 71 80 </div> … … 76 85 </div> 77 86 <div class="col-sm-9"> 78 <span class="wppm_project_details" ><?php echo (isset($proj_start_date))? esc_html($proj_start_date): "" ?></span>87 <span class="wppm_project_details" id="wppm_edit_pstart_date"><?php echo (isset($proj_start_date))? esc_html($proj_start_date): "" ?></span> 79 88 </div> 89 <input type="hidden" name="wppm_edit_pstart_date_ajax_nonce" id="wppm_edit_pstart_date_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_proj_start_date' ) ); ?>"> 80 90 </div> 81 91 <div class="row"> … … 84 94 </div> 85 95 <div class="col-sm-9"> 86 <?php $style = ($project->status!=4 && $proj_end_date < $current_date) ? "color:#FF0000":"color:#2C3E50"; ?> 87 <span class="wppm_project_details" style="<?php echo esc_attr($style); ?>"><?php echo (isset($proj_end_date))? esc_html($proj_end_date):"" ?></span> 96 <?php 97 $pstatus = isset($project->status) ? $project->status :""; 98 $style = ($pstatus!=4 && $proj_end_date < $current_date) ? "color:#FF0000":"color:#2C3E50"; ?> 99 <span class="wppm_project_details" id="wppm_edit_pend_date" style="<?php echo esc_attr($style); ?>"><?php echo (isset($proj_end_date))? esc_html($proj_end_date):"" ?></span> 88 100 </div> 101 <input type="hidden" name="wppm_edit_pend_date_ajax_nonce" id="wppm_edit_pend_date_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_proj_end_date' ) ); ?>"> 89 102 </div> 90 103 <?php } ?> … … 110 123 </div> 111 124 </div> 112 </div> 125 <div id="wppm_proj_discussion_container"> 126 <div class="row"> 127 <div class="col-sm-12" style="margin-top:5px;"> 128 <span class="wppm_proj_discussion"><?php echo esc_html_e('Comment','taskbuilder')?></span><br> 129 </div> 130 </div> 131 <div class="row"> 132 <div class="col-sm-12"> 133 <textarea id="wppm_proj_comment" placeholder="<?php echo esc_attr__('Write a comment...','taskbuilder');?>" onclick="wppm_add_proj_comment()" name="wppm_proj_comment"></textarea> 134 </div> 135 </div> 136 <div class="row" id="wppm_proj_comment_btn"> 137 <div class="col-sm-6"> 138 <span id="wppm_proj_attach_file" onclick="wppm_upload_proj_comment_file()"><?php echo esc_html_e('Attach Files','taskbuilder')?></span> 139 </div> 140 <div class="col-sm-6"> 141 <button type="button" id="wppm_individual_cancel_proj_comment_btn" onclick="wppm_cancel_proj_comment();" class="wppm-btn-cancel"> 142 <?php echo esc_html_e('Cancel','taskbuilder')?> 143 </button> 144 <button type="button" id="wppm_individual_submit_proj_comment_btn" style="background-color:<?php echo esc_attr($appearance_settings['comment-send-btn-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['comment-send-btn-color'])?>!important;" onclick="wppm_submit_proj_comment(<?php echo esc_attr($id); ?>);" class="wppm-btn"> 145 <?php echo esc_html_e('SEND','taskbuilder')?> 146 </button> 147 </div> 148 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_submit_proj_comment' ) ); ?>"> 149 </div> 150 <div class="row"> 151 <div class="wppm_proj_attachment_container col-sm-12" style="display:none;"> 152 </div> 153 </div> 154 </div> 155 <div class="wppm_thread_container"> 156 <?php 157 if(!empty($project_comment)){ 158 foreach($project_comment as $comment){ 159 $user = get_userdata( $comment->created_by ); 160 $comment_body = stripslashes((htmlspecialchars_decode($comment->body, ENT_QUOTES))); 161 $comment_body = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $comment_body); 162 $date = date("Y-m-d H:i:s" ,strtotime($comment->create_time)); 163 $thread_date = date("d F Y, h:i:s A" ,strtotime($date)); 164 $attachment_ids = isset($comment->attachment_ids)? $comment->attachment_ids : ''; 165 if($attachment_ids!=""){ 166 $attachments = explode(",",$attachment_ids); 167 } else { 168 $attachments = array(); 169 } 170 ?> 171 <div class="wppm_proj_thread"> 172 <div class="wppm_thread_avatar"> 173 <?php echo (get_avatar($comment->created_by, 40));?> 174 </div> 175 <div class="wppm_thread_body"> 176 <div class="wppm_thread_user_name"> 177 <strong style="color:<?php echo esc_attr($appearance_settings['comment-primary-color']);?>"><?php echo esc_html($user->display_name) ?></strong> <small class="wppm_comment_date" style="color:<?php echo esc_attr($appearance_settings['comment-date-color']);?>"><i><?php echo esc_html($thread_date) ?></i></small> 178 <div class="wppm_thread_action"> 179 <?php if(( ($current_user->has_cap('manage_options')) || ($wppmfunction->has_proj_comment_permission('edit_proj_comment',$id,$comment->id)))){ ?> 180 <span title="Edit this thread" onclick="wppm_edit_proj_thread(<?php echo esc_attr($comment->id)?>,<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit1.svg'); ?>" alt="edit"></span> 181 <span title="Delete this thread" onclick="wppm_delete_proj_thread(<?php echo esc_attr($comment->id) ?>,<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/trash.svg'); ?>" alt="delete"></span> 182 <?php } ?> 183 </div> 184 </div> 185 <div class="wppm_thread_messege" style="color:<?php echo esc_attr($appearance_settings['comment-secondary-color']);?>"> 186 <?php 187 $allowedtags = array( 'br' => array(), 'abbr' => array('title' => array(),), 'p' => array(), 'strong' => array(), 'a' => array('href' => array(), 'title' => array(), 'target'=> array(), 'rel'=>array()),'em' =>array(),'span' =>array(), 'blockquote'=>array('cite' => array(),),'div' => array('class' => array(),'title' => array(),'style' => array(),),'ul'=>array(),'li'=>array(),'ol'=>array(),'img' => array( 'alt'=> array(),'class' => array(),'height' => array(),'src'=> array(),'width'=> array(),)); 188 if(!empty($comment_body)){ 189 echo wp_kses(wpautop($comment_body),$allowedtags) ; 190 } ?> 191 </div> 192 <?php 193 if(!empty($attachments)):?> <br> 194 <strong class="wppm_attachment_title"><?php echo esc_html_e('Attachments','taskbuilder');?>:</strong><br> 195 <table class="wppm_attachment_tbl"> 196 <tbody> 197 <?php 198 if(!empty($attachments)){ 199 foreach( $attachments as $attachment ): 200 $attach = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}wppm_attachments where id=".$attachment); 201 $download_url = site_url('/').'?wppm_attachment='.$attachment.'&pid='.$id.'&pac='.$auth_id; 202 $findStr = ".txt"; 203 if(!empty( $attach)){ 204 $attachment_name = preg_replace('/' . $findStr . '/', "", $attach->name, 1); 205 $attachment_name = sanitize_file_name($attachment_name); 206 } 207 if((!empty($attachment_name))){ 208 ?> 209 <tr class="wppm_attachment_tr"> 210 <td> 211 <a class="wppm_attachment_link" href="<?php echo esc_url($download_url) ?>" target="_blank"> 212 <span class="wppm_attachment_file_name" style="padding: 7px;"><?php echo isset($attach->file_name) ? esc_html($attach->file_name):"";?></span></a> 213 <?php if((($comment->created_by == $current_user->ID) || ($current_user->has_cap('manage_options')) || ($wppmfunction->has_proj_comment_permission('edit_proj_comment',$id,$comment->id)))){ ?> 214 <span class="wppm_thread_action_btn" onclick="wppm_proj_thread_attachment_remove(this,<?php echo isset($attach->id)? esc_attr($attach->id):''; ?>,<?php echo isset($comment->id)? esc_attr($comment->id):''; ?>,<?php echo isset($comment->proj_id) ? esc_attr($comment->proj_id):'';?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/cancel.svg'); ?>" alt="cancel"></span> 215 <?php } ?> 216 </td> 217 </tr> 218 <?php } 219 endforeach; 220 } ?> 221 </tbody> 222 </table> 223 <input type="hidden" name="wppm_proj_thread_attachment_remove_ajax_nonce" id="wppm_proj_thread_attachment_remove" value="<?php echo esc_attr( wp_create_nonce( 'wppm_remove_proj_thread_attachment' ) ); ?>"> 224 <?php do_action('wppm_after_project_comment_attachment',$id,$comment->id);?> 225 <?php endif;?> 226 </div> 227 </div> 228 <?php } 229 } ?> 230 </div> 231 </div> 113 232 <div class="wppm_individual_project_widget col-sm-4 wppm_sidebar col-md-3"> 114 233 <div class="row wppm_widget" id="wppm_project_status_widget"> 115 <h4 class="widget_header"><?php echo esc_html_e('Status','taskbuilder')?> 116 <?php $style = ($wppmfunction->has_project_permission('change_project_status',$id) || $current_user->has_cap('manage_options'))? "display:inline":"display:none"; ?> 117 <span class="wppm_edit_project_details_widget" style="<?php echo esc_attr($style) ?>" onclick="wppm_edit_project_status(<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span></h4> 234 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 235 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"><?php echo esc_html_e('Status','taskbuilder')?></h4> 236 <?php $style = ($wppmfunction->has_project_permission('change_project_status',$id) || $current_user->has_cap('manage_options'))? "display:flex":"display:none"; ?> 237 <span class="wppm_edit_project_details_widget" style="<?php echo $style ?>" onclick="wppm_edit_project_status(<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 238 </div> 118 239 <hr class="widget_divider"> 119 <div class="wppm_sidebar_labels"><span class="wppm_label_info"><?php echo esc_html_e('Status','taskbuilder')?>:</span> <span class="wppm_admin_label" style="background-color:<?php echo esc_attr($project_status->bg_color) ?>;color:<?php echo esc_attr($project_status->color)?>;"><?php echo esc_attr($project_status->name) ?> </span></div> 120 </div> 240 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 241 <div class="wppm_sidebar_labels"><span class="wppm_label_info" style="color:<?php echo esc_attr($appearance_settings['widget-body-label-color'])?>"><?php echo esc_html_e('Status','taskbuilder')?>: <span class="wppm_admin_label" style="background-color:<?php echo isset($project_status->bg_color) ? esc_attr($project_status->bg_color):""; ?>;color:<?php echo isset($project_status->color) ? esc_attr($project_status->color): "" ?>;"><?php echo isset($project_status->name) ? esc_attr($project_status->name) : "" ?> </span></div> 242 </div> 243 </div> 121 244 <div class="row wppm_widget" id="wppm_project_raisedby_widget"> 122 <h4 class="widget_header"> 245 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 246 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"><?php echo esc_html_e('Project Creator','taskbuilder')?></span></h4> 123 247 <?php if ($current_user->has_cap('manage_options')) { ?> 124 248 <span class="wppm_edit_project_details_widget" onclick="wppm_edit_project_creator(<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 125 249 <?php } ?> 126 <span><?php echo esc_html_e('Project Creator','taskbuilder')?></span></h4> 127 <hr class="widget_divider"> <?php 250 </div> 251 <hr class="widget_divider"> <?php 252 if(isset($project->created_by)){ 128 253 $user_info = get_userdata($project->created_by); 129 ?> 254 }else{ 255 $user_info = ""; 256 } 257 ?> 258 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 130 259 <div id="wppm_project_creator"> 131 260 <div style="padding:2px 0;"> 132 <span class="wppm_project_user_avatar"><?php echo (get_avatar($project->created_by, 25, "mysteryman")); ?></span> 133 <span class="wppm_project_user_names"><?php echo (!empty($user_info)) ? esc_html_e($user_info->display_name,'taskbuilder') : "";?></span> 134 </div> 135 </div> 261 <span class="wppm_project_user_avatar"><?php echo isset($project->created_by)? (get_avatar($project->created_by, 25, "mysteryman")):""; ?></span> 262 <span class="wppm_project_user_names" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>"><?php echo (!empty($user_info)) ? esc_html_e($user_info->display_name,'taskbuilder') : "";?></span> 263 </div> 264 </div> 265 </div> 136 266 </div> 137 267 <div class="row wppm_widget" id="wppm_project_users_widget_container"> 138 <h4 class="widget_header"> 139 <?php if ($wppmfunction->has_project_permission('assign_project_users',$id ) || $current_user->has_cap('manage_options')) { ?> 140 <span class="wppm_edit_project_details_widget" onclick="wppm_get_users(<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 141 <?php } ?> 142 <span><?php echo esc_html_e('Users','taskbuilder')?></span></h4> 268 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 269 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"><?php echo esc_html_e('Users','taskbuilder')?></h4> 270 <?php if ($wppmfunction->has_project_permission('assign_project_users',$id ) || $current_user->has_cap('manage_options')) { ?> 271 <span class="wppm_edit_project_details_widget" onclick="wppm_get_users(<?php echo esc_attr($id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 272 <?php } ?> 273 </div> 143 274 <hr class="widget_divider"> 144 <div id="wppm_project_users"> 145 <?php 146 if(!(empty(array_filter($users)))){ 147 foreach($users as $user) { 148 $user_data = get_userdata($user); 149 $project_user = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_users WHERE proj_id = $id AND user_id = $user"); 150 ?> 151 <div style="padding:2px 0;"> 152 <span class="wppm_project_user_avatar"><?php echo (get_avatar($user, 25, "mysteryman")); ?></span> 153 <span class="wppm_project_user_names"><?php echo esc_html_e($user_data->display_name,'taskbuilder'); ?></span> 154 <?php 155 if(!empty($wppm_users_role)){ 156 foreach($wppm_users_role as $key=>$role){ 157 if(!empty($role)){ 158 foreach($role as $k=>$val){ 159 if( !empty($project_user) && $key == $project_user->role_id){ ?> 160 <span class="wppm_project_user_role">(<?php echo esc_html_e($role['label'],'taskbuilder'); ?>)</span><?php 275 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 276 <div id="wppm_project_users"> 277 <?php 278 if(!(empty(array_filter($users)))){ 279 foreach($users as $user) { 280 $user_data = get_userdata($user); 281 $project_user = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_users WHERE proj_id = $id AND user_id = $user"); 282 ?> 283 <div style="padding:2px 0;"> 284 <span class="wppm_project_user_avatar"><?php echo (get_avatar($user, 25, "mysteryman")); ?></span> 285 <span class="wppm_project_user_names" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"><?php echo esc_html_e($user_data->display_name,'taskbuilder'); ?></span> 286 <?php 287 if(!empty($wppm_users_role)){ 288 foreach($wppm_users_role as $key=>$role){ 289 if(!empty($role)){ 290 foreach($role as $k=>$val){ 291 if( !empty($project_user) && $key == $project_user->role_id){ ?> 292 <span class="wppm_project_user_role" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>">(<?php echo esc_html_e($role['label'],'taskbuilder'); ?>)</span><?php 293 } 161 294 } 162 295 } 163 296 } 164 297 } 165 } 166 ?> 167 </div> 168 <?php 298 ?> 299 </div> 300 <?php 301 } 302 } else { 303 ?><span class="wppm_project_users_not_assign_label" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>"> <?php echo esc_html_e('None','taskbuilder'); ?></span><?php 169 304 } 170 } else { 171 ?><span class="wppm_project_users_not_assign_label"> <?php echo esc_html_e('None','taskbuilder'); ?></span><?php 172 } 173 ?> 305 ?> 306 </div> 174 307 </div> 175 308 </div> 176 309 </div> 310 <input type="hidden" id="wppm_proj_nonce" value="<?php echo wp_create_nonce('wppm_upload_proj_attach_file')?>"> 311 <input type="file" id="wppm_proj_attachment_upload" class="hidden" onchange=""> 177 312 </div> 178 313 </form> 314 <style> 315 .wppm_comment_date i:hover{ 316 color: <?php echo esc_attr($appearance_settings['comment-date-hover-color'])?>; 317 } 318 #wppm_open_project .wppm-add-new-btn:hover{ 319 background-color: <?php echo esc_attr($appearance_settings['menu-button-hover-color'])?>!important; 320 } 321 </style> 179 322 <script> 180 jQuery( document ).ready( function( jQuery ) { 323 jQuery( document ).ready( function( jQuery ) { <?php 324 if ((($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('change_project_details',$id))) { ?> 325 jQuery("#wppm_edit_pstart_date").flatpickr({ 326 enableTime: true, 327 dateFormat: "Y-m-d H:i", 328 onChange: function(selectedDates, dateStr, instance) { 329 var data = { 330 action: 'wppm_set_change_proj_start_date', 331 proj_id:<?php echo esc_attr($project->id);?>, 332 date:dateStr, 333 _ajax_nonce:jQuery('#wppm_edit_pstart_date_ajax_nonce').val() 334 }; 335 jQuery.post(wppm_admin.ajax_url, data, function(response) { 336 instance.close(); 337 wppm_open_project(<?php echo esc_attr($project->id);?>); 338 }); 339 }, 340 }); 341 jQuery("#wppm_edit_pend_date").flatpickr({ 342 enableTime: true, 343 dateFormat: "Y-m-d H:i", 344 onChange: function(selectedDates, dateStr, instance) { 345 var data = { 346 action: 'wppm_set_change_proj_end_date', 347 proj_id:<?php echo esc_attr($project->id);?>, 348 date:dateStr, 349 _ajax_nonce:jQuery('#wppm_edit_pend_date_ajax_nonce').val() 350 }; 351 jQuery.post(wppm_admin.ajax_url, data, function(response) { 352 instance.close(); 353 wppm_open_project(<?php echo esc_attr($project->id);?>); 354 }); 355 }, 356 }); 357 <?php } ?> 358 tinymce.remove(); 359 tinymce.init({ 360 selector:'#wppm_proj_description', 361 body_id: 'wppm_proj_description', 362 directionality : '<?php //echo 'rtl'; ?>', 363 menubar: false, 364 statusbar: false, 365 height : '200', 366 plugins: [ 367 'lists link image directionality' 368 ], 369 image_advtab: true, 370 toolbar: 'bold italic underline blockquote | alignleft aligncenter alignright | bullist numlist | rtl | link image', 371 branding: false, 372 autoresize_bottom_margin: 20, 373 browser_spellcheck : true, 374 relative_urls : false, 375 remove_script_host : false, 376 convert_urls : true, 377 setup: function (editor) { 378 } 379 }); 380 }); 381 382 function wppm_add_proj_comment(){ 181 383 tinymce.remove(); 182 384 tinymce.init({ 183 selector:'#wppm_proj_ description',184 body_id: 'wppm_proj_ description',385 selector:'#wppm_proj_comment', 386 body_id: 'wppm_proj_comment', 185 387 directionality : '<?php //echo 'rtl'; ?>', 186 388 menubar: false, 187 389 statusbar: false, 188 390 height : '200', 391 width : '100%', 189 392 plugins: [ 190 'lists link image directionality '393 'lists link image directionality paste' 191 394 ], 192 395 image_advtab: true, … … 198 401 remove_script_host : false, 199 402 convert_urls : true, 403 paste_as_text: true, 200 404 setup: function (editor) { 201 405 } 202 406 }); 203 }); 407 jQuery('#wppm_proj_comment_btn').show(); 408 } 409 410 function wppm_upload_proj_comment_file(){ 411 jQuery('#wppm_proj_attachment_upload').unbind('change'); 412 jQuery('#wppm_proj_attachment_upload').on('change', function() { 413 var flag = false; 414 var file = this.files[0]; 415 jQuery('#wppm_proj_attachment_upload').val(''); 416 var allowedExtension = ['exe', 'php','js']; 417 var file_name_split = file.name.split('.'); 418 var file_extension = file_name_split[file_name_split.length-1]; 419 file_extension = file_extension.toLowerCase(); 420 if( (jQuery.inArray(file_extension,allowedExtension) > -1)){ 421 flag = true; 422 alert("<?php _e('Attached file type not allowed!','taskbuilder')?>"); 423 }; 424 <?php 425 $max_upload = (int)(ini_get('upload_max_filesize')); ?> 426 var current_filesize=file.size/1000000; 427 if(current_filesize > <?php echo esc_attr($max_upload); ?>){ 428 flag = true; 429 alert("<?php _e('File size exceed allowed limit!','taskbuilder')?>"); 430 } 431 if (!flag){ 432 var html_str = '<div class="wppm_attachment">'+ 433 '<div class="progress" style="float: none !important; width: unset !important;">'+ 434 '<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%">'+ 435 file.name+ 436 '</div>'+ 437 '<span class="wppm_attachment_cancel" onclick="wppm_attachment_cancel(this);" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/cross_icon.svg'); ?>" alt="delete_icon"></span>'+ 438 '</div>'+ 439 '</div>'; 440 jQuery('.wppm_proj_attachment_container').show(); 441 jQuery('.wppm_proj_attachment_container').append(html_str); 442 var attachment = jQuery('.wppm_proj_attachment_container').find('.wppm_attachment').last(); 443 var data = new FormData(); 444 data.append('file', file); 445 data.append('arr_name', file.name); 446 data.append('action', 'wppm_upload_proj_attach_file'); 447 data.append('nonce', jQuery('#wppm_proj_nonce').val().trim()); 448 jQuery.ajax({ 449 type: 'post', 450 url: wppm_admin.ajax_url, 451 data: data, 452 xhr: function(){ 453 var xhr = new window.XMLHttpRequest(); 454 xhr.upload.addEventListener("progress", function(evt){ 455 if (evt.lengthComputable) { 456 var percentComplete = Math.floor((evt.loaded / evt.total) * 100); 457 jQuery(attachment).find('.progress-bar').css('width',percentComplete+'%'); 458 } 459 }, false); 460 return xhr; 461 }, 462 processData: false, 463 contentType: false, 464 success: function(response) { 465 var return_obj=JSON.parse(response); 466 jQuery(attachment).find('.wppm_attachment_cancel').show(); 467 if( parseInt(return_obj.id) != 0 ){ 468 jQuery(attachment).append('<input type="hidden" class="wppm_proj_comment_attachment" name="wppm_proj_comment_attachment[]" value="'+return_obj.id+'">'); 469 jQuery(attachment).find('.progress-bar').addClass('progress-bar-success'); 470 }else { 471 jQuery(attachment).find('.progress-bar').addClass('progress-bar-danger'); 472 } 473 } 474 }); 475 } 476 }); 477 jQuery('#wppm_proj_attachment_upload').trigger('click'); 478 } 204 479 </script> -
taskbuilder/trunk/includes/admin/projects/wppm_set_delete_project.php
r2772108 r3079882 7 7 $project_id = isset($_POST['project_id']) ? sanitize_text_field($_POST['project_id']) : 0 ; 8 8 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('delete_project',$project_id))) {exit;} 9 10 if ( check_ajax_referer( 'wppm_set_delete_project', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 12 } 13 9 14 $tasks = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wppm_task where project = $project_id"); 10 15 /*************delete project********/ -
taskbuilder/trunk/includes/admin/settings.php
r2951988 r3079882 4 4 } 5 5 global $wpdb, $wppmfunction; 6 $popup_settings = get_option("wppm-ap-modal"); 7 $wppm_ap_settings = get_option("wppm-ap-settings"); 6 8 ?> 7 9 <div class="wppm_bootstrap"> … … 19 21 <li id="wppm_settings_task_status" role="presentation"><a href="javascript:wppm_get_task_status_settings();"><?php echo esc_html_e('Task Statuses','taskbuilder');?></a></li> 20 22 <li id="wppm_settings_miscellaneous" role="presentation"><a href="javascript:wppm_get_miscellaneous_settings();"><?php echo esc_html_e('Miscellaneous','taskbuilder');?></a></li> 23 <li id="wppm_settings_appearance" role="presentation"><a href="javascript:wppm_get_appearance_settings();"><?php echo esc_html_e('Appearance','taskbuilder');?></a></li> 21 24 <?php do_action('wppm_after_setting_pills');?> 22 25 </ul> … … 49 52 </div> 50 53 </div> 54 <style> 55 #wppm_popup_title{ 56 background-color: <?php echo esc_attr($popup_settings['header-bg-color'])?>; 57 } 58 #wppm_popup_title h3{ 59 color:<?php echo esc_attr( $popup_settings['header-text-color'])?>; 60 } 61 #wppm_popup_body{ 62 background-color: <?php echo esc_attr($popup_settings['body-bg-color'])?>!important; 63 } 64 #wppm_popup_body label{ 65 color:<?php echo esc_attr( $popup_settings['body-label-color'])?>; 66 } 67 #wppm_popup_body input{ 68 color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; 69 } 70 #wppm_popup_body select{ 71 color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; 72 } 73 #wppm_popup_body span { 74 color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; 75 } 76 #wppm_popup_body .select2-results__options { 77 color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; 78 } 79 #wppm_popup_footer{ 80 background-color: <?php echo esc_attr($popup_settings['footer-bg-color'])?>!important; 81 } 82 .wppm_popup_action{ 83 background-color: <?php echo esc_attr($popup_settings['action-btn-bg-color'])?>!important; 84 color:<?php echo esc_attr( $popup_settings['action-btn-text-color'])?>!important; 85 } 86 .wppm_bootstrap .nav-pills > li.active > a, 87 .wppm_bootstrap .nav-pills > li.active > a:hover, 88 .wppm_bootstrap .nav-pills > li.active > a:focus { 89 color: <?php echo esc_attr( $wppm_ap_settings['tab-text-color'])?>!important; 90 background-color:<?php echo esc_attr($wppm_ap_settings['tab-background-color'])?>!important; 91 } 92 </style> 51 93 <!-- Pop-up snippet end --> 52 94 <script> -
taskbuilder/trunk/includes/admin/settings/wppm_add_task_priority.php
r2611331 r3079882 23 23 <input id="wppm_priority_bg_color" class="wppm_color_picker" name="wppm_priority_bg_color" value="#1E90FF" /> 24 24 </div> 25 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_priority' ) ); ?>"> 25 26 <script> 26 27 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/settings/wppm_delete_category.php
r2611331 r3079882 6 6 global $current_user,$wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 8 if ( check_ajax_referer( 'wppm_delete_category', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 9 11 $cat_id = isset($_POST) && isset($_POST['cat_id']) ? intval(sanitize_text_field($_POST['cat_id'])) : 0; 10 12 if (!$cat_id) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_delete_status.php
r2611331 r3079882 6 6 global $current_user,$wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 8 if ( check_ajax_referer( 'wppm_delete_status', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 9 11 $status_id = isset($_POST) && isset($_POST['status_id']) ? intval(sanitize_text_field($_POST['status_id'])) : 0; 10 12 if (!$status_id) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_delete_task_priority.php
r2611331 r3079882 6 6 global $current_user,$wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 if ( check_ajax_referer( 'wppm_delete_task_priority', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 9 12 $priority_id = isset($_POST) && isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : 0; -
taskbuilder/trunk/includes/admin/settings/wppm_delete_task_status.php
r2611331 r3079882 6 6 global $current_user,$wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 if ( check_ajax_referer( 'wppm_delete_task_status', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 9 12 $status_id = isset($_POST) && isset($_POST['status_id']) ? intval(sanitize_text_field($_POST['status_id'])) : 0; -
taskbuilder/trunk/includes/admin/settings/wppm_get_add_category.php
r2611331 r3079882 13 13 <input id="wppm_cat_name" class="form-control" name="wppm_cat_name" value="" /> 14 14 </div> 15 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_category' ) ); ?>"> 15 16 <?php 16 17 $body = ob_get_clean(); -
taskbuilder/trunk/includes/admin/settings/wppm_get_add_proj_status.php
r2611331 r3079882 23 23 <input id="wppm_proj_status_bg_color" class="wppm_color_picker" name="wppm_status_bg_color" value="#1E90FF" /> 24 24 </div> 25 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_status' ) ); ?>"> 25 26 <script> 26 27 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/settings/wppm_get_add_task_status.php
r2611331 r3079882 23 23 <input id="wppm_task_status_bg_color" class="wppm_color_picker" name="wppm_task_status_bg_color" value="#1E90FF" /> 24 24 </div> 25 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_add_task_status' ) ); ?>"> 25 26 <script> 26 27 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/settings/wppm_get_advanced_settings.php
r2951988 r3079882 6 6 global $current_user,$wpdb,$wppmfunction; 7 7 $wppm_public_projects_permission = get_option('wppm_public_projects_permission'); 8 $wppm_ap_settings = get_option("wppm-ap-settings"); 8 9 ?> 9 10 <form id="wppm_frm_advanced_settings" method="post" action="javascript:wppm_set_advanced_settings();"> … … 24 25 </select> 25 26 <hr> 26 <button type="submit" class="wppm-submit-btn" ><?php echo esc_html_e('Save Changes','taskbuilder');?></button>27 <button type="submit" class="wppm-submit-btn" style="background-color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-bg-color'])?>!important;color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-text-color'])?>!important;"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> 27 28 <span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="edit"></span> 28 29 <input type="hidden" name="action" value="wppm_set_advanced_settings" /> 30 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_advanced_settings' ) ); ?>"> 29 31 </form> -
taskbuilder/trunk/includes/admin/settings/wppm_get_category_settings.php
r2951988 r3079882 8 8 exit; 9 9 } 10 $wppm_ap_settings = get_option("wppm-ap-settings"); 10 11 $categories = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_project_categories ORDER BY load_order ASC" ); 11 12 $cat_arr = array(); … … 25 26 <span class="wppm-title"> 26 27 <?php echo esc_html_e('Project Categories','taskbuilder');?> 27 <span style="margin-left:10px;" class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_get_add_category()"><?php echo esc_html_e('+Add New','taskbuilder');?></span>28 28 </span> 29 <span class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_get_add_category()" style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;"><?php echo esc_html_e('+Add New','taskbuilder');?></span> 29 30 <div class="wppm_padding_space"></div> 30 31 <ul class="wppm-sortable"> … … 43 44 ?> 44 45 </ul> 46 <input type="hidden" name="wppm_cat_order_ajax_nonce" id="wppm_cat_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_category_order' ) ); ?>"> 47 <input type="hidden" name="wppm_delete_cat_ajax_nonce" id="wppm_delete_cat_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_category' ) ); ?>"> 45 48 <div> 49 <style> 50 #wppm_category_container .wppm-add-new-btn:hover{ 51 background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; 52 } 53 </style> 46 54 <script> 47 55 jQuery(function(){ … … 56 64 var data = { 57 65 action: 'wppm_set_category_order', 58 load_orders : result 66 load_orders : result, 67 _ajax_nonce:jQuery('#wppm_cat_order_ajax_nonce').val() 59 68 }; 60 69 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 93 102 var data = { 94 103 action: 'wppm_set_add_category', 95 cat_name : cat_name 104 cat_name : cat_name, 105 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 96 106 }; 97 107 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 137 147 action : 'wppm_set_edit_category', 138 148 cat_id:cat_id, 139 cat_name:cat_name 149 cat_name:cat_name, 150 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 140 151 }; 141 152 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { -
taskbuilder/trunk/includes/admin/settings/wppm_get_edit_category.php
r2611331 r3079882 18 18 <input id="wppm_edit_cat_name" class="form-control" name="wppm_edit_cat_name" value="<?php echo esc_html_e($category->name,'taskbuilder');?>" /> 19 19 </div> 20 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_category' ) ); ?>"> 20 21 <?php 21 22 $body = ob_get_clean(); -
taskbuilder/trunk/includes/admin/settings/wppm_get_edit_priority.php
r2611331 r3079882 39 39 <button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button> 40 40 <button type="button" class="btn wppm_popup_action" onclick="wppm_set_edit_priority(<?php echo htmlentities(esc_attr($priority_id))?>);"><?php echo esc_html_e('Submit','taskbuilder');?></button> 41 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_priority' ) ); ?>"> 41 42 <?php 42 43 $footer = ob_get_clean(); -
taskbuilder/trunk/includes/admin/settings/wppm_get_edit_proj_status.php
r2611331 r3079882 28 28 <input id="wppm_edit_status_bg_color" class="wppm_edit_color_picker" name="wppm_edit_status_bg_color" value="<?php echo esc_attr($status->bg_color)?>" /> 29 29 </div> 30 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_status' ) ); ?>"> 30 31 <script> 31 32 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/settings/wppm_get_edit_task_status.php
r2611331 r3079882 28 28 <input id="wppm_edit_task_status_bg_color" class="wppm_edit_color_picker" name="wppm_edit_task_status_bg_color" value="<?php echo esc_attr($status->bg_color)?>" /> 29 29 </div> 30 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_task_status' ) ); ?>"> 30 31 <script> 31 32 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/settings/wppm_get_general_settings.php
r3035644 r3079882 10 10 $wppm_project_time = get_option('wppm_project_time'); 11 11 $wppm_task_time = get_option('wppm_task_time'); 12 $wppm_ap_settings = get_option("wppm-ap-settings"); 12 13 $wppm_edit_tasks_permission = get_option('wppm_default_edit_tasks_permission'); 13 14 ?> … … 87 88 </select> 88 89 <hr> 89 <button type="submit" class="wppm-submit-btn" ><?php echo esc_html_e('Save Changes','taskbuilder');?></button>90 <button type="submit" class="wppm-submit-btn" style="background-color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-bg-color'])?>!important;color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-text-color'])?>!important;"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> 90 91 <span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="edit"></span> 91 92 <input type="hidden" name="action" value="wppm_set_general_settings" /> 93 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_general_settings' ) ); ?>"> 92 94 </form> -
taskbuilder/trunk/includes/admin/settings/wppm_get_priority_settings.php
r2951988 r3079882 18 18 $priority_ids = $wppmfunction->sanitize_array($priority_ids); 19 19 } 20 $wppm_ap_settings = get_option("wppm-ap-settings"); 20 21 ?> 21 22 <div id="wppm_task_priorities_container"> … … 25 26 <span class="wppm-title"> 26 27 <?php echo esc_html_e('Task Priorities','taskbuilder');?> 27 <span style="margin-left:10px;" class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_add_task_priority();"><?php echo esc_html_e('+Add New','taskbuilder');?></span>28 28 </span> 29 <span style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;" class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_add_task_priority();"><?php echo esc_html_e('+Add New','taskbuilder');?></span> 29 30 <div class="wppm_padding_space"></div> 30 31 <ul class="wppm-sortable"> … … 48 49 ?> 49 50 </ul> 51 <input type="hidden" name="wppm_prio_order_ajax_nonce" id="wppm_prio_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_priority_order' ) ); ?>"> 52 <input type="hidden" name="wppm_delete_tprio_ajax_nonce" id="wppm_delete_tprio_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_task_priority' ) ); ?>"> 50 53 <div> 54 <style> 55 #wppm_task_priorities_container .wppm-add-new-btn:hover{ 56 background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; 57 } 58 </style> 51 59 <script> 52 60 jQuery(function(){ … … 61 69 var data = { 62 70 action: 'wppm_set_priority_order', 63 load_orders : result 71 load_orders : result, 72 _ajax_nonce : jQuery('#wppm_prio_order_ajax_nonce').val() 64 73 }; 65 74 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 94 103 priority_name : priority_name, 95 104 priority_color: priority_color, 96 priority_bg_color: priority_bg_color 105 priority_bg_color: priority_bg_color, 106 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 97 107 }; 98 108 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 148 158 priority_name:priority_name, 149 159 priority_color: priority_color, 150 priority_bg_color: priority_bg_color 160 priority_bg_color: priority_bg_color, 161 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 151 162 }; 152 163 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { -
taskbuilder/trunk/includes/admin/settings/wppm_get_proj_status_settings.php
r2951988 r3079882 13 13 exit; 14 14 } 15 $wppm_ap_settings = get_option("wppm-ap-settings"); 15 16 $statuses = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_project_statuses ORDER BY load_order ASC" ); 16 17 $status_arr = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}wppm_project_statuses" ); … … 30 31 <span class="wppm-title"> 31 32 <?php echo esc_html_e('Project Statuses','taskbuilder');?> 32 <span style="margin-left:10px;" class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_get_add_proj_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span>33 33 </span> 34 <span style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;" class="wppm-add-new-btn wppm_btn btn-primary" onclick="wppm_get_add_proj_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span> 34 35 <div class="wppm_padding_space"></div> 35 36 … … 53 54 ?> 54 55 </ul> 56 <input type="hidden" name="wppm_status_order_ajax_nonce" id="wppm_status_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_status_order' ) ); ?>"> 57 <input type="hidden" name="wppm_delete_pstatus_ajax_nonce" id="wppm_delete_pstatus_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_status' ) ); ?>"> 58 55 59 <div> 60 <style> 61 #wppm_proj_statuses_container .wppm-add-new-btn:hover{ 62 background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; 63 } 64 </style> 56 65 <script> 57 66 jQuery(function(){ … … 66 75 var data = { 67 76 action: 'wppm_set_status_order', 68 load_orders : result 77 load_orders : result, 78 _ajax_nonce : jQuery('#wppm_status_order_ajax_nonce').val() 69 79 }; 70 80 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 99 109 status_name : status_name, 100 110 status_color: status_color, 101 status_bg_color: status_bg_color 111 status_bg_color: status_bg_color, 112 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 102 113 }; 103 114 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 153 164 status_name:status_name, 154 165 status_color: status_color, 155 status_bg_color: status_bg_color 166 status_bg_color: status_bg_color, 167 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 156 168 }; 157 169 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { -
taskbuilder/trunk/includes/admin/settings/wppm_get_task_status_settings.php
r2951988 r3079882 23 23 $status_ids = $wppmfunction->sanitize_array($status_ids); 24 24 } 25 $wppm_ap_settings = get_option("wppm-ap-settings"); 25 26 ?> 26 27 <div id="wppm_task_statuses_container"> … … 30 31 <span class="wppm-title"> 31 32 <?php echo esc_html_e('Task Statuses','taskbuilder');?> 32 <span style="margin-left:10px;" class="wppm_btn btn-primary wppm-add-new-btn" onclick="wppm_get_add_task_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span>33 33 </span> 34 <span style="margin-left:10px;background-color:<?php echo esc_attr($wppm_ap_settings['add-new-button-bg-color'])?>;color:<?php echo esc_attr($wppm_ap_settings['add-new-button-text-color'])?>;" class="wppm_btn btn-primary wppm-add-new-btn" onclick="wppm_get_add_task_status();"><?php echo esc_html_e('+Add New','taskbuilder');?></span> 34 35 <div class="wppm_padding_space"></div> 35 36 <ul class="wppm-sortable"> … … 53 54 ?> 54 55 </ul> 56 <input type="hidden" name="wppm_tstatus_order_ajax_nonce" id="wppm_tstatus_order_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_task_status_order' ) ); ?>"> 57 <input type="hidden" name="wppm_delete_tstatus_ajax_nonce" id="wppm_delete_tstatus_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_task_status' ) ); ?>"> 55 58 <div> 59 <style> 60 #wppm_task_statuses_container .wppm-add-new-btn:hover{ 61 background-color: <?php echo esc_attr($wppm_ap_settings['add-new-button-hover-color'])?>!important; 62 } 63 </style> 56 64 <script> 57 65 jQuery(function(){ … … 66 74 var data = { 67 75 action: 'wppm_set_task_status_order', 68 load_orders : result 76 load_orders : result, 77 _ajax_nonce : jQuery('#wppm_tstatus_order_ajax_nonce').val() 69 78 }; 70 79 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 99 108 status_name : status_name, 100 109 status_color: status_color, 101 status_bg_color: status_bg_color 110 status_bg_color: status_bg_color, 111 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 102 112 }; 103 113 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { … … 153 163 status_name:status_name, 154 164 status_color: status_color, 155 status_bg_color: status_bg_color 165 status_bg_color: status_bg_color, 166 _ajax_nonce:jQuery('[name="_ajax_nonce"]').val() 156 167 }; 157 168 jQuery.post(wppm_admin.ajax_url, data, function(response_str) { -
taskbuilder/trunk/includes/admin/settings/wppm_set_add_category.php
r2611331 r3079882 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 8 9 if ( check_ajax_referer( 'wppm_set_add_category', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 9 12 $cat_name = isset($_POST) && isset($_POST['cat_name']) ? sanitize_text_field($_POST['cat_name']) : ''; 10 13 if (!$cat_name) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_set_add_priority.php
r2611331 r3079882 6 6 global $current_user, $wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 9 if ( check_ajax_referer( 'wppm_set_add_priority', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 12 8 13 $priority_name = isset($_POST) && isset($_POST['priority_name']) ? sanitize_text_field($_POST['priority_name']) : ''; 9 14 if (!$priority_name) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_set_add_status.php
r2611331 r3079882 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 8 9 if ( check_ajax_referer( 'wppm_set_add_status', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 9 12 $status_name = isset($_POST) && isset($_POST['status_name']) ? sanitize_text_field($_POST['status_name']) : ''; 10 13 if (!$status_name) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_set_add_task_status.php
r2611331 r3079882 6 6 global $current_user, $wpdb; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 9 if ( check_ajax_referer( 'wppm_set_add_task_status', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 8 12 9 13 $status_name = isset($_POST) && isset($_POST['status_name']) ? sanitize_text_field($_POST['status_name']) : ''; -
taskbuilder/trunk/includes/admin/settings/wppm_set_advanced_settings.php
r2951988 r3079882 8 8 exit; 9 9 } 10 11 if ( check_ajax_referer( 'wppm_set_advanced_settings', '_ajax_nonce', false ) != 1 ) { 12 wp_send_json_error( 'Unauthorised request!', 401 ); 13 } 14 10 15 $wppm_public_projects_permission = isset($_POST) && isset(($_POST['wppm_public_projects_permission'])) ? sanitize_text_field($_POST['wppm_public_projects_permission']) : '0'; 11 16 update_option('wppm_public_projects_permission',$wppm_public_projects_permission); -
taskbuilder/trunk/includes/admin/settings/wppm_set_category_order.php
r2611331 r3079882 5 5 global $current_user, $wpdb,$wppmfunction; 6 6 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 7 7 if ( check_ajax_referer( 'wppm_set_category_order', '_ajax_nonce', false ) != 1 ) { 8 wp_send_json_error( 'Unauthorised request!', 401 ); 9 } 8 10 $load_orders = isset($_POST) && isset($_POST['load_orders']) ? ($_POST['load_orders']) : array(); 9 11 if(!empty($load_orders)){ -
taskbuilder/trunk/includes/admin/settings/wppm_set_edit_category.php
r2611331 r3079882 5 5 global $current_user,$wpdb; 6 6 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 7 8 if ( check_ajax_referer( 'wppm_set_edit_category', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 7 11 8 12 $cat_id = isset($_POST) && isset($_POST['cat_id']) ? intval(sanitize_text_field($_POST['cat_id'])) : 0; -
taskbuilder/trunk/includes/admin/settings/wppm_set_edit_priority.php
r2611331 r3079882 7 7 8 8 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 9 10 if ( check_ajax_referer( 'wppm_set_edit_priority', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 12 } 9 13 10 14 $priority_id = isset($_POST) && isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : ''; -
taskbuilder/trunk/includes/admin/settings/wppm_set_edit_status.php
r2611331 r3079882 7 7 8 8 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 9 10 if ( check_ajax_referer( 'wppm_set_edit_status', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 12 } 9 13 $status_id = isset($_POST) && isset($_POST['status_id']) ? intval(sanitize_text_field($_POST['status_id'])) : ''; 10 14 if (!$status_id) {exit;} -
taskbuilder/trunk/includes/admin/settings/wppm_set_edit_task_status.php
r2611331 r3079882 6 6 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 9 if ( check_ajax_referer( 'wppm_set_edit_task_status', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 8 12 9 13 $status_id = isset($_POST) && isset($_POST['status_id']) ? intval(sanitize_text_field($_POST['status_id'])) : ''; -
taskbuilder/trunk/includes/admin/settings/wppm_set_general_settings.php
r3035644 r3079882 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) { 8 8 exit; 9 } 10 if ( check_ajax_referer( 'wppm_set_general_settings', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 9 12 } 10 13 $wppm_task_list_view = isset($_POST) && isset(($_POST['wppm_task_list_view'])) ? sanitize_text_field($_POST['wppm_task_list_view']) : ''; -
taskbuilder/trunk/includes/admin/settings/wppm_set_priority_order.php
r2611331 r3079882 6 6 global $current_user, $wpdb, $wppmfunction; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 if ( check_ajax_referer( 'wppm_set_priority_order', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 9 12 $load_orders = isset($_POST) && isset($_POST['load_orders']) ? $wppmfunction->sanitize_array($_POST['load_orders']) : array(); -
taskbuilder/trunk/includes/admin/settings/wppm_set_status_order.php
r2712671 r3079882 6 6 global $current_user, $wpdb, $wppmfunction; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 if ( check_ajax_referer( 'wppm_set_status_order', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 $load_orders = isset($_POST) && isset($_POST['load_orders']) ? $wppmfunction->sanitize_array($_POST['load_orders']) : array(); 9 12 $statuses = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}wppm_project_statuses"); -
taskbuilder/trunk/includes/admin/settings/wppm_set_task_status_order.php
r2611331 r3079882 6 6 global $current_user, $wpdb,$wppmfunction; 7 7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;} 8 if ( check_ajax_referer( 'wppm_set_task_status_order', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 $load_orders = isset($_POST) && isset($_POST['load_orders']) ? $wppmfunction->sanitize_array($_POST['load_orders']) : array(); 9 12 $priorities = $wpdb->get_results( "SELECT id FROM {$wpdb->prefix}wppm_task_statuses"); -
taskbuilder/trunk/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wpdb,$wppmfunction; 6 if ( check_ajax_referer( 'wppm_add_new_checklist', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $task_id = isset($_POST) && isset($_POST['task_id']) ? intval(sanitize_text_field($_POST['task_id'])) : ''; 7 10 if (!$task_id) {exit;} -
taskbuilder/trunk/includes/admin/tasks/open_task/checklist/wppm_add_new_checklist_item.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wpdb,$wppmfunction; 6 if ( check_ajax_referer( 'wppm_add_new_checklist_item', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $checklist_id = isset($_POST) && isset($_POST['checklist_id']) ? intval(sanitize_text_field($_POST['checklist_id'])) : ''; 7 10 if (!$checklist_id) {exit;} -
taskbuilder/trunk/includes/admin/tasks/open_task/checklist/wppm_delete_checklist.php
r2611331 r3079882 5 5 global $current_user,$wpdb,$wppmfunction; 6 6 7 if ( check_ajax_referer( 'wppm_delete_checklist', '_ajax_nonce', false ) != 1 ) { 8 wp_send_json_error( 'Unauthorised request!', 401 ); 9 } 7 10 $checklist_id = isset($_POST) && isset($_POST['checklist_id']) ? intval(sanitize_text_field($_POST['checklist_id'])) : ''; 8 11 if (!$checklist_id) {exit;} -
taskbuilder/trunk/includes/admin/tasks/open_task/checklist/wppm_remove_checklist_item.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wpdb,$wppmfunction; 6 6 if ( check_ajax_referer( 'wppm_remove_checklist_item', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 7 9 $checklist_id = isset($_POST) && isset($_POST['checklist_id']) ? intval(sanitize_text_field($_POST['checklist_id'])) : ''; 8 10 $item_id = isset($_POST) && isset($_POST['item_id']) ? intval(sanitize_text_field($_POST['item_id'])) : ''; -
taskbuilder/trunk/includes/admin/tasks/open_task/checklist/wppm_set_checklist_progress.php
r2611331 r3079882 4 4 } 5 5 global $current_user,$wpdb,$wppmfunction; 6 6 if ( check_ajax_referer( 'wppm_set_checklist_progress', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 7 9 $checklist_id = isset($_POST) && isset($_POST['checklist_id']) ? intval(sanitize_text_field($_POST['checklist_id'])) : ''; 8 10 if (!$checklist_id) {exit;} -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_clone_task.php
r2734438 r3079882 19 19 <input type="hidden" name="action" value="wppm_set_clone_task" /> 20 20 <input type="hidden" name="task_id" value="<?php echo esc_attr($task_id) ?>" /> 21 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce(' set_clone_task')?>">21 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('wppm_set_clone_task')?>"> 22 22 </form> 23 23 -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_delete_task_thread.php
r2611331 r3079882 14 14 <p><?php echo esc_html_e('Are you sure to delete this thread?','taskbuilder');?></p> 15 15 <input type="hidden" name="action" value="wppm_set_delete_thread" /> 16 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_delete_thread' ) ); ?>"> 16 17 <input type="hidden" name="task_id" value="<?php echo htmlentities(esc_attr($task_id))?>" /> 17 18 <input type="hidden" name="comment_id" value="<?php echo htmlentities(esc_attr($comment_id))?>" /> -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_edit_task_creator.php
r2611331 r3079882 9 9 $task_data = $wppmfunction->get_task($task_id); 10 10 $task_creator = get_userdata($task_data['created_by']); 11 $settings = get_option("wppm-ap-modal"); 11 12 ob_start(); 12 13 ?> … … 19 20 </div> 20 21 <input type="hidden" name="action" value="wppm_set_change_raised_by" /> 22 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('wppm_set_change_raised_by')?>"> 21 23 <input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($task_creator->ID) ?>"> 22 24 <input type="hidden" name="task_id" value="<?php echo htmlentities(esc_attr($task_id)) ?>" /> 23 25 </form> 26 <style> 27 li { 28 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 29 } 30 </style> 24 31 <script> 25 32 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_edit_task_details.php
r2951988 r3079882 9 9 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task_id))) {exit;} 10 10 $task_data = $wppmfunction->get_task($task_id); 11 $settings = get_option("wppm-ap-modal"); 11 12 $project_data = $wppmfunction->get_project(intval(sanitize_text_field($task_data['project']))); 12 13 if($current_user->has_cap('manage_options')){ … … 110 111 <?php do_action('wppm_edit_task_details',$task_id,$project_id);?> 111 112 <input type="hidden" name="action" value="wppm_set_change_task_details" /> 113 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('wppm_set_change_task_details')?>"> 112 114 <input type="hidden" name="user_id" id="user_id" value=""> 113 115 <input type="hidden" name="task_id" value="<?php echo esc_attr($task_id) ?>" /> 114 116 </form> 117 <style> 118 .select2-results__options { 119 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 120 } 121 </style> 115 122 <script> 116 123 jQuery( document ).ready( function( jQuery ) { … … 146 153 convert_urls : true, 147 154 paste_as_text: true, 155 content_style: 156 `body { 157 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 158 }`, 148 159 setup: function (editor) { 149 160 } -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_edit_task_status.php
r2611331 r3079882 29 29 <?php do_action('wppm_after_edit_change_task_status',$task_id);?> 30 30 <input type="hidden" name="action" value="wppm_set_change_task_status" /> 31 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_task_status' ) ); ?>"> 31 32 <input type="hidden" id="wppm_task_id" name="task_id" value="<?php echo htmlentities(esc_attr($task_id)) ?>" /> 32 33 -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_edit_task_thread.php
r2611331 r3079882 10 10 $task_data = $wppmfunction->get_task($task_id); 11 11 $task_comment = $wppmfunction->get_task_comment($comment_id); 12 $settings = get_option("wppm-ap-modal"); 12 13 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || ($wppmfunction->has_permission('change_task_details',$task_id)) || ($current_user->ID == $task_comment['created_by']))) {exit;} 13 14 ob_start(); … … 20 21 </div> 21 22 <input type="hidden" name="action" value="wppm_set_edit_task_thread" /> 23 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_task_thread' ) ); ?>"> 22 24 <input type="hidden" id="wppm_task_id" name="task_id" value="<?php echo htmlentities(esc_attr($task_id)) ?>" /> 23 25 <input type="hidden" id="wppm_comment_id" name="comment_id" value="<?php echo htmlentities(esc_attr($comment_id)) ?>" /> … … 45 47 remove_script_host : false, 46 48 convert_urls : true, 49 content_style: 50 `body { 51 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 52 }`, 47 53 setup: function (editor) { 48 54 } -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_open_task.php
r3035644 r3079882 9 9 $wppm_default_task_date = get_option('wppm_default_task_date'); 10 10 $wppm_task_time = get_option('wppm_task_time'); 11 $appearance_settings = get_option("wppm-ap-individual-task"); 12 $settings = get_option("wppm-ap-modal"); 11 13 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || ($wppmfunction->has_permission('view_task',$id)))) {exit;} 12 14 $proj_id = isset($_POST) && isset($_POST['proj_id']) ? intval(sanitize_text_field($_POST['proj_id'])) : 0; … … 110 112 </div> 111 113 <div class="col-sm-9"> 112 <span class="wppm_task_details" ><?php echo (isset($task_start_date))? esc_html($task_start_date):"" ?></span>114 <span class="wppm_task_details" id="wppm_edit_tstart_date"><?php echo (isset($task_start_date))? esc_html($task_start_date):"" ?></span> 113 115 </div> 116 <input type="hidden" name="wppm_edit_tstart_date_ajax_nonce" id="wppm_edit_tstart_date_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_task_start_date' ) ); ?>"> 114 117 </div> 115 118 <div class="row"> … … 119 122 <div class="col-sm-9"> 120 123 <?php $style = ($task->status!=4 && $task->end_date < $current_date) ? "color:#FF0000":"color:#2C3E50"; ?> 121 <span class="wppm_task_details" style="<?php echo esc_attr($style); ?>"><?php echo (isset($task_end_date))? esc_html($task_end_date):"" ?></span>124 <span class="wppm_task_details" id="wppm_edit_tend_date" style="<?php echo esc_attr($style); ?>"><?php echo (isset($task_end_date))? esc_html($task_end_date):"" ?></span> 122 125 </div> 126 <input type="hidden" name="wppm_edit_tend_date_ajax_nonce" id="wppm_edit_tend_date_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_task_end_date' ) ); ?>"> 123 127 </div> 124 128 <?php } ?> … … 157 161 <div class="col-sm-4" style="text-align:right;<?php echo esc_attr($check_style) ?>"> 158 162 <a class="wppm_delete_checklist" onclick="wppm_delete_checklist(<?php echo esc_attr($list->id);?>,<?php echo esc_attr($task->id);?>,<?php echo esc_attr($proj_id);?>)"><?php echo esc_html_e('Delete Checklist','taskbuilder');?></a> 163 <input type="hidden" name="wppm_delete_checklist_ajax_nonce" id="wppm_delete_checklist_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_delete_checklist' ) ); ?>"> 159 164 </div> 160 165 </div> … … 175 180 $checked = $val->checked == 1 ? 'checked="checked"' : ''; 176 181 ?> 177 <div id="wppm_checklist_<?php echo esc_attr($val->id) ?>" class="row " style="margin-bottom:10px;font: 15px 'Helvetica Neue',Helvetica,Arial,sans-serif;">182 <div id="wppm_checklist_<?php echo esc_attr($val->id) ?>" class="row wppm_checklist_item" style="margin-bottom:10px;font: 15px 'Helvetica Neue',Helvetica,Arial,sans-serif;"> 178 183 <div class="col-sm-8" id="wppm_checklist_item_container_<?php echo esc_attr($val->id) ?>"> 179 184 <input id="wppm_checklist_item_<?php echo esc_attr($val->id) ?>" class="wppm_checklist_item_<?php echo esc_attr($val->checklist_id) ?>" onchange="wppm_checklist_progress(<?php echo esc_attr($val->checklist_id) ?>,<?php echo esc_attr($val->id) ?>,<?php echo esc_attr($task->id) ?>)" type="checkbox" name="wppm_checklist" <?php echo esc_attr($checked) ?> value="<?php echo esc_attr($val->id) ?>" <?php echo esc_attr($disabled) ?> style="margin:5px;"><label style="padding-top: 5px;font-weight: normal;font: 13px 'Helvetica Neue',Helvetica,Arial,sans-serif;"><?php echo esc_html_e($val->item_name,'taskbuilder') ?></label> 185 <input type="hidden" name="wppm_checklist_progress_ajax_nonce" id="wppm_checklist_progress_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_checklist_progress' ) ); ?>"> 180 186 </div> 181 187 <?php if ($list->created_by == $current_user->ID || $current_user->has_cap('manage_options') || $user_role == 1) { ?> 182 188 <div class="col-sm-4" id="wppm_checklist_action_<?php echo esc_attr($val->id) ?>" style="text-align:right; display:none;cursor:pointer;"> 183 189 <span onclick=wppm_delete_checklist_item(<?php echo esc_attr($val->id) ?>,<?php echo esc_attr($val->checklist_id) ?>,<?php echo esc_attr($proj_id);?>,<?php echo esc_attr($id) ?>)><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/trash.svg'); ?>" alt="delete"></span> 190 <input type="hidden" name="wppm_delete_checklist_item_ajax_nonce" id="wppm_delete_checklist_item_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_remove_checklist_item' ) ); ?>"> 184 191 </div> 185 192 <?php } ?> … … 199 206 <input type="text" id="wppm_checklist_item_label_<?php echo esc_attr($list->id) ?>" class="wppm_checklist_item_label_<?php echo esc_attr($list->id) ?>" placeholder="<?php echo esc_attr__('Add an item','taskbuilder') ?>" name="wppm_checklist_item_label" style="font: 13px 'Helvetica Neue',Helvetica,Arial,sans-serif;"> 200 207 <input type="button" value="Add" class="btn btn-success btn-sm wppm_add_new_item_btn_<?php echo esc_attr($list->id); ?>" onclick="wppm_add_new_checklist_item(<?php echo esc_attr($list->id)?>,<?php echo esc_attr($task->id)?>,<?php echo esc_attr($proj_id) ?>)"> 208 <input type="hidden" name="wppm_checklist_item_ajax_nonce" id="wppm_checklist_item_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_add_new_checklist_item' ) ); ?>"> 201 209 <span onclick="wppm_remove_add_checklist_container(<?php echo esc_attr($list->id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/cancel.svg'); ?>" alt="delete"></span> 202 210 </div> … … 220 228 <input type="text" class="wppm_checklist_label" placeholder="<?php echo esc_attr__('Please insert checklist title','taskbuilder');?>" id="wppm_checklist_label" name="wppm_checklist_label"> 221 229 <input type="button" value="Add" id="wppm_checklist_btn" class="btn btn-success btn-sm" onclick="wppm_add_new_checklist(<?php echo esc_attr($id)?>,<?php echo esc_attr($proj_id) ?>)"> 230 <input type="hidden" name="wppm_checklist_ajax_nonce" id="wppm_checklist_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_add_new_checklist' ) ); ?>"> 222 231 <span onclick="wppm_remove_add_checklist()"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/cross1.svg'); ?>"></span> 223 232 </div> … … 245 254 <?php echo esc_html_e('Cancel','taskbuilder')?> 246 255 </button> 247 <button type="button" id="wppm_individual_submit_task_comment_btn" onclick="wppm_submit_task_comment(<?php echo esc_attr($id); ?>,<?php echo esc_attr($proj_id); ?>);" class="wppm-btn">256 <button type="button" id="wppm_individual_submit_task_comment_btn" style="background-color:<?php echo esc_attr($appearance_settings['comment-send-btn-bg-color'])?>;color:<?php echo esc_attr($appearance_settings['comment-send-btn-color'])?>!important;" onclick="wppm_submit_task_comment(<?php echo esc_attr($id); ?>,<?php echo esc_attr($proj_id); ?>);" class="wppm-btn"> 248 257 <?php echo esc_html_e('SEND','taskbuilder')?> 249 258 </button> 259 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_submit_task_comment' ) ); ?>"> 250 260 </div> 251 261 </div> … … 277 287 <div class="wppm_thread_body"> 278 288 <div class="wppm_thread_user_name"> 279 <strong ><?php echo esc_html($user->display_name) ?></strong> <small class="wppm_comment_date"><i><?php echo esc_html($thread_date) ?></i></small>289 <strong style="color:<?php echo esc_attr($appearance_settings['comment-primary-color']);?>"><?php echo esc_html($user->display_name) ?></strong> <small class="wppm_comment_date" style="color:<?php echo esc_attr($appearance_settings['comment-date-color']);?>"><i><?php echo esc_html($thread_date) ?></i></small> 280 290 <div class="wppm_thread_action"> 281 291 <?php if(( ($current_user->has_cap('manage_options')) || ($wppmfunction->has_comment_permission('edit_task_comment',$id,$comment->id)))){ ?> … … 285 295 </div> 286 296 </div> 287 <div class="wppm_thread_messege" >297 <div class="wppm_thread_messege" style="color:<?php echo esc_attr($appearance_settings['comment-secondary-color']);?>"> 288 298 <?php 289 299 $allowedtags = array( 'br' => array(), 'abbr' => array('title' => array(),), 'p' => array(), 'strong' => array(), 'a' => array('href' => array(), 'title' => array(), 'target'=> array(), 'rel'=>array()),'em' =>array(),'span' =>array(), 'blockquote'=>array('cite' => array(),),'div' => array('class' => array(),'title' => array(),'style' => array(),),'ul'=>array(),'li'=>array(),'ol'=>array(),'img' => array( 'alt'=> array(),'class' => array(),'height' => array(),'src'=> array(),'width'=> array(),)); … … 318 328 </td> 319 329 </tr> 330 <input type="hidden" name="wppm_ajax_nonce" id="wppm_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_remove_thread_attachment' ) ); ?>"> 320 331 <?php } 321 332 endforeach; … … 333 344 <div class="wppm_individual_task_widget col-sm-4 wppm_sidebar col-md-3"> 334 345 <div class="row wppm_widget" id="wppm_status_widget"> 335 <h4 class="widget_header"><?php echo esc_html_e('Status','taskbuilder')?> 336 <?php if ($wppmfunction->has_permission('change_status',$id) || $current_user->has_cap('manage_options')) { ?> 337 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_status(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span></h4> 338 <?php } ?> 346 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 347 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"><?php echo esc_html_e('Status','taskbuilder')?></h4> 348 <?php if ($wppmfunction->has_permission('change_status',$id) || $current_user->has_cap('manage_options')) { ?> 349 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_status(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 350 <?php } ?> 351 </div> 339 352 <hr class="widget_divider"> 340 <div class="wppm_sidebar_labels"><span class="wppm_label_info"><?php echo esc_html_e('Status','taskbuilder')?>:</span> <span class="wppm_admin_label" style="background-color:<?php echo (isset($task_status->bg_color))? esc_attr($task_status->bg_color):""?>;color:<?php echo (isset($task_status->color))? esc_attr($task_status->color):""?>;"><?php echo (isset($task_status->name))? esc_attr($task_status->name):"" ?> </span></div> 353 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 354 <div class="wppm_sidebar_labels"><span class="wppm_label_info" style="color:<?php echo esc_attr($appearance_settings['widget-body-label-color'])?>"><?php echo esc_html_e('Status','taskbuilder')?>:</span> <span class="wppm_admin_label" style="background-color:<?php echo (isset($task_status->bg_color))? esc_attr($task_status->bg_color):""?>;color:<?php echo (isset($task_status->color))? esc_attr($task_status->color):""?>;"><?php echo (isset($task_status->name))? esc_attr($task_status->name):"" ?> </span></div> 355 </div> 341 356 </div> 342 357 <div class="row wppm_widget" id="wppm_raisedby_widget"> 343 <h4 class="widget_header"> 344 <?php echo esc_html_e('Task Creator','taskbuilder')?> 345 <?php if ($wppmfunction->has_permission('change_raised_by',$id ) || $current_user->has_cap('manage_options')) { ?> 346 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_creator(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span></h4> 347 <?php } ?> 358 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 359 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>"> 360 <?php echo esc_html_e('Task Creator','taskbuilder')?></h4> 361 <?php if ($wppmfunction->has_permission('change_raised_by',$id ) || $current_user->has_cap('manage_options')) { ?> 362 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_creator(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 363 <?php } ?> 364 </div> 348 365 <hr class="widget_divider"> <?php 349 366 $user_info = get_userdata($task->created_by); 350 367 ?> 351 <div style="padding:2px 0;"> 352 <span class="wppm_task_user_avatar"><?php echo (get_avatar($task->created_by, 25, "mysteryman")); ?></span> 353 <span class="wppm_task_user_names"><?php echo esc_html($user_info->display_name); ?></span> 368 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 369 <div style="padding:2px 0;"> 370 <span class="wppm_task_user_avatar"><?php echo (get_avatar($task->created_by, 25, "mysteryman")); ?></span> 371 <span class="wppm_task_user_names" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>;"><?php echo esc_html($user_info->display_name); ?></span> 372 </div> 354 373 </div> 355 374 </div> 356 375 <div class="row wppm_widget" id="wppm_task_users_widget_container"> 357 <h4 class="widget_header"> 358 <?php if ($wppmfunction->has_permission('assign_task_users',$id ) || $current_user->has_cap('manage_options')) { ?> 359 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_users(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 360 <?php } ?> 361 <span><?php echo esc_html_e('Users','taskbuilder')?></span></h4> 376 <div class="wppm-widget-header" style="background-color:<?php echo esc_attr($appearance_settings['widget-header-bg-color'])?>"> 377 <h4 class="widget_header" style="color:<?php echo esc_attr($appearance_settings['widget-header-text-color'])?>;"><?php echo esc_html_e('Users','taskbuilder')?></h4> 378 <?php if ($wppmfunction->has_permission('assign_task_users',$id ) || $current_user->has_cap('manage_options')) { ?> 379 <span class="wppm_edit_task_details_widget" onclick="wppm_edit_task_users(<?php echo esc_attr($id) ?>,<?php echo esc_attr($proj_id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span> 380 <?php } ?> 381 </div> 362 382 <hr class="widget_divider"> 363 <div id="wppm_task_users"> 364 <?php 365 $i=0; 366 if(!empty($users)){ 367 foreach($users as $user) { 368 $user_data = get_userdata($user); 369 if(!empty($project_data['users'])){ 370 $proj_users = explode(',',$project_data['users']); 371 if(in_array($user,$proj_users)){ 372 $i++; 373 ?> 374 <div style="padding:2px 0;"> 375 <span class="wppm_task_user_avatar"><?php echo (get_avatar($user, 25, "mysteryman")); ?></span> 376 <span class="wppm_task_user_names"><?php echo ((!empty($user_data))? esc_html($user_data->display_name) :"") ?></span> 377 </div> 378 <?php 383 <div class="wppm-widget-body" style="background-color:<?php echo esc_attr($appearance_settings['widget-body-bg-color'])?>"> 384 <div id="wppm_task_users"> 385 <?php 386 $i=0; 387 if(!empty($users)){ 388 foreach($users as $user) { 389 $user_data = get_userdata($user); 390 if(!empty($project_data['users'])){ 391 $proj_users = explode(',',$project_data['users']); 392 if(in_array($user,$proj_users)){ 393 $i++; 394 ?> 395 <div style="padding:2px 0;"> 396 <span class="wppm_task_user_avatar"><?php echo (get_avatar($user, 25, "mysteryman")); ?></span> 397 <span class="wppm_task_user_names" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>;"><?php echo ((!empty($user_data))? esc_html($user_data->display_name) :"") ?></span> 398 </div> 399 <?php 400 } 379 401 } 380 402 } 381 403 } 382 }383 if($i==0){ ?>384 <span class="wppm_display_user_none"><?php echo esc_html_e('None','taskbuilder'); ?></span> <?php385 }386 ?>404 if($i==0){ ?> 405 <span class="wppm_display_user_none" style="color:<?php echo esc_attr($appearance_settings['widget-body-text-color'])?>"><?php echo esc_html_e('None','taskbuilder'); ?></span> <?php 406 } 407 ?> 408 </div> 387 409 </div> 388 410 </div> 389 411 <?php do_action('wppm_after_task_widgets',$id,$proj_id);?> 390 412 </div> 391 <input type="hidden" id="wppm_nonce" value="<?php echo wp_create_nonce( )?>">413 <input type="hidden" id="wppm_nonce" value="<?php echo wp_create_nonce('wppm_upload_file')?>"> 392 414 <input type="file" id="wppm_attachment_upload" class="hidden" onchange=""> 393 415 </div> 394 416 </form> 417 <style> 418 .wppm_comment_date i:hover{ 419 color: <?php echo esc_attr($appearance_settings['comment-date-hover-color'])?>; 420 } 421 #Layer_1{ 422 fill:red!important; 423 } 424 </style> 395 425 <script> 396 jQuery( document ).ready( function( jQuery ) { 426 jQuery( document ).ready( function( jQuery ) {<?php 427 if ((($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task->id))){ ?> 428 jQuery("#wppm_edit_tstart_date").flatpickr({ 429 enableTime: true, 430 dateFormat: "Y-m-d H:i", 431 onChange: function(selectedDates, dateStr, instance) { 432 var data = { 433 action: 'wppm_set_change_task_start_date', 434 task_id:<?php echo esc_attr($task->id);?>, 435 date:dateStr, 436 _ajax_nonce:jQuery('#wppm_edit_tstart_date_ajax_nonce').val() 437 }; 438 jQuery.post(wppm_admin.ajax_url, data, function(response) { 439 instance.close(); 440 wppm_open_task(<?php echo esc_attr($task->id);?>); 441 }); 442 }, 443 }); 444 jQuery("#wppm_edit_tend_date").flatpickr({ 445 enableTime: true, 446 dateFormat: "Y-m-d H:i", 447 onChange: function(selectedDates, dateStr, instance) { 448 var data = { 449 action: 'wppm_set_change_task_end_date', 450 task_id:<?php echo esc_attr($task->id);?>, 451 date:dateStr, 452 _ajax_nonce:jQuery('#wppm_edit_tend_date_ajax_nonce').val() 453 }; 454 jQuery.post(wppm_admin.ajax_url, data, function(response) { 455 instance.close(); 456 wppm_open_task(<?php echo esc_attr($task->id);?>); 457 }); 458 }, 459 }); 460 <?php } ?> 397 461 <?php foreach ($wppm_checklist as $chklist) { ?> 398 462 var $checkboxes = jQuery('.wppm_checklist_item_'+<?php echo esc_attr($chklist->id);?>); -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_change_raised_by.php
r2611331 r3079882 7 7 8 8 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_raised_by',$task_id))) {exit;} 9 9 if ( check_ajax_referer( 'wppm_set_change_raised_by', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 10 12 $user_id = isset($_POST['user_id']) ? sanitize_text_field($_POST['user_id']) : 0 ; 11 13 $task_data = $wppmfunction->get_task($task_id); -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_change_task_details.php
r2951988 r3079882 7 7 $proj_id = isset($_POST['proj_id']) ? intval(sanitize_text_field($_POST['proj_id'])) : '' ; 8 8 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task_id))) {exit;} 9 if ( check_ajax_referer( 'wppm_set_change_task_details', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 9 12 $task_data = $wppmfunction->get_task($task_id); 10 13 $task_label = isset($_POST['wppm_edit_task_label']) ? sanitize_text_field($_POST['wppm_edit_task_label']) : "" ; -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_change_task_status.php
r2611331 r3079882 7 7 $task_id = isset($_POST['task_id']) ? sanitize_text_field($_POST['task_id']) : ''; 8 8 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_status',$task_id))) {exit;} 9 9 if ( check_ajax_referer( 'wppm_set_change_task_status', '_ajax_nonce', false ) != 1 ) { 10 wp_send_json_error( 'Unauthorised request!', 401 ); 11 } 10 12 $status_id = isset($_POST['wppm_status']) ? intval(sanitize_text_field($_POST['wppm_status'])) : 0 ; 11 13 if( !$status_id ){ -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_clone_task.php
r2772108 r3079882 4 4 } 5 5 global $wpdb,$current_user,$wppmfunction; 6 6 $redirect_flag = false; 7 if ( !isset($ajax_nonce) && (check_ajax_referer( 'wppm_set_clone_task', '_ajax_nonce', false ) != 1) ) { 8 $redirect_flag = true; 9 }elseif((isset($ajax_nonce) && !wp_verify_nonce($ajax_nonce,'wppm_set_clone_task'))){ 10 $redirect_flag = true; 11 } 12 if($redirect_flag == true){ 13 wp_send_json_error( 'Unauthorised request!', 401 ); 14 } 7 15 $prev_task_id = isset($_POST['task_id']) ? sanitize_text_field($_POST['task_id']) : $ptask_id ; 8 16 $task = $wppmfunction->get_task($prev_task_id); -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_delete_thread.php
r2772108 r3079882 9 9 $task_comment = $wppmfunction->get_task_comment($thread_id); 10 10 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_comment_permission('delete_task_thread',$task_id,$thread_id))) {exit;} 11 if ( check_ajax_referer( 'wppm_set_delete_thread', '_ajax_nonce', false ) != 1 ) { 12 wp_send_json_error( 'Unauthorised request!', 401 ); 13 } 11 14 $sql="SELECT attachment_ids FROM {$wpdb->prefix}wppm_task_comment WHERE id =".$thread_id; 12 15 $thread_attachment_ids = $wpdb->get_results( $sql ); -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_edit_task_thread.php
r2663532 r3079882 8 8 $task_comment = $wppmfunction->get_task_comment($comment_id); 9 9 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('change_task_details',$task_id) || $current_user->ID == $task_comment['created_by'])) {exit;} 10 if ( check_ajax_referer( 'wppm_set_edit_task_thread', '_ajax_nonce', false ) != 1 ) { 11 wp_send_json_error( 'Unauthorised request!', 401 ); 12 } 10 13 $task_comment_data = $wppmfunction->get_task_comment($comment_id); 11 14 $old_comment_body = $task_comment_data['body']; -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_set_task_users.php
r2756281 r3079882 6 6 $task_id = isset($_POST['task_id']) ? intval(sanitize_text_field($_POST['task_id'])) : '' ; 7 7 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_permission('assign_task_users',$task_id))) {exit;} 8 if ( check_ajax_referer( 'wppm_set_task_users', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 8 11 $task_data = $wppmfunction->get_task($task_id); 9 12 $users = ""; -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_submit_task_comment.php
r2663532 r3079882 4 4 } 5 5 global $wpdb,$wppmfunction,$current_user; 6 if ( check_ajax_referer( 'wppm_submit_task_comment', '_ajax_nonce', false ) != 1 ) { 7 wp_send_json_error( 'Unauthorised request!', 401 ); 8 } 6 9 $task_id = isset($_POST['task_id']) ? sanitize_text_field($_POST['task_id']) : '' ; 7 10 $comment = isset($_POST['comment_body']) ? ($_POST['comment_body']) : '' ; -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_thread_attachment_remove.php
r2772108 r3079882 5 5 6 6 global $current_user, $wppmfunction, $wpdb; 7 if ( check_ajax_referer( 'wppm_remove_thread_attachment', '_ajax_nonce', false ) != 1 ) { 8 wp_send_json_error( 'Unauthorised request!', 401 ); 9 } 7 10 $attachment = isset($_POST['attachment']) ? intval(sanitize_text_field($_POST['attachment'])) : '0' ; 8 11 $comment_id = isset($_POST['comment_id']) ? intval(sanitize_text_field($_POST['comment_id'])) : '0' ; -
taskbuilder/trunk/includes/admin/tasks/open_task/wppm_upload_file.php
r2782740 r3079882 2 2 // Exit if accessed directly 3 3 if ( ! defined( 'ABSPATH' ) ) exit; 4 4 if ( isset($_POST['wppm_upload_proj_attach_file']) && check_ajax_referer( 'wppm_upload_proj_attach_file', 'nonce', false ) != 1 ) { 5 wp_send_json_error( 'Unauthorised request!', 401 ); 6 } 7 elseif ( isset($_POST['wppm_upload_file']) && check_ajax_referer( 'wppm_upload_file', 'nonce', false ) != 1 ) { 8 wp_send_json_error( 'Unauthorised request!', 401 ); 9 } 5 10 global $wpdb; 6 11 $isError = false; -
taskbuilder/trunk/includes/admin/tasks/wppm_add_new_task.php
r3042496 r3079882 142 142 <?php } ?> 143 143 <input type="hidden" name="action" value="wppm_create_task" /> 144 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_create_task' ) ); ?>"> 144 145 </div> 145 146 </div> -
taskbuilder/trunk/includes/admin/tasks/wppm_create_task.php
r2663532 r3079882 5 5 } 6 6 global $current_user,$wpdb,$wppmfunction; 7 8 if ( check_ajax_referer( 'wppm_create_task', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 7 11 8 12 // Task name -
taskbuilder/trunk/includes/admin/tasks/wppm_get_delete_task.php
r2611331 r3079882 13 13 </div> 14 14 <input type="hidden" name="action" value="wppm_set_delete_task" /> 15 <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('wppm_set_delete_task')?>"> 15 16 <input type="hidden" name="task_id" value="<?php echo htmlentities(esc_attr($id))?>" /> 16 17 </form> -
taskbuilder/trunk/includes/admin/tasks/wppm_get_task_users.php
r2611331 r3079882 5 5 global $wpdb,$wppmfunction,$current_user; 6 6 $wppm_users_role = get_option('wppm_user_role'); 7 $settings = get_option("wppm-ap-modal"); 7 8 $task_id = isset($_POST['task_id']) ? intval(sanitize_text_field($_POST['task_id'])) : '' ; 8 9 $proj_id = isset($_POST['proj_id']) ? intval(sanitize_text_field($_POST['proj_id'])) : '' ; … … 47 48 </div> 48 49 <input type="hidden" name="action" value="wppm_set_task_users" /> 50 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_task_users' ) ); ?>"> 49 51 <input type="hidden" id="wppm_task_id" name="task_id" value="<?php echo esc_attr($task_id) ?>" /> 50 52 </div> 51 53 </form> 54 <style> 55 li { 56 color:<?php echo esc_attr( $settings['body-text-color'])?>!important; 57 } 58 </style> 52 59 <script> 53 60 jQuery(document).ready(function(){ -
taskbuilder/trunk/includes/admin/tasks/wppm_set_delete_task.php
r2844010 r3079882 6 6 global $current_user, $wppmfunction ,$wpdb; 7 7 $task_id = isset($_POST['task_id']) ? sanitize_text_field($_POST['task_id']) : 0 ; 8 8 if ( check_ajax_referer( 'wppm_set_delete_task', '_ajax_nonce', false ) != 1 ) { 9 wp_send_json_error( 'Unauthorised request!', 401 ); 10 } 9 11 $sql="SELECT attachment_ids FROM {$wpdb->prefix}wppm_task_comment WHERE task_id =".$task_id; 10 12 $thread_attachment_ids= $wpdb->get_results( $sql ); -
taskbuilder/trunk/includes/admin/tasks/wppm_tasks.php
r2611331 r3079882 4 4 } 5 5 $wppm_default_task_list_view = get_option('wppm_default_task_list_view'); 6 $settings = get_option("wppm-ap-modal"); 6 7 ?> 7 8 <div class="wppm_bootstrap"> … … 26 27 <!-- Pop-up snippet end --> 27 28 </div> 29 <style> 30 #wppm_popup_title{ 31 background-color: <?php echo esc_attr($settings['header-bg-color'])?>; 32 } 33 #wppm_popup_title h3{ 34 color:<?php echo esc_attr( $settings['header-text-color'])?>; 35 } 36 #wppm_popup_body{ 37 background-color: <?php echo esc_attr($settings['body-bg-color'])?>!important; 38 } 39 #wppm_popup_body label{ 40 color:<?php echo esc_attr( $settings['body-label-color'])?>; 41 } 42 #wppm_popup_body input{ 43 color:<?php echo esc_attr( $settings['body-text-color'])?>; 44 } 45 #wppm_popup_body select{ 46 color:<?php echo esc_attr( $settings['body-text-color'])?>; 47 } 48 #wppm_popup_body span { 49 color:<?php echo esc_attr( $settings['body-text-color'])?>; 50 } 51 #wppm_popup_body .select2-results__options { 52 color:<?php echo esc_attr( $settings['body-text-color'])?>; 53 } 54 #wppm_popup_footer{ 55 background-color: <?php echo esc_attr($settings['footer-bg-color'])?>!important; 56 } 57 .wppm_popup_action{ 58 background-color: <?php echo esc_attr($settings['action-btn-bg-color'])?>!important; 59 color:<?php echo esc_attr( $settings['action-btn-text-color'])?>!important; 60 } 61 </style> 28 62 <script type="text/javascript"> 29 63 jQuery( document ).ready( function( jQuery ) { -
taskbuilder/trunk/includes/admin/tasks/wppm_tasks_list.php
r3035644 r3079882 10 10 $sort_by = isset($_POST['sort_by']) ? sanitize_text_field($_POST['sort_by']):"task_name"; 11 11 $filter_by = isset($_POST['wppm_task_filter']) ? sanitize_text_field($_POST['wppm_task_filter']) : "all"; 12 $proj_filter = isset($_POST['wppm_proj_filter']) ? sanitize_text_field($_POST['wppm_proj_filter']) : "0"; 12 13 $current_date = date('Y-m-d'); 13 14 $wppm_task_time = get_option('wppm_task_time'); 15 if($current_user->has_cap('manage_options')){ 16 $query = ( "SELECT * FROM {$wpdb->prefix}wppm_project ORDER BY project_name" ); 17 $where = ""; 18 }else{ 19 $query = ("SELECT Proj.* 20 FROM {$wpdb->prefix}wppm_project AS Proj 21 Left join {$wpdb->prefix}wppm_project_meta proj_meta ON Proj.id = proj_meta.project_id"); 22 $where = " where (FIND_IN_SET($current_user->ID,Proj.users)) OR (Proj.id = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1) Group by Proj.id ORDER BY project_name"; 23 } 24 $query.= $where; 25 $projects = $wpdb->get_results($query); 26 $appearance_settings = get_option("wppm-ap-task-list"); 14 27 $filters = array( 15 28 'sort_by' => $sort_by, 16 29 'order' => $order, 17 30 'search' => $search_tag, 18 'filter'=>$filter_by 31 'filter'=>$filter_by, 32 'proj_filter' =>$proj_filter 19 33 ); 20 34 $tl_filters = isset( $_COOKIE['wppm_filters'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['wppm_filters'] ) ) : $filters; … … 30 44 $search_tag = isset($_POST['task_search']) ? sanitize_text_field($_POST['task_search']) : $tl_filters_arr['search']; 31 45 $filter_by = isset($_POST['wppm_task_filter']) ? sanitize_text_field($_POST['wppm_task_filter']) : $tl_filters_arr['filter']; 46 $proj_filter = isset($_POST['wppm_proj_filter']) ? sanitize_text_field($_POST['wppm_proj_filter']) : $tl_filters_arr['proj_filter']; 32 47 if($sort_by == ""){ 33 48 $sort_by = 'task_name'; … … 37 52 'order' => $order, 38 53 'search'=>$search_tag, 39 'filter'=>$filter_by 54 'filter'=>$filter_by, 55 'proj_filter'=>$proj_filter 40 56 ); 41 57 setcookie('wppm_filters',wp_json_encode( $filters ),time() + 3600); … … 70 86 }elseif($filter_by == 'mine'){ 71 87 $wppm_tl_filter = "(FIND_IN_SET('$current_user->ID',Task.users)>0)"; 88 } 89 if($proj_filter!=0){ 90 $wppm_task_by_proj_filter = "Task.project = '$proj_filter'"; 91 }else{ 92 $wppm_task_by_proj_filter ="1=1"; 72 93 } 73 94 $wppm_default_task_date = get_option('wppm_default_task_date'); … … 112 133 if(!empty($search_tag )){ 113 134 if($current_user->has_cap('manage_options')){ 114 $where = " where $wppm_tl_filter AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text')";135 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text')"; 115 136 } else{ 116 $where = " where $wppm_tl_filter AND (((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text'))";137 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND (((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1)) AND (Task.task_name LIKE '$search_tag_text' OR proj.project_name LIKE '$search_tag_text' OR task_statuses.name LIKE '$search_tag_text' OR task_priorities.name LIKE '$search_tag_text' OR user.display_name LIKE '$search_tag_text'))"; 117 138 } 118 139 }else{ 119 140 if($current_user->has_cap('manage_options')){ 120 $where = " where $wppm_tl_filter ";141 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter"; 121 142 } else{ 122 $where = " where $wppm_tl_filter AND ((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1))";143 $where = " where $wppm_tl_filter AND $wppm_task_by_proj_filter AND ((FIND_IN_SET('$current_user->ID',Task.users)>0) OR (Task.created_by= '$current_user->ID') OR (proj_users.user_id = '$current_user->ID' AND proj_users.role_id = 1 AND (FIND_IN_SET('$current_user->ID',proj.users)>0)) OR (Task.project = proj_meta.project_id AND proj_meta.meta_key='public_project' AND proj_meta.meta_value=1))"; 123 144 } 124 145 } … … 143 164 <div class="col-sm-6"> 144 165 <span class="wppm-heading-inline"> <?php echo esc_html_e('Tasks','taskbuilder');?> </span> 145 <span class="wppm-add-new-btn btn-primary" onclick="wppm_add_new_task()"><img class="wppm_add_new_task_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="add_icon"><?php echo esc_html_e('Add New','taskbuilder');?></span>166 <span class="wppm-add-new-btn btn-primary" id="wppm_add_new_task_btn_tl" style="background-color:<?php echo $appearance_settings['list-header-button-background-color']?>;color:<?php echo $appearance_settings['list-header-button-text-color']?>" onclick="wppm_add_new_task()"><img class="wppm_add_new_task_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="add_icon"><?php echo esc_html_e('Add New','taskbuilder');?></span> 146 167 </div> 147 168 <div id="wppm_task_search" class="col-sm-6"> … … 150 171 </div> 151 172 </div> 173 <div id="wppm_task_filter_container"> 174 <div class="wppm-filter-item"> 175 <label for="wppm_task_filter"> <?php echo esc_html_e('Filter','taskbuilder');?></label> 176 <select id="wppm_task_filter" name="wppm_task_filter" onchange="wppm_apply_task_filter()"> 177 <option value="all"<?php echo ($filter_by == "all")? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 178 <option value="todo" <?php echo ($filter_by == "todo")? 'selected':""?>><?php echo esc_html_e('Todo','taskbuilder');?></option> 179 <option value="inprogress" <?php echo ($filter_by == "inprogress")? 'selected':""?>><?php echo esc_html_e('In Progress','taskbuilder');?></option> 180 <option value="hold" <?php echo ($filter_by == "hold")? 'selected':""?>><?php echo esc_html_e('Hold','taskbuilder');?></option> 181 <option value="completed" <?php echo ($filter_by == "completed")? 'selected':""?>><?php echo esc_html_e('Completed','taskbuilder');?></option> 182 <option value="mine" <?php echo ($filter_by == "mine")? 'selected':""?>><?php echo esc_html_e('Mine','taskbuilder');?></option> 183 <option value="unassigned" <?php echo ($filter_by == "unassigned")? 'selected':""?>><?php echo esc_html_e('Unassigned','taskbuilder');?></option> 184 <option value="overdue" <?php echo ($filter_by == "overdue")? 'selected':""?>><?php echo esc_html_e('Overdue','taskbuilder');?></option> 185 </select> 186 </div> 187 <div class="wppm-filter-item wppm_project_autocomplete_container"> 188 <label for="wppm_task_list_proj_filter"> 189 <?php echo esc_html_e('Project','taskbuilder');?> 190 </label><br> 191 <select searchable="search here" onchange="wppm_tasks_by_select_project()" class="form-control" size="40" name="wppm_task_list_proj_filter" id="wppm_task_list_proj_filter" data-width="100%" style="width: 100%!important;"> 192 <option value="0" <?php echo ($proj_filter == 0)? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 193 <?php 194 if(!empty($projects)){ 195 foreach($projects as $proj) { 196 ?> 197 <option value="<?php echo esc_attr($proj->id)?>" <?php echo ($proj_filter == $proj->id)? 'selected':""?>><?php echo esc_html_e($proj->project_name,'taskbuilder');?></option> 198 <?php } 199 } ?> 200 </select> 201 </div> 202 <div class="wppm_display_submit"> 203 <div class="wppm-filter-actions"> 204 <span class="wppm-link" onclick="wppm_tl_reset_filter()"> <?php echo esc_html_e('Reset','taskbuilder');?></span> 205 </div> 206 </div> 207 </div> 152 208 <div class="row"> 153 <div class="col-sm-6" id="wppm_task_filter_container"> 154 <div class="wppm-filter-item"> 155 <label for="wppm_task_filter"> <?php echo esc_html_e('Filter','taskbuilder');?></label> 156 <select id="wppm_task_filter" name="wppm_task_filter" onchange="wppm_apply_task_filter()"> 157 <option value="all"<?php echo ($filter_by == "all")? 'selected':""?>><?php echo esc_html_e('All','taskbuilder');?></option> 158 <option value="todo" <?php echo ($filter_by == "todo")? 'selected':""?>><?php echo esc_html_e('Todo','taskbuilder');?></option> 159 <option value="inprogress" <?php echo ($filter_by == "inprogress")? 'selected':""?>><?php echo esc_html_e('In Progress','taskbuilder');?></option> 160 <option value="hold" <?php echo ($filter_by == "hold")? 'selected':""?>><?php echo esc_html_e('Hold','taskbuilder');?></option> 161 <option value="completed" <?php echo ($filter_by == "completed")? 'selected':""?>><?php echo esc_html_e('Completed','taskbuilder');?></option> 162 <option value="mine" <?php echo ($filter_by == "mine")? 'selected':""?>><?php echo esc_html_e('Mine','taskbuilder');?></option> 163 <option value="unassigned" <?php echo ($filter_by == "unassigned")? 'selected':""?>><?php echo esc_html_e('Unassigned','taskbuilder');?></option> 164 <option value="overdue" <?php echo ($filter_by == "overdue")? 'selected':""?>><?php echo esc_html_e('Overdue','taskbuilder');?></option> 165 </select> 166 </div> 167 <div class="wppm_display_submit"> 168 <div class="wppm-filter-actions"> 169 <span class="wppm-link" onclick="wppm_tl_reset_filter()"> <?php echo esc_html_e('Reset','taskbuilder');?></span> 170 </div> 171 </div> 172 </div> 173 <div class="col-sm-6"> 209 <div class="col-sm-12"> 174 210 <span id="wppm_grid_view_btn" onclick="wppm_view_task_search_filter(<?php echo esc_attr($page_no)?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/grid_view.svg'); ?>" alt="grid_view"><span><?php echo esc_html_e('Grid view','taskbuilder');?></span></span> 175 </div>211 </div> 176 212 </div> 177 213 <div id="wppm_task_table_container" class="wppm_task_table_container table-responsive"> … … 179 215 <thead> 180 216 <tr> 181 <th class="wppm_table_header" >217 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 182 218 <div id="wppm_task_name_container"> 183 <span id="wppm_task_name_th" ><?php echo esc_html_e('Task name','taskbuilder'); ?></span>219 <span id="wppm_task_name_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Task name','taskbuilder'); ?></span> 184 220 <img width="16" height="16" style = "<?php echo ($sort_by == 'task_name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('task_name','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_task_name_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 185 221 <img width="16" height="16" style = "<?php echo ($sort_by == 'task_name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('task_name','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_task_name_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 186 222 </div> 187 223 </th> 188 <th class="wppm_table_header" >189 <span id="wppm_project_name_th" ><?php echo esc_html_e('Project','taskbuilder'); ?></span>224 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 225 <span id="wppm_project_name_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Project','taskbuilder'); ?></span> 190 226 <img width="16" height="16" style = "<?php echo ($sort_by == 'proj.project_name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('project','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_project_list_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 191 227 <img width="16" height="16" style = "<?php echo ($sort_by == 'proj.project_name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('project','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_project_list_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 192 228 </th> 193 <th class="wppm_table_header" >194 <span id="wppm_status_th" ><?php echo esc_html_e('Status','taskbuilder'); ?></span>229 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 230 <span id="wppm_status_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Status','taskbuilder'); ?></span> 195 231 <img width="16" height="16" style = "<?php echo ($sort_by == 'task_statuses.name' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('status','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_status_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 196 232 <img width="16" height="16" style = "<?php echo ($sort_by == 'task_statuses.name' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('status','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_status_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 197 233 </th> 198 <th class="wppm_table_header" >199 <span id="wppm_priority_th" ><?php echo esc_html_e('Priority','taskbuilder'); ?></span>234 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 235 <span id="wppm_priority_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Priority','taskbuilder'); ?></span> 200 236 <img width="16" height="16" style = "<?php echo ($sort_by == ('task_priorities.name') && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('priority','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_priority_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 201 237 <img width="16" height="16" style = "<?php echo ($sort_by == ('task_priorities.name') && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('priority','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_priority_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 202 238 </th> 203 239 <?php if($wppm_default_task_date == 1) { ?> 204 <th class="wppm_table_header" >205 <span id="wppm_start_date_th" ><?php echo esc_html_e('Start date','taskbuilder'); ?></span>240 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 241 <span id="wppm_start_date_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Start date','taskbuilder'); ?></span> 206 242 <img width="16" height="16" style = "<?php echo ($sort_by == 'Task.start_date' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('start_date','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_start_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 207 243 <img width="16" height="16" style = "<?php echo ($sort_by == 'Task.start_date' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('start_date','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_start_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 208 244 </th> 209 <th class="wppm_table_header" >210 <span id="wppm_end_date_th" ><?php echo esc_html_e('End date','taskbuilder'); ?></span>245 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 246 <span id="wppm_end_date_th" style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('End date','taskbuilder'); ?></span> 211 247 <img width="16" height="16" style = "<?php echo ($sort_by == 'Task.end_date' && $order == 'DESC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('end_date','ASC')" class="wppm_chevron_img" id="wppm_chevron_sort_up_end_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_up_icon.svg'); ?>" alt="chevron_sort_up_icon"> 212 248 <img width="16" height="16" style = "<?php echo ($sort_by == 'Task.end_date' && $order == 'ASC') ? 'display:inline': 'display:none;'?>" onclick="wppm_sort_up_task_list('end_date','DESC')" onclick="wppm_sort_up_task_list('end_date','DESC')" class="wppm_chevron_img" id="wppm_chevron_sort_down_end_date_img" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/sort_down_icon.svg'); ?>" alt="chevron_sort_down_icon"> 213 249 </th> 214 250 <?php } ?> 215 <th class="wppm_table_header" >216 < ?php echo esc_html_e('Assign To','taskbuilder'); ?>251 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 252 <span style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Assign To','taskbuilder'); ?></span> 217 253 </th> 218 <th class="wppm_table_header" >219 < ?php echo esc_html_e('Progress','taskbuilder'); ?>254 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"> 255 <span style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('Progress','taskbuilder'); ?></span> 220 256 </th> 221 257 <?php do_action('wppm_table_header');?> … … 380 416 </div> 381 417 </form> 418 <style> 419 .select2-selection--single { 420 height: 30px!important; 421 } 422 .select2-dropdown:hover { 423 color: #23527c!important;; 424 } 425 .select2-results__options{ 426 font:15px "Helvetica Neue",Arial,Helvetica,sans-serif !important; 427 margin: 0!important; 428 line-height: inherit!important; 429 } 430 .select2-selection__rendered{ 431 font:15px "Helvetica Neue",Arial,Helvetica,sans-serif !important; 432 margin-top: 5px!important; 433 } 434 .select2-selection__rendered:hover{ 435 color: #2271b1 !important; 436 } 437 .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{ 438 background-color: #e85f08!important; 439 color: white !important; 440 } 441 .select2-container { 442 max-width: 150px !important; 443 min-width: 150px !important; 444 } 445 #wppm_task_filter{ 446 min-height: 30px !important; 447 max-height: 35px !important; 448 } 449 #wppm_task_table tr:nth-child(even) td{ 450 background-color:<?php echo esc_attr($appearance_settings['list-item-even-background-color'])?>; 451 color:<?php echo esc_attr($appearance_settings['list-item-even-text-color'])?>; 452 } 453 #wppm_task_table tr:nth-child(odd) td{ 454 background-color:<?php echo esc_attr($appearance_settings['list-item-odd-background-color'])?>; 455 color:<?php echo esc_attr($appearance_settings['list-item-odd-text-color'])?>; 456 } 457 #wppm_task_table tr:hover td{ 458 background-color:<?php echo esc_attr($appearance_settings['list-item-hover-background-color'])?>; 459 } 460 #wppm_task_table tr:hover td{ 461 color: <?php echo esc_attr($appearance_settings['list-item-hover-text-color'])?>; 462 } 463 #wppm_add_new_task_btn_tl:hover{ 464 background-color:<?php echo esc_attr($appearance_settings['list-header-button-hover-color'])?>!important; 465 } 466 </style> 382 467 <script type="text/javascript"> 383 468 var link = true; … … 415 500 416 501 }) 502 jQuery('#wppm_task_list_proj_filter').select2({ dropdownAutoWidth: true, width: 'auto' }); 503 jQuery('#wppm_task_list_proj_filter').val(<?php echo esc_attr($proj_filter) ?>); 504 417 505 </script> 418 506 -
taskbuilder/trunk/includes/class-wppm-admin.php
r2951988 r3079882 12 12 add_action( 'admin_enqueue_scripts', array( $this, 'loadScripts') ); 13 13 add_action( 'admin_menu', array($this,'wppm_register_dashboard_menu') ); 14 // add_action( 'admin_init',array($this,'wppm_appearance_setting_tab') ); 14 15 add_action( 'wp_ajax_wppm_add_new_project',array($this,'wppm_add_new_project')); 15 16 add_action( 'wp_ajax_wppm_open_project',array($this,'wppm_open_project')); … … 63 64 add_action('wp_ajax_wppm_submit_task_comment',array($this,'wppm_submit_task_comment')); 64 65 add_action('wp_ajax_wppm_upload_file',array($this,'wppm_upload_file')); 66 add_action('wp_ajax_wppm_upload_proj_attach_file',array($this,'wppm_upload_file')); 65 67 add_action('wp_ajax_wppm_get_en_general_setting',array($this,'wppm_get_en_general_setting')); 66 68 add_action('wp_ajax_wppm_set_en_general_settings',array($this,'wppm_set_en_general_settings')); … … 73 75 add_action('wp_ajax_wppm_set_change_task_details',array($this,'wppm_set_change_task_details')); 74 76 add_action('wp_ajax_wppm_edit_task_thread',array($this,'wppm_edit_task_thread')); 77 add_action('wp_ajax_wppm_edit_proj_thread',array($this,'wppm_edit_proj_thread')); 75 78 add_action('wp_ajax_wppm_set_edit_task_thread',array($this,'wppm_set_edit_task_thread')); 79 add_action('wp_ajax_wppm_set_edit_proj_thread',array($this,'wppm_set_edit_proj_thread')); 76 80 add_action('wp_ajax_wppm_delete_task_thread',array($this,'wppm_delete_task_thread')); 81 add_action('wp_ajax_wppm_delete_proj_thread',array($this,'wppm_delete_proj_thread')); 77 82 add_action('wp_ajax_wppm_set_delete_thread',array($this,'wppm_set_delete_thread')); 83 add_action('wp_ajax_wppm_set_delete_proj_thread',array($this,'wppm_set_delete_proj_thread')); 78 84 add_action('wp_ajax_wppm_edit_project_details',array($this,'wppm_edit_project_details')); 79 85 add_action('wp_ajax_wppm_set_change_project_details',array($this,'wppm_set_change_project_details')); … … 97 103 add_action('wppm_after_project_created',array($this,'wppm_en_project_created'),100,1); 98 104 add_action('wppm_after_submit_task_comment',array($this,'wppm_en_submit_task_comment'),10,2); 105 add_action('wppm_after_submit_proj_comment',array($this,'wppm_en_submit_proj_comment'),10,2); 99 106 add_action('wp_ajax_wppm_set_general_settings',array($this,'wppm_set_general_settings')); 100 107 add_action('wp_ajax_wppm_get_project_tasks',array($this,'wppm_get_project_tasks')); 101 add_action('wp_ajax_wppm_remove_thread_attachment',array($this,'wppm_remove_thread_attachment'),10,3); 108 add_action('wp_ajax_wppm_remove_thread_attachment',array($this,'wppm_remove_thread_attachment'),10,5); 109 add_action('wp_ajax_wppm_remove_proj_thread_attachment',array($this,'wppm_remove_proj_thread_attachment'),10,4); 102 110 add_action('wp_ajax_wppm_remove_checklist_item',array($this,'wppm_remove_checklist_item'),10,4); 103 111 add_action('wp_ajax_wppm_clone_task',array($this,'wppm_clone_task'),10,1); 104 add_action('wp_ajax_wppm_set_clone_task',array($this,'wppm_set_clone_task'),10, 2);112 add_action('wp_ajax_wppm_set_clone_task',array($this,'wppm_set_clone_task'),10,4); 105 113 add_action('wp_ajax_wppm_get_advanced_settings',array($this,'wppm_get_advanced_settings')); 106 114 add_action('wp_ajax_wppm_set_advanced_settings',array($this,'wppm_set_advanced_settings')); 115 add_action('wp_ajax_wppm_get_appearance_settings',array($this,'wppm_get_appearance_settings')); 107 116 add_action('wp_ajax_wppm_get_project_visibility',array($this,'wppm_get_project_visibility'),10,1); 108 117 add_action('wp_ajax_wppm_change_project_visibility',array($this,'wppm_change_project_visibility'),10,2); 118 add_action('wp_ajax_wppm_submit_proj_comment',array($this,'wppm_submit_proj_comment')); 119 add_action('wp_ajax_wppm_set_change_task_start_date',array($this,'wppm_set_change_task_start_date')); 120 add_action('wp_ajax_wppm_set_change_task_end_date',array($this,'wppm_set_change_task_end_date')); 121 add_action('wp_ajax_wppm_set_change_proj_start_date',array($this,'wppm_set_change_proj_start_date')); 122 add_action('wp_ajax_wppm_set_change_proj_end_date',array($this,'wppm_set_change_proj_end_date')); 123 add_action('wp_ajax_wppm_get_ap_proj_list',array($this,'wppm_get_ap_proj_list')); 124 add_action('wp_ajax_wppm_set_ap_proj_list',array($this,'wppm_set_ap_proj_list')); 125 add_action('wp_ajax_wppm_get_ap_task_list',array($this,'wppm_get_ap_task_list')); 126 add_action('wp_ajax_wppm_set_ap_task_list',array($this,'wppm_set_ap_task_list')); 127 add_action('wp_ajax_wppm_reset_ap_proj_list',array($this,'wppm_reset_ap_proj_list')); 128 add_action('wp_ajax_wppm_reset_ap_task_list',array($this,'wppm_reset_ap_task_list')); 129 add_action('wp_ajax_wppm_get_ap_individual_proj',array($this,'wppm_get_ap_individual_proj')); 130 add_action('wp_ajax_wppm_set_ap_individual_proj',array($this,'wppm_set_ap_individual_proj')); 131 add_action('wp_ajax_wppm_reset_ap_individual_proj',array($this,'wppm_reset_ap_individual_proj')); 132 add_action('wp_ajax_wppm_get_ap_individual_task',array($this,'wppm_get_ap_individual_task')); 133 add_action('wp_ajax_wppm_set_ap_individual_task',array($this,'wppm_set_ap_individual_task')); 134 add_action('wp_ajax_wppm_reset_ap_individual_task',array($this,'wppm_reset_ap_individual_task')); 135 add_action('wp_ajax_wppm_get_ap_modal_popup',array($this,'wppm_get_ap_modal_popup')); 136 add_action('wp_ajax_wppm_set_ap_modal_popup',array($this,'wppm_set_ap_modal_popup')); 137 add_action('wp_ajax_wppm_reset_ap_modal_popup',array($this,'wppm_reset_ap_modal_popup')); 138 add_action('wp_ajax_wppm_get_ap_grid_view',array($this,'wppm_get_ap_grid_view')); 139 add_action('wp_ajax_wppm_set_ap_grid_view',array($this,'wppm_set_ap_grid_view')); 140 add_action('wp_ajax_wppm_reset_ap_grid_view',array($this,'wppm_reset_ap_grid_view')); 141 add_action('wp_ajax_wppm_get_ap_settings',array($this,'wppm_get_ap_settings')); 142 add_action('wp_ajax_wppm_set_ap_settings',array($this,'wppm_set_ap_settings')); 143 add_action('wp_ajax_wppm_reset_ap_settings',array($this,'wppm_reset_ap_settings')); 109 144 } 110 145 … … 237 272 238 273 } 239 274 240 275 public function wppm_projects(){ 241 276 include WPPM_ABSPATH.'includes/admin/projects/projects.php'; … … 567 602 } 568 603 604 public function wppm_edit_proj_thread(){ 605 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_edit_project_thread.php'; 606 die(); 607 } 608 569 609 public function wppm_set_edit_task_thread(){ 570 610 include WPPM_ABSPATH.'includes/admin/tasks/open_task/wppm_set_edit_task_thread.php'; … … 572 612 } 573 613 614 public function wppm_set_edit_proj_thread(){ 615 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_set_edit_proj_thread.php'; 616 die(); 617 } 618 574 619 public function wppm_delete_task_thread(){ 575 620 include WPPM_ABSPATH.'includes/admin/tasks/open_task/wppm_delete_task_thread.php'; … … 577 622 } 578 623 624 public function wppm_delete_proj_thread(){ 625 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_delete_proj_thread.php'; 626 die(); 627 } 628 579 629 public function wppm_set_delete_thread(){ 580 630 include WPPM_ABSPATH.'includes/admin/tasks/open_task/wppm_set_delete_thread.php'; 631 die(); 632 } 633 634 public function wppm_set_delete_proj_thread(){ 635 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_set_delete_proj_thread.php'; 581 636 die(); 582 637 } … … 671 726 } 672 727 728 public function wppm_en_submit_proj_comment($proj_id,$comment_id){ 729 include WPPM_ABSPATH.'includes/admin/email_notifications/wppm_en_submit_proj_comment.php'; 730 } 731 673 732 public function wppm_en_task_created($task_id){ 674 733 include WPPM_ABSPATH.'includes/admin/email_notifications/wppm_en_task_created.php'; … … 690 749 } 691 750 751 public function wppm_remove_proj_thread_attachment(){ 752 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_proj_thread_attachment_remove.php'; 753 die(); 754 } 755 692 756 public function wppm_remove_checklist_item(){ 693 757 include WPPM_ABSPATH.'includes/admin/tasks/open_task/checklist/wppm_remove_checklist_item.php'; … … 719 783 } 720 784 785 public function wppm_get_appearance_settings(){ 786 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_appearance_settings.php'; 787 die(); 788 } 789 790 public function wppm_get_ap_proj_list(){ 791 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_proj_list.php'; 792 die(); 793 } 794 795 public function wppm_get_ap_individual_proj(){ 796 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_individual_proj.php'; 797 die(); 798 } 799 800 public function wppm_get_ap_individual_task(){ 801 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_individual_task.php'; 802 die(); 803 } 804 805 public function wppm_set_ap_proj_list(){ 806 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_proj_list.php'; 807 die(); 808 } 809 810 public function wppm_reset_ap_proj_list(){ 811 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_proj_list.php'; 812 die(); 813 } 814 721 815 public function wppm_get_project_visibility(){ 722 816 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_get_project_visibility.php'; … … 728 822 die(); 729 823 } 824 825 public function wppm_submit_proj_comment(){ 826 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_submit_project_comment.php'; 827 die(); 828 } 829 830 public function wppm_set_change_task_start_date(){ 831 include WPPM_ABSPATH.'includes/admin/tasks/open_task/wppm_set_change_task_start_date.php'; 832 die(); 833 } 834 835 public function wppm_set_change_task_end_date(){ 836 include WPPM_ABSPATH.'includes/admin/tasks/open_task/wppm_set_change_task_end_date.php'; 837 die(); 838 } 839 840 public function wppm_set_change_proj_start_date(){ 841 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_set_change_proj_start_date.php'; 842 die(); 843 } 844 845 public function wppm_set_change_proj_end_date(){ 846 include WPPM_ABSPATH.'includes/admin/projects/open_project/wppm_set_change_proj_end_date.php'; 847 die(); 848 } 849 850 public function wppm_get_ap_task_list(){ 851 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_task_list.php'; 852 die(); 853 } 854 855 public function wppm_set_ap_task_list(){ 856 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_task_list.php'; 857 die(); 858 } 859 860 public function wppm_reset_ap_task_list(){ 861 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_task_list.php'; 862 die(); 863 } 864 865 public function wppm_set_ap_individual_proj(){ 866 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_individual_proj.php'; 867 die(); 868 } 869 870 public function wppm_set_ap_individual_task(){ 871 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_individual_task.php'; 872 die(); 873 } 874 875 public function wppm_reset_ap_individual_proj(){ 876 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_individual_proj.php'; 877 die(); 878 } 879 880 public function wppm_reset_ap_individual_task(){ 881 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_individual_task.php'; 882 die(); 883 } 884 885 public function wppm_reset_ap_modal_popup(){ 886 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_modal_popup.php'; 887 die(); 888 } 889 890 public function wppm_get_ap_modal_popup(){ 891 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_modal_popup.php'; 892 die(); 893 } 894 895 public function wppm_set_ap_modal_popup(){ 896 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_modal_popup.php'; 897 die(); 898 } 899 900 public function wppm_get_ap_grid_view(){ 901 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_grid_view.php'; 902 die(); 903 } 904 905 public function wppm_set_ap_grid_view(){ 906 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_grid_view.php'; 907 die(); 908 } 909 910 public function wppm_reset_ap_grid_view(){ 911 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_grid_view.php'; 912 die(); 913 } 914 915 public function wppm_get_ap_settings(){ 916 include WPPM_ABSPATH.'includes/admin/settings/wppm_get_ap_settings.php'; 917 die(); 918 } 919 920 public function wppm_set_ap_settings(){ 921 include WPPM_ABSPATH.'includes/admin/settings/wppm_set_ap_settings.php'; 922 die(); 923 } 924 925 public function wppm_reset_ap_settings(){ 926 include WPPM_ABSPATH.'includes/admin/settings/wppm_reset_ap_settings.php'; 927 die(); 928 } 929 730 930 } 731 931 -
taskbuilder/trunk/includes/class-wppm-functions.php
r2951988 r3079882 92 92 } 93 93 94 public static function wppm_submit_proj_comment($args){ 95 global $wpdb; 96 $wpdb->insert($wpdb->prefix.'wppm_project_comment',$args); 97 $comment_id = $wpdb->insert_id; 98 return $comment_id; 99 } 100 94 101 // Random string 95 102 public static function getRandomString($length = 8) { … … 257 264 } 258 265 return apply_filters( 'wppm_has_comment_permission', $response, $task_id, $comment_id, $permission ); 266 } 267 268 public function has_proj_comment_permission($permission, $proj_id,$comment_id){ 269 global $current_user,$wppmfunction,$wpdb; 270 if(empty($comment_id)){ 271 $comment_id = 0; 272 } 273 $project_user = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_users WHERE proj_id = $proj_id AND user_id = $current_user->ID"); 274 $project_users = $wpdb->get_var("SELECT users FROM {$wpdb->prefix}wppm_project WHERE id = $proj_id"); 275 $project_users_arr = explode(',',(string)$project_users); 276 $proj_comment = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_comment WHERE proj_id = $proj_id AND id = $comment_id"); 277 $response = false; 278 $flag = false; 279 if((!empty($project_user)) && ($project_user->role_id == 1) && in_array($current_user->ID,$project_users_arr)){ 280 $flag= true; 281 } 282 switch ($permission) { 283 case 'delete_proj_thread': 284 case 'edit_proj_comment': 285 (($flag==true) || ($current_user->ID == $proj_comment->created_by)) ? $response = true: $response = false; 286 break; 287 } 288 return apply_filters( 'wppm_has_proj_comment_permission', $response, $proj_id, $comment_id, $permission ); 259 289 } 260 290 … … 415 445 } 416 446 447 public function get_proj_comment($comment_id){ 448 global $wpdb; 449 $project_comment_data = array(); 450 $project_comment = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_comment WHERE id=$comment_id "); 451 if( $project_comment ){ 452 $project_comment_data = json_decode(json_encode($project_comment), true); 453 } 454 return $project_comment_data; 455 } 456 417 457 public function change_task_comment($comment_id,$comment_body){ 418 458 global $wpdb; … … 422 462 $wpdb->update($wpdb->prefix.'wppm_task_comment', $values, array('id'=>$comment_id)); 423 463 } 464 465 public function change_proj_comment($comment_id,$comment_body){ 466 global $wpdb; 467 $values=array( 468 'body'=>$comment_body 469 ); 470 $wpdb->update($wpdb->prefix.'wppm_project_comment', $values, array('id'=>$comment_id)); 471 } 472 424 473 public function change_project_label($project_id,$project_label){ 425 474 global $wpdb; … … 496 545 'change_task_assign_users' => __('Change Task Assign Users','taskbuilder'), 497 546 'new_discussion' => __('New Comment','taskbuilder'), 547 'new_proj_discussion' =>__('New Project Comment','taskbuilder') 498 548 ); 499 549 return apply_filters('wppm_en_types',$notification_types); … … 665 715 public function get_project_category_name($cat_id){ 666 716 global $wpdb; 667 $cat_name = $wpdb->get_var("SELECT name FROM {$wpdb->prefix}wppm_project_categories WHERE id ='$cat_id'"); 717 if(!empty($cat_id)){ 718 $cat_name = $wpdb->get_var("SELECT name FROM {$wpdb->prefix}wppm_project_categories WHERE id ='$cat_id'"); 719 }else{ 720 $cat_name = ""; 721 } 668 722 return $cat_name; 669 723 } … … 760 814 } 761 815 762 public function create_duplicate_task($ptask_id, $project_id ){816 public function create_duplicate_task($ptask_id, $project_id,$ajax_nonce){ 763 817 include WPPM_ABSPATH . 'includes/admin/tasks/open_task/wppm_set_clone_task.php'; 818 } 819 820 public function get_last_comment_proj_user_name($project_id){ 821 global $wpdb; 822 $proj_comment_creator = $wpdb->get_var("SELECT created_by FROM {$wpdb->prefix}wppm_project_comment WHERE (id=(select MAX(id) from {$wpdb->prefix}wppm_project_comment) AND proj_id = $project_id)"); 823 if(!empty($proj_comment_creator)){ 824 $user = get_userdata( $proj_comment_creator ); 825 return $user->display_name; 826 } 827 } 828 829 public function get_proj_comment_body($project_id){ 830 global $wpdb; 831 $proj_comment = $wpdb->get_var("SELECT body FROM {$wpdb->prefix}wppm_project_comment WHERE (id=(select MAX(id) from {$wpdb->prefix}wppm_project_comment) AND proj_id = $project_id)"); 832 return $proj_comment; 764 833 } 765 834 } -
taskbuilder/trunk/includes/frontend/shortcode.php
r3042496 r3079882 28 28 wp_enqueue_script('wppm-datatable-js'); 29 29 wp_enqueue_script('wppm-datatable-css'); 30 $settings = get_option("wppm-ap-modal"); 30 31 ?> 31 32 <div class="wppm_bootstrap"> … … 54 55 </div> 55 56 </div> 57 <style> 58 #wppm_popup_title{ 59 background-color: <?php echo esc_attr($settings['header-bg-color'])?>; 60 } 61 #wppm_popup_title h3{ 62 color:<?php echo esc_attr( $settings['header-text-color'])?>; 63 } 64 #wppm_popup_body{ 65 background-color: <?php echo esc_attr($settings['body-bg-color'])?>!important; 66 } 67 #wppm_popup_body label{ 68 color:<?php echo esc_attr( $settings['body-label-color'])?>; 69 } 70 #wppm_popup_body input{ 71 color:<?php echo esc_attr( $settings['body-text-color'])?>; 72 } 73 #wppm_popup_body select{ 74 color:<?php echo esc_attr( $settings['body-text-color'])?>; 75 } 76 #wppm_popup_body span { 77 color:<?php echo esc_attr( $settings['body-text-color'])?>; 78 } 79 #wppm_popup_body .select2-results__options { 80 color:<?php echo esc_attr( $settings['body-text-color'])?>; 81 } 82 #wppm_popup_footer{ 83 background-color: <?php echo esc_attr($settings['footer-bg-color'])?>!important; 84 } 85 .wppm_popup_action{ 86 background-color: <?php echo esc_attr($settings['action-btn-bg-color'])?>!important; 87 color:<?php echo esc_attr( $settings['action-btn-text-color'])?>!important; 88 } 89 </style> 56 90 <!-- Pop-up snippet end --> 57 91 <?php -
taskbuilder/trunk/includes/frontend/wppm_tasks_shortcode.php
r3042496 r3079882 24 24 wp_enqueue_script('wppm-gpopover-js'); 25 25 wp_enqueue_script('wppm-dragula-js'); 26 $ task_list_view = get_option('wppm_default_task_list_view');26 $settings = get_option("wppm-ap-modal"); 27 27 ?> 28 28 <div class="wppm_bootstrap"> … … 51 51 </div> 52 52 </div> 53 <style> 54 #wppm_popup_title{ 55 background-color: <?php echo esc_attr($settings['header-bg-color'])?>; 56 } 57 #wppm_popup_title h3{ 58 color:<?php echo esc_attr( $settings['header-text-color'])?>; 59 } 60 #wppm_popup_body{ 61 background-color: <?php echo esc_attr($settings['body-bg-color'])?>!important; 62 } 63 #wppm_popup_body label{ 64 color:<?php echo esc_attr( $settings['body-label-color'])?>; 65 } 66 #wppm_popup_body input{ 67 color:<?php echo esc_attr( $settings['body-text-color'])?>; 68 } 69 #wppm_popup_body select{ 70 color:<?php echo esc_attr( $settings['body-text-color'])?>; 71 } 72 #wppm_popup_body span { 73 color:<?php echo esc_attr( $settings['body-text-color'])?>; 74 } 75 #wppm_popup_body .select2-results__options { 76 color:<?php echo esc_attr( $settings['body-text-color'])?>; 77 } 78 </style> 53 79 <!-- Pop-up snippet end --> 54 80 <?php … … 134 160 dataform.append("sort_by", 'task_name'); 135 161 dataform.append("order", 'ASC'); 162 dataform.append("wppm_proj_filter",0); 136 163 <?php echo do_action('wppm_tl_reset_filter_dataform');?> 137 164 jQuery.ajax( { … … 261 288 dataform.append("sort_by", "task_name"); 262 289 dataform.append("order", "ASC"); 290 dataform.append("wppm_proj_filter","0"); 263 291 jQuery.ajax( { 264 292 url: wppm_admin.ajax_url, -
taskbuilder/trunk/includes/replace_macro.php
r2611331 r3079882 8 8 $project_id = intval(sanitize_text_field($project_id)); 9 9 $wppm_project_data = $wppmfunction->get_project($project_id); 10 $wppm_proj_comment = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_project_comment where proj_id='".$project_id."' ORDER BY id DESC LIMIT 1;"); 11 $attachments = array(); 12 $auth_id = $wppmfunction->get_project_meta($project_id,'project_auth_code',true); 13 if(!empty($wppm_proj_comment)){ 14 $attachments = explode(',',$wppm_proj_comment->attachment_ids); 15 } 10 16 preg_match_all("/{[^}]*}/" ,$str,$matches); 11 17 $matches = array_unique($matches[0]); 18 $flag =false; 12 19 foreach($matches as $match){ 13 20 switch($match){ … … 34 41 // Project Category 35 42 case '{project_category}': 36 $str = preg_replace('/{project_category}/', $this->get_project_category_name(sanitize_text_field($wppm_project_data['cat_id'])), $str); 43 if(!empty($wppm_project_data['cat_id'])){ 44 $str = preg_replace('/{project_category}/', $this->get_project_category_name(sanitize_text_field($wppm_project_data['cat_id'])), $str); 45 }else{ 46 $str = ""; 47 } 48 37 49 break; 38 50 // Project Name … … 62 74 $str = preg_replace('/{date_created}/', get_date_from_gmt(sanitize_text_field($wppm_project_data['date_created'] )), $str); 63 75 break; 76 //Last comment user name 77 case '{last_proj_comment_user_name}': 78 $str = preg_replace('/{last_proj_comment_user_name}/', $this->get_last_comment_proj_user_name($project_id), $str); 79 break; 80 //Last comment body 81 case '{proj_comment_body}': 82 $flag= true; 83 $str = preg_replace('/{proj_comment_body}/', $this->get_proj_comment_body($project_id), $str); 84 break; 85 64 86 // Project Description 65 87 case '{project_description}': 66 $str = preg_replace('/{project_description}/', sanitize_text_field($wppm_project_data['description']), $str); 67 68 88 $str = preg_replace('/{project_description}/', sanitize_text_field($wppm_project_data['description']), $str); 89 } 90 } 91 if($flag == true){ 92 if(!empty($attachments)){ 93 foreach($attachments as $attach_id){ 94 $upload_dir = wp_upload_dir(); 95 $attachment = $wpdb->get_row("select * from {$wpdb->prefix}wppm_attachments where id='".$attach_id."'"); 96 if(!empty($attachment)){ 97 $updated_time = sanitize_text_field($attachment->date_created); 98 $time = strtotime(sanitize_text_field($updated_time)); 99 $month = date("m",$time); 100 $year = date("Y",$time); 101 $findStr = ".txt"; 102 $attachment_name = preg_replace('/' . $findStr . '/', "", sanitize_file_name($attachment->name), 1); 103 $file_url = $upload_dir['basedir'] . '/wppm/'.'/'.$year.'/'.$month.'/'. $attachment_name; 104 $download_url = home_url('/').'?wppm_attachment='.sanitize_text_field($attachment->id).'&pid='.sanitize_text_field($project_id).'&pac='.sanitize_text_field($auth_id); 105 $attach_url[] = '<a style="text-decoration:none;" href="'.$download_url.'" target="_blank">'.sanitize_file_name($attachment->file_name).'</a>'; 106 }else{ 107 $attach_url= array(); 108 } 109 } 110 $str = $str.implode("<br>",$attach_url); 69 111 } 70 112 } -
taskbuilder/trunk/includes/wppm-install.php
r3035644 r3079882 141 141 );"; 142 142 dbDelta( $sql ); 143 $sql = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wppm_project_comment ( 144 id integer NOT NULL AUTO_INCREMENT, 145 proj_id integer, 146 body LONGTEXT NULL DEFAULT NULL, 147 attachment_ids TINYTEXT NULL DEFAULT NULL, 148 create_time datetime, 149 created_by integer, 150 PRIMARY KEY (id) 151 );"; 152 dbDelta( $sql ); 143 153 $sql = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}wppm_attachments ( 144 154 id BIGINT NOT NULL AUTO_INCREMENT, … … 273 283 update_option('wppm_task_time',1); 274 284 } 285 if($installed_version < '3.0.0'){ 286 $wppm_email_notificatins = get_option('wppm_email_notification'); 287 if(!empty($wppm_email_notificatins) && !isset($wppm_email_notificatins[8])){ 288 $wppm_email_notificatins[8] = array( 289 'type'=>'new_proj_discussion', 290 'subject'=>__('[{project_name}] {last_proj_comment_user_name} started new discussion:','taskbuilder'), 291 'body'=>__('<p><strong>{last_proj_comment_user_name}</strong> wrote:</p> <p>{proj_comment_body}</p>','taskbuilder'), 292 'recipients'=>array(1,2) 293 ); 294 update_option('wppm_email_notification',$wppm_email_notificatins); 295 } 296 update_option( 297 'wppm-ap-project-list', 298 array( 299 'list-header-background-color' => '#304FFE', 300 'list-header-text-color' => '#fff', 301 'list-item-odd-background-color' => '#fff', 302 'list-item-odd-text-color' => '#2C3E50', 303 'list-item-even-background-color' => '#F2F2F2', 304 'list-item-even-text-color' => '#2C3E50', 305 'list-item-hover-background-color' => '#F5F5F5', 306 'list-item-hover-text-color' => '#2C3E50' 307 ) 308 ); 309 update_option( 310 'wppm-ap-task-list', 311 array( 312 'list-header-button-background-color'=>'#0052CC', 313 'list-header-button-hover-color' =>'#0065ff', 314 'list-header-button-text-color' =>'#fff', 315 'list-header-background-color' => '#304FFE', 316 'list-header-text-color' => '#fff', 317 'list-item-odd-background-color' => '#fff', 318 'list-item-odd-text-color' => '#2C3E50', 319 'list-item-even-background-color' => '#F2F2F2', 320 'list-item-even-text-color' => '#2C3E50', 321 'list-item-hover-background-color' => '#F5F5F5', 322 'list-item-hover-text-color' => '#2C3E50', 323 ) 324 ); 325 update_option( 326 'wppm-ap-individual-project', 327 array( 328 'menu-button-bg-color' =>'#0052CC', 329 'menu-button-hover-color' =>'#0065ff', 330 'menu-button-text-color' =>'#fff', 331 'comment-primary-color' => '#000000', 332 'comment-secondary-color' => '#4e4e4e', 333 'comment-date-color' => '#a8aeb5', 334 'comment-date-hover-color' => '#000000', 335 'comment-send-btn-bg-color' => '#5067c5', 336 'comment-send-btn-color' => '#ffffff', 337 'widget-header-bg-color' => '#ffffff', 338 'widget-header-text-color' => '#2C3E50', 339 'widget-body-bg-color' => '#ffffff', 340 'widget-body-label-color' => '#9c9c9c', 341 'widget-body-text-color' => '#2C3E50', 342 ) 343 ); 344 update_option( 345 'wppm-ap-individual-task', 346 array( 347 'comment-primary-color' => '#000000', 348 'comment-secondary-color' => '#4e4e4e', 349 'comment-date-color' => '#a8aeb5', 350 'comment-date-hover-color' => '#000000', 351 'comment-send-btn-bg-color' => '#5067c5', 352 'comment-send-btn-color' => '#ffffff', 353 'widget-header-bg-color' => '#ffffff', 354 'widget-header-text-color' => '#2C3E50', 355 'widget-body-bg-color' => '#ffffff', 356 'widget-body-label-color' => '#9c9c9c', 357 'widget-body-text-color' => '#2C3E50', 358 ) 359 ); 360 update_option( 361 'wppm-ap-modal', 362 array( 363 'header-bg-color' => '#ffffff', 364 'header-text-color' => '#3c434a', 365 'body-bg-color' => '#fff', 366 'body-label-color' => '#3c434a', 367 'body-text-color' => '#555', 368 'footer-bg-color' => '#F6F6F6', 369 'action-btn-bg-color' =>'#306EFF', 370 'action-btn-text-color'=>'#fff', 371 'z-index' => 900000000, 372 ) 373 ); 374 update_option( 375 'wppm-ap-grid-view', 376 array( 377 'menu-button-bg-color' =>'#0052CC', 378 'menu-button-hover-color' =>'#0065ff', 379 'menu-button-text-color' =>'#fff', 380 'grid-background-color' => '#fff', 381 'grid-header-text-color' => '#2C3E50' 382 ) 383 ); 384 update_option( 385 'wppm-ap-settings', 386 array( 387 'tab-background-color' => '#0052CC', 388 'tab-text-color' => '#fff', 389 'add-new-button-bg-color' =>'#0052CC', 390 'add-new-button-text-color' =>'#fff', 391 'add-new-button-hover-color'=>'#0065ff', 392 'save-changes-button-bg-color'=>'#306EFF', 393 'save-changes-button-text-color'=>'#fff' 394 ) 395 ); 396 } 275 397 // update wppm_version option to plugin version 276 398 update_option( 'wppm_version', WPPM_VERSION ); -
taskbuilder/trunk/readme.txt
r3042496 r3079882 4 4 Tags: project,task,project management,task management,project manager,wordpress project management,task manager,CRM,Kanban board,management,bug tracker,issue tracker 5 5 Requires at least: 4.4 6 Tested up to: 6. 4.37 Stable tag: 2.0.96 Tested up to: 6.5.2 7 Stable tag: 3.0.0 8 8 License: GPL v3 9 9 … … 38 38 - **Custom Priorities**: You can create unlimited custom priorities for tasks. 39 39 - **Custom Categories**: You can create unlimited custom categories for projects. 40 - **Appearance Setting**: Customizable Appearance to match up with your theme. 40 41 41 42 … … 98 99 99 100 == Changelog == 101 = V 3.0.0(May 1,2024) = 102 * Compatible with WordPress v6.5.2. 103 * New: Appearance Setting(Customizable Appearance to match up with your theme). You can set setting in (Projects > Settings > Appearance). 104 * New: Project Comment. You can add comment in project like task. 105 * New: Project filter in task list(Task by project). 106 * New: Project start & end date clickable in open project. 107 * New: Task start & end date clickable in open Task. 108 * New: Project name added on kanban board. 109 * Fix: Php warning & notices. 110 * Fix: Some security fixes. 111 * Fix(Pro feature): Warning in Gantt Chart add-on. 112 * Fix(Pro feature): Public project's task not showing on calendar for co-worker. 113 100 114 = V 2.0.9(Feb 28,2024) = 101 115 * New: Hooks added. -
taskbuilder/trunk/taskbuilder.php
r3042496 r3079882 4 4 * Plugin URI: https://wordpress.org/plugins/taskbuilder/ 5 5 * Description: Wordpress Project & Task Management plugin. Easy to keep track of projects & tasks! 6 * Version: 2.0.96 * Version: 3.0.0 7 7 * Author: Taskbuilder Team 8 8 * Author URI: https://taskbuilder.net/ 9 9 * Requires at least: 4.4 10 * Tested up to: 6. 4.310 * Tested up to: 6.5.2 11 11 * Text Domain: taskbuilder 12 12 * Domain Path: /lang … … 20 20 21 21 final class WP_Taskbuilder { 22 public $version = ' 2.0.9';22 public $version = '3.0.0'; 23 23 public function __construct() { 24 24 // define global constants … … 90 90 } 91 91 } 92 if( isset($_REQUEST['wppm_attachment']) && isset($_REQUEST['pid']) && isset($_REQUEST['pac'])){ 93 $attach_id = intval(sanitize_text_field($_REQUEST['wppm_attachment'])); 94 $auth_code = (sanitize_text_field($_REQUEST['pac'])); 95 $proj_id = intval(sanitize_text_field($_REQUEST['pid'])); 96 $proj_auth_code = $wppmfunction->get_project_meta($proj_id,'project_auth_code',true); 97 $proj_auth_code = sanitize_text_field($proj_auth_code); 98 if($proj_auth_code == $auth_code){ 99 $this->wppm_file_download($attach_id); 100 } 101 } 92 102 } 93 103
Note: See TracChangeset
for help on using the changeset viewer.