rice-framework/krad-web/src/main/webapp/krad/scripts/krad.edit.js
/**
 * Cancel the edit on an inline edit control
 *
 * @param $control the control element
 * @param $editDiv the edit div element containing the edit state
 * @param $viewButton the view div element containing the view state
 * @returns {boolean} false for handler purposes
 */
Cancel the edit on an inline edit control

@param $control the control element
@param $editDiv the edit div element containing the edit state
@param $viewButton the view div element containing the view state
@returns {boolean} false for handler purposes
Cancel the edit on an inline edit control @param $control the control element @param $editDiv the edit div element containing the edit state @param $viewButton the view div element containing the view state @returns { boolean } false for handler purposes
function _cancelEdit($control, $editDiv, $viewButton) {
    $control.val($editDiv.data(kradVariables.INLINE_EDIT.ORIGINAL_VALUE));
    var valid = true;
    if (validateClient) {
        var fieldId = getAttributeId(jQuery($control).attr('id'));
        var data = getValidationData(jQuery("#" + fieldId));
        data.useTooltip = false;
        valid = validateFieldValue($control);
    }
    if (!valid) {
        focusEnd($control);
        return false;
    }
    $editDiv.hide();
    $viewButton.show();
    $viewButton.focus();
    $control.unbind("keydown." + kradVariables.INLINE_EDIT.INLINE_EDIT_NAMESPACE);
    $editDiv.unbind("cancel." + kradVariables.INLINE_EDIT.INLINE_EDIT_NAMESPACE);
    return false;
}
function _cancelEdit ( $control , $editDiv , $viewButton ) { $control . val ( $editDiv . data ( kradVariables . INLINE_EDIT . ORIGINAL_VALUE ) ) ; var valid = true ; if ( validateClient ) { var fieldId = getAttributeId ( jQuery ( $control ) . attr ( 'id' ) ) ; var data = getValidationData ( jQuery ( "#" + fieldId ) ) ; data . useTooltip = false ; valid = validateFieldValue ( $control ) ; } if ( ! valid ) { focusEnd ( $control ) ; return false ; } $editDiv . hide ( ) ; $viewButton . show ( ) ; $viewButton . focus ( ) ; $control . unbind ( "keydown." + kradVariables . INLINE_EDIT . INLINE_EDIT_NAMESPACE ) ; $editDiv . unbind ( "cancel." + kradVariables . INLINE_EDIT . INLINE_EDIT_NAMESPACE ) ; return false ; }
Cancel the edit on an inline edit control
Cancel the edit on an inline edit control
// Check for a very rare case where the cancel value may not be valid on the form anymore (this should never happen
 // if original data is truly valid).  May also occur in cross field constraint situations.
 // Remove no longer needed handlers
