How to use the bootstrap.table function in bootstrap

To help you get started, we’ve selected a few bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geonetwork / core-geonetwork / web-ui / src / main / resources / catalog / components / viewer / gfi / FeaturesTable.js View on Github external
$(trs[i]).mouseenter(function(e) {
                  // Hackish over event from:
                  // https://github.com/wenzhixin/bootstrap-table/issues/782
                  var row = $(e.currentTarget)
                  .parents('table')
                  .data()['bootstrap.table']
                  .data[$(e.currentTarget).data('index')];
                  if (!row) { return; }
                  var feature = this.loader.getFeatureFromRow(row);
                  var source = this.featuresTablesCtrl.fOverlay.getSource();
                  source.clear();
                  if (feature && feature.getGeometry()) {
                    source.addFeature(feature);
                  }
                }.bind(this));
                $(trs[i]).mouseleave(function(e) {
github renatahodovan / fuzzinator / fuzzinator / ui / wui / resources / static / scripts / stats.js View on Github external
for (var detail of row.subconfigs) {
      var statRowDetail = document.importNode($('#stat-row-template').prop('content').cloneNode(true), true).children[0];
      if (detail.subconfig !== null) {
          $(statRowDetail).find('.config-ref').attr('href', `/configs/${detail.subconfig}`);
      }
      $(statRowDetail).find('.config-ref').text(detail.subconfig === null ? 'N/A' : `${detail.subconfig}`);
      $(statRowDetail).find('.sut').text(row.sut);
      $(statRowDetail).find('.exec').text(detail.exec);
      $(statRowDetail).find('.issues').text(detail.issues);
      $(statRowDetail).find('.unique').text(detail.unique);
      $(statRowDetail).appendTo($(mainDiv));
    }
    return mainDiv.outerHTML;
  }

  var bst = $('#stats-table').bootstrapTable(fz.utils.bstOptions({
    columnNames: ['fuzzer', 'exec', 'issues', 'unique', 'sut'],
    formatter: statRowFormatter,
    detailFormatter: statRowDetailFormatter,
    sortName: 'exec',
    sortOrder: 'desc',
    cookieIdTable: 'statTableCookie',
    getRows: fz.api.getStats,
    showAll: true,
  })).data()['bootstrap.table'];

  fz.notifications.onmessage['refresh_stats'] = function () {
    bst.refresh({ silent: true });
  };
});
github renatahodovan / fuzzinator / fuzzinator / ui / wui / resources / static / scripts / toolbar.js View on Github external
$(document).ready(function () {
  'use strict';

  var bst = $('.bootstrap-table .table').data()['bootstrap.table'];

  $('#table-search').off('keyup drop blur').on('keyup drop blur', function (event) {
    clearTimeout(0);
    setTimeout(function () {
        bst.onSearch(event);
    }, 500);
  });

  $('.sort-menu .sort-name').off('click').on('click', function (event) {
    bst.options.sortName = $(event.currentTarget).data('value');
    bst.onSort();
  });

  $('.sort-menu .sort-order').off('click').on('click', function (event) {
    bst.options.sortOrder = $(event.currentTarget).data('value');
    bst.onSort();
github renatahodovan / fuzzinator / fuzzinator / ui / wui / resources / static / scripts / issues.js View on Github external
}

    return $(issueRow)[0].outerHTML;
  }

  var options = fz.utils.bstOptions({
    columnNames: ['sut', 'fuzzer', 'id', 'first_seen', 'last_seen', 'count', 'reduced', 'reported'],
    formatter: issueRowFormatter,
    sortName: 'first_seen',
    sortOrder: 'desc',
    cookieIdTable: 'issueTableCookie',
    getRows: fz.api.getIssues,
    showAll: true,
    includeInvalid: false,
  });
  var bst = $('#issues-table').bootstrapTable(options).data()['bootstrap.table'];

  fz.notifications.onmessage['refresh_issues'] = function () {
    bst.refresh({ silent: true });
  };
});