|
@ -132,7 +132,7 @@ $(function () {
|
132
|
132
|
var panelBody;
|
133
|
133
|
|
134
|
134
|
if (panelTitle.length > 0) {
|
135
|
|
panelBody = $(panelTitle).parents('div.panel').find('div.panel-body');
|
|
135
|
panelBody = $(panelTitle).parents('div.panel').find('.table');
|
136
|
136
|
}
|
137
|
137
|
else {
|
138
|
138
|
$('div#history').prepend(
|
|
@ -150,7 +150,10 @@ $(function () {
|
150
|
150
|
.append(
|
151
|
151
|
'<td>' + product + '</td>'
|
152
|
152
|
+ '<td class="text-right" style="width: 4em;"><span class="calories">' + calories + '</span></td>'
|
153
|
|
+ '<td class="text-center" style="width: 6em;"><button class="btn btn-danger delete-history"><span class="glyphicon glyphicon-fire"></span></button></td>'));
|
|
153
|
+ '<td class="text-center" style="width: 6em;"><button class="btn btn-danger delete-history" style="display: none;"><span class="glyphicon glyphicon-fire"></span></button></td>'));
|
|
154
|
|
|
155
|
$('.panel.panel-default > .panel-collapse').addClass('collapse').find('.delete-history').hide();
|
|
156
|
$('.panel.panel-default:first > .panel-collapse').addClass('in').find('.delete-history').show();
|
154
|
157
|
}
|
155
|
158
|
|
156
|
159
|
function getDailyCalories() {
|
|
@ -219,7 +222,7 @@ $(function () {
|
219
|
222
|
.append(
|
220
|
223
|
'<td>' + response[i].Product + '</td>'
|
221
|
224
|
+ '<td class="text-right" style="width: 4em;"><span class="calories">' + response[i].Calories + '</span></td>'
|
222
|
|
+ '<td class="text-center" style="width: 6em;"><button class="btn btn-danger delete-history"><span class="glyphicon glyphicon-fire"></span></button></td>');
|
|
225
|
+ '<td class="text-center" style="width: 6em;"><button class="btn btn-danger delete-history" style="display: none;"><span class="glyphicon glyphicon-fire"></span></button></td>');
|
223
|
226
|
|
224
|
227
|
if (!lastDate || lastDate != momentDate) {
|
225
|
228
|
lastDate = momentDate;
|
|
@ -247,8 +250,8 @@ $(function () {
|
247
|
250
|
$(history).append(panel);
|
248
|
251
|
}
|
249
|
252
|
|
250
|
|
$('.panel.panel-default > .panel-collapse').addClass('collapse');
|
251
|
|
$('.panel.panel-default:first > .panel-collapse').addClass('in');
|
|
253
|
$('.panel.panel-default > .panel-collapse').addClass('collapse').find('.delete-history').hide();
|
|
254
|
$('.panel.panel-default:first > .panel-collapse').addClass('in').find('.delete-history').show();
|
252
|
255
|
}
|
253
|
256
|
});
|
254
|
257
|
}
|