rice-framework/krad-web/src/main/webapp/krad/scripts/krad.edit.js
/**
 * Creates the buttons and the div containing them used by inline edit for save and cancel actions
 *
 * @param $control the control used for editing
 * @param $editDiv the edit element div used for inline edit
 * @param saveEditFunc the function to call on save
 * @param cancelEditFunc the function to call on cancel
 * @return the edit button div element which contains the buttons
 * @private
 */
Creates the buttons and the div containing them used by inline edit for save and cancel actions


Creates the buttons and the div containing them used by inline edit for save and cancel actions
function _createInlineEditButtons($control, $editDiv, saveEditFunc, cancelEditFunc) {
    var saveText = getMessage(kradVariables.MESSAGE_SAVE);
    var cancelText = getMessage(kradVariables.MESSAGE_CANCEL);
    var $editButtonDiv = jQuery("<div class='uif-inlineEdit-buttons' style='display:inline-block'></div>");
    var saveButton = jQuery("<button class='btn btn-default btn-sm icon-checkmark-circle' style='margin-right: 3px;' title='" + saveText
            + "'><span class='sr-only'>" + saveText + "</span></button>");
    saveButton.click(saveEditFunc);
    var cancelButton = jQuery("<button class='btn btn-default btn-sm icon-cancel-circle' title='" + cancelText
            + "'><span class='sr-only'>" + cancelText + "</span></button>");
    cancelButton.click(cancelEditFunc);
    $editButtonDiv.append(saveButton);
    $editButtonDiv.append(cancelButton);
    $editDiv.append($editButtonDiv);
    var top = $control.offset().top + $control.outerHeight();
    var left = $control.offset().left + $control.outerWidth() - $editButtonDiv.outerWidth();
    $editButtonDiv.offset({top: top, left: left});
    return $editButtonDiv;
}
function _createInlineEditButtons ( $control , $editDiv , saveEditFunc , cancelEditFunc ) { var saveText = getMessage ( kradVariables . MESSAGE_SAVE ) ; var cancelText = getMessage ( kradVariables . MESSAGE_CANCEL ) ; var $editButtonDiv = jQuery ( "<div class='uif-inlineEdit-buttons' style='display:inline-block'></div>" ) ; var saveButton = jQuery ( "<button class='btn btn-default btn-sm icon-checkmark-circle' style='margin-right: 3px;' title='" + saveText + "'><span class='sr-only'>" + saveText + "</span></button>" ) ; saveButton . click ( saveEditFunc ) ; var cancelButton = jQuery ( "<button class='btn btn-default btn-sm icon-cancel-circle' title='" + cancelText + "'><span class='sr-only'>" + cancelText + "</span></button>" ) ; cancelButton . click ( cancelEditFunc ) ; $editButtonDiv . append ( saveButton ) ; $editButtonDiv . append ( cancelButton ) ; $editDiv . append ( $editButtonDiv ) ; var top = $control . offset ( ) . top + $control . outerHeight ( ) ; var left = $control . offset ( ) . left + $control . outerWidth ( ) - $editButtonDiv . outerWidth ( ) ; $editButtonDiv . offset ( { top : top , left : left } ) ; return $editButtonDiv ; }
Creates the buttons and the div containing them used by inline edit for save and cancel actions
Creates the buttons and the div containing them used by inline edit for save and cancel actions
// Create Save and Cancel button content for inline edit
 // Position the buttons at the bottom right of the control
