Changeset 3027495
- Timestamp:
- 01/26/2024 07:43:05 PM (14 months ago)
- Location:
- wp-easy-crm
- Files:
-
- 38 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-easy-crm/trunk/easy-crm.php
r3025425 r3027495 4 4 * Plugin Name: Easy CRM 5 5 * Description: Collect new leads, manage clients, quotations, invoices, tasks and more for your entire team 6 * Version: 1.0.1 36 * Version: 1.0.14 7 7 * Author: IT-iCO SRL 8 8 * Author URI: https://it-ico.com … … 661 661 wp_register_script( 'datatables', plugin_dir_url( __FILE__ ).'scripts/datatables.min.js', array( 'jquery' ) ); 662 662 wp_enqueue_script( 'datatables' ); 663 wp_register_script( 'datatablesresponsive', plugin_dir_url( __FILE__ ).'scripts/dataTables.responsive.min.js', array( 'jquery' ) ); 664 wp_enqueue_script( 'datatablesresponsive' ); 663 665 wp_register_script( 'html2pdf', plugin_dir_url( __FILE__ ).'scripts/html2pdf.bundle.min.js', array( 'jquery' ) ); 664 666 wp_enqueue_script( 'html2pdf' ); -
wp-easy-crm/trunk/readme.txt
r3025425 r3027495 4 4 Requires at least: 5.9 5 5 Tested up to: 6.4.2 6 Stable tag: 1.0.1 36 Stable tag: 1.0.14 7 7 Contributors: sunnysonic 8 8 License: GPLv2 or later … … 60 60 61 61 == Changelog == 62 63 = 1.0.14 = 64 * tested wordpress 6.4.2 65 * mobile usability improved on all pages 66 * show more button in client profile made bigger and centered on overflowing content 62 67 63 68 = 1.0.13 = -
wp-easy-crm/trunk/views/clientProfile.php
r3024884 r3027495 102 102 103 103 <div><h1 style="float:left"><?php _e( 'Client Contact Profile', 'wp-easy-crm' );?> || <?php echo esc_html($row_details['clientname']) ?></h1> 104 <a href="admin.php?page=wp-easy-crm&id=<?php echo $row_details['id'];?>&action=deleteclient" style="float:right;margin-left:20px;margin-top:12px;" onclick="return eacr_confirmDeleteSuppl();"><?php _e( 'delete client', 'wp-easy-crm' );?></a><br/></div>104 <a href="admin.php?page=wp-easy-crm&id=<?php echo $row_details['id'];?>&action=deleteclient" style="float:right;margin-left:20px;margin-top:12px;" class="delete-client-link" onclick="return eacr_confirmDeleteSuppl();"><?php _e( 'delete client', 'wp-easy-crm' );?></a><br/></div> 105 105 <br/><br/> 106 106 … … 126 126 </br></br><code><b><?php _e( 'Address:', 'wp-easy-crm' );?></b> <?php echo esc_html($row_details['direccion']) ?> <b>Accounting Region:</b> <?php echo esc_html($accountingRegionName) ?> </code> 127 127 </br></br><code><b><?php _e( 'Note:', 'wp-easy-crm' );?></b> <?php echo esc_html($row_details['nota']) ?></code> 128 129 <style> 130 @media (max-width: 767px) { /* Adjust max-width as needed for your target mobile breakpoint */ 131 .delete-client-link { 132 display: none; 133 } 134 .editcolumn { 135 display: none; 136 } 137 #wpcontent { 138 padding-left: 5px !important; 139 padding-right: 5px !important; 140 } 141 } 142 </style> 143 144 <script> 145 jQuery(document).ready(function() { 146 // Inject CSS to hide sorting arrows and minimize thead height 147 var css = ` 148 table.dataTable thead th { 149 border: 0; 150 padding: 0; 151 height: 1px; 152 font-size: 0; 153 } 154 table.dataTable thead .sorting, 155 table.dataTable thead .sorting_asc, 156 table.dataTable thead .sorting_desc, 157 table.dataTable thead .sorting_asc_disabled, 158 table.dataTable thead .sorting_desc_disabled { 159 background-image: none !important; 160 }`; 161 var style = document.createElement('style'); 162 if (style.styleSheet) { 163 style.styleSheet.cssText = css; 164 } else { 165 style.appendChild(document.createTextNode(css)); 166 } 167 document.getElementsByTagName('head')[0].appendChild(style); 168 169 // Add an empty thead and initialize DataTables 170 jQuery('table').each(function() { 171 var emptyThead = jQuery('<thead><tr></tr></thead>'); 172 var numCols = jQuery(this).find('tbody tr:first td').length; 173 for (var i = 0; i < numCols; i++) { 174 emptyThead.find('tr').append('<th></th>'); 175 } 176 jQuery(this).prepend(emptyThead); 177 178 // Initialize DataTables with specific options 179 jQuery(this).DataTable({ 180 responsive: { 181 details: { 182 type: 'column', 183 target: 0 // Target the second column (index starts at 0) 184 } 185 }, 186 paging: false, // Disable pagination 187 searching: false, // Hide the search box 188 info: false, // Hide table information summary 189 lengthChange: false, // Hide length menu (number of rows per page selector) 190 ordering: false // Disable ordering (sorting) 191 }); 192 }); 193 }); 194 </script> 195 196 197 198 199 200 201 202 128 203 129 204 <!--Activity Log section--> … … 263 338 echo '<td class="column-columnname">'.esc_html($singlequote['lastupdate_at']).'</td>'; 264 339 265 echo '<td class="column-columnname "><a href="admin.php?page=wp-easy-crm-addquote&action=edit"eid='.esc_html($singlequote['id']).'&id='.esc_html($id).'">'.__( 'edit', 'wp-easy-crm' ).'</a>340 echo '<td class="column-columnname editcolumn"><a href="admin.php?page=wp-easy-crm-addquote&action=edit"eid='.esc_html($singlequote['id']).'&id='.esc_html($id).'">'.__( 'edit', 'wp-easy-crm' ).'</a> 266 341 | <a onclick="return eacr_confirmDeleteQuote();" href="admin.php?page=wp-easy-crm-addquote&action=delete"eid='.esc_html($singlequote['id']).'&id='.esc_html($id).'">'.__( 'delete', 'wp-easy-crm' ).'</a></td>'; 267 342 … … 295 370 showMoreBtn.style.color = 'white'; // White text 296 371 showMoreBtn.style.border = 'none'; 297 showMoreBtn.style.padding = ' 5px 10px';298 showMoreBtn.style.marginTop = ' 5px';372 showMoreBtn.style.padding = '10px 10px'; 373 showMoreBtn.style.marginTop = '10px'; 299 374 showMoreBtn.style.cursor = 'pointer'; 300 showMoreBtn.style.borderRadius = '5px'; 375 showMoreBtn.style.borderRadius = '10px'; 376 showMoreBtn.style.display = 'block'; // Set display to block 377 showMoreBtn.style.marginLeft = 'auto'; // Align to center horizontally 378 showMoreBtn.style.marginRight = 'auto'; // Align to center horizontally 301 379 302 380 // Append the button after the table -
wp-easy-crm/trunk/views/listClients.php
r3025425 r3027495 275 275 276 276 277 //can possibly be deleted below january 2024278 // if ( current_user_can( 'editor' ) || current_user_can( 'shop_manager' ) ) {279 // // The current user is either an editor or a shop manager280 // // Ensure $selected_regions is an array of integers281 // $selected_regions = array_map('intval', $selected_regions);282 283 // // Create a string of comma-separated values from the $selected_regions array284 // $selected_regions_str = implode(',', $selected_regions);285 286 // if (!empty($selected_regions_str)) {287 // $allclients = $wpdb->get_results(288 // $wpdb->prepare(289 // "SELECT * FROM $clientTable WHERE idaccountingregionfk IN (%s) ORDER BY clientname",290 // $selected_regions_str291 // ),292 // ARRAY_A293 // );294 // } else {295 // // Handle the case where there are no selected regions296 // $allclients = array();297 // }298 299 // } else if ( current_user_can( 'administrator' ) ) {300 // // The current user is an administrator301 // $allclients = $wpdb->get_results(302 303 // $wpdb->prepare(304 // "SELECT * from $clientTable ORDER BY clientname",""305 // ),ARRAY_A306 // );307 // }308 309 310 311 312 277 if(count($allclients) > 0){ 313 278 … … 317 282 jQuery(document).ready(function ($) { 318 283 319 var table = $('#clientstable').DataTable( 320 { 321 order: [[7, 'desc']], 322 "iDisplayLength": 12, 323 "columnDefs": [ 324 { "width": "4%", "targets": 0 } // Adjust the width of the first column 325 ] 326 } 327 ); 284 var table = $('#clientstable').DataTable({ 285 order: [[7, 'desc']], 286 "iDisplayLength": 12, 287 "columnDefs": [ 288 { "width": "4%", "targets": 0 } // Adjust the width of the first column 289 ], 290 responsive: { 291 details: { 292 type: 'column', 293 target: 2 // Target the second column (index starts at 0) 294 } 295 }, 296 }); 297 328 298 $('#buttonshowall').on('click', function() { 329 299 event.preventDefault(); // Prevent the default anchor behavior … … 379 349 380 350 <style> 351 352 @media (max-width: 767px) { /* Adjust max-width as needed for your target mobile breakpoint */ 353 #wpcontent { 354 padding-left: 5px !important; 355 padding-right: 5px !important; 356 } 357 } 381 358 .dot { 382 359 height: 16px; … … 407 384 408 385 <h1><?php _e( 'Client Contacts', 'wp-easy-crm' );?></h1> 409 <table class="wp-list-table widefat fixed striped table-view-list posts" id="clientstable" cellspacing="0" style="padding:20px;padding-left:10px;padding-right:10px ">386 <table class="wp-list-table widefat fixed striped table-view-list posts" id="clientstable" cellspacing="0" style="padding:20px;padding-left:10px;padding-right:10px;max-width:100%"> 410 387 <thead> 411 388 <tr> -
wp-easy-crm/trunk/views/quotationsInvoices.php
r3025425 r3027495 121 121 $('#tableinvoices').DataTable( 122 122 { 123 responsive: { 124 details: { 125 type: 'column', 126 target: 1 // Target the second column (index starts at 0) 127 } 128 }, 123 129 order: [[4, 'desc']], 124 130 "iDisplayLength": 12, 125 131 126 } 132 }, 133 127 134 ); 128 135 -
wp-easy-crm/trunk/views/tasks.php
r3025425 r3027495 169 169 "pageLength": -1, // Initially show all rows 170 170 "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], // Dropdown for number of rows to be displayed per page 171 "order": [[4, 'asc']] // Replace 'columnIndex' with the index of the end-date column 172 171 "order": [[4, 'asc']], // Replace 'columnIndex' with the index of the end-date column 172 responsive: { 173 details: { 174 type: 'column', 175 target: 1 // Target the second column (index starts at 0) 176 } 177 }, 173 178 }); 174 179 var recenttaskstable = $('#tablerecenttasks').DataTable({ 175 180 "pageLength": -1, // Initially show all rows 176 181 "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], // Dropdown for number of rows to be displayed per page 177 "order": [[4, 'asc']] // Replace 'columnIndex' with the index of the end-date column 178 182 "order": [[4, 'asc']], // Replace 'columnIndex' with the index of the end-date column 183 responsive: { 184 details: { 185 type: 'column', 186 target: 1 // Target the second column (index starts at 0) 187 } 188 }, 179 189 }); 180 190
Note: See TracChangeset
for help on using the changeset viewer.