Re: Definitive (data) pagination

2006-07-09 Thread AD7six

Hi all,

I've updated the cakeforge pagination code, and edited the wiki
tutorial as a start (http://wiki.cakephp.org/tutorials:pagination) -
otherwise it would be out of sync completely.

If anyone spots an error with the code please feel free to enhance (but
be careful not to make the code specific!)

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-08 Thread AD7six

Hi all,

an update to the version of cake fixed the mysterious URL encoded URL
problem (if that is/was the cause)...

I've updated the demo available at the url below to include a pretty
url example as well as normal and ajax versions. The source is
available at the top of the page for anyone curious (note that the
controllers, views helper and element are in a PLUGIN named
pagination).

http://www.noswad.me.uk/pagination

If there are no objections/additions, I'll update the snippet on
cakeforge in 24 hours or so after commenting the code a little.

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-07 Thread AD7six

Hi ..

The problem is easy to diagnose, but I don't know how to solve it.

This code:
return $this->Ajax->link(
$title,
$url,
array(
"update" => $AjaxDivUpdate
),
NULL,
NULL,
FALSE
);
generates the links.

Any link returned as part of an ajax update seems to be url encoded.

This one will work
idEvent.observe('link29970050', 'click',
function(event){ new
Ajax.Updater('content','/pagination/ajaxed/?direction=DESC',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'content']}) }, false);

Because there is only one get parameter, this one will not:

Sort by Category
NameEvent.observe('link1348214211',
'click', function(event){ new
Ajax.Updater('content','/pagination/ajaxed/?sortBy=name&sortByClass=Category',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'content']}) }, false);

Because there are 2 get parameters and the & is being url encoded

It should be "?sortBy=name&sortByClass=Category" to work.

What needs to be done to generate the links correctly? I hope someone
more ajax savvy can show the way...

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-07 Thread ..

Ajax is failing - apparently randomly (but that can't be) - will look
into it more when I have bit more time 
..


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-06 Thread AD7six

Hi All,

I'd welcome help ensuring that all the ajax links generated by the
pagination update effort work http://www.noswad.me.uk/pagination/

Any comments?

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-04 Thread AD7six

Hi Armando,

I was hoping to update the code to permit this (and demonstrate why I
don´t think it's a good idea in many cases) yesterday, but didn´t get
time to do it yet.

I see a number of problems in it´s use:
1) If you paginate /Controller/ - then the action will become "page",
"show" etc. If you paginate the home page the controller becomes
"page", "show" etc.
2) Would eliminate the possibility to use the parameters show, page,
direction (and others, but these are the interesting ones).
3) How to successfully paginate /Controller/Action/Param aswell as
/Controller/Action/Param1/Val1

The beauty of using GET data, especially in the mode that it is
employed is that it doesn´t interfere or need to care what the current
url is, but it shouldn´t be too difficult to modify such that the
component can accept an array of values and if present, use that
instead of looking GET data (and modify the links accordingly).

In any case, thanks for your comment :)

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-04 Thread sicapitan

I might do the AJAX part, as my solution is entirely ajax


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Definitive (data) pagination

2006-07-03 Thread Armando Sosa

why don't use gwoo's named parameters to keep url pretty? like:

http://www.noswad.me.uk/pagination/titles/show/10/page/2

On 7/3/06, AD7six <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> After a discussion on the irc today, and given that pagination is
> something pretty common, I thought it was about time to try and create
> a "copes with all" solution. There are a number of solution dotted
> around, I've taken a look at all and tried to ensure I didn't miss
> anything out. That said I haven't looked at the presentation side of
> things (images, google style).
>
> I just finished playing around with this:
> http://www.noswad.me.uk/pagination. You can get the example plugin and
> the associated component, helper and element with the "download me"
> link on the page. Each link is a variation of the same page (perhaps
> obviously).
>
> This is clearly an effort to update and enhance what pj and gwoo did (a
> good job of) a while ago - I've left out the ajax from the demo for now
> to highlight what is happening with the url, one bit of logic that is
> missing is to automatically use ajax updates if a) it's available and
> b) the parameter to use ajax if available is set to true. Not sure on
> the best way to do that - help welcome.
>
> The syntax for use is slightly different from the wiki (less code to
> write) and as such> Tarique Sani in keeping with what we discussed if
> you feel this goes far enough towards a generic solution - I'd welcome
> any efforts writing a tutorial and will create a snippet or otherwise
> fix the code tomorrow.
>
> Comments welcome (except regarding the other things on the site that
> break because of this update ;)), Cheers,
>
> AD7six
>
>
> >
>


-- 
Armando Sosa

www.nolimit-studio.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Definitive (data) pagination

2006-07-03 Thread AD7six

Hi all,

After a discussion on the irc today, and given that pagination is
something pretty common, I thought it was about time to try and create
a "copes with all" solution. There are a number of solution dotted
around, I've taken a look at all and tried to ensure I didn't miss
anything out. That said I haven't looked at the presentation side of
things (images, google style).

I just finished playing around with this:
http://www.noswad.me.uk/pagination. You can get the example plugin and
the associated component, helper and element with the "download me"
link on the page. Each link is a variation of the same page (perhaps
obviously).

This is clearly an effort to update and enhance what pj and gwoo did (a
good job of) a while ago - I've left out the ajax from the demo for now
to highlight what is happening with the url, one bit of logic that is
missing is to automatically use ajax updates if a) it's available and
b) the parameter to use ajax if available is set to true. Not sure on
the best way to do that - help welcome.

The syntax for use is slightly different from the wiki (less code to
write) and as such> Tarique Sani in keeping with what we discussed if
you feel this goes far enough towards a generic solution - I'd welcome
any efforts writing a tutorial and will create a snippet or otherwise
fix the code tomorrow.

Comments welcome (except regarding the other things on the site that
break because of this update ;)), Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---