$(function () { common.dateTimePicker("from"); common.dateTimePicker("to"); $('[data-toggle="popover-hover"]').popover({ html: true, trigger: 'hover', placement: 'left', container: 'body', content: function () { return ''; } }); // setTimeout(function () { // window.location.reload(true); // }, 30000); }); function resizeImage(e) { var size = $(e).attr("data-size"); if (size === "min") { $(e).attr("style", "width:200px;cursor:pointer;"); $(e).attr("data-size", "max"); } if (size === "max") { $(e).attr("style", "width:100px;cursor:pointer;"); $(e).attr("data-size", "min"); } } function openForm(e, field) { var html = ``; $(e).closest("td").html(html); } function _save(e) { $.ajax({ url: $("input[name='saveUrl']").val(), type: 'POST', data: { id: $(e).data("id"), field: $(e).data("field"), value: $(e).val() }, success: function (data) { $(e).closest("td").html(data); }, error: function (jqXHR, textStatus, errorThrown) { common.modalBlock(false); common.ajaxError(); } }); } function search(e) { window.location = $(e).attr("data-href") + "?from=" + $("input[name='FromTime']").val() + "&to=" + $("input[name='ToTime']").val(); } function _export(e) { window.location = $(e).attr("data-href") + "?from=" + $("input[name='FromTime']").val() + "&to=" + $("input[name='ToTime']").val(); }