Changeset 3385174
- Timestamp:
- 10/27/2025 11:15:04 AM (5 months ago)
- Location:
- loan-calculator-wp
- Files:
-
- 70 added
- 11 edited
-
tags/2.1.0 (added)
-
tags/2.1.0/assets (added)
-
tags/2.1.0/assets/blueprints (added)
-
tags/2.1.0/assets/blueprints/blueprint.json (added)
-
tags/2.1.0/includes (added)
-
tags/2.1.0/includes/admin (added)
-
tags/2.1.0/includes/admin/class-loan-calculator-admin.php (added)
-
tags/2.1.0/includes/admin/forms (added)
-
tags/2.1.0/includes/admin/forms/theme-templates (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/default-theme (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/default-theme/ww-loan-calculator-loan-default-theme-form.php (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/new-theme (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/new-theme/css (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/new-theme/css/style.css (added)
-
tags/2.1.0/includes/admin/forms/theme-templates/new-theme/ww-loan-calculator-loan-new-theme-form.php (added)
-
tags/2.1.0/includes/admin/forms/ww-loan-calculator-setting.php (added)
-
tags/2.1.0/includes/class-ww-loan-calculator-public.php (added)
-
tags/2.1.0/includes/class-ww-loan-calculator-scripts.php (added)
-
tags/2.1.0/includes/css (added)
-
tags/2.1.0/includes/css/all.min.css (added)
-
tags/2.1.0/includes/css/frontend-style.css (added)
-
tags/2.1.0/includes/css/fstdropdown.css (added)
-
tags/2.1.0/includes/css/fstdropdown.min.css (added)
-
tags/2.1.0/includes/css/loan_calculator_admin_settings.css (added)
-
tags/2.1.0/includes/css/post_type_admin.css (added)
-
tags/2.1.0/includes/css/print.min.css (added)
-
tags/2.1.0/includes/images (added)
-
tags/2.1.0/includes/images/add.png (added)
-
tags/2.1.0/includes/images/down-arrow.svg (added)
-
tags/2.1.0/includes/images/group-4.png (added)
-
tags/2.1.0/includes/images/group-5.png (added)
-
tags/2.1.0/includes/images/play-video.png (added)
-
tags/2.1.0/includes/images/remove.png (added)
-
tags/2.1.0/includes/js (added)
-
tags/2.1.0/includes/js/admin-script.js (added)
-
tags/2.1.0/includes/js/break-up-of-total-payment.js (added)
-
tags/2.1.0/includes/js/chart-js (added)
-
tags/2.1.0/includes/js/chart-js/chart.js (added)
-
tags/2.1.0/includes/js/chart-js/chartjs-plugin-datalabels.js (added)
-
tags/2.1.0/includes/js/frequency_payment.js (added)
-
tags/2.1.0/includes/js/frontend-script.js (added)
-
tags/2.1.0/includes/js/fstdropdown.js (added)
-
tags/2.1.0/includes/js/fstdropdown.min.js (added)
-
tags/2.1.0/includes/js/jquery.print.js (added)
-
tags/2.1.0/includes/js/jquery.validate.min.js (added)
-
tags/2.1.0/includes/js/post_type_admin.js (added)
-
tags/2.1.0/includes/js/print.min.js (added)
-
tags/2.1.0/includes/loan-calculator-misc-functions.php (added)
-
tags/2.1.0/includes/webfonts (added)
-
tags/2.1.0/includes/webfonts/fa-brands-400.eot (added)
-
tags/2.1.0/includes/webfonts/fa-brands-400.svg (added)
-
tags/2.1.0/includes/webfonts/fa-brands-400.ttf (added)
-
tags/2.1.0/includes/webfonts/fa-brands-400.woff (added)
-
tags/2.1.0/includes/webfonts/fa-brands-400.woff2 (added)
-
tags/2.1.0/includes/webfonts/fa-regular-400.eot (added)
-
tags/2.1.0/includes/webfonts/fa-regular-400.svg (added)
-
tags/2.1.0/includes/webfonts/fa-regular-400.ttf (added)
-
tags/2.1.0/includes/webfonts/fa-regular-400.woff (added)
-
tags/2.1.0/includes/webfonts/fa-regular-400.woff2 (added)
-
tags/2.1.0/includes/webfonts/fa-solid-900.eot (added)
-
tags/2.1.0/includes/webfonts/fa-solid-900.svg (added)
-
tags/2.1.0/includes/webfonts/fa-solid-900.ttf (added)
-
tags/2.1.0/includes/webfonts/fa-solid-900.woff (added)
-
tags/2.1.0/includes/webfonts/fa-solid-900.woff2 (added)
-
tags/2.1.0/index.php (added)
-
tags/2.1.0/languages (added)
-
tags/2.1.0/languages/loan-calculator-wp.pot (added)
-
tags/2.1.0/license.txt (added)
-
tags/2.1.0/loan-calculator-wp.php (added)
-
tags/2.1.0/readme.txt (added)
-
trunk/includes/admin/forms/theme-templates/new-theme/css/style.css (modified) (1 diff)
-
trunk/includes/admin/forms/theme-templates/new-theme/ww-loan-calculator-loan-new-theme-form.php (modified) (1 diff)
-
trunk/includes/admin/forms/ww-loan-calculator-setting.php (modified) (1 diff)
-
trunk/includes/class-ww-loan-calculator-scripts.php (modified) (1 diff)
-
trunk/includes/css/frontend-style.css (modified) (2 diffs)
-
trunk/includes/css/loan_calculator_admin_settings.css (modified) (1 diff)
-
trunk/includes/js/admin-script.js (modified) (1 diff)
-
trunk/includes/js/frequency_payment.js (modified) (1 diff)
-
trunk/includes/js/frontend-script.js (modified) (8 diffs)
-
trunk/loan-calculator-wp.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
loan-calculator-wp/trunk/includes/admin/forms/theme-templates/new-theme/css/style.css
r3327581 r3385174 2465 2465 display: none; 2466 2466 } 2467 select.single-val-option { 2468 appearance: none; 2469 pointer-events: none; 2470 padding: 10px; 2471 } 2467 2472 2468 2473 /****************************************************/ -
loan-calculator-wp/trunk/includes/admin/forms/theme-templates/new-theme/ww-loan-calculator-loan-new-theme-form.php
r3245518 r3385174 414 414 <div class="input-container"> 415 415 <?php $backgroud_arrow_logo = WW_LOAN_CALCULATOR_URL.'includes/images/down-arrow.svg'; ?> 416 <style type="text/css"> .site-wrap-repayment-freq-section:after {background-image: url(<?php echo esc_attr($backgroud_arrow_logo); ?>); } </style> 416 <style type="text/css"> 417 .site-wrap-repayment-freq-section:after {background-image: url(<?php echo esc_attr($backgroud_arrow_logo); ?>); } 418 .site-wrap-repayment-freq-section.single-val-option-main:after {background-image: none; } 419 </style> 417 420 <?php if (!empty($get_repayment_frequency)) { 418 421 $rpfclass = (count($get_repayment_frequency) == 1 ? 'single-val-option' : ''); 422 $rpfmainclass = (count($get_repayment_frequency) == 1 ? 'single-val-option-main' : ''); 419 423 ?> 420 <div class="site-wrap-repayment-freq-section ">424 <div class="site-wrap-repayment-freq-section <?php echo esc_attr($rpfmainclass); ?>"> 421 425 <select name="repayment_freq" id="repayment_freq" class="payment-opt-drop <?php echo esc_attr($rpfclass); ?>"> 422 426 <?php -
loan-calculator-wp/trunk/includes/admin/forms/ww-loan-calculator-setting.php
r3245518 r3385174 431 431 </th> 432 432 <td> 433 <input type="checkbox" name="ww_loan_option[repayment_frequency][]" id="repayment_frequency_option_monthly" value="Monthly" class="regular-text" <?php echo ((!empty($get_repayment_frequency) && in_array('Monthly', $get_repayment_frequency)) ? "checked" : ""); ?>><label for="repayment_frequency_option_monthly"><?php esc_html_e('Monthly', 'loan-calculator-wp'); ?></label> 434 | 435 <input type="checkbox" name="ww_loan_option[repayment_frequency][]" id="repayment_frequency_option_quarterly" value="Quarterly" class="regular-text" <?php echo ((!empty($get_repayment_frequency) && in_array('Quarterly', $get_repayment_frequency)) ? "checked" : ""); ?>><label for="repayment_frequency_option_quarterly"><?php esc_html_e('Quarterly', 'loan-calculator-wp'); ?></label> 436 | 437 <input type="checkbox" name="ww_loan_option[repayment_frequency][]" id="repayment_frequency_option_yearly" value="Yearly" class="regular-text" <?php echo ((!empty($get_repayment_frequency) && in_array('Yearly', $get_repayment_frequency)) ? "checked" : ""); ?>><label for="repayment_frequency_option_yearly"><?php esc_html_e('Yearly', 'loan-calculator-wp'); ?></label> 438 | 439 <input type="checkbox" name="ww_loan_option[repayment_frequency][]" id="repayment_frequency_option_weekly" value="Weekly" class="regular-text" <?php echo ((!empty($get_repayment_frequency) && in_array('Weekly', $get_repayment_frequency)) ? "checked" : ""); ?>><label for="repayment_frequency_option_weekly"><?php esc_html_e('Weekly', 'loan-calculator-wp'); ?></label> 440 | 441 <input type="checkbox" name="ww_loan_option[repayment_frequency][]" id="repayment_frequency_option_fortnight" value="Fortnight" class="regular-text" <?php echo ((!empty($get_repayment_frequency) && in_array('Fortnight', $get_repayment_frequency)) ? "checked" : ""); ?>><label for="repayment_frequency_option_fortnight"><?php esc_html_e('Fortnightly', 'loan-calculator-wp'); ?></label> 442 </br> 443 </br> 444 <i><b style="color:red"><?php esc_html_e('Note', 'loan-calculator-wp') ?></b><?php esc_attr_e(": If no Repayment Frequency Options are selected, the monthly option will be automatically displayed on the frontend by default.", 'loan-calculator-wp') ?></i> 433 <?php 434 $frequencies = [ 435 'Monthly' => __('Monthly', 'loan-calculator-wp'), 436 'Yearly' => __('Yearly', 'loan-calculator-wp'), 437 'Quarterly' => __('Quarterly', 'loan-calculator-wp'), 438 'Fortnight' => __('Fortnightly', 'loan-calculator-wp'), 439 'Weekly' => __('Weekly', 'loan-calculator-wp'), 440 ]; 441 442 // Get saved selected repayment frequencies in order 443 $saved_selection = $get_repayment_frequency ?? []; // e.g. ['Yearly', 'Monthly'] 444 445 // Ensure default if nothing selected 446 if (empty($saved_selection)) { 447 $saved_selection = ['Monthly']; 448 } 449 450 $selected_items = array_values(array_filter($saved_selection, function ($key) use ($saved_selection) { 451 return in_array($key, $saved_selection); 452 })); 453 454 // Get unselected options 455 $default_order = array_keys($frequencies); 456 $unselected_items = array_diff($default_order, $selected_items); 457 458 ?> 459 <div class="sortable-container"> 460 <!-- Unselected + Not Sortable --> 461 <div class="sortable-wrapper"> 462 <h4><?php esc_html_e('Disabled Options', 'loan-calculator-wp'); ?></h4> 463 <ul id="sortable-disabled" class="sortable-list disabled-options"> 464 <?php foreach ($unselected_items as $key): ?> 465 <li data-key="<?= esc_attr($key); ?>"> 466 <label> 467 <input type="checkbox" 468 name="ww_loan_option[repayment_frequency][]" 469 value="<?= esc_attr($key); ?>" class="toggle-repayment"> 470 <?= esc_html($frequencies[$key]); ?> 471 </label> 472 </li> 473 <?php endforeach; ?> 474 </ul> 475 </div> 476 477 <!-- Selected + Sortable --> 478 <div class="sortable-wrapper"> 479 <h4><?php esc_html_e('Enabled Options ( Drag to Reorder )', 'loan-calculator-wp'); ?></h4> 480 <ul id="sortable-enabled" class="sortable-list enabled-options"> 481 <?php foreach ($selected_items as $key): ?> 482 <li data-key="<?= esc_attr($key); ?>"> 483 <span class="drag-handle" title="<?php esc_attr_e('Drag to reorder', 'loan-calculator-wp'); ?>">⋮⋮</span> 484 <label> 485 <input type="checkbox" checked 486 name="ww_loan_option[repayment_frequency][]" 487 value="<?= esc_attr($key); ?>" class="toggle-repayment"> 488 <?= esc_html($frequencies[$key]); ?> 489 </label> 490 </li> 491 492 <?php endforeach; ?> 493 </ul> 494 </div> 495 </div> 496 497 <p><i><b style="color:red"><?php esc_html_e('Note', 'loan-calculator-wp'); ?></b> <?php esc_html_e('If no Repayment Frequency Options are selected, the monthly option will be automatically displayed on the frontend by default.', 'loan-calculator-wp'); ?></i></p> 445 498 </td> 446 499 </tr> -
loan-calculator-wp/trunk/includes/class-ww-loan-calculator-scripts.php
r3245518 r3385174 32 32 true 33 33 ); 34 35 // add jquery UI for Repayment Frequency drag & drop ability 36 wp_enqueue_script('jquery-ui-sortable'); 34 37 35 38 // Add JS -
loan-calculator-wp/trunk/includes/css/frontend-style.css
r3327581 r3385174 430 430 background-color: var(--calc-bg-light-color) !important; 431 431 432 height: 3 4px !important;432 height: 36px !important; 433 433 434 434 line-height: 34px; … … 448 448 font-size: 14px !important; 449 449 450 padding: 4px 0px 5px 3px !important;450 padding: 5px 0px 5px 5px !important; 451 451 452 452 text-align: left !important; -
loan-calculator-wp/trunk/includes/css/loan_calculator_admin_settings.css
r3245518 r3385174 20 20 21 21 22 /* Start css for Repayment Frequency */ 23 .sortable-container { 24 display: flex; 25 gap: 20px; 26 flex-wrap: wrap; 27 } 22 28 29 .sortable-wrapper { 30 flex: 1; 31 min-width: 250px; 32 } 33 34 .sortable-wrapper h4 { 35 font-size: 14px; 36 margin: 8px 0 8px 0; 37 38 } 39 40 .sortable-list { 41 list-style: none; 42 margin: 0; 43 padding: 0; 44 background: #f9f9f9; 45 border: 1px solid #ccc; 46 min-height: 40px; 47 } 48 49 .sortable-list li { 50 padding: 10px; 51 border-bottom: 1px solid #ddd; 52 background: #fff; 53 display: flex; 54 align-items: center; 55 } 56 57 .sortable-list li:last-child { 58 border-bottom: none; 59 } 60 61 .sortable-list input[type="checkbox"] { 62 margin-right: 10px; 63 } 64 65 .disabled-options li { 66 cursor: default; 67 opacity: 0.8; 68 } 69 70 .enabled-options li { 71 cursor: move; 72 } 73 .drag-handle { 74 cursor: move; 75 margin-right: 10px; 76 font-size: 18px; 77 color: #888; 78 user-select: none; /* prevent text selection on drag */ 79 } 80 81 82 /* end css for Repayment Frequency */ 83 84 -
loan-calculator-wp/trunk/includes/js/admin-script.js
r3245518 r3385174 842 842 843 843 844 /* Start Drag and drop ability js for Repayment Frequency options */ 845 function updateOrderField() { 846 var selectedKeys = jQuery('#sortable-enabled li').map(function() { 847 return jQuery(this).data('key'); 848 }).get(); 849 jQuery('#repayment_frequency_order').val(selectedKeys.join(',')); 850 } 851 852 // Init sortable with drag handle 853 jQuery('#sortable-enabled').sortable({ 854 handle: '.drag-handle', 855 update: updateOrderField 856 }); 857 858 // When checkbox toggled 859 jQuery('.toggle-repayment').on('change', function() { 860 var li = jQuery(this).closest('li'); 861 862 if (this.checked) { 863 // Add drag handle span if missing 864 if (li.find('.drag-handle').length === 0) { 865 li.prepend('<span class=\"drag-handle\" title=\"Drag to reorder\">⋮⋮</span>'); 866 } 867 li.css('cursor', 'auto'); 868 jQuery('#sortable-enabled').append(li); 869 } else { 870 // Remove drag handle 871 li.find('.drag-handle').remove(); 872 li.css('cursor', 'default'); 873 jQuery('#sortable-disabled').append(li); 874 } 875 updateOrderField(); 876 }); 877 878 // Set initial cursor & drag handle states 879 jQuery('#sortable-disabled li').css('cursor', 'default').find('.drag-handle').remove(); 880 jQuery('#sortable-enabled li').css('cursor', 'auto').each(function() { 881 if (jQuery(this).find('.drag-handle').length === 0) { 882 jQuery(this).prepend('<span class=\"drag-handle\" title=\"Drag to reorder\">⋮⋮</span>'); 883 } 884 }); 885 886 updateOrderField(); 887 /* End Drag and drop ability js for Repayment Frequency options */ 888 844 889 845 890 }); -
loan-calculator-wp/trunk/includes/js/frequency_payment.js
r3292676 r3385174 217 217 } 218 218 219 /* 2025-05-13 */220 219 return monthlyInterestAmount; 221 220 -
loan-calculator-wp/trunk/includes/js/frontend-script.js
r3292676 r3385174 20 20 //Condition For New theme 21 21 function loan_calculation_process() { 22 var currency_symbol = setting_data.currency_symbols; 22 var currency_symbol = setting_data.currency_symbols; 23 24 var default_nop_value = jQuery("input[name='loan_terms']").val(); 25 /* visible note below chart */ 26 if(default_nop_value > 120){ 27 jQuery('body').find('.chart-note').show(); 28 }else{ 29 jQuery('body').find('.chart-note').hide(); 30 } 31 23 32 var loan_amount = jQuery("#loan_amount").val(); 24 33 … … 1967 1976 1968 1977 jQuery("#loan_terms").on("blur", function () { 1969 /*on filled input check min max values 6-7-2023*/1978 /*on filled input check min max values*/ 1970 1979 var repayment_freq = jQuery("#repayment_freq option:selected").val(); 1971 1980 var old_repayment_freq = jQuery( … … 2452 2461 }); 2453 2462 $(document).on("input", "#repayment_freq", function () { 2454 /*========start 6-7-2023=========*/2455 2463 var repayment_freq = jQuery("#repayment_freq option:selected").val(); 2456 2464 var old_repayment_freq = jQuery( … … 2511 2519 setting_data.back_ground_color + 2512 2520 " 100%)"; 2513 2514 /*========End 6-7-2023=========*/2515 2521 loan_calculation_process(); 2516 2522 }); … … 2830 2836 repayment_frequency_val 2831 2837 ); 2832 /* 2025-05-13 */2838 2833 2839 var default_nop_value = jQuery("input[name='loan_terms']").val(); 2834 2840 /* visible note below chart */ … … 4761 4767 4762 4768 jQuery("#loan_terms").on("blur", function () { 4763 /*on filled input check min max values 6-7-2023*/4769 /*on filled input check min max values */ 4764 4770 var repayment_freq = jQuery("#repayment_freq option:selected").val(); 4765 4771 var old_repayment_freq = jQuery( … … 5370 5376 5371 5377 $(document).on("input", "#repayment_freq", function () { 5372 /*========start 6-7-2023=========*/ 5378 5373 5379 var repayment_freq = jQuery("#repayment_freq option:selected").val(); 5374 5380 … … 5435 5441 "%, #c9a208 100%)"; 5436 5442 5437 /*========End 6-7-2023=========*/5438 5443 loan_calculation_process(); 5439 5444 }); -
loan-calculator-wp/trunk/loan-calculator-wp.php
r3327581 r3385174 4 4 * Plugin URI: https://www.worldwebtechnology.com/ 5 5 * Description: Advanced Loan Calculator for Home Loans, Personal Loans, and various other types of loans. Includes features like a repayment chart, amortization table, video tab, balloon payment option, and supports all currencies. Use the contact form shortcode for easy access. 6 * Version: 2. 0.36 * Version: 2.1.0 7 7 * Author: World Web Technology 8 8 * Author URI: https://www.worldwebtechnology.com/ … … 27 27 */ 28 28 if (!defined('WW_LOAN_CALCULATOR_VERSION')) { 29 define('WW_LOAN_CALCULATOR_VERSION', '2. 0.3'); //version of plugin29 define('WW_LOAN_CALCULATOR_VERSION', '2.1.0'); //version of plugin 30 30 } 31 31 if (!defined('WW_LOAN_CALCULATOR_TEXT_DOMAIN')) { //check if variable is not defined previous then define it -
loan-calculator-wp/trunk/readme.txt
r3327581 r3385174 10 10 Requires PHP: 7.4 11 11 Tested up to: 6.8 12 Stable tag: 2. 0.312 Stable tag: 2.1.0 13 13 License: GPLv2 or later 14 14 License URI: https://www.gnu.org/licenses/gpl-2.0.html 15 Version: 2. 0.315 Version: 2.1.0 16 16 17 17 Loan / EMI Calculator for Home Loan and Personal Loan … … 129 129 == Changelog == 130 130 131 = 2.1.0 (October 27, 2025) = 132 * Add: Ability to reorder Repayment Frequency options 133 131 134 = 2.0.3 (July 14, 2025) = 132 135 * Fix: Browser compatibility issue with field slider input
Note: See TracChangeset
for help on using the changeset viewer.