rice-framework/krad-web/src/main/webapp/krad/scripts/krad.edit.js
/**
 * Setup the key handlers necessary for inline edit
 *
 * @param $control the control element
 * @param cancelEditFunc the cancel function to call to cancel
 */
Setup the key handlers necessary for inline edit

@param $control the control element
@param cancelEditFunc the cancel function to call to cancel
Setup the key handlers necessary for inline edit @param $control the control element @param cancelEditFunc the cancel function to call to cancel
function _setupInlineEditKeyHandlers($control, cancelEditFunc, saveEditFunc) {
    $control.on("keydown." + kradVariables.INLINE_EDIT.INLINE_EDIT_NAMESPACE,function (event) {
        var keycode = (event.keyCode ? event.keyCode : event.which);
        if (keycode === 27) {
            cancelEditFunc(event);
            return false;
        }
        else if (keycode === 13 && !($control.is("textarea"))) {
            event.preventDefault();
            saveEditFunc(event);
            return false;
        }
    });
}
function _setupInlineEditKeyHandlers ( $control , cancelEditFunc , saveEditFunc ) { $control . on ( "keydown." + kradVariables . INLINE_EDIT . INLINE_EDIT_NAMESPACE , function ( event ) { var keycode = ( event . keyCode ? event . keyCode : event . which ) ; if ( keycode === 27 ) { cancelEditFunc ( event ) ; return false ; } else if ( keycode === 13 && ! ( $control . is ( "textarea" ) ) ) { event . preventDefault ( ) ; saveEditFunc ( event ) ; return false ; } } ) ; }
Setup the key handlers necessary for inline edit
Setup the key handlers necessary for inline edit
// Check for escape key
 // Check for enter key
