Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getTable = function (url) {
- $.ajax({
- url: '/get_items_list',
- async: false,
- dataType: 'json',
- error: function () {},
- success: function (data) {
- $('table.table > tbody').empty();
- $.each(data, function (key, value) {
- $('table.table > tbody').append('<tr><td>' + value.name + '</td><td class="text-right ' + (value.belong_status ? 'success' : 'fail') + '">Ячейка ' + value.cell_num + '</td></tr>');
- });
- },
- complete: function () {
- $.each(data, function (key, value) {
- if ( value.session_status == False ) {
- redirect_to("/index");
- }
- }
- clearTimeout( execu_timer );
- execu_timer = setTimeout( function () {
- getTable(url);
- }, 1000 );
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement