Jump to content

Pagination


bunoire14

Recommended Posts

http://forum.phpvms....edules-to-work/

There is the link to that pagination. It is a tutorial on how to impliment it. You have to follow how I said to do it, otherwise it gives you problems with your schedules.But as tutmeister said, it is easily skinnable. You can change how it shows, and where you want each bit to show.

Link to comment
Share on other sites

Thanks for the link guys,

I dont intend to use it for schedules, I will be using it in other areas, but what i did notice on that thread, the example site shows its usage listing the schedules, but the jQuery loaded all of the schedules from the database at once, this took some time and while it was loading just listed them in one huge list. When the initial loading had finished it seemed to instantiate the jQuery function and sort them into "pages".

This seems to increase browsing speed once loaded, but certainly doesn't increase load speed and looks terrible as its rendering, is there a way to make the jQuery only load the first X amount of results? I know it will be slower browsing, but id take a few seconds slower over very rough rendering.

I know some jQuery/Javascript (of which I'm not an expert in any shape or form) often has a function where by you can ask it to "Pre-Load" all results being used or just load the first set, typically i have found this on jQuery rotating banners where it usually loads all the images used in the banner first before displaying it.

ill have a play with this tonight and see what i can do on my development environment

Cheers,

Link to comment
Share on other sites

How you have organised you schedules doesn't matter, it is the layout of the code that does however. That loading also depends on your internet speed. If it is fast, it will load fairly quickly, if it is slow, then it may take a little while. Examples dont have to be followed 100%. It doesn't have to be for the schedules, it can be used for any table you have. If using it on the roster, you do however need to make the roster show without hubs, as that causes problems with it.

Link to comment
Share on other sites

  • 9 months later...

Hello everybody,

Sorry respond in an old topic.

tutmeister, I went on the website of his company and saw the list of pireps for each pilot, I found it very nice pagination.

I tried using in my site, but was ordered in descending order, and I would like to put by date equal to his.

Could you help me?

Very thanks.

Link to comment
Share on other sites

Thanks for the compliment!

What we did was simply call datatables by calling the javascript in our HTML head, adding the class of "display" to our roster's HTML table, and linking the table's ID to the datatables jQuery initiaization call. This is exactly like in Mr. Bean's tutorial here. You can make any HTML table into a sortable table this way. To make it ordered by a certain column, you can change the jQuery call to add the aaSorting option.

<script type="text/javascript" charset="utf-8">
   $(document).ready(function() {
       oTable = $('#dataTables').dataTable({
       "bJQueryUI": true,
       "sPaginationType": "full_numbers",
       "aaSorting": [[ 5, "desc" ]]
       });
   } );
</script>
<div class="example_alt_pagination">        
<table id="dataTables" class="display">
YOUR PIREP TABLE HERE
</table>
</div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...