Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Meitar

    (@meitar)

    Okay, I can guide you: consider reading the plugin’s FAQ. ??

    Hello and thank you for this amazing plugin. I read the faq but I’m missing where to set default entries per page. I know it’s my mistake but where is the info?

    many thanks

    Plugin Author Meitar

    (@meitar)

    Copied from the FAQ:

    How do I change the default settings, like can I turn paging off? Can I change the page length? Can I change the sort order?

    If you’re able to add JavaScript to your theme, you can do all of these things, and more. Any and all DataTables-enhanced tables can be modified by using the DataTables API.

    For instance, to disable paging, add a JavaScript to your theme that looks like this:

    jQuery(window).load(function () {
        jQuery('#igsv-MY_TABLE_KEY').dataTable().api().page.len(-1).draw();
    });

    Oh I see. I didn’t think that section was it because it talks about removing paging and I was looking for a section on changing the default number of entries.

    Thank you very much for helping, I’ll try it out

    Plugin Author Meitar

    (@meitar)

    I didn’t think that section was it because it talks about removing paging and I was looking for a section on changing the default number of entries.

    Just change the -1 to whatever page length you want; 5 gives you five rows per page, 40 gives you forty rows per page, and so on. ??

    Ok i think I have got it down. my theme has a script addon section to make it update proof which is nice. the only issue I see is that I have dozens of spreadsheets so adding the key into the script is a problem. Is there any way to still do it?

    Plugin Author Meitar

    (@meitar)

    I have dozens of spreadsheets so adding the key into the script is a problem. Is there any way to still do it?

    Sure there is, but that’s a matter of customizing your script, and I don’t offer arbitrary programming help on these forums. Good luck. ??

    Ok. I’ll see if i can figure it out. if I can’t get it, where to ask for programming help?

    Plugin Author Meitar

    (@meitar)

    where to ask for programming help?

    StackOverflow.com is generally useful for that.

    Thats a good idea. I did some searching on SO and looked at the jQuery attributes contains selector page and came up with this:

    <script type="text/javascript" >jQuery(window).load(function () { jQuery( 'div[id*="igsv-"]' ).dataTable().api().page.len(-1).draw();
    });</script>

    as far as I can tell this should be working but doesn’t, any suggestions?

    Plugin Author Meitar

    (@meitar)

    If you’re just looking to apply the same functions to every instance of a table produced by this plugin, you should select the igsv-table class, not individual IDs.

    Yup that was the trick! thank you. so the final solution was:

    <script type="text/javascript" >jQuery(window).load(function () { jQuery( ".igsv-table").dataTable().api().page.len(-1).draw();
    });</script>

    Thanks again for the slick plugin. I donated what little pitiful amount I could earlier then needed support and you’ve been incredibly helpful with amazing response time.

    I highly encourage every user of this plugin to donate to the author. check out maymay.net for ways to support him!

    Plugin Author Meitar

    (@meitar)

    Thanks for the support. ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Inline Google Spreadsheet Viewer’ is closed to new replies.