rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Appends the message count to the document title (window title) 
 * 
 * First look to see if there is a error/warning/info message already 
 * in the tab title, in the event that the there is no error/warning/info 
 * at all add the message to the title. If there is an error/warning/info 
 * message and then either update the new message or remove the error and 
 * the dash. 
 *
 * @param countMessage the new message to append
 */
Appends the message count to the document title (window title)

First look to see if there is a error/warning/info message already
in the tab title, in the event that the there is no error/warning/info
at all add the message to the title. If there is an error/warning/info
message and then either update the new message or remove the error and
the dash.

@param countMessage the new message to append
Appends the message count to the document title ( window title ) First look to see if there is a error / warning / info message already in the tab title in the event that the there is no error / warning / info at all add the message to the title . If there is an error / warning / info message and then either update the new message or remove the error and the dash . @param countMessage the new message to append
function addCountToDocumentTitle(countMessage) {
	var tokenIndex = document.title.lastIndexOf(" - ");
    if (tokenIndex > -1 && !isEmpty(countMessage)) {
        document.title = document.title.substr(0, tokenIndex) + " - " + countMessage;
    } else if (tokenIndex > -1 && isEmpty(countMessage)) {
        document.title = document.title.substr(0, tokenIndex);
    } else if (!isEmpty(countMessage)) {
        document.title = document.title + " - " + countMessage;
    }
}
function addCountToDocumentTitle ( countMessage ) { var tokenIndex = document . title . lastIndexOf ( " - " ) ; if ( tokenIndex > - 1 && ! isEmpty ( countMessage ) ) { document . title = document . title . substr ( 0 , tokenIndex ) + " - " + countMessage ; } else if ( tokenIndex > - 1 && isEmpty ( countMessage ) ) { document . title = document . title . substr ( 0 , tokenIndex ) ; } else if ( ! isEmpty ( countMessage ) ) { document . title = document . title + " - " + countMessage ; } }
Appends the message count to the document title (window title)
Appends the message count to the document title ( window title )