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-2.2.0 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.5 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.4 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.3 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.2 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.1 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.1.0 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.0.2 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.0.1 app/assets/javascripts/cm_admin/kanban.js
cm-admin-2.0.0 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.56 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.55 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.54 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.53 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.52 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.51 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.50 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.49 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.48 app/assets/javascripts/cm_admin/kanban.js
cm-admin-1.5.47 app/assets/javascripts/cm_admin/kanban.js