Permalink
Browse files

Item8477: improve the message display to account for availability of …

…JS. Also compressed strikeone JS module and removed dead code.

git-svn-id: http://svn.foswiki.org/trunk@6886 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
CrawfordCurrie CrawfordCurrie
CrawfordCurrie authored and CrawfordCurrie committed Mar 24, 2010
1 parent a747ff3 commit efa091a8f34b6d50eca00e629a44d672ebaa17c7
@@ -50,7 +50,7 @@ object.
=cut
# Done as a sub to help perl optimise it away
sub TRACE { 0 }
sub TRACE { 1 }
# Define cookie name only once
# WARNING: If you change this, be sure to also change the javascript
@@ -106,7 +106,7 @@ sub addValidationKey {
---++ StaticMethod addOnSubmit( $form ) -> $form
Add a =foswikiStrikeOne= double submission onsubmit handler to a form.
Add a double submission onsubmit handler to a form.
* =$form= - the opening tag of a form, ie. <form ...>=
The handler will be added to an existing on submit, or by adding a new
onsubmit in the form tag.
@@ -116,9 +116,9 @@ onsubmit in the form tag.
sub addOnSubmit {
my ($form) = @_;
unless ( $form =~
s/\bonsubmit=(["'])((?:\s*javascript:)?)(.*)\1/onsubmit=${1}${2}foswikiStrikeOne(this);$3$1/i )
s/\bonsubmit=(["'])((?:\s*javascript:)?)(.*)\1/onsubmit=${1}${2}StrikeOne.submit(this);$3$1/i )
{
$form =~ s/>$/ onsubmit="foswikiStrikeOne(this)">/;
$form =~ s/>$/ onsubmit="StrikeOne.submit(this)">/;
}
return $form;
}

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit efa091a

Please sign in to comment.