Home Forums Weaver Xtreme Theme I tried to post this in my previous thread, but it wouldn’t take

Topic Resolution: Answered
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #74780
    Answered
    Dave
    Participant

    I want to apologize for involving you guys with this, but I figured I’d reach out here since you’re programmers and know your stuff. Also because I’m at my end trying to resolve this.

    For example, here’s the support I receive when I question the updating a third column for the date difference which is vital to us.

    https://video.drift.com/v/abF2SdgIuyrUmeuUga9Tf5zbnpEiqIHVTYzu87hhHNc/?bookMeeting=true

    I’m also given the following “custom” JS for counting total records and the date difference (but must disable pagination, and can’t help but wonder what happens when I reach 1,000+ records – ).

    This is all a foreign language to me, but you guys probably know how to read this stuff.

    Anyway, thanks again. Looks like I may have to bite the bullet and remain with Caspio. 🙁

    <hr />

    //showing rows count
    var rowCount = $table.find(“tbody tr”).length;
    var fixCount = $table.find(“tbody tr”).length;
    var $countWrapper = $table.parent();
    $countWrapper.prepend(”

    Total ” + rowCount + “ Permits Reviewed
    “);
    $table.on(‘postdraw.ft.table’, function(e, ft) {
    var rowsCount = ft.rows.array.length;
    $countWrapper.find(‘.table_info_count .current_count’).html(rowsCount + ” of ” + fixCount);
    });//date difference
    $(document).ready(function() {
    // Function to calculate the difference in days between two dates
    function calculateDateDifference(date1, date2) {
    const d1 = new Date(date1);
    const d2 = new Date(date2);
    const timeDifference = Math.abs(d2 – d1);
    const dayDifference = Math.ceil(timeDifference / (1000 * 60 * 60 * 24));
    return dayDifference;
    }// Function to update the date_difference column
    function updateDateDifferences() {
    // Loop through each row in the table
    $(‘#footable_2469 tr’).each(function() {
    const date1 = $(this).find(‘td.updated’).text(); // Replace with your actual date_1 column class or selector
    const date2 = $(this).find(‘td.received’).text(); // Replace with your actual date_2 column class or selectorif (date1 && date2) {
    const dateDifference = calculateDateDifference(date1, date2);
    console.log(dateDifference);
    $(this).find(‘td.days’).text(dateDifference); // Replace with your actual date_difference column class or selector
    }
    });
    }// Call the function to update date differences
    updateDateDifferences();

    // Optionally, you can call this function on table data update events if needed
    });

    #74783
    User
    Moderator

    @Dave


    @Weaver
    will need to comment on this, as it a bit outside the scope of this Forum and my pay scale too, to be honest 

    Regards!

     

    #74784
    Dave
    Participant

    Thanks User, I appreciate the feedback.

    I only posted this here because in the past, Weaver, Scrambler and a few others here helped tremendously. Of course, it was theme related, but when it came to this custom JavaScript stuff (which makes my brain melt), they were instrumental and most helpful.

    I’d certainly take no offense if they told me to take it elsewhere. I was simply reaching out because I’m at my end trying to figure this out. If I had 1/10th the skill-set they do, at least I’d have a fighting chance. How they’re able to write this code stuff is beyond me. Then again, how neurosurgeons perform is also beyond me, but this is why we have folks who specialize in all sorts of things.

    I appreciate everything everyone here does, and in helping me understand a few things.

    Thanks again,
    David

    #74785
    Best Answer
    Weaver
    Keymaster

    This reply has been accepted as the best answer.

    Sorry, but this is really way beyond the scope of this forum.

    It may even be beyond the abilities of the plugin developer to help you, or if you are having issue with width, then it is likely other users have the same problem, and the plugin developer would be wise to help you, and even fix the plugin.

    But not us.

    #74786
    scrambler
    Moderator

    You really need to work with them on all this.

    Watching the video, it looks like you may be able to add CSS to change the size of that window you complained about earlier. May be ask them is they could give you custom CSS that would be inserted in their custom CSS tab that could do that job.

    For the 1000 record, again, ask them, we have no way of knowing the answer to that.

    #74787
    Dave
    Participant

    I fully understand Mr. Weaver.

    I submitted a recommendation to the plugin developer, and hope they decide favorably.

    Thanks again, and please accept my apology for bringing this into this forum.

    Best,
    David

    #74788
    Dave
    Participant

    Thank you Scrambler,

    Again, sorry I posted this here. This CSS/JS is programing stuff which is overly confusing (at least for me).

    I’ll mention the CSS suggestion to the plugin developer see if they can do something. I also suggested another “form” plugin to connect to the table somehow so we can use forms, etc.

    I’ll wait and see what happens, if anything.

    Thanks again Scrambler,
    David

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.