Changeset 465 for ether_megapoli


Ignore:
Timestamp:
04/04/12 16:21:50 (12 years ago)
Author:
vmipsl
Message:

MCO clean

Location:
ether_megapoli/trunk/web
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/backoffice/mco-script.jsp

    r464 r465  
    4848        if( !this.verifyFields() ) 
    4949        { 
    50             var parametersUrl = "code=" + $( "#code" ).val() + "&email=" + $( "#email" ).val() + "&state=" + this.selectStates.getValue() + "&type=" + this.selectTypes.getValue() + 
    51                     "&title=" + $( "#titleRequest" ).val() + "&informations=" + $( "#informations" ).val(); 
     50            var parametersUrl = "code=" + stripVowelAccent( $( "#code" ).val() ) + "&email=" + $( "#email" ).val() + "&state=" + this.selectStates.getValue() + "&type=" + this.selectTypes.getValue() + 
     51                    "&title=" + stripVowelAccent( $( "#titleRequest" ).val() ) + "&informations=" + stripVowelAccent( $( "#informations" ).val() ); 
    5252            var request = $.ajax( { 
    5353                url: "backoffice?methodName=addRequest&" + parametersUrl, 
     
    8080        if( this.request && !this.verifyFields() ) 
    8181        { 
    82             var parametersUrl = "id=" + this.request.id + "&code=" + $( "#code" ).val() + "&email=" + $( "#email" ).val() + 
    83                     "&type=" + this.selectTypes.getValue() + "&state=" + this.selectStates.getValue() + "&title=" + $( "#titleRequest" ).val() + "&informations=" + $( "#informations" ).val(); 
     82            var parametersUrl = "id=" + this.request.id + "&code=" + stripVowelAccent( $( "#code" ).val() ) + "&email=" + $( "#email" ).val() + 
     83                    "&type=" + this.selectTypes.getValue() + "&state=" + this.selectStates.getValue() + "&title=" + stripVowelAccent( $( "#titleRequest" ).val() ) + "&informations=" + stripVowelAccent( $( "#informations" ).val() ); 
    8484            $.ajax( { 
    8585                url: "backoffice?methodName=modifyRequest&" + parametersUrl, 
  • ether_megapoli/trunk/web/resources/js/classesForJQuery/etherHelper.js

    r311 r465  
    9696    $( pageContainer ).html( Math.max( 1, page ) ); 
    9797} 
     98 
     99function stripVowelAccent( str ) 
     100{ 
     101    var s = str; 
     102 
     103    var rExps = [ /[\xC0-\xC2]/g, /[\xE0-\xE2]/g, 
     104        /[\xC8-\xCA]/g, /[\xE8-\xEB]/g, 
     105        /[\xCC-\xCE]/g, /[\xEC-\xEE]/g, 
     106        /[\xD2-\xD4]/g, /[\xF2-\xF4]/g, 
     107        /[\xD9-\xDB]/g, /[\xF9-\xFB]/g ]; 
     108 
     109    var repChar = ['A','a','E','e','I','i','O','o','U','u']; 
     110 
     111    for( var i = 0; i < rExps.length; i++ ) 
     112        s = s.replace( rExps[i], repChar[i] ); 
     113 
     114    return s; 
     115} 
  • ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java

    r464 r465  
    388388                               @Nullable @ParamName(ParameterConstants.PARAMETER_TITLE) final String title, 
    389389                               @Nullable @ParamName(ParameterConstants.PARAMETER_INFORMATIONS) final String informations ) 
    390             throws WebException, NoSuchAlgorithmException 
     390            throws WebException 
    391391    { 
    392392        try 
Note: See TracChangeset for help on using the changeset viewer.