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');
|
$('.form-group', $form).removeClass('has-error');
|
||||||
$('.help-block', $form).html('').addClass('hide');
|
$('.help-block', $form).html('').addClass('hide');
|
||||||
$submitBtn.removeClass('has-error');
|
$submitBtn.removeClass('has-error');
|
||||||
|
$submitBtn.removeClass('show');
|
||||||
|
|
||||||
var currnetCount = $('#counter-' + stepId).html()
|
var currnetCount = $('#counter-' + stepId).html()
|
||||||
$('#counter-' + stepId).html(parseInt(currnetCount) + 1)
|
$('#counter-' + stepId).html(parseInt(currnetCount) + 1)
|
||||||
|
|
|
@ -21,10 +21,10 @@ function initInlineEditing(title) {
|
||||||
});
|
});
|
||||||
$inputString.keydown();
|
$inputString.keydown();
|
||||||
}
|
}
|
||||||
inputString = $inputString[0]
|
inputString = $inputString[0];
|
||||||
|
|
||||||
function cancelAllEditFields() {
|
function saveAllEditFields() {
|
||||||
$('.inline-edit-active').find('.cancel-button').click();
|
$('.inline-edit-active').find('.save-button').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateField() {
|
function updateField() {
|
||||||
|
@ -64,8 +64,8 @@ function initInlineEditing(title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$editBlock.click(e => {
|
$editBlock.click(e => {
|
||||||
cancelAllEditFields();
|
|
||||||
if (inputString.disabled) {
|
if (inputString.disabled) {
|
||||||
|
saveAllEditFields();
|
||||||
editBlock.dataset.editMode = 1;
|
editBlock.dataset.editMode = 1;
|
||||||
inputString.disabled = false;
|
inputString.disabled = false;
|
||||||
$inputString.focus();
|
$inputString.focus();
|
||||||
|
|
Loading…
Reference in a new issue