Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             $.extend($.tablesorter.themes.bootstrap, {
  2.                 // these classes are added to the table. To see other table classes available,
  3.                 // look here: http://twitter.github.com/bootstrap/base-css.html#tables
  4.                 table      : 'table table-bordered',
  5.                 caption    : 'caption',
  6.                 header     : 'bootstrap-header', // give the header a gradient background
  7.                 footerRow  : '',
  8.                 footerCells: '',
  9.                 icons      : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header
  10.                 sortNone   : 'bootstrap-icon-unsorted',
  11.                 sortAsc    : 'icon-chevron-up glyphicon glyphicon-chevron-up',     // includes classes for Bootstrap v2 & v3
  12.                 sortDesc   : 'icon-chevron-down glyphicon glyphicon-chevron-down', // includes classes for Bootstrap v2 & v3
  13.                 active     : '', // applied when column is sorted
  14.                 hover      : '', // use custom css here - bootstrap class may not override it
  15.                 filterRow  : '', // filter row class
  16.                 even       : '', // odd row zebra striping
  17.                 odd        : ''  // even row zebra striping
  18.             });
  19.            
  20.             // call the tablesorter plugin and apply the uitheme widget
  21.             $("#account-list").tablesorter({
  22.                 // this will apply the bootstrap theme if "uitheme" widget is included
  23.                 // the widgetOptions.uitheme is no longer required to be set
  24.                 theme : "bootstrap",
  25.                
  26.                 widthFixed: true,
  27.                
  28.                 headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon!
  29.                
  30.                 // widget code contained in the jquery.tablesorter.widgets.js file
  31.                 // use the zebra stripe widget if you plan on hiding any rows (filter widget)
  32.                 widgets : [ "uitheme" ],
  33.                
  34.                 widgetOptions : {
  35.                     // using the default zebra striping class name, so it actually isn't included in the theme variable above
  36.                     // this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden
  37.                     zebra : ["even", "odd"],
  38.                    
  39.                     // reset filters button
  40.                     filter_reset : ".reset"
  41.                    
  42.                     // set the uitheme widget to use the bootstrap theme class names
  43.                     // this is no longer required, if theme is set
  44.                     // ,uitheme : "bootstrap"
  45.                 }
  46.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement