mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Fix inside click action in inline editing [SCI-3440] (#1765)
* Fix inside click action
This commit is contained in:
parent
d28d466dc9
commit
825e34e661
2 changed files with 5 additions and 4 deletions
|
@ -238,6 +238,7 @@ var Comments = (function() {
|
|||
$('.form-group', $form).removeClass('has-error');
|
||||
$('.help-block', $form).html('').addClass('hide');
|
||||
$submitBtn.removeClass('has-error');
|
||||
$submitBtn.removeClass('show');
|
||||
|
||||
var currnetCount = $('#counter-' + stepId).html()
|
||||
$('#counter-' + stepId).html(parseInt(currnetCount) + 1)
|
||||
|
|
|
@ -21,10 +21,10 @@ function initInlineEditing(title) {
|
|||
});
|
||||
$inputString.keydown();
|
||||
}
|
||||
inputString = $inputString[0]
|
||||
inputString = $inputString[0];
|
||||
|
||||
function cancelAllEditFields() {
|
||||
$('.inline-edit-active').find('.cancel-button').click();
|
||||
function saveAllEditFields() {
|
||||
$('.inline-edit-active').find('.save-button').click();
|
||||
}
|
||||
|
||||
function updateField() {
|
||||
|
@ -64,8 +64,8 @@ function initInlineEditing(title) {
|
|||
}
|
||||
|
||||
$editBlock.click(e => {
|
||||
cancelAllEditFields();
|
||||
if (inputString.disabled) {
|
||||
saveAllEditFields();
|
||||
editBlock.dataset.editMode = 1;
|
||||
inputString.disabled = false;
|
||||
$inputString.focus();
|
||||
|
|
Loading…
Reference in a new issue