JSFiddle - React, Tailwind, and code Playground
by kasperfish
HTML
<div id="yla-debug" class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title pull-left">Daily Production Data for <span style="font-weight: bold;">@ViewBag.SiteName</span> </h3>
<span style="font-weight: normal; background-color: #000080;" class="badge pull-left">(Autoupdate every 30 min.)</span>
<div class="pull-right" id="loading-production-parameters">
<span>Refreshing</span>
<img src="~/Content/ajax-loader-bar1.gif" />
</div>
</div>
<div class="panel-body">
<table id="partial-rows-parameters" class="table table-striped table-hover">
</table>
</div>
<div class="panel-footer">
<span>Last Refresh: </span>
<span id="last_refresh_parameters"></span>
</div>
</div>
JavaScript
$(function () {
//
//Init
//Initial Tasks
//
refreshParameters();
refreshTotals();
//
// Events
//
$('#yla-debug').click(function (e) {
refreshParameters();
refreshTotals();
});
};
function refreshParameters() {
console.log('refresh parameters');
doRefresh('#loading-production-parameters', '#partial-rows-parameters', '@VirtualPathUtility.ToAbsolute("~/home/ProductionParameters")');
}
function refreshTotals() {
console.log('refresh totals');
doRefresh('#loading-production-totals', '#partial-rows-totals', '@VirtualPathUtility.ToAbsolute("~/home/ProductionTotals")');
}