Changeset 1567


Ignore:
Timestamp:
2010-06-22 14:55:42 (3 years ago)
Author:
freya
Message:

solves #339 : if validation is in initialisation state, clear valid/invalid classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/control.js

    r1563 r1567  
    14681468                        this.valueState = Control.STATE_INIT; // mark that this value isn't validated yet. 
    14691469                        this.clearMessage(); // and clear messages 
     1470                        this.clearValidationClasses(); 
    14701471                    } 
    14711472                } finally { 
     
    17041705        this.setMessage(""); 
    17051706    } 
    1706      
     1707 
     1708     /** 
     1709      * removes valid/invalid classes added 
     1710      */ 
     1711    Control.prototype.clearValidationClasses = function(){ 
     1712      
     1713       var mrkElm = this.getElement(ControlElements.REV_MARK); 
     1714           
     1715       if(mrkElm){  
     1716           mrkElm.removeClass("valid"); 
     1717           mrkElm.removeClass("invalid"); 
     1718       } 
     1719    } 
     1720      
     1721      
    17071722    /** 
    17081723     * Gives a string representation of the control 
     
    18691884        } 
    18701885        this.clearMessage(); 
     1886        this.clearValidationClasses(); 
    18711887        this.operationalState = Control.STATE_DISABLED; 
    18721888    } 
Note: See TracChangeset for help on using the changeset viewer.