|
@@ -10,22 +10,18 @@ $contentData = [
|
|
],
|
|
],
|
|
"estimated_daily_calories" => [
|
|
"estimated_daily_calories" => [
|
|
"S" => '',
|
|
"S" => '',
|
|
- "I" => '',
|
|
|
|
"P" => '',
|
|
"P" => '',
|
|
],
|
|
],
|
|
"estimated_daily_protein_grams" => [
|
|
"estimated_daily_protein_grams" => [
|
|
"S" => '',
|
|
"S" => '',
|
|
- "I" => '',
|
|
|
|
"P" => '',
|
|
"P" => '',
|
|
],
|
|
],
|
|
"estimated_daily_vegetable_servings" => [
|
|
"estimated_daily_vegetable_servings" => [
|
|
"S" => '',
|
|
"S" => '',
|
|
- "I" => '',
|
|
|
|
"P" => '',
|
|
"P" => '',
|
|
],
|
|
],
|
|
"estimated_daily_hours_of_sleep" => [
|
|
"estimated_daily_hours_of_sleep" => [
|
|
"S" => '',
|
|
"S" => '',
|
|
- "I" => '',
|
|
|
|
"P" => '',
|
|
"P" => '',
|
|
]
|
|
]
|
|
];
|
|
];
|
|
@@ -49,15 +45,17 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
<tr>
|
|
<tr>
|
|
<th class="border-bottom-0 text-secondary width-30px"></th>
|
|
<th class="border-bottom-0 text-secondary width-30px"></th>
|
|
<th class="border-bottom-0 text-secondary">Subjective</th>
|
|
<th class="border-bottom-0 text-secondary">Subjective</th>
|
|
- <th class="border-bottom-0 text-secondary w-50">Impression & Plan</th>
|
|
|
|
|
|
+ <th class="border-bottom-0 text-secondary width-100px">Impression</th>
|
|
|
|
+ <th class="border-bottom-0 text-secondary w-50">Plan</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
@foreach(@$contentData["lines"] as $line)
|
|
@foreach(@$contentData["lines"] as $line)
|
|
<tr>
|
|
<tr>
|
|
<td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>
|
|
<td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>
|
|
- <td><textarea rows="1" key="S">{{$line['S']}}</textarea></td>
|
|
|
|
- <td><textarea rows="1" key="P">{{$line['P']}}</textarea></td>
|
|
|
|
|
|
+ <td><textarea rows="1" key="S">{{@$line['S']}}</textarea></td>
|
|
|
|
+ <td><textarea rows="1" key="I">{{@$line['I']}}</textarea></td>
|
|
|
|
+ <td><textarea rows="1" key="P">{{@$line['P']}}</textarea></td>
|
|
</tr>
|
|
</tr>
|
|
@endforeach
|
|
@endforeach
|
|
</tbody>
|
|
</tbody>
|
|
@@ -112,6 +110,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
<style>
|
|
<style>
|
|
.stag-sheet tbody tr td {
|
|
.stag-sheet tbody tr td {
|
|
padding: 0;
|
|
padding: 0;
|
|
|
|
+ background: #fff;
|
|
}
|
|
}
|
|
.stag-sheet tbody tr td textarea {
|
|
.stag-sheet tbody tr td textarea {
|
|
border: 1px solid transparent;
|
|
border: 1px solid transparent;
|
|
@@ -123,6 +122,9 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
padding: 3px;
|
|
padding: 3px;
|
|
min-height: 28px;
|
|
min-height: 28px;
|
|
}
|
|
}
|
|
|
|
+ .stag-sheet tbody tr td textarea {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ }
|
|
.stag-sheet tbody tr td textarea:focus,
|
|
.stag-sheet tbody tr td textarea:focus,
|
|
.stag-sheet tbody tr td textarea:focus-visible {
|
|
.stag-sheet tbody tr td textarea:focus-visible {
|
|
border: 1px solid steelblue;
|
|
border: 1px solid steelblue;
|
|
@@ -156,6 +158,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
function newRow() {
|
|
function newRow() {
|
|
return $('<tr><td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>' +
|
|
return $('<tr><td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>' +
|
|
'<td><textarea rows="1" key="S"></textarea></td>' +
|
|
'<td><textarea rows="1" key="S"></textarea></td>' +
|
|
|
|
+ '<td><textarea rows="1" key="I"></textarea></td>' +
|
|
'<td><textarea rows="1" key="P"></textarea></td></tr>');
|
|
'<td><textarea rows="1" key="P"></textarea></td></tr>');
|
|
}
|
|
}
|
|
|
|
|
|
@@ -209,6 +212,12 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
parentSegment.find('[name="data"]').trigger('save-trigger');
|
|
parentSegment.find('[name="data"]').trigger('save-trigger');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function autoGrowTextarea(_textarea) {
|
|
|
|
+ _textarea.style.minHeight = "100%";
|
|
|
|
+ _textarea.style.height = "calc(1.5em + .5rem + 2px)";
|
|
|
|
+ _textarea.style.height = (_textarea.scrollHeight)+"px";
|
|
|
|
+ }
|
|
|
|
+
|
|
parentSegment
|
|
parentSegment
|
|
.off('keydown', '.stag-sheet textarea')
|
|
.off('keydown', '.stag-sheet textarea')
|
|
.on('keydown', '.stag-sheet textarea', function(_e) {
|
|
.on('keydown', '.stag-sheet textarea', function(_e) {
|
|
@@ -272,18 +281,14 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
|
|
});
|
|
});
|
|
|
|
|
|
parentSegment.find('.stag-sheet textarea').each(function() {
|
|
parentSegment.find('.stag-sheet textarea').each(function() {
|
|
- this.style.minHeight = "calc(1.5em + .5rem + 2px)";
|
|
|
|
- this.style.height = "calc(1.5em + .5rem + 2px)";
|
|
|
|
- this.style.height = (this.scrollHeight)+"px";
|
|
|
|
|
|
+ autoGrowTextarea(this);
|
|
});
|
|
});
|
|
|
|
|
|
parentSegment
|
|
parentSegment
|
|
.off('edit-mode-activated')
|
|
.off('edit-mode-activated')
|
|
.on('edit-mode-activated', function() {
|
|
.on('edit-mode-activated', function() {
|
|
parentSegment.find('.stag-sheet textarea').each(function() {
|
|
parentSegment.find('.stag-sheet textarea').each(function() {
|
|
- this.style.minHeight = "calc(1.5em + .5rem + 2px)";
|
|
|
|
- this.style.height = "calc(1.5em + .5rem + 2px)";
|
|
|
|
- this.style.height = (this.scrollHeight)+"px";
|
|
|
|
|
|
+ autoGrowTextarea(this);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|