Changeset 3157953
- Timestamp:
- 09/26/2024 06:54:40 AM (17 months ago)
- Location:
- atarim-visual-collaboration
- Files:
-
- 209 added
- 10 edited
-
tags/4.0.6 (added)
-
tags/4.0.6/atarim-visual-collaboration.php (added)
-
tags/4.0.6/css (added)
-
tags/4.0.6/css/admin-settings.css (added)
-
tags/4.0.6/css/admin.css (added)
-
tags/4.0.6/css/bootstrap.min.css (added)
-
tags/4.0.6/css/monolith.min.css (added)
-
tags/4.0.6/css/quill.css (added)
-
tags/4.0.6/css/wpf-common.css (added)
-
tags/4.0.6/css/wpf-icons.css (added)
-
tags/4.0.6/css/wpf-login.css (added)
-
tags/4.0.6/imagehelper.php (added)
-
tags/4.0.6/images (added)
-
tags/4.0.6/images/Atarim.svg (added)
-
tags/4.0.6/images/BG-pattern.png (added)
-
tags/4.0.6/images/Loader-slider-WPFeedback.svg (added)
-
tags/4.0.6/images/WPF-welcome_720.png (added)
-
tags/4.0.6/images/Websites-Mockup.png (added)
-
tags/4.0.6/images/app-project.svg (added)
-
tags/4.0.6/images/approved.svg (added)
-
tags/4.0.6/images/atarim-whitelabel.svg (added)
-
tags/4.0.6/images/atarim_favicon_white.svg (added)
-
tags/4.0.6/images/atarim_icon.svg (added)
-
tags/4.0.6/images/attachment.svg (added)
-
tags/4.0.6/images/auto-report.png (added)
-
tags/4.0.6/images/bell.svg (added)
-
tags/4.0.6/images/check-li.svg (added)
-
tags/4.0.6/images/checked.svg (added)
-
tags/4.0.6/images/comment.png (added)
-
tags/4.0.6/images/cross.svg (added)
-
tags/4.0.6/images/delete.svg (added)
-
tags/4.0.6/images/desktop.svg (added)
-
tags/4.0.6/images/docs.svg (added)
-
tags/4.0.6/images/edit-delete.png (added)
-
tags/4.0.6/images/enter.png (added)
-
tags/4.0.6/images/eye-off-white.svg (added)
-
tags/4.0.6/images/eye-off.svg (added)
-
tags/4.0.6/images/general.svg (added)
-
tags/4.0.6/images/global-settings.png (added)
-
tags/4.0.6/images/integrations-image.png (added)
-
tags/4.0.6/images/internal-task.png (added)
-
tags/4.0.6/images/link.svg (added)
-
tags/4.0.6/images/lock.svg (added)
-
tags/4.0.6/images/menu.svg (added)
-
tags/4.0.6/images/mobile.svg (added)
-
tags/4.0.6/images/multi-file.svg (added)
-
tags/4.0.6/images/no-pages.svg (added)
-
tags/4.0.6/images/no-task.svg (added)
-
tags/4.0.6/images/note.svg (added)
-
tags/4.0.6/images/nothingfound.svg (added)
-
tags/4.0.6/images/pdf.svg (added)
-
tags/4.0.6/images/placeholder-image.png (added)
-
tags/4.0.6/images/reg-logo.svg (added)
-
tags/4.0.6/images/responsive.svg (added)
-
tags/4.0.6/images/search.svg (added)
-
tags/4.0.6/images/share.svg (added)
-
tags/4.0.6/images/sidebar-left.svg (added)
-
tags/4.0.6/images/sidebarmenu.svg (added)
-
tags/4.0.6/images/tablet.svg (added)
-
tags/4.0.6/images/task-center.png (added)
-
tags/4.0.6/images/txt.svg (added)
-
tags/4.0.6/images/upload.svg (added)
-
tags/4.0.6/images/user-permissions.png (added)
-
tags/4.0.6/images/video.svg (added)
-
tags/4.0.6/images/white-labelling.png (added)
-
tags/4.0.6/images/wpf-screenshot-sound.mp3 (added)
-
tags/4.0.6/images/wpf_reconnect.png (added)
-
tags/4.0.6/images/zip.svg (added)
-
tags/4.0.6/inc (added)
-
tags/4.0.6/inc/admin (added)
-
tags/4.0.6/inc/admin/page-settings-permissions.php (added)
-
tags/4.0.6/inc/admin/page-settings.php (added)
-
tags/4.0.6/inc/admin/task-center.php (added)
-
tags/4.0.6/inc/admin/upgrade-subscription-popup.php (added)
-
tags/4.0.6/inc/admin/wpf_admin_function.php (added)
-
tags/4.0.6/inc/admin/wpf_backend_initial_setup.php (added)
-
tags/4.0.6/inc/frontend (added)
-
tags/4.0.6/inc/frontend/wpf_approve_page_modal.php (added)
-
tags/4.0.6/inc/frontend/wpf_general_task_modal.php (added)
-
tags/4.0.6/inc/frontend/wpf_login_modal.php (added)
-
tags/4.0.6/inc/frontend/wpf_responsive_page_modal.php (added)
-
tags/4.0.6/inc/frontend/wpf_restrictions_modal.php (added)
-
tags/4.0.6/inc/wpf_admin_functions.php (added)
-
tags/4.0.6/inc/wpf_ajax_functions.php (added)
-
tags/4.0.6/inc/wpf_api.php (added)
-
tags/4.0.6/inc/wpf_class.php (added)
-
tags/4.0.6/inc/wpf_email_notifications.php (added)
-
tags/4.0.6/inc/wpf_function.php (added)
-
tags/4.0.6/inc/wpf_popup_string.php (added)
-
tags/4.0.6/index.php (added)
-
tags/4.0.6/js (added)
-
tags/4.0.6/js/admin (added)
-
tags/4.0.6/js/admin.js (added)
-
tags/4.0.6/js/admin/admin_app.js (added)
-
tags/4.0.6/js/animation-complete.json (added)
-
tags/4.0.6/js/app.js (added)
-
tags/4.0.6/js/atarim-ui.js (added)
-
tags/4.0.6/js/atarim.ui.mouse.min.js (added)
-
tags/4.0.6/js/atarimjs.js (added)
-
tags/4.0.6/js/bootstrap.min.js (added)
-
tags/4.0.6/js/cpickr.js (added)
-
tags/4.0.6/js/custompopover.js (added)
-
tags/4.0.6/js/html2canvas.js (added)
-
tags/4.0.6/js/jquery.ui.touch-punch.js (added)
-
tags/4.0.6/js/jscolor.js (added)
-
tags/4.0.6/js/pickr.min.js (added)
-
tags/4.0.6/js/popper.min.js (added)
-
tags/4.0.6/js/quill.js (added)
-
tags/4.0.6/js/selectoroverlay.js (added)
-
tags/4.0.6/js/wpf-ajax-login.js (added)
-
tags/4.0.6/js/wpf_browser_info.js (added)
-
tags/4.0.6/js/wpf_common_functions.js (added)
-
tags/4.0.6/js/xyposition.js (added)
-
tags/4.0.6/languages (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-cs_CZ.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-cs_CZ.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-de_AT.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-de_AT.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-de_DE.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-de_DE.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-el.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-el.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-es_ES.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-es_ES.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-fr_FR.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-fr_FR.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-he_IL.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-he_IL.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-it_IT.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-it_IT.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-nl_NL.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-nl_NL.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-pt_BR.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-pt_BR.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-sv_SE.mo (added)
-
tags/4.0.6/languages/atarim-visual-collaboration-sv_SE.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration.po (added)
-
tags/4.0.6/languages/atarim-visual-collaboration.pot (added)
-
tags/4.0.6/languages/atarim-visual-collaboration.temp (added)
-
tags/4.0.6/license.txt (added)
-
tags/4.0.6/readme.txt (added)
-
tags/4.0.6/src (added)
-
tags/4.0.6/src/AccessToken (added)
-
tags/4.0.6/src/AccessToken/Revoke.php (added)
-
tags/4.0.6/src/AccessToken/Verify.php (added)
-
tags/4.0.6/src/AuthHandler (added)
-
tags/4.0.6/src/AuthHandler/AuthHandlerFactory.php (added)
-
tags/4.0.6/src/AuthHandler/Guzzle5AuthHandler.php (added)
-
tags/4.0.6/src/AuthHandler/Guzzle6AuthHandler.php (added)
-
tags/4.0.6/src/AuthHandler/Guzzle7AuthHandler.php (added)
-
tags/4.0.6/src/Client.php (added)
-
tags/4.0.6/src/Collection.php (added)
-
tags/4.0.6/src/Exception.php (added)
-
tags/4.0.6/src/Http (added)
-
tags/4.0.6/src/Http/Batch.php (added)
-
tags/4.0.6/src/Http/MediaFileUpload.php (added)
-
tags/4.0.6/src/Http/REST.php (added)
-
tags/4.0.6/src/Model.php (added)
-
tags/4.0.6/src/Service (added)
-
tags/4.0.6/src/Service.php (added)
-
tags/4.0.6/src/Service/Exception.php (added)
-
tags/4.0.6/src/Service/README.md (added)
-
tags/4.0.6/src/Service/Resource.php (added)
-
tags/4.0.6/src/Task (added)
-
tags/4.0.6/src/Task/Composer.php (added)
-
tags/4.0.6/src/Task/Exception.php (added)
-
tags/4.0.6/src/Task/Retryable.php (added)
-
tags/4.0.6/src/Task/Runner.php (added)
-
tags/4.0.6/src/Utils (added)
-
tags/4.0.6/src/Utils/UriTemplate.php (added)
-
tags/4.0.6/src/aliases.php (added)
-
tags/4.0.6/uninstall.php (added)
-
tags/4.0.6/visual-composer (added)
-
tags/4.0.6/visual-composer/LICENSE (added)
-
tags/4.0.6/visual-composer/README.md (added)
-
tags/4.0.6/visual-composer/babel.config.js (added)
-
tags/4.0.6/visual-composer/manifest.json (added)
-
tags/4.0.6/visual-composer/package-lock.json (added)
-
tags/4.0.6/visual-composer/package.json (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/ActivateAtarim.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/ActivateAtarimLicense.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/ExampleAtarimPanel.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/InstallAtarim.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/SideBar.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/TaskContent.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component/AdditionalInfoTab.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component/PriorityTab.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component/ScreenshotTab.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component/StatusTab.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/component/UserTab.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/dataManager.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/index.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/info-icon.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/screenshot-icon.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/status-icon.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/trans_back_atarim.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/urgency-icon.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/media/user-icon.svg (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/services (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/services/apiPath.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/services/apiResquest.js (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/style (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/style/sidebar.css (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/utils (added)
-
tags/4.0.6/visual-composer/visual-composer-atarim/utils/helpers.js (added)
-
tags/4.0.6/visual-composer/yarn.lock (added)
-
trunk/atarim-visual-collaboration.php (modified) (9 diffs)
-
trunk/css/admin.css (modified) (2 diffs)
-
trunk/css/wpf-common.css (modified) (1 diff)
-
trunk/inc/admin/page-settings-permissions.php (modified) (3 diffs)
-
trunk/inc/admin/page-settings.php (modified) (1 diff)
-
trunk/inc/admin/wpf_admin_function.php (modified) (2 diffs)
-
trunk/inc/wpf_ajax_functions.php (modified) (3 diffs)
-
trunk/inc/wpf_function.php (modified) (4 diffs)
-
trunk/js/wpf_common_functions.js (modified) (18 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
atarim-visual-collaboration/trunk/atarim-visual-collaboration.php
r3144271 r3157953 3 3 * Plugin Name: Atarim: Visual Website Collaboration, Feedback & Workflow Management 4 4 * Description: Atarim Visual Collaboration makes it easy and efficient to collaborate on websites with your clients, internal team, contractors…anyone! It’s used by nearly 10,000 agencies and freelancers worldwide on over 120,000 websites. 5 * Version: 4.0. 55 * Version: 4.0.6 6 6 * Requires at least: 5.0 7 7 * Require PHP: 7.4 … … 30 30 } 31 31 if ( ! defined( 'WPF_VERSION' ) ) { 32 define( 'WPF_VERSION', '4.0. 5' );32 define( 'WPF_VERSION', '4.0.6' ); 33 33 } 34 34 … … 618 618 $current_user_name = $currnet_user_information['display_name']; 619 619 $current_user_id = $currnet_user_information['user_id']; 620 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' ); 620 $wpf_website_builder = maybe_unserialize( get_site_data_by_key( 'wpf_website_developer' ) ); 621 $wpf_website_builder = ! empty( $wpf_website_builder ) ? (array) $wpf_website_builder : array(); 621 622 if ( $current_user_name == 'Guest' ) { 622 623 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); … … 652 653 $comment_count = get_last_task_id(); 653 654 654 echo "<script>var wpf_nonce = '$wpf_nonce', wpf_comment_time = '$wpf_comment_time', wpf_all_pages = '$wpf_all_pages', current_role = '$current_role', wpf_current_role = '$wpf_user_type', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = '$wpf_website_builder', wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', atarim_server_down = '$atarim_server_down';</script>";655 echo "<script>var wpf_nonce = '$wpf_nonce', wpf_comment_time = '$wpf_comment_time', wpf_all_pages = '$wpf_all_pages', current_role = '$current_role', wpf_current_role = '$wpf_user_type', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = " . json_encode( $wpf_website_builder ) . ", wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', atarim_server_down = '$atarim_server_down';</script>"; 655 656 656 657 if ( isset( $_REQUEST['page'] ) ) { … … 1344 1345 $current_user_name = $currnet_user_information['display_name']; 1345 1346 $current_user_id = $currnet_user_information['user_id']; 1346 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' ); 1347 $wpf_website_builder = maybe_unserialize( get_site_data_by_key( 'wpf_website_developer' ) ); 1348 $wpf_website_builder = ! empty( $wpf_website_builder ) ? (array) $wpf_website_builder : array(); 1347 1349 if ( $current_user_name == 'Guest' ) { 1348 1350 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); … … 1452 1454 } 1453 1455 } else { 1454 if ( is_category() || is_post_type_archive()) {1455 $page_type = "archive";1456 $category = get_queried_object();1457 $current_page_id = $category->term_id;1458 $current_page_url = get_category_link( $current_page_id );1456 if ( is_category() ) { 1457 $page_type = "archive"; 1458 $category = get_queried_object(); 1459 $current_page_id = $category->term_id; 1460 $current_page_url = get_category_link( $current_page_id ); 1459 1461 $current_page_title = addslashes( get_cat_name( $current_page_id ) ); 1462 } elseif ( is_post_type_archive() ) { 1463 $page_type = "archive"; 1464 $category = get_queried_object(); 1465 // Handle custom post type archive, no term_id available 1466 $post_type = get_post_type(); 1467 $current_page_id = 9999999999; // No term_id for post type archive 1468 $current_page_url = get_post_type_archive_link( $post_type ); 1469 $current_page_title = post_type_archive_title( '', false ); 1460 1470 } else if ( is_tag() ) { // tag archieve page 1461 1471 $page_type = "archive"; … … 1528 1538 echo "<style>li#wp-admin-bar-wpfeedback_admin_bar {display: none !important;}</style>"; 1529 1539 if ( $current_page_id == 0 ) { 1530 echo "<script>var fallback_link_check = '$fallback_link', page_type = '$page_type', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = '$wpf_website_builder', wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = window.location.href.split('?')[0], current_page_title = '$current_page_title', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_admin_bar = '$wpf_admin_bar', wpf_tab_permission_display_stickers = '$wpf_tab_permission_display_stickers', wpf_tab_permission_display_task_id = '$wpf_tab_permission_display_task_id', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>";1540 echo "<script>var fallback_link_check = '$fallback_link', page_type = '$page_type', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = " . json_encode( $wpf_website_builder ) . ", wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = window.location.href.split('?')[0], current_page_title = '$current_page_title', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_admin_bar = '$wpf_admin_bar', wpf_tab_permission_display_stickers = '$wpf_tab_permission_display_stickers', wpf_tab_permission_display_task_id = '$wpf_tab_permission_display_task_id', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>"; 1531 1541 } else { 1532 echo "<script>var fallback_link_check = '$fallback_link', page_type = '$page_type', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = '$wpf_website_builder', wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = '$current_page_url', current_page_title = '$current_page_title', wpf_current_screen = '', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_admin_bar = $wpf_admin_bar, wpf_tab_permission_display_stickers = '$wpf_tab_permission_display_stickers', wpf_tab_permission_display_task_id = '$wpf_tab_permission_display_task_id', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>";1542 echo "<script>var fallback_link_check = '$fallback_link', page_type = '$page_type', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = " . json_encode( $wpf_website_builder ) . ", wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = '$current_page_url', current_page_title = '$current_page_title', wpf_current_screen = '', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_admin_bar = $wpf_admin_bar, wpf_tab_permission_display_stickers = '$wpf_tab_permission_display_stickers', wpf_tab_permission_display_task_id = '$wpf_tab_permission_display_task_id', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>"; 1533 1543 } 1534 1544 $wpf_sidebar_closeicon = '<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 357 357" enable-background="new 0 0 357 357" xml:space="preserve"><g><g id="close"><polygon fill="#F5325C" points="357,35.7 321.3,0 178.5,142.8 35.7,0 0,35.7 142.8,178.5 0,321.3 35.7,357 178.5,214.2 321.3,357 357,321.3 214.2,178.5 "/></g></g></svg>'; … … 1601 1611 $current_user_name = $currnet_user_information['display_name']; 1602 1612 $current_user_id = $currnet_user_information['user_id']; 1603 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' );1604 1613 if ( $current_user_name == 'Guest' ) { 1605 1614 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); … … 1640 1649 $current_user_name = $currnet_user_information['display_name']; 1641 1650 $current_user_id = $currnet_user_information['user_id']; 1642 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' );1643 1651 if ( $current_user_name == 'Guest' ) { 1644 1652 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); -
atarim-visual-collaboration/trunk/css/admin.css
r3138174 r3157953 204 204 font-size: 12px !important; 205 205 } 206 ul.wp_feedback_filter _checkbox.user input[type="checkbox"]:checked + label:after {206 ul.wp_feedback_filter.user input[type="checkbox"]:checked + label:after { 207 207 content: ''; 208 208 display: block; … … 1392 1392 .wpf_user_permissions { 1393 1393 margin-bottom: 25px; 1394 } 1395 .wpf_user_permissions .isglobal { 1396 display: none; 1394 1397 } 1395 1398 table.wpf_perm_table { -
atarim-visual-collaboration/trunk/css/wpf-common.css
r3138174 r3157953 1602 1602 height: 70px !important; 1603 1603 box-sizing: content-box; 1604 } 1605 #wpf_allpages li.current_page_task, #wpf_allpages li.current_page_general_task { 1606 height: 85px !important; 1604 1607 } 1605 1608 li.current_page_task:hover, li.current_page_general_task:hover { -
atarim-visual-collaboration/trunk/inc/admin/page-settings-permissions.php
r3138174 r3157953 150 150 <div class="wpf_user_permissions <?php if ( ! is_feature_enabled( 'user_permissions' ) ) { ?> blocked <?php } ?>"> 151 151 <?php 152 $isglobal = 'islocal'; 152 153 if ( get_option( "wpf_global_settings" ) == 'yes' ) { 154 $isglobal = 'isglobal'; 153 155 ?> 154 156 <div class="at_feature_lock_wrap wpf_global_lock"> … … 163 165 </div> 164 166 <?php 165 } else {167 } 166 168 ?> 167 <p><?php esc_attr_e( 'Enable or disable diffent functionality based on the Atarim user types to overwirte the default settings and customise your workflow.', 'atarim-visual-collaboration' ); ?></p> 168 <table class="wpf_perm_table"> 169 <tr> 170 <td class="wpf_perm_top"></td> 171 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_client' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_client' ) ) : esc_attr_e( 'Client (Website Owner) ', 'atarim-visual-collaboration' ); ?></td> 172 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_webmaster' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_webmaster' ) ) : esc_attr_e( 'Webmaster', 'atarim-visual-collaboration' ); ?></td> 173 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_others' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_others' ) ) : esc_attr_e( 'Others ', 'atarim-visual-collaboration' ); ?></td> 174 <td class="wpf_perm_top"><?php esc_attr_e( 'Guest ', 'atarim-visual-collaboration' ); ?></td> 175 </tr> 176 <tr> 177 <td class="wpf_left_cell"><?php esc_attr_e( 'Add User', 'atarim-visual-collaboration' ); ?> 178 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Users tab inside tasks to give you more control over who can assign users to tasks, so you can ensure tasks are assigned correctly.</div>"></span> 179 </td> 180 <td><input type="checkbox" name="wpf_tab_permission_user_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_client' ) == 'yes' ) { echo 'checked'; } ?> ></td> 181 <td><input type="checkbox" name="wpf_tab_permission_user_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 182 <td><input type="checkbox" name="wpf_tab_permission_user_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 183 <td><input type="checkbox" name="wpf_tab_permission_user_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 184 </tr> 185 <tr> 186 <td class="wpf_left_cell"><?php esc_attr_e( 'Priority', 'atarim-visual-collaboration' ); ?> 187 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Priority tab inside tasks, we recommend keeping this on for all so you are always aware of how urgent a task is (and the emotional state of your client).</div>"></span> 188 </td> 189 <td><input type="checkbox" name="wpf_tab_permission_priority_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 190 <td><input type="checkbox" name="wpf_tab_permission_priority_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 191 <td><input type="checkbox" name="wpf_tab_permission_priority_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 192 <td><input type="checkbox" name="wpf_tab_permission_priority_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 193 </tr> 194 <tr> 195 <td class="wpf_left_cell"><?php esc_attr_e( 'Status', 'atarim-visual-collaboration' ); ?> 196 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Status tab inside tasks, so you can control which users dictate where a task currently stands.</div>"></span> 197 </td> 198 <td><input type="checkbox" name="wpf_tab_permission_status_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 199 <td><input type="checkbox" name="wpf_tab_permission_status_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 200 <td><input type="checkbox" name="wpf_tab_permission_status_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 201 <td><input type="checkbox" name="wpf_tab_permission_status_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 202 </tr> 203 <tr> 204 <td class="wpf_left_cell"><?php esc_attr_e( 'Screenshot', 'atarim-visual-collaboration' ); ?> 205 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Screenshot tab inside tasks, which allows users to take a screenshot of their current view so you can see exactly what’s happening for that user.</div>"></span> 206 </td> 207 <td><input type="checkbox" name="wpf_tab_permission_screenshot_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 208 <td><input type="checkbox" name="wpf_tab_permission_screenshot_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 209 <td><input type="checkbox" name="wpf_tab_permission_screenshot_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 210 <td><input type="checkbox" name="wpf_tab_permission_screenshot_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 211 </tr> 212 <tr> 213 <td class="wpf_left_cell"><?php esc_attr_e( 'Information', 'atarim-visual-collaboration' ); ?> 214 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Information tab inside tasks, giving you the resolution, browser and username of the user that created the task. All the info you need to get the task done.</div>"></span> 215 </td> 216 <td><input type="checkbox" name="wpf_tab_permission_information_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 217 <td><input type="checkbox" name="wpf_tab_permission_information_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 218 <td><input type="checkbox" name="wpf_tab_permission_information_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 219 <td><input type="checkbox" name="wpf_tab_permission_information_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 220 </tr> 221 <tr> 222 <td class="wpf_left_cell"><?php esc_attr_e( 'Delete', 'atarim-visual-collaboration' ); ?> 223 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Delete button inside the Information tab on tasks. Allowing you full control over who is accountable for which tasks have been created, to stop confusion occurring.</div>"></span> 224 </td> 225 <td><input type="checkbox" name="wpf_tab_permission_delete_task_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 226 <td><input type="checkbox" name="wpf_tab_permission_delete_task_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 227 <td><input type="checkbox" name="wpf_tab_permission_delete_task_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 228 <td><input type="checkbox" name="wpf_tab_permission_delete_task_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 229 </tr> 230 <tr> 231 <td class="wpf_left_cell"><?php esc_attr_e( 'Auto Screenshot', 'atarim-visual-collaboration' ); ?> 232 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Enable automatic screenshots of the user’s current view when they create a task. Providing you the clarity you need to tackle the task.</div>"></span> 233 </td> 234 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 235 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 236 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 237 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 238 </tr> 239 <!-- display stickers settings --> 240 <tr> 241 <td class="wpf_left_cell"><?php esc_attr_e( 'Color Coded Stickers', 'atarim-visual-collaboration' ); ?> 242 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide color-coded stickers on the task stickers. The color is determined by the status and urgency of a task, showing you the state of the task at a glance without needing to open it.</div>"></span> 243 </td> 244 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 245 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 246 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 247 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 248 </tr> 249 <!-- display task id on sticker --> 250 <tr> 251 <td class="wpf_left_cell"><?php esc_attr_e( 'Display Number On Completed Task', 'atarim-visual-collaboration' ); ?> 252 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Replace the tick on completed tasks on the front-end with the task number to make it easier to see the ID of the completed task.</div>"></span> 253 </td> 254 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 255 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 256 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 257 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 258 </tr> 259 <!-- enable keyboard shortcut => v2.1.0 --> 260 <tr> 261 <td class="wpf_left_cell"><?php esc_attr_e( 'Keyboard Shortcuts', 'atarim-visual-collaboration' ); ?> 262 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Enable the use of keyboard shortcuts to make it quicker to collaborate on the front and back-end:<ul><li><b>Shift+F</b> - Go into Comment Mode</li><li><b>Shift+G</b> - Create a new General Task</li><li><b>Shift+S</b> - Open the sidebar</li><li><b>Shift+B</b> - Collapse bottom bar</li></ul></div>"></span> 263 </td> 264 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 265 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 266 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 267 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 268 </tr> 269 </table> 270 <?php } ?> 169 <div class="<?php echo $isglobal; ?>" > 170 <p><?php esc_attr_e( 'Enable or disable diffent functionality based on the Atarim user types to overwirte the default settings and customise your workflow.', 'atarim-visual-collaboration' ); ?></p> 171 <table class="wpf_perm_table"> 172 <tr> 173 <td class="wpf_perm_top"></td> 174 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_client' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_client' ) ) : esc_attr_e( 'Client (Website Owner) ', 'atarim-visual-collaboration' ); ?></td> 175 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_webmaster' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_webmaster' ) ) : esc_attr_e( 'Webmaster', 'atarim-visual-collaboration' ); ?></td> 176 <td class="wpf_perm_top"><?php echo get_site_data_by_key( 'wpf_customisations_others' ) ? esc_html( get_site_data_by_key( 'wpf_customisations_others' ) ) : esc_attr_e( 'Others ', 'atarim-visual-collaboration' ); ?></td> 177 <td class="wpf_perm_top"><?php esc_attr_e( 'Guest ', 'atarim-visual-collaboration' ); ?></td> 178 </tr> 179 <tr> 180 <td class="wpf_left_cell"><?php esc_attr_e( 'Add User', 'atarim-visual-collaboration' ); ?> 181 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Users tab inside tasks to give you more control over who can assign users to tasks, so you can ensure tasks are assigned correctly.</div>"></span> 182 </td> 183 <td><input type="checkbox" name="wpf_tab_permission_user_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_client' ) == 'yes' ) { echo 'checked'; } ?> ></td> 184 <td><input type="checkbox" name="wpf_tab_permission_user_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 185 <td><input type="checkbox" name="wpf_tab_permission_user_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 186 <td><input type="checkbox" name="wpf_tab_permission_user_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_user_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 187 </tr> 188 <tr> 189 <td class="wpf_left_cell"><?php esc_attr_e( 'Priority', 'atarim-visual-collaboration' ); ?> 190 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Priority tab inside tasks, we recommend keeping this on for all so you are always aware of how urgent a task is (and the emotional state of your client).</div>"></span> 191 </td> 192 <td><input type="checkbox" name="wpf_tab_permission_priority_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 193 <td><input type="checkbox" name="wpf_tab_permission_priority_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 194 <td><input type="checkbox" name="wpf_tab_permission_priority_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 195 <td><input type="checkbox" name="wpf_tab_permission_priority_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_priority_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 196 </tr> 197 <tr> 198 <td class="wpf_left_cell"><?php esc_attr_e( 'Status', 'atarim-visual-collaboration' ); ?> 199 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Status tab inside tasks, so you can control which users dictate where a task currently stands.</div>"></span> 200 </td> 201 <td><input type="checkbox" name="wpf_tab_permission_status_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 202 <td><input type="checkbox" name="wpf_tab_permission_status_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 203 <td><input type="checkbox" name="wpf_tab_permission_status_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 204 <td><input type="checkbox" name="wpf_tab_permission_status_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_status_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 205 </tr> 206 <tr> 207 <td class="wpf_left_cell"><?php esc_attr_e( 'Screenshot', 'atarim-visual-collaboration' ); ?> 208 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Screenshot tab inside tasks, which allows users to take a screenshot of their current view so you can see exactly what’s happening for that user.</div>"></span> 209 </td> 210 <td><input type="checkbox" name="wpf_tab_permission_screenshot_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 211 <td><input type="checkbox" name="wpf_tab_permission_screenshot_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 212 <td><input type="checkbox" name="wpf_tab_permission_screenshot_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 213 <td><input type="checkbox" name="wpf_tab_permission_screenshot_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_screenshot_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 214 </tr> 215 <tr> 216 <td class="wpf_left_cell"><?php esc_attr_e( 'Information', 'atarim-visual-collaboration' ); ?> 217 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Information tab inside tasks, giving you the resolution, browser and username of the user that created the task. All the info you need to get the task done.</div>"></span> 218 </td> 219 <td><input type="checkbox" name="wpf_tab_permission_information_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 220 <td><input type="checkbox" name="wpf_tab_permission_information_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 221 <td><input type="checkbox" name="wpf_tab_permission_information_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 222 <td><input type="checkbox" name="wpf_tab_permission_information_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_information_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 223 </tr> 224 <tr> 225 <td class="wpf_left_cell"><?php esc_attr_e( 'Delete', 'atarim-visual-collaboration' ); ?> 226 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide the Delete button inside the Information tab on tasks. Allowing you full control over who is accountable for which tasks have been created, to stop confusion occurring.</div>"></span> 227 </td> 228 <td><input type="checkbox" name="wpf_tab_permission_delete_task_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 229 <td><input type="checkbox" name="wpf_tab_permission_delete_task_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 230 <td><input type="checkbox" name="wpf_tab_permission_delete_task_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 231 <td><input type="checkbox" name="wpf_tab_permission_delete_task_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_delete_task_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 232 </tr> 233 <tr> 234 <td class="wpf_left_cell"><?php esc_attr_e( 'Auto Screenshot', 'atarim-visual-collaboration' ); ?> 235 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Enable automatic screenshots of the user’s current view when they create a task. Providing you the clarity you need to tackle the task.</div>"></span> 236 </td> 237 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 238 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 239 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 240 <td><input type="checkbox" name="wpf_tab_auto_screenshot_task_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_auto_screenshot_task_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 241 </tr> 242 <!-- display stickers settings --> 243 <tr> 244 <td class="wpf_left_cell"><?php esc_attr_e( 'Color Coded Stickers', 'atarim-visual-collaboration' ); ?> 245 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Show/Hide color-coded stickers on the task stickers. The color is determined by the status and urgency of a task, showing you the state of the task at a glance without needing to open it.</div>"></span> 246 </td> 247 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 248 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 249 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 250 <td><input type="checkbox" name="wpf_tab_permission_display_stickers_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_stickers_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 251 </tr> 252 <!-- display task id on sticker --> 253 <tr> 254 <td class="wpf_left_cell"><?php esc_attr_e( 'Display Number On Completed Task', 'atarim-visual-collaboration' ); ?> 255 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Replace the tick on completed tasks on the front-end with the task number to make it easier to see the ID of the completed task.</div>"></span> 256 </td> 257 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 258 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 259 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 260 <td><input type="checkbox" name="wpf_tab_permission_display_task_id_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_display_task_id_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 261 </tr> 262 <!-- enable keyboard shortcut => v2.1.0 --> 263 <tr> 264 <td class="wpf_left_cell"><?php esc_attr_e( 'Keyboard Shortcuts', 'atarim-visual-collaboration' ); ?> 265 <span class="dashicons dashicons-info" data-toggle="tooltip" data-placement="top" data-html="true" title="<div class='wpf-tooltip'>Enable the use of keyboard shortcuts to make it quicker to collaborate on the front and back-end:<ul><li><b>Shift+F</b> - Go into Comment Mode</li><li><b>Shift+G</b> - Create a new General Task</li><li><b>Shift+S</b> - Open the sidebar</li><li><b>Shift+B</b> - Collapse bottom bar</li></ul></div>"></span> 266 </td> 267 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_client" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_client' ) == 'yes' ) { echo 'checked'; } ?>></td> 268 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_webmaster" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_webmaster' ) == 'yes' ) { echo 'checked'; } ?>></td> 269 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_others" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_others' ) == 'yes' ) { echo 'checked'; } ?>></td> 270 <td><input type="checkbox" name="wpf_tab_permission_keyboard_shortcut_guest" value="yes" <?php if ( get_site_data_by_key( 'wpf_tab_permission_keyboard_shortcut_guest' ) == 'yes' ) { echo 'checked'; } ?>></td> 271 </tr> 272 </table> 273 </div> 271 274 </div> 272 275 <?php 273 276 $wpfb_users_json = do_shortcode( '[wpf_user_list_front]' ); 274 277 $wpfb_users = json_decode( $wpfb_users_json ); 275 $wpf_website_developer = ! empty( get_site_data_by_key( 'wpf_website_developer' ) ) ? get_site_data_by_key( 'wpf_website_developer' ) : 0; 276 $wpf_website_client = ! empty( get_site_data_by_key( 'wpf_website_client' ) ) ? get_site_data_by_key( 'wpf_website_client' ) : 0; 278 $wpf_website_developer = maybe_unserialize( get_site_data_by_key( 'wpf_website_developer' ) ); 279 $wpf_website_developer = ! empty( $wpf_website_developer ) ? (array) $wpf_website_developer : array(); 280 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); 281 $wpf_website_client = ! empty( $wpf_website_client ) ? $wpf_website_client : 0; 277 282 ?> 278 283 <div class="wpf_title_section" id="wpf_default_users"><?php esc_attr_e( 'Default Users', 'atarim-visual-collaboration' ); ?></div> … … 280 285 <div class="wpf_title"><?php esc_attr_e( 'The website builder', 'atarim-visual-collaboration' ); ?></div> 281 286 <div class="wpf_description"><?php esc_attr_e( 'The website builder will add this user to all tasks by default, allowing the client to skip the "choose a user" tab when creating a task. It will also be used for the Auto Login option when coming from the Atarim Dashboard.', 'atarim-visual-collaboration' ); ?></div> 282 <select name="wpf_website_developer"> 283 <option value="0"><?php esc_attr_e( 'select', 'atarim-visual-collaboration' ); ?></option> 287 <select name="wpf_website_developer[]" multiple> 284 288 <?php 285 289 foreach ( $wpfb_users as $key => $val ) { 290 $displayname = ucfirst( strtolower( $val->displayname ) ); 286 291 ?> 287 <option value="<?php echo $key; ?>" id="<?php echo $val->username; ?>" <?php if ( $wpf_website_developer == $key ) { echo "selected"; } ?> ><?php echo $val->displayname; ?></option>292 <option value="<?php echo $key; ?>" id="<?php echo $val->username; ?>" <?php if ( in_array( $key, $wpf_website_developer ) ) { echo "selected"; } ?> ><?php echo $displayname; ?></option> 288 293 <?php } ?> 289 294 </select> -
atarim-visual-collaboration/trunk/inc/admin/page-settings.php
r3138174 r3157953 335 335 <br> 336 336 </div> 337 <?php338 $wpfb_users_json = do_shortcode( '[wpf_user_list_front]' );339 $wpfb_users = json_decode( $wpfb_users_json );340 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' );341 $wpf_website_developer = get_site_data_by_key( 'wpf_website_developer' );342 ?>343 337 <input type="submit" value="<?php esc_attr_e('Save Changes', 'atarim-visual-collaboration'); ?>" class="wpf_button" id="wpf_save_setting" /> 344 338 </div> -
atarim-visual-collaboration/trunk/inc/admin/wpf_admin_function.php
r3144271 r3157953 26 26 $current_user_name = $currnet_user_information['display_name']; 27 27 $current_user_id = $currnet_user_information['user_id']; 28 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' ); 28 $wpf_website_builder = maybe_unserialize( get_site_data_by_key( 'wpf_website_developer' ) ); 29 $wpf_website_builder = ! empty( $wpf_website_builder ) ? (array) $wpf_website_builder : array(); 29 30 30 31 if ( $current_user_name == 'Guest' ) { … … 177 178 require_once( WPF_PLUGIN_DIR . 'inc/wpf_popup_string.php' ); 178 179 if ( $wpf_active == 1 && $wpf_check_page_builder_active == 0 && $wpf_allow_backend_commenting != 'yes' && $wpf_current_screen != 'settings_page_menu_editor' && $wpf_current_screen != 'collaborate_page_collaboration_page_settings' && ( ! $is_site_archived ) ) { 179 echo "<script>var fallback_link_check = '', page_type = '', wpf_reconnect_icon = '$wpf_reconnect_icon', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', wpf_current_screen = '$wpf_current_screen', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = '$wpf_website_builder', wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = '$current_page_url', current_page_title = '$current_page_title', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', wpf_admin_bar = 1, restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>";180 echo "<script>var fallback_link_check = '', page_type = '', wpf_reconnect_icon = '$wpf_reconnect_icon', wpf_tag_enter_img = '$wpf_tag_enter_img', disable_for_admin = '$disable_for_admin', wpf_nonce = '$wpf_nonce', wpf_current_screen = '$wpf_current_screen', current_role = '$current_role', wpf_current_role = '$wpf_current_role', current_user_name = '$current_user_name', current_user_id = '$current_user_id', wpf_website_builder = " . json_encode( $wpf_website_builder ) . ", wpfb_users = '$wpfb_users', ajaxurl = '$ajax_url', current_page_url = '$current_page_url', current_page_title = '$current_page_title', current_page_id = '$current_page_id', wpf_screenshot_sound = '$sound_file', plugin_url = '$plugin_url', comment_count = '$comment_count', bubble_comment_count = '$bubble_comment_count', wpf_show_front_stikers = '$wpf_show_front_stikers', wpf_tab_permission_user = '$wpf_tab_permission_user', wpf_tab_permission_priority = '$wpf_tab_permission_priority', wpf_tab_permission_status = '$wpf_tab_permission_status', wpf_tab_permission_screenshot = '$wpf_tab_permission_screenshot', wpf_tab_permission_information = '$wpf_tab_permission_information', wpf_tab_permission_delete_task = '$wpf_tab_permission_delete_task', wpf_tab_permission_auto_screenshot = '$wpf_tab_permission_auto_screenshot', wpf_tab_permission_keyboard_shortcut = '$wpf_tab_permission_keyboard_shortcut', wpf_admin_bar = 1, restrict_plugin = '$restrict_plugin', atarim_server_down = '$atarim_server_down';</script>"; 180 181 if ( $disable_for_admin == 0 ) { 181 182 $wpf_site_id = get_option( 'wpf_site_id' ); -
atarim-visual-collaboration/trunk/inc/wpf_ajax_functions.php
r3144271 r3157953 33 33 $current_user_name = $currnet_user_information['display_name']; 34 34 $current_user_id = $currnet_user_information['user_id']; 35 $wpf_website_builder = get_site_data_by_key( 'wpf_website_developer' );36 35 if ( $current_user_name == 'Guest' ) { 37 36 $wpf_website_client = get_site_data_by_key( 'wpf_website_client' ); … … 682 681 $sendtocloud = wp_json_encode( $task_data ); 683 682 $res = wpf_send_remote_post( $url, $sendtocloud ); 683 $res = array( 'id' => encrypt_id( $res ), 'ID' => $res ); 684 684 echo wp_json_encode( $res ); 685 685 exit(); … … 951 951 $url = WPF_CRM_API . 'wp-api/comment/updateContent'; 952 952 $sendtocloud = wp_json_encode( $args ); 953 $comments_info = wpf_send_remote_post( $url, $sendtocloud ); 953 $comments_info = wpf_send_remote_post( $url, $sendtocloud ); 954 954 if ( $comments_info['status'] == 200 ) { 955 955 echo "1"; -
atarim-visual-collaboration/trunk/inc/wpf_function.php
r3144271 r3157953 86 86 if ( is_array( $notify_users ) ) { 87 87 if ( count( $notify_users ) > 0 ) { 88 echo '<ul class="wp_feedback_filter _checkboxuser">';88 echo '<ul class="wp_feedback_filter user">'; 89 89 if ( ! empty( $notify_users ) ) { 90 90 foreach ( $notify_users as $user ) { … … 249 249 $options['wpf_customisations_others'] = sanitize_text_field( $_POST['wpf_customisations_others'] ); 250 250 $options['wpf_website_client'] = sanitize_text_field( $_POST['wpf_website_client'] ); 251 $options['wpf_website_developer'] = sanitize_text_field( $_POST['wpf_website_developer']);251 $options['wpf_website_developer'] = maybe_serialize( array_map( 'sanitize_text_field', $_POST['wpf_website_developer'] ) ); 252 252 $options['wpf_tab_permission_user_client'] = isset( $_POST['wpf_tab_permission_user_client'] ) ? sanitize_text_field( $_POST['wpf_tab_permission_user_client'] ) : 'no'; 253 253 $options['wpf_tab_permission_user_webmaster'] = isset( $_POST['wpf_tab_permission_user_webmaster'] ) ? sanitize_text_field( $_POST['wpf_tab_permission_user_webmaster'] ) : 'no'; … … 2374 2374 } 2375 2375 2376 // func iton to return uploaded file html for task center by Pratap.2376 // function to return uploaded file html for task center by Pratap. 2377 2377 function get_files_html($files) { 2378 2378 $files_html = ''; … … 2382 2382 $each_img_html = ''; 2383 2383 $each_docu_html = ''; 2384 $preview_image_icon = ''; 2385 $delete_icon = ''; 2384 2386 $has_img = false; 2385 2387 $has_docu = false; -
atarim-visual-collaboration/trunk/js/wpf_common_functions.js
r3144271 r3157953 148 148 // Code to generate new task. 149 149 function generate_task(id, internal, note) { 150 // Initialize base64 URL variable 150 151 var base64URL = ''; 151 html2canvas(document.body,{ 152 153 // Capture screenshot of the document body 154 html2canvas(document.body, { 152 155 x: window.scrollX, 153 156 y: window.scrollY, … … 155 158 height: window.innerHeight, 156 159 useCORS: true, 157 proxy: plugin_url+'imagehelper.php', 158 logging: true,}).then(function(canvas) { 159 base64URL = canvas.toDataURL('image/jpeg',1); 160 }); 161 var wpside = logged_user.wpside; 160 proxy: plugin_url + 'imagehelper.php', 161 logging: true 162 }).then(function(canvas) { 163 base64URL = canvas.toDataURL('image/jpeg', 1); 164 }); 165 166 // Generate unique ID and class for the task 162 167 var temp_id = Math.floor(100000 + Math.random() * 900000); 163 168 var temp_class = 'temp_class_' + temp_id; 164 if(typeof temp_tasks[id]!='undefined'){ 165 var task_element_path = temp_tasks[id]['rightArrowParents'].join(" > ");166 }169 170 // Initialize variables 171 var wpside = logged_user.wpside; 167 172 var curr_browser = get_browser(); 168 var new_task = {}; 169 var task_priority = jQuery_WPF('input[name=wpfbpriority'+id+']:checked').val(); 170 var task_status = jQuery_WPF('input[name=wpfbtaskstatus'+id+']:checked').val(); 173 var task_priority = jQuery_WPF('input[name=wpfbpriority' + id + ']:checked').val(); 174 var task_status = jQuery_WPF('input[name=wpfbtaskstatus' + id + ']:checked').val(); 175 var raw_comment = jQuery_WPF('textarea#comment-' + id).val(); 176 var task_comment = raw_comment.replace(/(<p><br><\/p>)+$/, ''); 171 177 var task_notify_users = []; 172 178 var task_notify_usernames = []; 173 var raw_comment = jQuery_WPF('textarea#comment-'+id).val(); 174 var task_comment = raw_comment.replace(/(<p><br><\/p>)+$/, '');175 jQuery_WPF.each(jQuery_WPF('input[name=author_list_' +id+']:checked'), function(){179 180 // Collect notified users and usernames 181 jQuery_WPF.each(jQuery_WPF('input[name=author_list_' + id + ']:checked'), function() { 176 182 task_notify_users.push(jQuery_WPF(this).val()); 177 183 task_notify_usernames.push(jQuery_WPF(this).data('wp-usrn')); 178 184 }); 179 task_notify_users = task_notify_users.join(","); 180 new_task['task_number'] = id; 181 new_task['task_priority'] = task_priority; 182 new_task['task_status'] = task_status; 183 new_task['task_config_author_browser'] = curr_browser['name']; 184 new_task['task_config_author_browserVersion'] = curr_browser['version']; 185 new_task['task_config_author_browserOS'] = curr_browser['OS']; 186 new_task['task_config_author_name'] = current_user_name; 187 new_task['task_config_author_id'] = current_user_id; 188 new_task['task_config_author_resX'] = window.screen.width; 189 new_task['task_config_author_resY'] = window.screen.height; 190 new_task['task_title'] = task_comment; 191 new_task['task_page_url'] = current_page_url; 192 new_task['task_page_title'] = current_page_title; 193 new_task['current_page_id'] = current_page_id; 194 new_task['task_comment_message'] = task_comment; 195 new_task['task_notify_users'] = task_notify_users; 196 if ( wpside == 'frontend' ) { 197 new_task['page_type'] = page_type; 198 } 199 new_task['is_note'] = note; 200 if ( wpside == 'backend' ) { 201 if ( wpf_current_screen != '' ) { 202 new_task['wpf_current_screen'] = wpf_current_screen; 203 }else{ 204 new_task['wpf_current_screen'] = ''; 205 } 206 new_task['task_page_title'] = ''; 207 new_task['is_admin_task'] = 1; 208 } 209 if ( internal == 1 ) { 210 new_task['internal'] = '1'; 211 } 212 if ( typeof temp_tasks[id] != 'undefined' ) { 213 new_task['task_element_path'] = task_element_path; 214 new_task['task_clean_dom_elem_path'] = temp_tasks[id]['wpf_clean_dom_elem_path']; 215 new_task['task_element_html'] = temp_tasks[id]['current_html_element']; 216 new_task['task_X'] = temp_tasks[id]['relative_location'].x; 217 new_task['task_Y'] = temp_tasks[id]['relative_location'].y; 218 new_task['task_elementX'] = temp_tasks[id]['html_element_location'].x; 219 new_task['task_elementY'] = temp_tasks[id]['html_element_location'].y; 220 new_task['task_relativeX'] = ''; 221 new_task['task_relativeY'] = ''; 222 new_task['task_element_height'] = temp_tasks[id]['html_element_height']; 223 new_task['task_element_width'] = temp_tasks[id]['html_element_width']; 224 if ( wpside == 'backend' ) { 225 new_task['task_type'] = 'element'; 185 186 var task_notify_users = task_notify_users.join(","); 187 188 // Create new task object 189 var new_task = { 190 task_number: id, 191 task_priority: task_priority, 192 task_status: task_status, 193 task_config_author_browser: curr_browser.name, 194 task_config_author_browserVersion: curr_browser.version, 195 task_config_author_browserOS: curr_browser.OS, 196 task_config_author_name: current_user_name, 197 task_config_author_id: current_user_id, 198 task_config_author_resX: window.screen.width, 199 task_config_author_resY: window.screen.height, 200 task_title: task_comment, 201 task_page_url: current_page_url, 202 task_page_title: current_page_title, 203 current_page_id: current_page_id, 204 task_comment_message: task_comment, 205 task_notify_users: task_notify_users, 206 is_note: note, 207 }; 208 209 // Set additional properties based on conditions 210 if (wpside === 'frontend') { 211 new_task.page_type = page_type; 212 if ( fallback_link_check == 1 ) { 213 new_task.task_type = 'element'; 226 214 } else { 227 if ( fallback_link_check == 1) {228 new_task ['task_type'] = 'element';215 if ( current_page_id == '' || current_page_id == 0 ) { 216 new_task.task_type = 'general'; 229 217 } else { 230 if ( current_page_id == '' || current_page_id == 0 ) { 231 new_task['task_type'] = 'general'; 232 } else { 233 new_task['task_type'] = 'element'; 234 } 235 } 236 } 218 new_task.task_type = 'element'; 219 } 220 } 221 } 222 223 if (wpside === 'backend') { 224 new_task.wpf_current_screen = wpf_current_screen || ''; 225 new_task.task_page_title = ''; 226 new_task.is_admin_task = 1; 227 new_task.task_type = 'element'; 228 } 229 230 if (internal === 1) { 231 new_task.internal = '1'; 232 } 233 234 if (typeof temp_tasks[id] !== 'undefined') { 235 var task_element_path = temp_tasks[id]['rightArrowParents'].join(" > "); 236 Object.assign(new_task, { 237 task_element_path: task_element_path, 238 task_clean_dom_elem_path: temp_tasks[id]['wpf_clean_dom_elem_path'], 239 task_element_html: temp_tasks[id]['current_html_element'], 240 task_X: temp_tasks[id]['relative_location'].x, 241 task_Y: temp_tasks[id]['relative_location'].y, 242 task_elementX: temp_tasks[id]['html_element_location'].x, 243 task_elementY: temp_tasks[id]['html_element_location'].y, 244 task_relativeX: '', 245 task_relativeY: '', 246 task_element_height: temp_tasks[id]['html_element_height'], 247 task_element_width: temp_tasks[id]['html_element_width'] 248 }); 237 249 } else { 238 new_task['task_type'] = 'general'; 239 } 250 new_task.task_type = 'general'; 251 } 252 253 // Process comment for URL or video 240 254 var temp_task_text = task_comment; 241 conststrippedString = task_comment.replace(/(<([^>]+)>)/gi, "");242 if (wpf_is_valid_url(strippedString) == true){243 if ( is_video_Url( strippedString )) {255 var strippedString = task_comment.replace(/(<([^>]+)>)/gi, ""); 256 if (wpf_is_valid_url(strippedString)) { 257 if (is_video_Url(strippedString)) { 244 258 temp_task_text = wpf_is_valid_video_url(strippedString); 245 259 } else { … … 247 261 } 248 262 } 263 264 // Create FormData object for upload 249 265 var wpf_upload_form = new FormData(); 250 266 wpf_upload_form.append('action', 'wpf_add_new_task'); 251 wpf_upload_form.append('wpf_nonce', wpf_nonce);267 wpf_upload_form.append('wpf_nonce', wpf_nonce); 252 268 wpf_upload_form.append('new_task', JSON.stringify(new_task)); 253 if(allFiles.length > 0) { 269 270 if (allFiles.length > 0) { 254 271 allFiles.forEach(function(file) { 255 272 wpf_upload_form.append('wpf_upload_file[]', file); 256 273 }); 257 274 } else { 258 wpf_upload_form.append("wpf_upload_file[]", ''); 259 } 275 wpf_upload_form.append('wpf_upload_file[]', ''); 276 } 277 260 278 jQuery_WPF.ajax({ 261 279 method : "POST", … … 268 286 jQuery_WPF('.wpf_no_task').hide(); 269 287 } 270 if(wpf_tab_permission.display_stickers == 'yes') { 271 var wpf_task_status_label= '<div class="wpf_task_label"><span class="task_status wpf_'+new_task['task_status']+' wpf_'+new_task['task_status']+'_custom">'+status_icon+'</span>'; 272 var wpf_task_priority_label= '<span class="priority wpf_'+new_task['task_priority']+' wpf_'+new_task['task_priority']+'_custom">'+priority_icon+'</span></div>'; 288 289 var wpf_task_status_label; 290 var wpf_task_priority_label; 291 if (wpf_tab_permission.display_stickers === 'yes') { 292 wpf_task_status_label = ` 293 <div class="wpf_task_label"> 294 <span class="task_status wpf_${new_task['task_status']} wpf_${new_task['task_status']}_custom">${status_icon}</span> 295 </div>`; 296 wpf_task_priority_label = ` 297 <span class="priority wpf_${new_task['task_priority']} wpf_${new_task['task_priority']}_custom">${priority_icon}</span>`; 273 298 } else { 274 var wpf_task_status_label= '<div class="wpf_task_label"><span class="task_status wpf_'+new_task['task_status']+'">'+status_icon+'</span>'; 275 var wpf_task_priority_label= '<span class="priority wpf_'+new_task['task_priority']+'">'+priority_icon+'</span></div>'; 276 } 299 wpf_task_status_label = ` 300 <div class="wpf_task_label"> 301 <span class="task_status wpf_${new_task['task_status']}">${status_icon}</span> 302 </div>`; 303 wpf_task_priority_label = ` 304 <span class="priority wpf_${new_task['task_priority']}">${priority_icon}</span>`; 305 } 306 277 307 var wpfb_tags_html =''; 278 308 var user_html = ''; 279 if ( Object.keys(task_notify_usernames).length > 0) {280 jQuery_WPF.each( task_notify_usernames, function(index, value) {281 user_html += '<span class="wpf_user_avat">' + value.slice(0, 2) + '</span>';309 if (Object.keys(task_notify_usernames).length > 0) { 310 jQuery_WPF.each(task_notify_usernames, function(index, value) { 311 user_html += `<span class="wpf_user_avat">${value.slice(0, 2)}</span>`; 282 312 }); 283 313 } 284 if(new_task['task_type']=='general') { 285 var view_id = bubble_comment_count; 314 315 var view_id; 316 if (new_task['task_type'] === 'general') { 317 view_id = bubble_comment_count; 286 318 bubble_comment_count++; 287 319 } else { 288 var view_id = bubble_comment_count; 289 } 320 view_id = bubble_comment_count; 321 } 322 290 323 var display_check_mark = ''; 291 if(wpf_tab_permission.display_task_id != 'yes') {324 if(wpf_tab_permission.display_task_id !== 'yes') { 292 325 display_check_mark = '<i class="gg-check"></i>'; 293 326 } else { 294 327 display_check_mark = view_id; 295 328 } 296 if(internal==1) { 329 330 if (internal === 1) { 297 331 var internal_icon = internal_icon_html; 298 jQuery_WPF('#bubble-'+id).append(internal_icon); 299 jQuery_WPF('#wpf_mark_internal_'+id).addClass('wpf_is_internal').removeClass('new_internal_tooltip').addClass('unmark_internal_tooltip'); 300 jQuery_WPF('#bubble-'+id).addClass('wpfb-internal'); 332 jQuery_WPF('#bubble-' + id).append(internal_icon); 333 jQuery_WPF('#wpf_mark_internal_' + id) 334 .addClass('wpf_is_internal') 335 .removeClass('new_internal_tooltip') 336 .addClass('unmark_internal_tooltip'); 337 jQuery_WPF('#bubble-' + id).addClass('wpfb-internal'); 301 338 } else { 302 339 internal_icon = ''; 303 340 } 341 304 342 var sticker_span = ''; 305 if(wpf_tab_permission.display_stickers == 'yes'){ 306 sticker_span = '<span class="sticker ' + task_priority + '_custom"></span> '; 307 } 343 if (wpf_tab_permission.display_stickers === 'yes') { 344 sticker_span = `<span class="sticker ${task_priority}_custom"></span> `; 345 } 346 308 347 let bubble_label = ''; 309 if (new_task['task_status']== 'complete') {348 if (new_task['task_status'] === 'complete') { 310 349 bubble_label = sticker_span + display_check_mark; 311 350 } else { 312 bubble_label = sticker_span + '<span class="wpf_bubble_num_wrapper">'+view_id+'</span>'; 313 } 351 bubble_label = sticker_span + `<span class="wpf_bubble_num_wrapper">${view_id}</span>`; 352 } 353 314 354 var wpf_dal_taskmeta = jQuery_WPF('#wpf_display_all_taskmeta').is(":checked"); 315 if(wpf_dal_taskmeta == true) {355 if(wpf_dal_taskmeta) { 316 356 var wpfactv = 'wpf_active'; 317 357 } 358 318 359 let internall = ''; 319 if ( internal) {360 if (internal) { 320 361 internall = '<span class="wpf_task_type" title="Task type">Internal</span>'; 321 362 } 322 363 323 if(new_task['task_type'] == 'general') { 324 const tag = (new_task['task_type'] == 'general') ? wpf_general_tag : wpf_email_tag; 325 if(wpf_tab_permission.display_stickers == 'yes') { 326 jQuery_WPF('#wpf_thispage_container_today').prepend('<li class="current_page_general_task ' + temp_class + ' ' + task_status+' '+task_status+'_custom '+task_priority+'" data-taskid="'+id+'" data-postid=""><div class="wpf_task_info"><div class="wpf_task_number '+task_status+'_custom" title="' + wpf_remap_text + '" data-disp-id="'+view_id+'">'+bubble_label+internal_icon+'</div><div class="wpf_task_sum"><level class="task-author">'+current_user_name+'<span>'+wpf_just_now+'</span></level><div class="current_page_task_list">'+task_comment+'</div></div></div><div class="wpf_task_meta"><div class="wpf_task_tagg">'+internall+'<span class="wpf_task_type" title="Task type">'+tag+'</span>' + wpfb_tags_html + '</div><div class="wpf_user_avatar">' + user_html + '</div></div></li>'); 327 } else { 328 jQuery_WPF('#wpf_thispage_container_today').prepend('<li class="current_page_general_task ' + temp_class + ' ' +task_status+' '+task_status+'_custom '+task_priority+'" data-taskid="'+id+'" data-postid=""><div class="wpf_task_info"><div class="wpf_task_number" title="' + wpf_remap_text + '" data-disp-id="'+view_id+'">'+bubble_label+internal_icon+'</div><div class="wpf_task_sum"><level class="task-author">'+current_user_name+'<span>'+wpf_just_now+'</span></level><div class="current_page_task_list">'+task_comment+'</div></div></div><div class="wpf_task_meta"><div class="wpf_task_tagg">'+internall+'<span class="wpf_task_type" title="Task type">'+tag+'</span>' + wpfb_tags_html + '</div><div class="wpf_user_avatar">' + user_html + '</div></div></li>'); 329 } 330 } else { 331 if(wpf_tab_permission.display_stickers == 'yes') { 332 jQuery_WPF('#wpf_thispage_container_today').prepend('<li class="current_page_task ' + temp_class + ' ' +task_status+' '+task_status+'_custom '+task_priority+'" data-taskid="'+id+'" data-postid=""><div class="wpf_task_info"><div class="wpf_task_number" title="' + wpf_remap_text + '" data-disp-id="'+view_id+'">'+bubble_label + internal_icon + '</div><div class="wpf_task_sum"><level class="task-author">'+current_user_name+'<span>'+wpf_just_now+'</span></level><div class="current_page_task_list">'+task_comment+'</div></div></div><div class="wpf_task_meta"><div class="wpf_task_tagg">' + internall + wpfb_tags_html + '</div><div class="wpf_user_avatar">' + user_html + '</div></div></li>'); 333 } else { 334 jQuery_WPF('#wpf_thispage_container_today').prepend('<li class="current_page_task ' + temp_class + ' ' +task_status+' '+task_priority+'" data-taskid="'+id+'" data-postid=""><div class="wpf_task_info"><div class="wpf_task_number" title="' + wpf_remap_text + '" data-disp-id="'+view_id+'">'+bubble_label + internal_icon + '</div><div class="wpf_task_sum"><level class="task-author">'+current_user_name+'<span>'+wpf_just_now+'</span></level><div class="current_page_task_list">'+task_comment+'</div></div></div><div class="wpf_task_meta"><div class="wpf_task_tagg">' + internall + wpfb_tags_html + '</div><div class="wpf_user_avatar">' + user_html + '</div></div></li>'); 335 } 336 } 337 img_dwn_icon = ""; 338 $class = "wpf_author"; 339 var note_html = ''; 340 if ( note == true ) { 364 const tag = new_task['task_type'] === 'general' ? wpf_general_tag : wpf_email_tag; 365 const taskTypeClass = new_task['task_type'] === 'general' ? 'current_page_general_task' : 'current_page_task'; 366 const taskStatussticker = wpf_tab_permission.display_stickers === 'yes' ? `${task_status}_custom` : ''; 367 const generalTag = new_task['task_type'] === 'general' ? `<span class="wpf_task_type" title="Task type">${tag}</span>` : ''; 368 369 let taskHtml = ` 370 <li class="${temp_class} ${task_status} ${taskStatussticker} ${task_priority} ${taskTypeClass}" data-taskid="${id}" data-postid=""> 371 <div class="wpf_task_info"> 372 <div class="wpf_task_number" title="${wpf_remap_text}" data-disp-id="${view_id}"> 373 ${bubble_label}${internal_icon} 374 </div> 375 <div class="wpf_task_sum"> 376 <level class="task-author">${current_user_name}<span>${wpf_just_now}</span></level> 377 <div class="current_page_task_list">${task_comment}</div> 378 </div> 379 </div> 380 <div class="wpf_task_meta"> 381 <div class="wpf_task_tagg"> 382 ${internall}${generalTag}${wpfb_tags_html} 383 </div> 384 <div class="wpf_user_avatar">${user_html}</div> 385 </div> 386 </li>`; 387 388 jQuery_WPF('#wpf_thispage_container_today').prepend(taskHtml); 389 390 let $class = "wpf_author"; 391 let note_html = ''; 392 if (note === true) { 341 393 $class = "wpf_author is_note"; 342 394 note_html = '<small class="wpf_note_html">Note</small>'; 343 395 } 344 author_html = ''; 345 if ( logged_user.author_img == '' || logged_user.author_img == 'undefined') { 346 if ( logged_user.author != '' ) { 347 author_html = logged_user.author.slice(0, 2); 348 } else { 349 author_html = current_user_name.slice(0, 2); 350 } 396 397 let author_html = ''; 398 if (logged_user.author_img === '' || logged_user.author_img === 'undefined') { 399 author_html = logged_user.author !== '' ? logged_user.author.slice(0, 2) : current_user_name.slice(0, 2); 351 400 } else { 352 author_html = '<img src="' + logged_user.author_img + '" alt="author" ></img>';353 } 354 355 // constcomment_data = responseData['data'];401 author_html = `<img src="${logged_user.author_img}" alt="author">`; 402 } 403 404 // comment_data = responseData['data']; 356 405 var comment_data = [{'id': 0}]; 357 406 358 // edit / delete button 359 var edit_delete_button_html = ''; 360 if (jQuery_WPF.inArray('edit', blocked) >= 0) { 361 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="edit_delete_plan()" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="edit_delete_plan()" >${delete_comment_icon}</a></div>`; 362 } else { 363 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="wpf_edit_box_active('${comment_data['id']}')" class="wpf_edit_box_active is_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn is_active" onclick="wpf_delete_comment('${comment_data['id']}')" >${delete_comment_icon}</a></div>`; 364 } 365 407 // Determine HTML for edit/delete buttons based on permissions 408 let edit_delete_button_html = getEditDeleteButtonHTML(comment_data['id']); 409 366 410 var files_html = get_files_html(temp_files); 367 var comment_html = '<li class="' + $class + ' ' + temp_class + ' ' + 'temp_comment_class"><div class="wpf-comment-container"><div class="wpf-author-img">' + author_html + '</div><div class="wpf-comment-wrapper"><level class="task-author"><div class="author-name">' + current_user_name + note_html + '</div><span>' + wpf_just_now + '</span></level><div class="meassage_area_main"><div class="chat_text" id="wpf-chat-text-'+comment_data['id']+'">'+temp_task_text+'</div>'+edit_delete_button_html+'</div>' + files_html + '<div id="wpfb-edit-comment-wrapper-'+comment_data['id']+'" class="wpfb-edit-comment-wrapper"><div class="wpf-editor"></div><textarea class="form-control wpfb-edit-comment" data-comment_id="'+comment_data['id']+'" placeholder="Edit the comment..." spellcheck="false">'+temp_task_text+'</textarea><button class="wpf_edit_comment_btn" onclick="wpfb_edit_comment('+comment_data['id']+')">'+edit_comment_text+'</button><a class="wpf-cancel-edit-comment" onclick="wpfb_cancel_edit_comment('+comment_data['id']+')" href="javascript:void(0)">'+cancel_edit_comment_text+'</a><div class="wpf_update_error wpf_hide">Please post your comment before performing this action</div></div></div></div></li>'; 368 jQuery_WPF('#task_comments_'+id).append(comment_html); 369 if(id == 1 && wpf_current_role == 'advisor'){ 370 var masic_comment_html = ""; 371 var masic_msg = "Awesome! you have just added your first task on the website. Let's start managing it from the dashboard. <a class='wpf_demo_cta' href='https://app.atarim.io/login' target='_blank'>Explore more in the Atarim Dashboard</a>"; 372 var masic_current_user_name = "Atarim"; 373 var masic_comment_html= '<li class="wpf_other magic_msg_replied"><level class="task-author">' + masic_current_user_name + '</level><div class="meassage_area_main">'+img_dwn_icon+'<div class="chat_text">'+masic_msg+'</div></div></li>'; 374 setTimeout(function(){ 375 jQuery_WPF('#task_comments_'+id).append(masic_comment_html); 376 }, 2000); 377 } 378 jQuery_WPF('#wpf_delete_container_'+id).html('<span class="wpfbsysinfo_delete_btn_task_id_'+id+'"><a href="javascript:void(0)" class="wpf_task_delete_btn" data-btn_taskid="' + id + '" style="color:red;"><i class="gg-trash"></i>'+wpf_delete_ticket+'</a></span><p class="wpfbsysinfo_delete_task_id_' + id + ' wpf_hide" ><b>'+wpf_delete_conform_text1+'</b><br>'+wpf_delete_conform_text2+' <a href="javascript:void(0)" class="wpf_task_delete" data-taskid="" data-elemid="'+id+'" style="color:red;">'+wpf_yes+'</a></p>'); 411 412 // getcomment HTML 413 var comment_html = createCommentHtml({ 414 className: $class, 415 tempClass: temp_class, 416 authorHtml: author_html, 417 currentUserName: current_user_name, 418 noteHtml: note_html, 419 wpfJustNow: wpf_just_now, 420 tempTaskText: temp_task_text, 421 editDeleteButtonHtml: edit_delete_button_html, 422 filesHtml: files_html, 423 commentDataId: comment_data['id'], 424 editCommentText: edit_comment_text, 425 cancelEditCommentText: cancel_edit_comment_text 426 }); 427 428 // Append the new comment HTML to the comments list 429 var $commentElement = jQuery_WPF(comment_html); 430 jQuery_WPF('#task_comments_' + id).append($commentElement); 431 432 const img_dwn_icon = ''; 433 if (id === 1 && wpf_current_role === 'advisor') { 434 const masic_msg = "Awesome! You have just added your first task on the website. Let's start managing it from the dashboard. <a class='wpf_demo_cta' href='https://app.atarim.io/login' target='_blank'>Explore more in the Atarim Dashboard</a>"; 435 const masic_current_user_name = "Atarim"; 436 437 const masic_comment_html = ` 438 <li class="wpf_other magic_msg_replied"> 439 <level class="task-author">${masic_current_user_name}</level> 440 <div class="meassage_area_main"> 441 ${img_dwn_icon} 442 <div class="chat_text">${masic_msg}</div> 443 </div> 444 </li>`; 445 446 setTimeout(() => { 447 jQuery_WPF('#task_comments_' + id).append(masic_comment_html); 448 }, 2000); 449 } 450 451 const deleteButtonHtml = ` 452 <span class="wpfbsysinfo_delete_btn_task_id_${id}"> 453 <a href="javascript:void(0)" class="wpf_task_delete_btn" data-btn_taskid="${id}" style="color:red;"> 454 <i class="gg-trash"></i>${wpf_delete_ticket} 455 </a> 456 </span> 457 <p class="wpfbsysinfo_delete_task_id_${id} wpf_hide"> 458 <b>${wpf_delete_conform_text1}</b><br> 459 ${wpf_delete_conform_text2} 460 <a href="javascript:void(0)" class="wpf_task_delete" data-taskid="" data-elemid="${id}" style="color:red;"> 461 ${wpf_yes} 462 </a> 463 </p>`; 464 jQuery_WPF(`#wpf_delete_container_${id}`).html(deleteButtonHtml); 465 379 466 jQuery_WPF('#comment-'+id).val(''); 380 467 // empty Task center rich text editor by Pratap … … 389 476 }, 390 477 success : function(data){ 478 let responseData = null; 391 479 try { 392 const jsonData = JSON.parse(data); 393 } catch (excep) {} 394 jQuery_WPF('#wpf_total_task_number').text( function(i, oldval) { 395 return ++oldval; 396 }); 397 if ( data != 0 ) { 398 tasks_on_page[id]=data; 480 responseData = JSON.parse(data); 481 } catch (ex) {} 482 if ( responseData['ID'] != 0 ) { 483 tasks_on_page[id] = responseData['ID']; 399 484 jQuery_WPF('#wpfbsysinfo_task_id-' + id).html(tasks_on_page[id]); 400 485 jQuery_WPF('#wpf_delete_container_' + id + ' .wpf_task_delete').attr('data-taskid', tasks_on_page[id]); … … 410 495 jQuery_WPF('.wpf_add_page').trigger('click'); 411 496 } 412 jQuery_WPF('.' + temp_class).find('.wpf_edit_box_active.is_active').attr('onclick', 'wpf_edit_box_active(' + data + ')'); 413 jQuery_WPF('.' + temp_class).find('.wpf_comment_delete_btn.is_active').attr('onclick', 'wpf_delete_comment(' + data + ')'); 414 jQuery_WPF('.' + temp_class).find('.chat_text').attr('id', 'wpf-chat-text-' + data ); 415 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment-wrapper').attr('id', 'wpf-wpfb-edit-comment-wrapper-' + data ); 416 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment').attr('data-comment_id', data ); 417 jQuery_WPF('.' + temp_class).find('.wpf_edit_comment_btn').attr('onclick', 'wpfb_edit_comment(' + data + ')'); 418 jQuery_WPF('.' + temp_class).find('.wpf-cancel-edit-comment').attr('onclick', 'wpfb_cancel_edit_comment(' + data + ')'); 419 jQuery_WPF('.' + temp_class).removeClass('temp_comment_class'); 420 jQuery_WPF('.' + temp_class).attr('data-comment_id', data ); 497 const commentId = responseData['id']; 498 update_comment_attributes(temp_class, commentId); 421 499 } 422 500 } … … 424 502 } 425 503 // Code to generate new comment. 426 function generate_comment(id, note){ 427 var new_task = Array(); 428 var task_priority = jQuery_WPF('input[name=wpfbpriority'+id+']:checked').val(); 429 var task_status = jQuery_WPF('input[name=wpfbtaskstatus'+id+']:checked').val(); 430 var raw_comment = jQuery_WPF('textarea#comment-'+id).val(); 504 function generate_comment(id, note) { 505 // Create an empty object for the new task 506 var new_task = {}; 507 508 // Get task priority and status from the form 509 var task_priority = jQuery_WPF('input[name=wpfbpriority' + id + ']:checked').val(); 510 var task_status = jQuery_WPF('input[name=wpfbtaskstatus' + id + ']:checked').val(); 511 512 // Get the raw comment text and clean it 513 var raw_comment = jQuery_WPF('textarea#comment-' + id).val(); 431 514 var task_comment = raw_comment.replace(/(<p><br><\/p>)+$/, ''); 432 515 var temp_task_text = task_comment; 516 517 // Collect the list of users to notify 433 518 var task_notify_users = []; 434 jQuery_WPF.each(jQuery_WPF('input[name=author_list_' +id+']:checked'), function(){519 jQuery_WPF.each(jQuery_WPF('input[name=author_list_' + id + ']:checked'), function() { 435 520 task_notify_users.push(jQuery_WPF(this).val()); 436 521 }); 437 task_notify_users =task_notify_users.join(","); 438 new_task['task_id']=tasks_on_page[id]; 439 new_task['task_comment_message']=task_comment; 440 new_task['comment_content']=task_comment; 441 new_task['is_note']=note; 522 task_notify_users = task_notify_users.join(","); 523 524 // Set up new task data 525 new_task['task_id'] = tasks_on_page[id]; 526 new_task['task_comment_message'] = task_comment; 527 new_task['comment_content'] = task_comment; 528 new_task['is_note'] = note; 529 530 // Process comment content to detect and handle URLs 442 531 const strippedString = task_comment.replace(/(<([^>]+)>)/gi, ""); 443 if (wpf_is_valid_url(strippedString) == true){444 if ( is_video_Url( strippedString )) {532 if (wpf_is_valid_url(strippedString) === true) { 533 if (is_video_Url(strippedString)) { 445 534 temp_task_text = wpf_is_valid_video_url(strippedString); 446 535 } else { … … 449 538 } 450 539 540 // Prepare form data for AJAX request 451 541 var wpf_upload_form = new FormData(); 452 542 wpf_upload_form.append('action', 'wpfb_add_comment'); 453 wpf_upload_form.append('wpf_nonce', wpf_nonce);543 wpf_upload_form.append('wpf_nonce', wpf_nonce); 454 544 wpf_upload_form.append('task_id', tasks_on_page[id]); 455 545 wpf_upload_form.append('comment_content', task_comment); 456 546 wpf_upload_form.append('is_note', note); 457 if (allFiles.length > 0) {547 if (allFiles.length > 0) { 458 548 allFiles.forEach(function(file) { 459 549 wpf_upload_form.append('wpf_upload_file[]', file); … … 462 552 wpf_upload_form.append("wpf_upload_file[]", ''); 463 553 } 554 555 // Generate a temporary class name 464 556 var temp_id = Math.floor(100000 + Math.random() * 900000); 465 557 var temp_class = 'temp_class_' + temp_id; 558 559 // Send the AJAX request to add the comment 466 560 jQuery_WPF.ajax({ 467 method: "POST",561 method: "POST", 468 562 url: ajaxurl, 469 563 data: wpf_upload_form, 470 564 contentType: false, 471 565 processData: false, 472 beforeSend: function() {473 // jQuery_WPF('.wpf_loader_'+id).show();474 jQuery_WPF('#wpf_error_' +id).hide();475 476 // const comment_data = responseData['data'];566 beforeSend: function() { 567 // Hide any previous error messages 568 jQuery_WPF('#wpf_error_' + id).hide(); 569 570 // Placeholder comment data until server response 477 571 var comment_data = [{'id': 0}]; 478 572 479 // edit / delete button 480 var edit_delete_button_html = ''; 481 if (jQuery_WPF.inArray('edit', blocked) >= 0) { 482 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="edit_delete_plan()" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="edit_delete_plan()" >${delete_comment_icon}</a></div>`; 483 } else { 484 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="wpf_edit_box_active('${comment_data['id']}')" class="wpf_edit_box_active is_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn is_active" onclick="wpf_delete_comment('${comment_data['id']}')" >${delete_comment_icon}</a></div>`; 485 } 486 487 $class = "wpf_author"; 573 // Determine HTML for edit/delete buttons based on permissions 574 let edit_delete_button_html = getEditDeleteButtonHTML(comment_data['id']); 575 576 // Set class based on whether the comment is a note 577 var $class = "wpf_author"; 488 578 var note_html = ''; 489 if ( note == true) {579 if (note === true) { 490 580 $class = "wpf_author is_note"; 491 581 note_html = '<small class="wpf_note_html">Note</small>'; 492 582 } 493 583 494 author_html = ''; 495 if ( logged_user.author_img == '' || logged_user.author_img == 'undefined') { 496 if ( logged_user.author != '' ) { 584 // Create author HTML based on user's image or initials 585 var author_html = ''; 586 if (logged_user.author_img === '' || logged_user.author_img === 'undefined') { 587 if (logged_user.author !== '') { 497 588 author_html = logged_user.author.slice(0, 2); 498 589 } else { … … 500 591 } 501 592 } else { 502 author_html = '<img src="' + logged_user.author_img + '" alt="author" ></img>';503 } 504 505 // /var files = wpf_file.files;593 author_html = '<img src="' + logged_user.author_img + '" alt="author"></img>'; 594 } 595 596 // Get HTML for any attached files 506 597 var files_html = get_files_html(temp_files); 507 598 508 var comment_html = '<li class="' + $class + ' ' + temp_class + ' ' + 'temp_comment_class"><div class="wpf-comment-container"><div class="wpf-author-img">' + author_html + '</div><div class="wpf-comment-wrapper"><level class="task-author"><div class="author-name">' + current_user_name + note_html + '</div><span>' + wpf_just_now + '</span></level><div class="meassage_area_main"><div class="chat_text" id="wpf-chat-text-'+comment_data['id']+'">'+temp_task_text+'</div>'+edit_delete_button_html+'</div>' + files_html + '<div id="wpfb-edit-comment-wrapper-'+comment_data['id']+'" class="wpfb-edit-comment-wrapper"><div class="wpf-editor"></div><textarea class="form-control wpfb-edit-comment" data-comment_id="'+comment_data['id']+'" placeholder="Edit the comment..." spellcheck="false">'+temp_task_text+'</textarea><button class="wpf_edit_comment_btn" onclick="wpfb_edit_comment('+comment_data['id']+')">'+edit_comment_text+'</button><a class="wpf-cancel-edit-comment" onclick="wpfb_cancel_edit_comment('+comment_data['id']+')" href="javascript:void(0)">'+cancel_edit_comment_text+'</a><div class="wpf_update_error wpf_hide">Please post your comment before performing this action</div></div></div></div></li>'; 509 510 jQuery_WPF('#task_comments_'+id).append(comment_html); 511 jQuery_WPF('textarea#comment-'+id).val(''); 512 // empty Task center rich text editor by Pratap 513 jQuery_WPF('textarea#comment-'+id).closest('.form-group').find('.ql-editor').html(''); 514 jQuery_WPF('#task_comments_'+id).animate({scrollTop: jQuery_WPF('#task_comments_'+id).prop("scrollHeight")}, 2000); 515 if(task_status=='complete'){ 599 // getcomment HTML 600 var comment_html = createCommentHtml({ 601 className: $class, 602 tempClass: temp_class, 603 authorHtml: author_html, 604 currentUserName: current_user_name, 605 noteHtml: note_html, 606 wpfJustNow: wpf_just_now, 607 tempTaskText: temp_task_text, 608 editDeleteButtonHtml: edit_delete_button_html, 609 filesHtml: files_html, 610 commentDataId: comment_data['id'], 611 editCommentText: edit_comment_text, 612 cancelEditCommentText: cancel_edit_comment_text 613 }); 614 615 // Append the new comment HTML to the comments list 616 var $commentElement = jQuery_WPF(comment_html); 617 jQuery_WPF('#task_comments_' + id).append($commentElement); 618 619 // Clear the original textarea and reset file uploads 620 jQuery_WPF('textarea#comment-' + id).val(''); 621 jQuery_WPF('textarea#comment-' + id).closest('.form-group').find('.ql-editor').html(''); 622 jQuery_WPF('#task_comments_' + id).animate({ scrollTop: jQuery_WPF('#task_comments_' + id).prop("scrollHeight") }, 2000); 623 624 // Update task status if marked complete 625 if (task_status === 'complete') { 516 626 let bubble_label = ''; 517 627 518 if (wpf_tab_permission.display_stickers == 'yes'){519 bubble_label = ' <span class="' +task_priority+'_custom"></span>';520 } 521 jQuery_WPF('#bubble-' +id).html(id+bubble_label);522 jQuery_WPF(document).find("#wpf_thispage [data-taskid='" + id + "'] .wpf_task_number").html(id +bubble_label);628 if (wpf_tab_permission.display_stickers === 'yes') { 629 bubble_label = ' <span class="' + task_priority + '_custom"></span>'; 630 } 631 jQuery_WPF('#bubble-' + id).html(id + bubble_label); 632 jQuery_WPF(document).find("#wpf_thispage [data-taskid='" + id + "'] .wpf_task_number").html(id + bubble_label); 523 633 jQuery_WPF(document).find("#wpf_thispage [data-taskid='" + id + "']").removeClass('complete').removeClass('open').removeClass('pending-review').removeClass('in-progress'); 524 634 jQuery_WPF(document).find("#wpf_thispage [data-taskid='" + id + "']").addClass(task_status); 525 635 } 636 637 // Reset file upload field 526 638 reset_file_upload_field(); 527 639 }, 528 success: function(data) {640 success: function(data) { 529 641 let responseData = null; 530 642 try { 531 643 responseData = JSON.parse(data); 532 } catch(ex){} 644 } catch (ex) {} 645 533 646 const comment_data = responseData['data']; 534 jQuery_WPF('.' + temp_class).find('.wpf_edit_box_active.is_active').attr('onclick', 'wpf_edit_box_active(\'' + comment_data['id'] + '\')'); 535 jQuery_WPF('.' + temp_class).find('.wpf_comment_delete_btn.is_active').attr('onclick', 'wpf_delete_comment(\'' + comment_data['id'] + '\')'); 536 jQuery_WPF('.' + temp_class).find('.chat_text').attr('id', 'wpf-chat-text-' + comment_data['id']); 537 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment-wrapper').attr('id', 'wpf-wpfb-edit-comment-wrapper-' + comment_data['id']); 538 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment').attr('data-comment_id', comment_data['id']); 539 jQuery_WPF('.' + temp_class).find('.wpf_edit_comment_btn').attr('onclick', 'wpfb_edit_comment(\'' + comment_data['id'] + '\')'); 540 jQuery_WPF('.' + temp_class).find('.wpf-cancel-edit-comment').attr('onclick', 'wpfb_cancel_edit_comment(\'' + comment_data['id'] + '\')'); 541 jQuery_WPF('.' + temp_class).removeClass('temp_comment_class'); 542 jQuery_WPF('.' + temp_class).attr('data-comment_id', comment_data['id']); 543 } 544 }); 647 const commentId = comment_data['id']; 648 update_comment_attributes(temp_class, commentId) 649 } 650 }); 651 } 652 // create edit_delete_button_html 653 function getEditDeleteButtonHTML(commentId) { 654 655 if(logged_user.author === '' || logged_user.author === 'undefined') { 656 return ''; 657 } 658 // Determine HTML for edit/delete buttons based on permissions 659 const isEditBlocked = jQuery_WPF.inArray('edit', blocked) >= 0; 660 const editAction = isEditBlocked ? 'edit_delete_plan()' : `wpf_edit_box_active('${commentId}')`; 661 const deleteAction = isEditBlocked ? 'edit_delete_plan()' : `wpf_delete_comment('${commentId}')`; 662 const isActiveClass = isEditBlocked ? '' : 'is_active'; 663 664 return ` 665 <div class="wpf-edit-delete-wrapper"> 666 <a href="javascript:void(0)" onclick="${editAction}" class="wpf_edit_box_active ${isActiveClass}" id="wpf_edit_box_active">${edit_comment_icon}</a> 667 <a href="javascript:void(0)" onclick="${deleteAction}" class="wpf_comment_delete_btn ${isActiveClass}">${delete_comment_icon}</a> 668 </div>`; 669 } 670 671 // Construct the comment HTML 672 function createCommentHtml({className, tempClass, authorHtml, currentUserName, noteHtml, wpfJustNow, tempTaskText, editDeleteButtonHtml, filesHtml, commentDataId, editCommentText, cancelEditCommentText}) { 673 return ` 674 <li class="${className} ${tempClass} temp_comment_class"> 675 <div class="wpf-comment-container"> 676 <div class="wpf-author-img">${authorHtml}</div> 677 <div class="wpf-comment-wrapper"> 678 <level class="task-author"> 679 <div class="author-name">${currentUserName} ${noteHtml}</div> 680 <span>${wpfJustNow}</span> 681 </level> 682 <div class="meassage_area_main"> 683 <div class="chat_text" id="wpf-chat-text-${commentDataId}">${tempTaskText}</div> 684 ${editDeleteButtonHtml} 685 </div> 686 ${filesHtml} 687 <div id="wpfb-edit-comment-wrapper-${commentDataId}" class="wpfb-edit-comment-wrapper"> 688 <div class="wpf-editor"></div> 689 <textarea class="form-control wpfb-edit-comment" data-comment_id="${commentDataId}" placeholder="Edit the comment..." spellcheck="false">${tempTaskText}</textarea> 690 <button class="wpf_edit_comment_btn" onclick="wpfb_edit_comment(${commentDataId})">${editCommentText}</button> 691 <a class="wpf-cancel-edit-comment" onclick="wpfb_cancel_edit_comment(${commentDataId})" href="javascript:void(0)">${cancelEditCommentText}</a> 692 <div class="wpf_update_error wpf_hide">Please post your comment before performing this action</div> 693 </div> 694 </div> 695 </div> 696 </li>`; 697 } 698 // Update attributes and IDs for the newly added comment 699 function update_comment_attributes(temp_class, commentId) { 700 jQuery_WPF('.' + temp_class).find('.wpf_edit_box_active.is_active').attr('onclick', 'wpf_edit_box_active(\'' + commentId + '\')'); 701 jQuery_WPF('.' + temp_class).find('.wpf_comment_delete_btn.is_active').attr('onclick', 'wpf_delete_comment(\'' + commentId + '\')'); 702 jQuery_WPF('.' + temp_class).find('.chat_text').attr('id', 'wpf-chat-text-' + commentId); 703 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment-wrapper').attr('id', 'wpfb-edit-comment-wrapper-' + commentId); 704 jQuery_WPF('.' + temp_class).find('.wpfb-edit-comment').attr('data-comment_id', commentId); 705 jQuery_WPF('.' + temp_class).find('.wpf_edit_comment_btn').attr('onclick', 'wpfb_edit_comment(\'' + commentId + '\')'); 706 jQuery_WPF('.' + temp_class).find('.wpf-cancel-edit-comment').attr('onclick', 'wpfb_cancel_edit_comment(\'' + commentId + '\')'); 707 jQuery_WPF('.' + temp_class).removeClass('temp_comment_class'); 708 jQuery_WPF('.' + temp_class).attr('data-comment_id', commentId); 709 710 // Initialize the Quill editor for the newly added comment 711 initializeQuillForComment(commentId); 712 } 713 // Function to initialize Quill editor for a specific comment 714 function initializeQuillForComment(comment_id) { 715 var editor = jQuery_WPF('#wpfb-edit-comment-wrapper-' + comment_id).find('.wpf-editor'); 716 717 if (!jQuery_WPF(editor).hasClass('activee')) { 718 jQuery_WPF(editor).addClass('activee'); 719 720 try { 721 var quill = new Quill(editor[0], { 722 modules: { 723 toolbar: [ 724 ['bold', 'italic', 'underline', 'strike'], 725 [{ list: 'ordered' }, { list: 'bullet' }], 726 ['link', 'code-block'], 727 ] 728 }, 729 placeholder: '', 730 theme: 'bubble' 731 }); 732 editor.data('quill', quill); 733 734 // Update the textarea with Quill editor content on change 735 quill.on('text-change', function(delta, oldDelta, source) { 736 var isempty = isQuillEmpty(quill); 737 var textarea = jQuery_WPF('#wpfb-edit-comment-wrapper-' + comment_id).find('textarea'); 738 textarea.val(isempty ? '' : quill.root.innerHTML); 739 }); 740 741 // Handle Enter key press in the editor 742 editor.on('keydown', function(event) { 743 if ((event.keyCode === 13 || event.key === "Enter") && !event.shiftKey) { 744 // Add logic to handle Enter key if needed 745 } 746 }); 747 748 // Focus on the editor after initialization 749 setTimeout(() => { 750 quill.focus(); 751 }, 100); 752 } catch (error) { 753 console.error('Error initializing Quill editor for comment ID:', comment_id, error); 754 } 755 } 545 756 } 546 757 // Mark task as internal; … … 746 957 } 747 958 var edited_html=''; 748 var edit_delete_button_html = '';749 959 if(wpfb_metas.comments[key].is_edited && !wpfb_metas.comments[key].is_deleted){ 750 960 edited_html='<span class="wpf-is-edited">(edited)<span class="wpf_tooltiptext edit_tooltip_text">'+wpfb_metas.comments[key].updated_at+'</span></span>'; … … 752 962 edited_html=''; 753 963 } 964 let edit_delete_button_html = ''; 754 965 if ( ( eval(current_user_id) === eval(wpfb_metas.comments[key]['wpf_user_id']) ) && (!wpfb_metas.comments[key]['is_log']) && (!wpfb_metas.comments[key].is_deleted) ) { 755 if (jQuery_WPF.inArray('edit', blocked) >= 0) { 756 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="edit_delete_plan()" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="edit_delete_plan()" >${delete_comment_icon}</a></div>`; 757 } else { 758 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="wpf_edit_box_active('${key}')" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="wpf_delete_comment('${key}')" >${delete_comment_icon}</a></div>`; 759 } 760 //wpf_display_tasks(); 966 // Determine HTML for edit/delete buttons based on permissions 967 edit_delete_button_html = getEditDeleteButtonHTML(key); 761 968 } 762 969 … … 1198 1405 1199 1406 var edited_html=''; 1200 var edit_delete_button_html = '';1407 let edit_delete_button_html = ''; 1201 1408 var show_comment_id = ''; 1202 1409 if(wpfb_metas.comments[key].is_edited && !wpfb_metas.comments[key].is_deleted){ 1203 //edited_html='<span class="wpf-is-edited">(edited)<span class="wpf_tooltiptext edit_tooltip_text">'+wpfb_metas.comments[key].updated_at+'</span></span>';1204 1410 edited_html='<span class="wpf-is-edited">(Edited)</span>'; 1205 1411 }else{ … … 1208 1414 1209 1415 if ( ( eval(current_user_id) === eval(wpfb_metas.comments[key]['wpf_user_id']) ) && (!wpfb_metas.comments[key]['is_log']) && (!wpfb_metas.comments[key].is_deleted) ) { 1210 if (jQuery_WPF.inArray('edit', blocked) >= 0) { 1211 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="edit_delete_plan()" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="edit_delete_plan()" >${delete_comment_icon}</a></div>`; 1212 } else { 1213 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="wpf_edit_box_active(${key})" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="wpf_delete_comment('${key}')" >${delete_comment_icon}</a></div>`; 1214 show_comment_id = key; 1215 } 1416 // Determine HTML for edit/delete buttons based on permissions 1417 edit_delete_button_html = getEditDeleteButtonHTML(key); 1216 1418 } 1217 1419 … … 1610 1812 tab_nav_html += '</ul>'; 1611 1813 1612 if(wpfb_metas.task_config_author_name != "undefined"){ 1613 for (var usr in wpfb_users_arr) { 1614 if (wpfb_users_arr.hasOwnProperty(usr)) { 1615 if(wpfb_users_arr[usr]['username']==wpfb_metas.task_config_author_name){ 1616 wpf_config_author_name = wpfb_users_arr[usr]['displayname']; // wpfb_users_arr[usr]['first_name'] + ' ' + wpfb_users_arr[usr]['last_name']; 1617 break; 1618 } 1814 if(wpfb_metas.task_config_author_name != "undefined"){ 1815 for (var usr in wpfb_users_arr) { 1816 if (wpfb_users_arr.hasOwnProperty(usr)) { 1817 if(wpfb_users_arr[usr]['username']==wpfb_metas.task_config_author_name){ 1818 wpf_config_author_name = wpfb_users_arr[usr]['displayname']; 1819 break; 1619 1820 } 1620 1821 } 1621 1822 } 1823 } 1622 1824 //new task popover 1623 1825 var tabs_html=''; … … 1979 2181 1980 2182 var edited_html=''; 1981 var edit_delete_button_html = '';2183 let edit_delete_button_html = ''; 1982 2184 var show_comment_id = ''; 1983 2185 if(wpfb_metas.comments[key].is_edited && !wpfb_metas.comments[key].is_deleted){ 1984 //edited_html='<span class="wpf-is-edited">(edited)<span class="wpf_tooltiptext edit_tooltip_text">'+wpfb_metas.comments[key].updated_at+'</span></span>';1985 2186 edited_html='<span class="wpf-is-edited">(Edited)</span>'; 1986 2187 }else{ … … 1989 2190 1990 2191 if ( ( eval(current_user_id) === eval(wpfb_metas.comments[key]['wpf_user_id']) ) && ( (!wpfb_metas.comments[key]['is_log']) && (!wpfb_metas.comments[key].is_deleted) ) ) { 1991 if (jQuery_WPF.inArray('edit', blocked) >= 0) { 1992 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="edit_delete_plan()" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="edit_delete_plan()" >${delete_comment_icon}</a></div>`; 1993 } else { 1994 edit_delete_button_html = `<div class="wpf-edit-delete-wrapper"><a href="javascript:void(0)" onclick="wpf_edit_box_active('${key}')" class="wpf_edit_box_active" id="wpf_edit_box_active">${edit_comment_icon}</a><a href="javascript:void(0)" class="wpf_comment_delete_btn" onclick="wpf_delete_comment('${key}')" >${delete_comment_icon}</a></div>`; 1995 show_comment_id = key; 1996 } 2192 // Determine HTML for edit/delete buttons based on permissions 2193 edit_delete_button_html = getEditDeleteButtonHTML(key); 1997 2194 } 1998 2195 … … 3366 3563 if (wpfb_users_arr.hasOwnProperty(key)) { 3367 3564 var user_name = (wpfb_users_arr[key]['first_name']) ? wpfb_users_arr[key]['first_name'] + ' ' + wpfb_users_arr[key]['last_name'] : wpfb_users_arr[key]['displayname']; 3368 if( current_user_id == key || wpf_website_builder == key) {3565 if( notify_users == '' && ( current_user_id === key || wpf_website_builder.includes(key) ) ) { 3369 3566 checked = 'checked'; 3370 3567 } -
atarim-visual-collaboration/trunk/readme.txt
r3144271 r3157953 4 4 Requires at least: 5.0 5 5 Tested up to: 6.6 6 Stable tag: 4.0. 56 Stable tag: 4.0.6 7 7 Requires PHP: 7.4 8 8 License: GPLv3 or later … … 375 375 376 376 == Changelog == 377 378 = 4.0.6 = 379 * **Multiple Default Users** - Integrated the option to set multiple default users for task assignments, instead of just one. 380 * **Guest User Restrictions** - Disabled the edit and delete options for guest users, preventing them from modifying or deleting comments. 381 * **Custom Post Type Archive Support** - Added support for custom post type archive pages, ensuring the collaboration interface loads properly on these pages. 382 377 383 378 384 = 4.0.5 =
Note: See TracChangeset
for help on using the changeset viewer.