Skip to content
This repository was archived by the owner on Jan 10, 2018. It is now read-only.

API and features description

Arthur edited this page Feb 22, 2016 · 6 revisions

Overview of GigaTables API and features

Basic knowledge

To create simple instance of GigaTables one should create javascript (with lniked JQuery of course) like:

        $('#gigatable').GigaTable({
          struct: {// all in
            search: ['top', 'bottom'],
            rowsSelector: ['asc', 'top', 'bottom'],
            pagination: ['bottom']
          },
          ajax: 'gigatables.php',
          columns: [
            {data: "id"},
            {data: "desc"},
            {data: "title"},
            {data: "date"},
            {data: "types"},
            {data: "info"}
          ]
        });   

Where:

  • "#gigatable" is the id of a <table> tag,
  • struct is the basic structure of a layout with it`s features (ex.: search box, pagination etc.),
  • ajax element contains the main script, that will load table content
  • columns actual columns for a table

HTML table structure skeleton, that matches former configuration:

    <table id="gigatable">
      <thead>
        <tr>
          <th>ID</th>
          <th>Name</th>
          <th>Description</th>
          <th>Date</th>
          <th>Types</th>
          <th>Info</th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <th>ID</th>
          <th>Name</th>
          <th>Description</th>
          <th>Date</th>
          <th>Types</th>
          <th>Info</th>
        </tr>
    </tfoot>
  </table>

Make sure they fit together (html table columns and json columns), it may run anyway, but the results and Your experience will be cleaner and better if they will.

Clone this wiki locally