Changeset 2147379
- Timestamp:
- 08/28/2019 09:50:10 PM (7 years ago)
- Location:
- wp-issues-crm/trunk
- Files:
-
- 6 edited
-
js/email-inbox.js (modified) (3 diffs)
-
js/email-message.js (modified) (11 diffs)
-
js/email-process.js (modified) (1 diff)
-
php/form/class-wic-form-email-inbox.php (modified) (2 diffs)
-
sql/wic_structures.sql (modified) (1 diff)
-
wp-issues-crm.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-issues-crm/trunk/js/email-inbox.js
r2146005 r2147379 121 121 if ( $( event.target ).hasClass ( "wic-inbox-page-label") ) { 122 122 $target = $(event.target).parent(); 123 } else if ( $( event.target ).hasClass ( "wic-inbox-tab-count") ) { 124 $target = $(event.target).parent().parent(); 123 125 } else { 124 126 $target = $(event.target); … … 482 484 wpIssuesCRM.doFilterAssignmentPopup = function() { 483 485 var popupWidth = 480; 484 var popupContent = '<div title=" Select Assigned Staff for Message Display"><div id = "staff_filter_assignment_popup">' +486 var popupContent = '<div title="Filter Assigned/Ready messages"><div id = "staff_filter_assignment_popup">' + 485 487 $( "#hidden-staff-assignment-control" ).html() + 486 '<p class="staff_assignment_popup-legend">Selection applies only when viewing Assigned or Ready tab.</p>' + 488 '<p>Selection of staff filters messages in the Assigned and Ready tabs, limiting them to messages assigned to the selected staff.</p>' + 489 '<p><em>The messages assigned to other staff and filtered out of the Assigned and Ready tabs will appear in the tabs where they would appear if unassigned.</em></p>' + 487 490 '</div></div>'; 488 491 dialog = $.parseHTML( popupContent ); … … 499 502 position: { my: "right top", at: "right top", of: "#wic-filter-assigned-button" }, 500 503 show: { effect: "fadeIn", duration: 200 }, 501 buttons: [], 504 buttons: [ 505 { 506 width: 80, 507 text: "Cancel", 508 click: function() { 509 wpIssuesCRM.filterAssignedPopupObject.dialog( "close" ); 510 } 511 }, 512 { 513 width: 80, 514 text: "Filter", 515 autofocus: true, 516 click: function() { 517 selectedStaff = selectStaffButton.val(); 518 nextPage[selectedPage] = 0; 519 wpIssuesCRM.loadSelectedPage(); 520 wpIssuesCRM.filterAssignedPopupObject.fadeOut( 300, 'swing', function(){ wpIssuesCRM.filterAssignedPopupObject.dialog( "close" ); }) 521 522 } 523 } 524 ], 502 525 modal: true, 503 526 }); 504 527 selectStaffButton = $( "#staff_filter_assignment_popup #case_assigned" ); 505 528 wpIssuesCRM.setVal( selectStaffButton[0],selectedStaff, '' ); // empty string is ignored provided staff # exists 506 507 selectStaffButton.on( "change", function( event, ui ) { 508 selectedStaff = selectStaffButton.val(); 509 nextPage[selectedPage] = 0; 510 wpIssuesCRM.loadSelectedPage(); 511 wpIssuesCRM.filterAssignedPopupObject.fadeOut( 200, 'swing', function(){ wpIssuesCRM.filterAssignedPopupObject.remove(); }) 512 }); 529 513 530 }; 514 531 -
wp-issues-crm/trunk/js/email-message.js
r2146005 r2147379 98 98 }) 99 99 // info request handlers 100 .on( "click", "#assigned-case-popup-button", wpIssuesCRM.handleAssignmentPopupClick )101 100 .on( "click", "#parse-popup-button", wpIssuesCRM.doParseDetailsPopup ) 102 101 .on( "click", "#view-issue-button", wpIssuesCRM.doIssuePeekPopup ) … … 106 105 .on ( "change", "#wic-inbox-work-area #pro_con", handleProConChange ) 107 106 // initialize action request handlers 107 .on( "click", "#assigned-case-popup-button", wpIssuesCRM.handleAssignmentPopupClick ) 108 108 // processEmail distinguishes the trigger buttons 109 109 .on( "click", ".trigger-email-process-button", wpIssuesCRM.processEmail ) … … 111 111 // display message review area 112 112 .css( "visibility", "visible" ); 113 114 // enable or disable approval/unapproval button 115 if ( !( ['CATEGORY_ASSIGNED', 'CATEGORY_READY'].indexOf(wpIssuesCRM.inboxSelectedTab) > -1 ) ){ 116 $( '#wic-email-approve-button' ).prop( 'disabled',true ).addClass('ui-state-disabled'); 117 } else { 118 $( '#wic-email-approve-button' ).prop( 'disabled',false ).removeClass('ui-state-disabled'); 119 } 120 // enable/disable staff reassignment button 121 if ( ! wpIssuesCRMSettings.canSendEmail ){ 122 $( '#assigned-case-popup-button' ).prop( 'disabled',true ).addClass('ui-state-disabled'); 123 } else { 124 $( '#assigned-case-popup-button' ).prop( 'disabled',false ).removeClass('ui-state-disabled'); 125 } 126 113 127 114 // remove any extant tinymce instances 128 115 tinymce.remove(); … … 193 180 /* 194 181 * ScrollMessage retrieves message info based on activeMessage pointer. 195 * It only show/hides loaders and areas to be filled -- no other display decisions change in it 196 * 182 * It only show/hides loaders and areas to be filled, enables/disables approve/assign buttons -- no other display decisions change in it 183 * 184 * Note that this is scrolling within a subject line ( or loading the first message of a subject line); jumpToSubjectLine scrolls across lines 197 185 */ 198 186 wpIssuesCRM.scrollMessage = function( switchingSubjects ) { … … 261 249 // save assigned staff -- setting to 0 if unassigned 262 250 wpIssuesCRM.assignedStaff = response.assigned_staff; 263 chooseStaffButtonColor(); 251 // set button values attributes and properties 252 manageApproveAssignButtons(); 264 253 // save final draft status 265 254 wpIssuesCRM.replyFinal = response.reply_is_final; … … 320 309 // cache transition line 321 310 wpIssuesCRM.replyTransitionLine = response.reply_transition_line; 311 312 322 313 }); 323 314 } … … 340 331 // informational popup 341 332 wpIssuesCRM.doAssignmentPopup = function() { 333 342 334 var popupWidth = 480; 343 335 var popupContent = '<div title="Assign Staff to Handle Message"><div id = "staff_assignment_popup">' + 344 336 $( "#hidden-staff-assignment-control" ).html() + 345 '<p class="staff_assignment_popup-legend">Email will be assigned for drafting of reply to selected staff.</p>' + 346 '</div></div>'; 337 '<p>Email will be assigned to selected staff and will show in the Assigned tab.</p>' + 338 '<p>Other emails with the exact same subject line will automatically follow the assigned email into the Assigned tab until ' + 339 'the assigned email is disposed of; you will still need to sweep them or individually reply to them. They are not yet recorded or assigned or grouped ' + 340 'with the assigned email. They are just following it to reduce clutter in other inbox tabs, while assigned staff drafts a reply. ' + 341 'You can act on them individually at any time just as if they were in any other tab.</p>'; 347 342 dialog = $.parseHTML( popupContent ); 348 343 wpIssuesCRM.assignedCasePopupObject = $( dialog ); … … 358 353 position: { my: "left top", at: "left bottom", of: "#wic-message-sender-constituent .wic-selectmenu-wrapper" }, 359 354 show: { effect: "fadeIn", duration: 200 }, 360 buttons: [], 361 modal: true, 355 buttons: [ 356 { 357 width: 80, 358 text: "Cancel", 359 click: function() { 360 wpIssuesCRM.assignedCasePopupObject.dialog( "close" ); 361 } 362 }, 363 { 364 width: 80, 365 text: "Assign", 366 autofocus: true, 367 click: function() { 368 wpIssuesCRM.assignedStaff = selectStaffButton.val(); 369 wpIssuesCRM.saveValueToInboxImage( 'staff', wpIssuesCRM.assignedStaff ); 370 manageApproveAssignButtons(); 371 wpIssuesCRM.assignedCasePopupObject.dialog( "close" ); 372 } 373 } 374 ], 375 modal: true, 362 376 }); 363 377 selectStaffButton = $( "#staff_assignment_popup #case_assigned" ); 364 378 wpIssuesCRM.setVal( selectStaffButton[0], wpIssuesCRM.assignedStaff, '' ); // empty string is ignored provided staff # exists 365 366 selectStaffButton.on( "change", function( event, ui ) { 367 wpIssuesCRM.assignedStaff = selectStaffButton.val(); 368 wpIssuesCRM.saveValueToInboxImage( 'staff', wpIssuesCRM.assignedStaff ); 369 wpIssuesCRM.assignedCasePopupObject.fadeOut( 500, 'swing', function(){ wpIssuesCRM.assignedCasePopupObject.remove(); }) 370 chooseStaffButtonColor(); 371 }); 379 372 380 }; 373 381 … … 713 721 $toTile.children( ".constituent-email-item-text" ).text ( response.constituent_name ); 714 722 } 715 chooseStaffButtonColor();716 723 // enable processing buttons 717 724 processingButtons.prop("disabled", false ).removeClass('ui-state-disabled'); 718 725 }); 719 }720 721 function chooseStaffButtonColor() {722 var color;723 if( wpIssuesCRM.currentMessageVars.countMessages > 1 ) {724 color = '#ddd'725 } else if ( wpIssuesCRM.assignedStaff > 0 ) {726 color = 'green'727 } else {728 color = '#999';729 }730 $( "#assigned-case-popup-button" ).css( "color", color );731 726 } 732 727 … … 793 788 /* 794 789 * 795 * handle approval button 790 * handle approval button appearance 796 791 * 797 792 * … … 903 898 * 904 899 */ 900 function manageApproveAssignButtons() { 901 /* 902 * enable/disable assign/approve buttons -- could do at jumpToSubjectLine, but doing it here makes 903 * possibility of adding message specific legends in enabled cases 904 * 905 */ 906 // enable or disable approval/unapproval button based on tab selection and message line count; is enabled for all users 907 if ( !( ['CATEGORY_ASSIGNED', 'CATEGORY_READY'].indexOf(wpIssuesCRM.inboxSelectedTab) > -1 || 908 wpIssuesCRM.currentMessageVars.countMessages > 1 ) ){ 909 $( '#wic-email-approve-button' ).prop( 'disabled',true ).addClass('ui-state-disabled'); 910 } else { 911 $( '#wic-email-approve-button' ).prop( 'disabled',false ).removeClass('ui-state-disabled'); 912 } 913 // enable/disable staff reassignment button based on user capability and message count; is enabled in all tabs 914 if ( ! wpIssuesCRMSettings.canSendEmail || wpIssuesCRM.currentMessageVars.countMessages > 1 ){ 915 $( '#assigned-case-popup-button' ).prop( 'disabled',true ).addClass('ui-state-disabled').attr("title","Cannot assign/reassign."); 916 } else { 917 $( '#assigned-case-popup-button' ).prop( 'disabled',false ).removeClass('ui-state-disabled'); 918 console.log ( ) 919 $( '#assigned-case-popup-button' ).prop("title", wpIssuesCRM.assignedStaff > 0 ? "Assigned -- click to reassign." : "Unassigned -- click to assign."); 920 } 921 922 /* 923 * 924 * choose staff button color 925 */ 926 var color; 927 if( wpIssuesCRM.currentMessageVars.countMessages > 1 ) { 928 color = '#ddd' 929 } else if ( wpIssuesCRM.assignedStaff > 0 ) { 930 color = 'green' 931 } else { 932 color = '#999'; 933 } 934 $( "#assigned-case-popup-button" ).css( "color", color ); 935 } 936 905 937 function currentUID() { 906 938 return wpIssuesCRM.currentMessageVars.uidArray[wpIssuesCRM.currentMessageVars.activeMessage]; -
wp-issues-crm/trunk/js/email-process.js
r2146005 r2147379 609 609 } 610 610 611 612 613 614 611 }( window.wpIssuesCRM = window.wpIssuesCRM || {}, jQuery )); // end namespace enclosure -
wp-issues-crm/trunk/php/form/class-wic-form-email-inbox.php
r2146005 r2147379 365 365 '<div id = "wic-email-subject-header"> '. 366 366 '<div id = "wic-message-subject"></div>' . 367 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-approve-button" type="button" value="approve" title="Reply ready" ><span class="dashicons dashicons-thumbs-down"></span></button>' .368 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-delete-button" type="button" value="delete" title="Archive" ><span class="dashicons dashicons-archive"></span></button>' .369 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-block-button" type="button" value="block" title = "Archive and block sender" ><span class="dashicons dashicons-warning"></span></button>' .370 '<button class="wic-form-button email-action-button subject-line-move-button" type="button" value="left" title="Previous Line"><span class="dashicons dashicons-arrow-left" ></span></button>' .371 '<button class="wic-form-button email-action-button subject-line-move-button" type="button" value="right" title="Next Line"><span class="dashicons dashicons-arrow-right" ></span></button>' .372 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-record-reply-button" type="button" value="reply" title="Record incoming and send outgoing" >Send</button>' .373 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-record-button" type="button" value="record" title="Record incoming" ><span class="dashicons dashicons-yes" ></span></button>' .374 '<button class="wic-form-button email-action-button" id="wic-email-close-button" type="button" title="Close"><span class="dashicons dashicons-no"></span></button>' .375 '</div>' .367 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-approve-button" type="button" value="approve" title="Reply ready" ><span class="dashicons dashicons-thumbs-down"></span></button>' . 368 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-delete-button" type="button" value="delete" title="Archive" ><span class="dashicons dashicons-archive"></span></button>' . 369 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-block-button" type="button" value="block" title = "Archive and block sender" ><span class="dashicons dashicons-warning"></span></button>' . 370 '<button class="wic-form-button email-action-button subject-line-move-button" type="button" value="left" title="Previous Line"><span class="dashicons dashicons-arrow-left" ></span></button>' . 371 '<button class="wic-form-button email-action-button subject-line-move-button" type="button" value="right" title="Next Line"><span class="dashicons dashicons-arrow-right" ></span></button>' . 372 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-record-reply-button" type="button" value="reply" title="Record incoming and send outgoing" >Send</button>' . 373 '<button class="wic-form-button email-action-button trigger-email-process-button" id="wic-email-record-button" type="button" value="record" title="Record incoming" ><span class="dashicons dashicons-yes" ></span></button>' . 374 '<button class="wic-form-button email-action-button" id="wic-email-close-button" type="button" title="Close"><span class="dashicons dashicons-no"></span></button>' . 375 '</div>' . 376 376 '<div id = "wic-inbox-detail-wrapper" >' . 377 377 '<div class="wic-dashboard-title inbox-legend" id = "wic-message-sender-header">' . … … 431 431 '<div id="reply-help-sidebar" class="wic-mce-sidebar"> 432 432 <div class="wic-mce-sidebar-section" > 433 <p><span class="dashicons dashicons-thumbs-up"></span><p> 434 <p><em>Approve this email draft -- move from Assigned tab to Ready tab.</em></p> 435 </div> 436 <div class="wic-mce-sidebar-section" > 433 437 <p><span class="dashicons dashicons-archive"></span><p> 434 438 <p><em>Delete the emails with this subject line (one time).</em></p> -
wp-issues-crm/trunk/sql/wic_structures.sql
r2145245 r2147379 255 255 KEY extended_message_id_key (extended_message_id(100)), 256 256 KEY from_domain_key (from_domain(100)), 257 KEY staff_subject (inbox_defined_staff,subject(100)), 257 258 KEY staff_final_subject (inbox_defined_staff,inbox_defined_reply_is_final,subject(100)) 258 259 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -
wp-issues-crm/trunk/wp-issues-crm.php
r2145245 r2147379 4 4 * Plugin URI: http://wp-issues-crm.com 5 5 * Description: Constituent Relationship Management for organizations that respond to constituents. Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories. 6 * Version: 4. 4.1.46 * Version: 4.5.0.1 7 7 * Author: Will Brownsberger 8 8 * Author URI: http://willbrownsberger.com … … 12 12 * Text Domain: wp-issues-crm 13 13 * 14 * Copyright 2015, 2016, 2017, 2018, 2019 WILL BROWNSBERGER (email : will brownsberger@gmail.com)14 * Copyright 2015, 2016, 2017, 2018, 2019 WILL BROWNSBERGER (email : will@brownsberger.net) 15 15 16 16 This program is free software; you can redistribute it and/or modify … … 39 39 // set database version global; 40 40 global $wp_issues_crm_db_version; 41 $wp_issues_crm_db_version = '4.5.0. 0.0.1';41 $wp_issues_crm_db_version = '4.5.0.1'; 42 42 /* 43 43 * set js_css version global -- three possibilities:
Note: See TracChangeset
for help on using the changeset viewer.