This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hide the dash initially when the document is ready | |
jQuery(document).ready(function() { | |
function removeDash() { | |
jQuery('.ff-el-progress-status').each(function() { | |
var text = jQuery(this).text().trim(); // Get the text content of the element | |
var newText = text.replace('-', ''); // Remove the dash | |
jQuery(this).text(newText); // Set the modified text back to the element | |
}); | |
} | |
removeDash(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Disable text selection with css | |
#footable_parent_NT_ID { | |
user-select: none; | |
-moz-user-select: none; | |
-webkit-user-select: none; | |
pointer-events: none; | |
} | |
/********************* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('ninja_tables_before_update_settings', function ($columns, $tableId) { | |
function modifyData($columns) { | |
if (isset($_REQUEST['columns'])) { | |
return $_REQUEST['columns']; | |
} else { | |
return $columns; | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adjust the delay time for Ninja Tables filter functionality. | |
* | |
* @param int $delayTime The default delay time in milliseconds. | |
* @param int $tableId The ID of the Ninja Table. | |
* @return int The modified delay time. | |
*/ | |
add_filter('ninja_table_search_time_delay', function ($delayTime, $tableId) { | |
if ($tableId == 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//If you are using Ninja Tables instead of Google Sheets, replace A1 with your reference shortcode. | |
//Ex "{{Your_Reference_Shortcode}}" | |
//Ninja tables | |
=IF(ISNUMBER(SEARCH(",", "{{Your_Reference_Shortcode}}")), | |
"<img src='" & SUBSTITUTE("{{Your_Reference_Shortcode}}", ",", "'><img src='") & "'>", | |
"<img src='" & "{{Your_Reference_Shortcode}}" & "'>") | |
//Google Sheets | |
=IF(ISNUMBER(SEARCH(",", A1)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* a simple tooltip that has been made by Farhan | |
*/ | |
/******************************************************** | |
HTML | |
********************************************************/ | |
<span class="ninja-tooltip" data-tooltip="I'm in top">Ninja Tables</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you can replace "_amount" with you column key column_key | |
$('tbody .ninja_clmn_nm_amount').each(function() { | |
// Get the cell value and parse it as an integer | |
var cellValue = parseInt($(this).text().trim()); | |
// Check if the value is 1000 or more | |
if (cellValue >= 1000) { | |
// If it's 1000 or more, format the value with commas | |
$(this).text(cellValue.toLocaleString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#footable_parent_NT_ID tbody tr td:nth-child(1), #footable_parent_NT_ID thead th:nth-child(1){ | |
position: sticky; | |
position: -webkit-sticky; | |
left: 0; | |
z-index: 1; | |
background: #fafafb; | |
font-weight:bold; | |
} |