|
@@ -870,6 +870,9 @@ function generateData(_parentSegment) {
|
|
|
$(this).find('input, textarea').each(function() {
|
|
|
line[$(this).attr('bucket')][$(this).attr('key')] = this.value;
|
|
|
});
|
|
|
+ $(this).find('[note-rte][key][bucket]').each(function() {
|
|
|
+ line[$(this).attr('bucket')][$(this).attr('key')] = $(this).find('.ql-editor[contenteditable]').first().html();
|
|
|
+ });
|
|
|
line.data = JSON.stringify(line.data);
|
|
|
line.childReviewData = JSON.stringify(line.childReviewData);
|
|
|
line.childPlanData = JSON.stringify(line.childPlanData);
|
|
@@ -924,6 +927,16 @@ parentSegment
|
|
|
|
|
|
});
|
|
|
|
|
|
+parentSegment
|
|
|
+ .off('click', '.stag-sheet tbody td')
|
|
|
+ .on('click', '.stag-sheet tbody td', function(_e) {
|
|
|
+ let focusable = $(this).find('input, textarea, .ql-editor[contenteditable]').first();
|
|
|
+ if(!focusable.is(':focus')) {
|
|
|
+ focusable.focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
parentSegment
|
|
|
.off('click.delete-line', '.stag-sheet .delete-line')
|
|
|
.on('click.delete-line', '.stag-sheet .delete-line', function() {
|
|
@@ -962,7 +975,6 @@ parentSegment
|
|
|
if(!isEmptyRow) numEmptyRows--;
|
|
|
else emptyRows.push(this);
|
|
|
});
|
|
|
- debugger
|
|
|
if(numEmptyRows > 0) {
|
|
|
if(numEmptyRows === numRows && numRows === 1) return false; // if only 1 row and all empty in that - ignore and stop
|
|
|
else { // else clear empty rows
|