powermail_allowCustomValidatorConfiguration.patch
| powermail/res/js/powermail_frontend.js 2011-02-10 18:19:30.000000000 +0100 | ||
|---|---|---|
| 25 | 25 |
(function($) {
|
| 26 | 26 |
$(function(){
|
| 27 | 27 | |
| 28 |
var powermail_validator = $('.tx_powermail_pi1_form').validator({
|
|
| 28 |
var powermail_validator = $('.tx_powermail_pi1_form').validator($.extend({
|
|
| 29 | 29 |
inputEvent: 'blur', |
| 30 | 30 |
grouped: true, |
| 31 | 31 |
singleError: false, |
| 32 |
position: 'top right', |
|
| 33 |
offset: [-5, -20], |
|
| 34 |
message: '<div><em/></div>' |
|
| 35 | ||
| 36 |
}); |
|
| 32 |
message: '<div><em/></div>', |
|
| 33 |
messageClass: 'tx-powermail-pi1_error', |
|
| 34 |
errorClass: 'tx-powermail-pi1_errorField' |
|
| 35 |
}, powermail_customValidatorConfiguration)); |
|
| 37 | 36 | |
| 38 | 37 |
// initialize range input |
| 39 | 38 |
$(':range').rangeinput();
|
| powermail/static/pi1/setup.txt 2011-02-10 18:22:34.000000000 +0100 | ||
|---|---|---|
| 431 | 431 | |
| 432 | 432 |
// if powermail is on current page build up validation js |
| 433 | 433 | |
| 434 |
lib.powermailjsGlobal = COA |
|
| 435 |
lib.powermailjsGlobal {
|
|
| 436 |
10 = TEXT |
|
| 437 |
10 {
|
|
| 438 |
wrap = var powermail_customValidatorConfiguration = {|};
|
|
| 439 |
value ( |
|
| 440 |
position: 'top right', |
|
| 441 |
offset: [-5, -20] |
|
| 442 |
) |
|
| 443 |
} |
|
| 444 |
} |
|
| 445 | ||
| 434 | 446 |
lib.powermailjs = COA |
| 435 | 447 |
lib.powermailjs {
|
| 436 | 448 |
wrap = (function($){|})(jQuery);
|
| 449 | ||
| 437 | 450 |
10 = COA |
| 438 | 451 |
10 {
|
| 439 | 452 |
wrap = $.tools.validator.localize('en', {|});
|
| ... | ... | |
| 637 | 650 | |
| 638 | 651 |
// if powermail is on current page and t3jquery is NOT loaded include validation js into page footer |
| 639 | 652 | |
| 653 |
page.footerData.31319 < lib.powermailjsGlobal |
|
| 654 |
page.footerData.31319.wrap ( |
|
| 655 |
<script type="text/javascript"> |
|
| 656 |
/* <![CDATA[*/ |
|
| 657 |
| |
|
| 658 |
/*]]>*/ |
|
| 659 |
</script> |
|
| 660 |
) |
|
| 661 | ||
| 640 | 662 |
page.footerData.31320 < lib.powermailjs |
| 641 | 663 |
page.footerData.31320.wrap ( |
| 642 | 664 |
<script type="text/javascript"> |
| ... | ... | |
| 683 | 705 |
compress = 1 |
| 684 | 706 |
tofooter = 1 |
| 685 | 707 |
} |
| 708 |
50 = USER |
|
| 709 |
50 {
|
|
| 710 |
userFunc = tx_t3jquery->addJS |
|
| 711 |
jsdata.cObject < lib.powermailjsGlobal |
|
| 712 |
compress = 1 |
|
| 713 |
tofooter = 1 |
|
| 714 |
} |
|
| 686 | 715 |
} |
| 687 | 716 | |
| 688 | 717 |
[end] |