Sha256: b5c2a80cf9f4b6f55c5b2b3a00eeba1ae5ee1a1ec15aa9fbba088749edc70107

Contents?: true

Size: 920 Bytes

Versions: 104

Compression:

Stored size: 920 Bytes

Contents

$(document).on('click', '.kanban-show-more', function(e) {
  e.preventDefault();
  var page = $(this).data('page') + 1
  var query_string = window.location.search
  $.ajax('/admin/batch_order_items' + query_string, {
    type: "GET",
    data: {
      page: page,
      per_page: $(this).data('per-page'),
      view_type: 'kanban'
    },
    success: function (data) {
      apply_response_to_board(data.table.data);
      $('.kanban-show-more').data('page', page)
      if (data.table.paging.next_page == false) {
        $('.kanban-show-more').addClass('disabled')
      }
      $('.kanban-show-more').data('page', page)
    },
    error: function (jqxhr, textStatus, errorThrown) {
      alert("Something went wrong. Please try again later.\n" + errorThrown);
    },
  });
})

function apply_response_to_board(json_data) {
  $.each(json_data, function(key, value) {
    $('.' + key + ' .cards').append(value)
  });
}

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
cm-admin-1.5.27 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.26 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.25 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.23 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.22 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.21 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.20 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.11 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.9 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.8 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.7 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.6 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.1 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.0 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.9 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.8 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.7 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.6 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.5 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.4.4 app/assets/javascripts/cm_admin/kanban.js