Index: trunk/extensions/RecordAdmin/recordadmin.js |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | for( i = 0; i < window.forms.length; i++ ) { |
4 | 4 | var type = forms[i]; |
5 | 5 | var form = document.getElementById( type.toLowerCase() + '-form' ); |
6 | | - form.onsubmit(); |
| 6 | + if( form.onsubmit() === false ) return false; |
7 | 7 | var tags = [ 'input', 'select', 'textarea' ]; |
8 | 8 | for( j = 0; j < tags.length; j++ ) { |
9 | 9 | var inputs = form.getElementsByTagName( tags[j] ); |
— | — | @@ -22,4 +22,4 @@ |
23 | 23 | } |
24 | 24 | } |
25 | 25 | }; |
26 | | -jQuery( '#editform' ).attr( 'onsubmit', 'raRecordForms()' ); |
| 26 | +jQuery( '#editform' ).submit( raRecordForms ); |
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -113,9 +113,7 @@ |
114 | 114 | global $wgRecordAdminExtPath; |
115 | 115 | $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$wgRecordAdminExtPath/recordadmin.js\"></script>" ); |
116 | 116 | $wgOut->addScript( "<script type=\"$wgJsMimeType\"> |
117 | | - function raAddRecordFormSubmit() { |
118 | | - jQuery( '#editform' ).attr( 'onsubmit', 'raRecordForms()' ); |
119 | | - } |
| 117 | + function raAddRecordFormSubmit() { jQuery( '#editform' ).submit( raRecordForms ); } |
120 | 118 | addOnloadHook( raAddRecordFormSubmit );</script>" |
121 | 119 | ); |
122 | 120 | } |
— | — | @@ -270,11 +268,11 @@ |
271 | 269 | case '=': |
272 | 270 | $cond = $re ? preg_match( $b, $a ) : ( empty( $b ) ? true : ( $a == $b ) ); |
273 | 271 | break; |
274 | | - |
| 272 | + |
275 | 273 | case '!=': |
276 | 274 | $cond = $re ? !preg_match( $b, $a ) : ( empty( $b ) ? true : ( $a != $b ) ); |
277 | 275 | break; |
278 | | - |
| 276 | + |
279 | 277 | default: |
280 | 278 | $a = preg_replace( "|(\d\d)[-/](\d\d)[-/](\d\d\d\d)|", "$3/$2/$1", $a ); # hack for dd/mm/yyyy format - best to use yyyy-mm-dd |
281 | 279 | $b = preg_replace( "|(\d\d)[-/](\d\d)[-/](\d\d\d\d)|", "$3/$2/$1", $b ); |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * @author Siebrand Mazeland |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | | -define( 'RECORDADMIN_VERSION', '1.3.1, 2011-08-18' ); |
| 14 | +define( 'RECORDADMIN_VERSION', '1.3.2, 2011-08-18' ); |
15 | 15 | |
16 | 16 | $wgRecordAdminExtPath = preg_replace( "|^.*(/extensions/.*$)|", "$wgScriptPath$1", dirname( __FILE__ ) ); |
17 | 17 | |