Sha256: 5721037b8f5edf15dffb05fd7f1239801fa9037ca2828911d674d8ff9ec4d04f

Contents?: true

Size: 989 Bytes

Versions: 3

Compression:

Stored size: 989 Bytes

Contents

//= require 'jquery'
//= require 'jquery_ujs'
//= require 'hatchy/bootstrap/bootstrap'
//= require 'hatchy/libraries/pnotify.custom.js'
//= require 'hatchy/application.js'
//= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
//= require best_in_place

var admin = (function(){
  // cache DOM
  var $ajax_data_table = $('.ajax-data-table');
  var $data_table = $('.data-table');
  var $bestInPlace = $('.best_in_place');

  // functions
  function setAjaxDataTable(){
    $ajax_data_table.dataTable({
      pagingType: "full_numbers",
      jQueryUI: true,
      processing: true,
      serverSide: true,
      ajax: $ajax_data_table.data('source'),
    });
  }

  function setDataTable(){
    $data_table.dataTable({
      sPaginationType: "full_numbers",
      bJQueryUI: true,
    });
  }

  function setBestInPlace(){
    $bestInPlace.best_in_place();
  }

  setDataTable();
  setAjaxDataTable();
  setBestInPlace();

  return{};
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hatchy-0.0.8.pre app/assets/javascripts/hatchy/admin.js
hatchy-0.0.7.pre app/assets/javascripts/hatchy/admin.js
hatchy-0.0.6.pre app/assets/javascripts/hatchy/admin.js