MediaWiki:Common.js
From Thương mại - Thuong mai
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* SORTABLE */ $(document).ready(function() { var mytable = new ttable('ttable'); // Styling Parameters mytable.style.table = 'table-default'; mytable.style.tablehead = 'head-default'; mytable.style.tablebody = 'body-default'; mytable.style.tablecaption = 'caption-default'; // Hovering Parameters mytable.style.headhover = true; mytable.style.tablehead_hover = 'hoverhead-default'; mytable.style.tableheadtd_hover = 'hoverheadtd-default'; mytable.style.bodyhover = true; mytable.style.tablebody_hover = 'hoverbody-default'; // Highlighting Parameters mytable.highlight.enabled = true; mytable.highlight.style = 'highlight-default'; mytable.highlight.onclick = true; mytable.highlight.onclick_style = 'clicklight-default'; // Stripped Parameters mytable.style.stripped = true; mytable.style.odd_row = 'odd-default'; // Numeration Parameters mytable.style.num = true; mytable.style.num_class = 'num-default'; // Sorting Parameters mytable.sorting.enabled = false; mytable.sorting.sortall = false; mytable.sorting.resetnum = false; mytable.sorting.sortedstyle = 'sorted-default'; mytable.sorting.clickablestyle = 'clickable-default'; mytable.sorting.sortascstyle = 'sortasc-default'; mytable.sorting.sortdescstyle = 'sortdesc-default'; // Pagination Parameters mytable.pagination.enabled = true; mytable.pagination.rowperpage=5; // Editing Parameters mytable.edit.enabled = true; // Search Parameters mytable.search.enabled = true; mytable.search.inputID = 'filter'; mytable.search.casesensitive = false; // Render Table mytable.rendertable(); var mytable1 = new ttable('ttable1'); mytable1.rendertable(); var mytable2 = new ttable('ttable2'); mytable2.sorting.enabled = false; mytable2.pagination.enabled = true; mytable2.pagination.rowperpage=5; mytable2.rendertable(); var mytable3 = new ttable('ttable3'); mytable3.sorting.enabled = true; mytable3.sorting.sortall = true; mytable3.rendertable(); var mytable4 = new ttable('ttable4'); mytable4.edit.enabled = true; mytable4.rendertable(); $('#exporttable').click(function() { alert($('#ttable4').tocsv(',')); }); var mytable5 = new ttable('ttable5'); mytable5.search.enabled = true; mytable5.search.inputID = 'searchinput'; mytable5.search.casesensitive = false; mytable5.pagination.enabled = true; mytable5.pagination.rowperpage=5; mytable5.rendertable(); });