MediaWiki:Common.js: Difference between revisions

From Thương mại - Thuong mai
(Created page with "→‎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; my...")
 
No edit summary
Tag: Manual revert
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* SORTABLE */
/* 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();
});

Latest revision as of 08:56, 3 February 2024

/* SORTABLE */