Correction of pagination bug in grid when using -numbered

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Correction of pagination bug in grid when using -numbered

stevepiercy
This did not make it into the repo.  Attached please find a
correction to the pagination bug in the grid when using
-numbered.  Without this change, only next and previous links
appear and no first or last links.

When running a diff, you will see comments for 3 customizations
I made in the grid footer using the language string 'gotopage'.  
They may be safely omitted.

The remaining changes are necessary in order to properly display
complete navigation links in a grid when using -numbered.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>
--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

grid.inc (70K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Correction of pagination bug in grid when using -numbered

stevepiercy
meh.  Ignore that.  I forgot to merge Jolle's bug fix.

Also I like his addition to Knop that swaps the rows for
pagination and column names in the header which make the column
headings sit directly above their column values.  I'll merge
that in, too, then resubmit for review after I get some sleep.
http://lasso.2283332.n4.nabble.com/Grid-links-and-session-links-don-t-play-tt3157883.html

--steve


On 12/23/10 at 4:11 AM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>This did not make it into the repo.  Attached please find a
>correction to the pagination bug in the grid when using
>-numbered.  Without this change, only next and previous links
>appear and no first or last links.
>
>When running a diff, you will see comments for 3 customizations
>I made in the grid footer using the language string
>'gotopage'.  They may be safely omitted.
>
>The remaining changes are necessary in order to properly
>display complete navigation links in a grid when using -numbered.
>
>--steve
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>-----

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|

Re: Correction of pagination bug in grid when using -numbered

stevepiercy
OK, now I've got it merged and tested.  Here is the change log
that I merged:

2010-12-23  SP  Corrected pagination bug for -numbered.
2010-11-17  JC  Added -startwithfooter flag to
grid->renderhtml.  This moves the footer before the column
titles in the table header.
2010-11-17  JC  Changed rawheader inclusion to work even if
there's no quicksearch for a grid
2010-05-14  JC  Added span separation on grid footer for better styling
2010-01-27  JC  Adjusted the id support
2010-01-25  JC  Added support for optional id, used by table,
quicksearch and quicksearch_reset

Jolle's additions create an option to place the column titles
immediately above their column values, improves styles and helps
with javascript selectors.

When running a diff, you will see comments for 3 customizations
I made in the grid footer using the language string 'gotopage'.  
They may be safely omitted, however I think it helps clarify
what the numbers in the grid footer represent.

I also found a bug from Jolle's grid.inc that added an empty row
to the grid when using $grid->renderhtml(-startwithfooter):

         if(#startwithfooter);
             #output += self -> 'footer';
             #output += '<th colspan="' + (#fields -> size) + '">';
             #output += '</th></tr>\n<tr>';
         /if;

Should be:

         if(#startwithfooter);
             #output += self -> 'footer';
         /if;

I'm not sure why those two extra lines were in there.  I removed
them because I could not understand its purpose with them.

There was also a missing semi-colon on the second one of these,
which I corrected:

         (local_defined('startwithfooter') && #startwithfooter
!= false ? #startwithfooter = true | local('startwithfooter' = false))

--steve


On 12/23/10 at 4:39 AM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>meh.  Ignore that.  I forgot to merge Jolle's bug fix.
>
>Also I like his addition to Knop that swaps the rows for
>pagination and column names in the header which make the column
>headings sit directly above their column values.  I'll merge
>that in, too, then resubmit for review after I get some sleep.
>http://lasso.2283332.n4.nabble.com/Grid-links-and-session-links-don-t-play-tt3157883.
>html
>
>--steve
>
>
>On 12/23/10 at 4:11 AM, [hidden email] (Steve Piercy - Web
>Site Builder) pronounced:
>
>>This did not make it into the repo.  Attached please find a
>>correction to the pagination bug in the grid when using
>>-numbered.  Without this change, only next and previous links
>>appear and no first or last links.
>>
>>When running a diff, you will see comments for 3
>>customizations I made in the grid footer using the language
>>string 'gotopage'.  They may be safely omitted.
>>
>>The remaining changes are necessary in order to properly
>>display complete navigation links in a grid when using -numbered.
>>
>>--steve
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>-----
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>
--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

grid.inc (72K) Download Attachment