[Catalyst] how to confirm before deleteing
I writting my first little Catalyst app and need todo a delete function. I have a link for users to delete a row in a sqlite table. My question is what is the prefered rocess for asking You selected delete. Do you really want todo this?. Thanks in advance! -Paul -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583057.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
Paul, how about a javascript confirm() box? body a href=yourcontroller/delete/row_id onclick=javascript:return confirm('You selected delete. Do you really want todo this?')Delete Row/a /body cheers, -rodrigo On Wed, Jan 21, 2009 at 2:23 PM, Paul Falbe p...@cassens.com wrote: I writting my first little Catalyst app and need todo a delete function. I have a link for users to delete a row in a sqlite table. My question is what is the prefered rocess for asking You selected delete. Do you really want todo this?. Thanks in advance! -Paul -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583057.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? ... and if the user has Javascript disabled? Doh! ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
On Wed, Jan 21, 2009 at 06:19:06AM -0800, Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Yes, but if the user has JS disabled, you have a problem. What I typically do is have two separate actions, a delete and a do_delete. The delete action merely displays the record and has a form (link, whatever) asking Are you sure?, and then if they agree, you perform the do_delete that does the business. You could also have a single delete action but with a confirm parameter signalling that you're really deleting, etc. There are lots of options. You can pair this with JS if you want. Best, Jesse Sheidlower Rodrigo-51 wrote: Paul, how about a javascript confirm() box? body yourcontroller/delete/row_id Delete Row /body cheers, -rodrigo On Wed, Jan 21, 2009 at 2:23 PM, Paul Falbe p...@cassens.com wrote: I writting my first little Catalyst app and need todo a delete function. I have a link for users to delete a row in a sqlite table. My question is what is the prefered rocess for asking You selected delete. Do you really want todo this?. Thanks in advance! -Paul -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583057.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583988.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? body yourcontroller/delete/row_id Delete Row /body cheers, -rodrigo On Wed, Jan 21, 2009 at 2:23 PM, Paul Falbe p...@cassens.com wrote: I writting my first little Catalyst app and need todo a delete function. I have a link for users to delete a row in a sqlite table. My question is what is the prefered rocess for asking You selected delete. Do you really want todo this?. Thanks in advance! -Paul -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583057.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583988.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
Dave Howorth wrote: Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? ... and if the user has Javascript disabled? Or if you have some like Google's ill-fated prefetch running, caching all the links it finds on a page ? GETing a link should really only be used when the action is idempotent. If it changes stuff then you ought to use a POST via a form button. S. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
On Wed, Jan 21, 2009 at 10:22 AM, Simon Wilcox sim...@digitalcraftsmen.netwrote: Dave Howorth wrote: Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? ... and if the user has Javascript disabled? Or if you have some like Google's ill-fated prefetch running, caching all the links it finds on a page ? GETing a link should really only be used when the action is idempotent. If it changes stuff then you ought to use a POST via a form button. YES! There are rare cases where a get may enable consequences, but this is not one of them. form method=POST action=/yourapp/account/do_delete input type=hidden name=accountid value=23948234 input type=submit name=delete value=Delete My Account onClick=return confirm( 'Are you sure you want to delete your account?'); /form This both checks if the user really wants to delete (if js is enabled) and also uses a post to delete data via the app. -- Thanks! Wade Stuart Phone: 917-363-6164 IM: SpaceMuscles ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Newbie Question about Database
lol I know but I'm doing this inside a private lan where we are building this app with my coleagues :p of course later on we will have specific accounts with limited access Your colleagues can be your biggest security problem. It just takes an argument...a jealousy...someone who feels belittled...someone who just wants to take advantage of lax data security. It is real good practice to use least-privilege access to data from the very beginning. Exactly, also how many of those we will of course do X later... TODO's end up hanging out there forever. -- Thanks! Wade Stuart Phone: 917-363-6164 IM: SpaceMuscles ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Custom fields in a model
I have a database table -- let's call it 'Contacts' that I'm accessing through a DBIx::Class model. This table has two fields called 'first_name' and 'last_name'. Could I get some suggestion on the best way to add code to the model (or the schema) to allow me to add a custom field to the resultset without having an actual column in the database table? I want to be able to access a field in the resultset called something like 'common_name'. This field would contain a concatenation of the first and last name fields for people and only the data from the last name for other entities like businesses. Thanks! Greg Coates ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Custom fields in a model
Greg Coates wrote: I have a database table -- let's call it 'Contacts' that I'm accessing through a DBIx::Class model. This table has two fields called 'first_name' and 'last_name'. Could I get some suggestion on the best way to add code to the model (or the schema) to allow me to add a custom field to the resultset without having an actual column in the database table? I want to be able to access a field in the resultset called something like 'common_name'. This field would contain a concatenation of the first and last name fields for people and only the data from the last name for other entities like businesses. At the end of the schema definition file (if you're generating schema, it's after the DO NOT MODIFY THIS OR ANYTHING ABOVE! line) add the following: __PACKAGE__-resultset_class('Contacts::ResultSet'); package Contacts::ResultSet; use warnings; use strict; use base 'DBIx::Class::ResultSet'; sub common_name { if ($self-person) { return $self-first_name. .$self-last_name; } else { # etc. } ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Custom fields in a model
On 21.01.2009, at 19:24, Greg Coates wrote: Could I get some suggestion on the best way to add code to the model (or the schema) to allow me to add a custom field to the resultset without having an actual column in the database table? I want to Just add them as methods to your ResultSource classes: package MyApp::Schema::Contacts; [...] sub common_name { my $self = shift; return $self-first_name . . $self-last_name; } --Tobias ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] London Perl tutorials - 25th 26th February 2009 - day 2 includes Cat+DBIC
Ok, so, as a favour to the UKUUG and to Dave Cross, founder of the illustrious london.pm and person mad enough to let me split the tutorial time at the London Perl Workshop 2008 with him, I hereby re-appear on the lists to point out that there are tutorials going on, and those of you attempting to get people up to speed or rescue PHP developers or whatever might be interested in it. So, if you are interested, here's the details - UKUUG (in conjunction with O'Reilly) presents: Introduction to Perl - 25th February 2009 Advanced Perl Techniques - 26th February 2009 Tutor: Dave Cross see: http://www.ukuug.org/events/perl09/ Day 1: Introduction to Perl - 25th February: This one-day course is an introduction to Perl for complete beginners. No knowledge of Perl is assumed, although attendees will have a slight advantage if they have some knowledge of at least one other programming language. At the end of the course, attendees will have enough knowledge to write a number of useful Perl programs, together with details of where to go for more information. Syllabus: What is Perl Input and output Creating and running a Perl program Regular expressions Perl variables References Operators and functions Finding and using modules Conditional constructs Smart matching Subroutines Day 2: Advanced Perl Techniques - 26th February: Perl has come a long way since the scripting language which powered most of the world wide web in the 1990s. There are many ways to build applications in Perl. In this course we will look at some powerful techniques which are used by the best Perl programmers in the world. This one-day course is aimed at programmers who have been using Perl for some time but who may not be completely up to date with the latest Perl techniques. At the end of the course attendees will have a number of modern Perl programming techniques to their programming toolkit. Syllabus: What's new in Perl 5.10 Dates and times Testing (including coverage analysis) Database access with DBIx::Class Profiling Object oriented programming with Moose Templates Web application development with Catalyst TUTOR Biography: Dave Cross is the owner of Magnum Solutions Ltd, an Open Source consultancy company based in London. In 1998 he started london.pm which has grown to be one of the largest Perl Mongers groups in the world. He nominally led the group until September 2001. Between August 2002 and June 2006 he was the Perl Mongers User Groups Co-ordinator for the Perl Foundation. Dave is a regular speaker at Perl and Open Source conferences and is often invited to present tutorials alongside the main conference. He is the author of Data Munging with Perl (Manning, 2001) and a co-author of Perl Template Toolkit (O'Reilly, 2003). Dave lives in South West London. The rumours about gold-plated cats were never true. Each day starts at 09:30 - ends approx. 17:00 each day -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] London Perl tutorials - 25th 26th February 2009 - day 2 includes Cat+DBIC
This is really tempting. I don't know if I can afford this one. And I would have to get to London several days before Day 1, because jet lag hits me hard. Hmm. Bob Cochran Matt S Trout wrote: Ok, so, as a favour to the UKUUG and to Dave Cross, founder of the illustrious london.pm and person mad enough to let me split the tutorial time at the London Perl Workshop 2008 with him, I hereby re-appear on the lists to point out that there are tutorials going on, and those of you attempting to get people up to speed or rescue PHP developers or whatever might be interested in it. So, if you are interested, here's the details - UKUUG (in conjunction with O'Reilly) presents: Introduction to Perl - 25th February 2009 Advanced Perl Techniques - 26th February 2009 Tutor: Dave Cross see: http://www.ukuug.org/events/perl09/ Day 1: Introduction to Perl - 25th February: This one-day course is an introduction to Perl for complete beginners. No knowledge of Perl is assumed, although attendees will have a slight advantage if they have some knowledge of at least one other programming language. At the end of the course, attendees will have enough knowledge to write a number of useful Perl programs, together with details of where to go for more information. Syllabus: What is Perl Input and output Creating and running a Perl program Regular expressions Perl variables References Operators and functions Finding and using modules Conditional constructs Smart matching Subroutines Day 2: Advanced Perl Techniques - 26th February: Perl has come a long way since the scripting language which powered most of the world wide web in the 1990s. There are many ways to build applications in Perl. In this course we will look at some powerful techniques which are used by the best Perl programmers in the world. This one-day course is aimed at programmers who have been using Perl for some time but who may not be completely up to date with the latest Perl techniques. At the end of the course attendees will have a number of modern Perl programming techniques to their programming toolkit. Syllabus: What's new in Perl 5.10 Dates and times Testing (including coverage analysis) Database access with DBIx::Class Profiling Object oriented programming with Moose Templates Web application development with Catalyst TUTOR Biography: Dave Cross is the owner of Magnum Solutions Ltd, an Open Source consultancy company based in London. In 1998 he started london.pm which has grown to be one of the largest Perl Mongers groups in the world. He nominally led the group until September 2001. Between August 2002 and June 2006 he was the Perl Mongers User Groups Co-ordinator for the Perl Foundation. Dave is a regular speaker at Perl and Open Source conferences and is often invited to present tutorials alongside the main conference. He is the author of Data Munging with Perl (Manning, 2001) and a co-author of Perl Template Toolkit (O'Reilly, 2003). Dave lives in South West London. The rumours about gold-plated cats were never true. Each day starts at 09:30 - ends approx. 17:00 each day ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Tool for rendering web pages consistently though time ?
Hi, I'm looking for a tool/procedure that could render web pages in a consistent manner without having to rely on the screen resolution and fonts of a workstation so that, through time - and through many OS updates of various sorts - it'd be possible to always render the pages in the exact same way, for documentation purposes. Perhaps some kind of virtual screen that always uses the same parameters and whose output whould be in svg of jpg. Is there a way of doing that ? Thanls for any ideas/suggestions. Cheers. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Tool for rendering web pages consistently though time ?
Can you be more specific about time and consistent? How far into the future are we talking? Does it have to remain pixel-perfect? Patrick http://patspam.com On Thu, Jan 22, 2009 at 11:29 AM, lanas la...@securenet.net wrote: Hi, I'm looking for a tool/procedure that could render web pages in a consistent manner without having to rely on the screen resolution and fonts of a workstation so that, through time - and through many OS updates of various sorts - it'd be possible to always render the pages in the exact same way, for documentation purposes. Perhaps some kind of virtual screen that always uses the same parameters and whose output whould be in svg of jpg. Is there a way of doing that ? Thanls for any ideas/suggestions. Cheers. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Tool for rendering web pages consistently though time ?
On Thu, 22 Jan 2009 12:02:19 +1100, Patrick Donelan p...@patspam.com wrote : Can you be more specific about time and consistent? How far into the future are we talking? Does it have to remain pixel-perfect? That would be over two years. This is for the making and updating of a user guide. Currently the procedure is to take screenshots but then, it so happen that the original workstation witht he original resolution and fonts no longer exists, so the screenshots of the web pages are no longer exactly the same. It'd be possible to dedicate a do not touch workstation for that purpose only but I'm looking for a more elegant solution which do not rely on any workstation hardware/resolution/fonts. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Tool for rendering web pages consistently though time ?
On Wednesday 21 January 2009 07:10:15 pm lanas wrote: That would be over two years. This is for the making and updating of a user guide. Currently the procedure is to take screenshots but then, it so happen that the original workstation witht he original resolution and fonts no longer exists, so the screenshots of the web pages are no longer exactly the same. It'd be possible to dedicate a do not touch workstation for that purpose only but I'm looking for a more elegant solution which do not rely on any workstation hardware/resolution/fonts. A unix box, Xvfb, firefox, a page saver extension, and a little automation? Then all the config details are under your control, and the hands off bit becomes less of a factor. Just a thought. Andrew ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Tool for rendering web pages consistently though time ?
On Wed, 21 Jan 2009 19:19:03 -0600, Andrew Rodland arodl...@comcast.net wrote : A unix box, Xvfb, firefox, a page saver extension, and a little automation? Then all the config details are under your control, and the hands off bit becomes less of a factor. Just a thought. Thanks, that's a whole lot of pointers. I did a quick search on xvfb, headless, firefox and found quite a few links on that topic. Cheers. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Catalyst: Text::SimpleTable's now go as wide as $ENV{COLUMNS}
Hi Oleg, I applied your patch to 5.70 and 5.80 tonight. Sorry for the delay. Cheers, j http://jays.net r9120 | jhannah | 2009-01-21 19:45:16 -0600 (Wed, 21 Jan 2009) | 3 lines Changed paths: M /Catalyst-Runtime/5.80/trunk/Changes M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Path.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Regex.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Stats.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm Text::SimpleTable's now go as wide as $ENV{COLUMNS} Patch written by Oleg Kostyuk cub.ua...@gmail.com r9121 | jhannah | 2009-01-21 19:53:47 -0600 (Wed, 21 Jan 2009) | 6 lines Changed paths: M /Catalyst-Runtime/5.70/trunk/Changes M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Path.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Regex.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Dispatcher.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Stats.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Utils.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm Text::SimpleTable's now go as wide as $ENV{COLUMNS} (jhannah) Patch written by Oleg Kostyuk cub.ua...@gmail.com Also nuked Stats.pm report() -- my patch to 5.80/trunk a couple weeks back added tests and everything over there. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
* On Wed, Jan 21 2009, Dave Howorth wrote: Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? ... and if the user has Javascript disabled? noscriptPlease enable Javascript. It's Two Thousand Fucking Nine./noscript Seriously. Regards, Jonathan Rockway -- print just = another = perl = hacker = if $,=$ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
Kieren Diment wrote: Yeah, 98% of your browsers have javascript enabled and a big chunk of the remainder are bots ... On the other hand you might want a non-javascript undo option at the other end if you go that route. Duh, I should know this, but do screen readers support JavaScript? Regards, Richard Siddall ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: how to confirm before deleting
* Jonathan Rockway j...@jrock.us [2009-01-22 05:15]: It's Two Thousand Fucking Nine. Exactly: it’s 2009, where are my safe-by-default browsers and web apps? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Re: how to confirm before deleteing
* Jesse Sheidlower jes...@panix.com [2009-01-21 15:55]: What I typically do is have two separate actions, a delete and a do_delete. The delete action merely displays the record and has a form (link, whatever) asking Are you sure?, and then if they agree, you perform the do_delete that does the business. You could also have a single delete action but with a confirm parameter signalling that you're really deleting, etc. There are lots of options. You can pair this with JS if you want. Best approach for pairing with JS: Do the above, ie. if the user GETs the link, you send back a form with POST and OK/Cancel buttons which they can use to POST the delete request. *Then*, use inobtrusive JS to modify the links, so that they first pop up a confirm dialog then submit a hidden form if the user says OK. That way users who have Javascript get asked OK/Cancel with a popup and they send a POST immediately. And users who don’t have Javascript get asked OK/Cancel on a separate page. And deletion is safely shielded behind a POST action in both cases. (I should make a jQuery plugin out of this sometime…) First rule of web apps: merely following a link (or typing into the browser address bar and hitting Enter) should NEVER EVER result in a destructive action, no matter what URL the user typed. Remember that following links need not be intentional. Your browser follows far more links automatically without telling you than the number of links you ever actively click on: every image, every stylesheet, every script, every frame, every Flash object on every page you visit is downloaded automatically. Now consider what happens if a malicious user puts img src=http://yourapp.example.org/addressbook/delete/all; into a page they control and then send a link to that page to your users. If you allow destructive actions on GET, you have just allowed for your users to be screwed over through no fault of their own. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleteing
On Wed, Jan 21, 2009 at 05:23:12AM -0800, Paul Falbe wrote: I writting my first little Catalyst app and need todo a delete function. I have a link for users to delete a row in a sqlite table. My question is what is the prefered rocess for asking You selected delete. Do you really want todo this?. This thread has been beat to death, but one other point: What do *you* think the vast majority of times you click Delete and are then asked Do you really want to delete? Of course I want to delete it, that's why I clicked that big fat delete button. The javascript confirmation is easy, and I do it all the time, but when not so lazy and the action lends itself I provide an undelete option afterwards for those rare oops times. -- Bill Moseley mose...@hank.org Sent from my iMutt ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
Kieren Diment wrote: Yeah, 98% of your browsers have javascript enabled and a big chunk of the remainder are bots ... On the other hand you might want a non-javascript undo option at the other end if you go that route. Oh, and watch out for a Classic Error I saw in someone's code a little while ago.. They had entered a bunch of state-modifying buttons like this: a href=/blah/blah/$id/delete onclick=confirm(..)img src=/static/trashcan.gif alt=Delete//a But what happens when your site gets spidered by a search engine, that follows all links? Whoops. There's a good reason state-modification-actions should be POST (or rather, non-GET, if you want to go with PUT, DELETE, etc) On 22/01/2009, at 3:06 PM, Jonathan Rockway wrote: * On Wed, Jan 21 2009, Dave Howorth wrote: Paul Falbe wrote: That works thank you very much. Don't know how many google searchs I did trying to find that out! Rodrigo-51 wrote: Paul, how about a javascript confirm() box? ... and if the user has Javascript disabled? noscriptPlease enable Javascript. It's Two Thousand Fucking Nine./noscript ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
On Thu, Jan 22, 2009 at 3:12 PM, Toby Corkindale toby.corkind...@strategicdata.com.au wrote: But what happens when your site gets spidered by a search engine, that follows all links? Whoops. There's a good reason state-modification-actions should be POST (or rather, non-GET, if you want to go with PUT, DELETE, etc) Surely such an action would be behind some form of authentication, ergo blocking any random web crawler? An app that allowed you to delete records with no security checks has bigger issues. ^_^ -- Trevor Phillips - http://dortamur.livejournal.com/ On nights such as this, evil deeds are done. And good deeds, of course. But mostly evil, on the whole. -- (Terry Pratchett, Wyrd Sisters) ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
Trevor Phillips wrote: On Thu, Jan 22, 2009 at 3:12 PM, Toby Corkindale toby.corkind...@strategicdata.com.au wrote: But what happens when your site gets spidered by a search engine, that follows all links? Whoops. There's a good reason state-modification-actions should be POST (or rather, non-GET, if you want to go with PUT, DELETE, etc) Surely such an action would be behind some form of authentication, ergo blocking any random web crawler? An app that allowed you to delete records with no security checks has bigger issues. ^_^ Yeah.. can't actually remember what the actions were, but indeed, 'twas misguided. After posting that, I realised other people had already posted warnings about not using GET for state-change anyway. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to confirm before deleting
From: Richard Siddall richard.sidd...@elirion.net Kieren Diment wrote: Yeah, 98% of your browsers have javascript enabled and a big chunk of the remainder are bots ... On the other hand you might want a non-javascript undo option at the other end if you go that route. Duh, I should know this, but do screen readers support JavaScript? It depends on what the JS script does. If it draws a menu for example, it won't be accessible, but if it just hides/shows a div with menu elements, it would be accessible in some cases, but probably not for all the screen readers. For just showing a confirmation window, JS is accessible for the screen readers. The most annoying thing however is to use links that use JS code in the href attribute instead of associate it with the events like onClick. This is because when the user makes a shift+click or shift+enter on a link in order to open the new page in a new window, it just displays an error because the browser can't access an url like javascript:DoPostBack() It is also very annoying to need to open a link like # or . I think that if the user presses shift+enter, he knows that this will open the page in a new window, so the href attribute should contain the full URL to the targeted page. Of course, if the URL should change something on the server, that page that opens directly (without JS) should contain a form that asks for a confirmation. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Tool for rendering web pages consistently though time ?
From: lanas la...@securenet.net Hi, I'm looking for a tool/procedure that could render web pages in a consistent manner without having to rely on the screen resolution and fonts of a workstation so that, through time - and through many OS updates of various sorts - it'd be possible to always render the pages in the exact same way, for documentation purposes. Perhaps some kind of virtual screen that always uses the same parameters and whose output whould be in svg of jpg. Is there a way of doing that ? Thanls for any ideas/suggestions. I hope there isn't. Such a documentation would be targeted discriminatory only to the sighted users, and this is not nice at all. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/