MediaWiki:Gadget-ResearchNotes-datatable.js

From Toolkit.Socialnetwork.Health
Revision as of 01:31, 14 July 2024 by Admin (talk | contribs) (Created page with "if( $('#research-notes').length ) { $('#research-notes').DataTable({ dom: '<"top"lf>rt<"bottom"ip><"clear">', columns: [ { "title": "Page" }, { "title": "File" }, { "title": "URL" }, { "title": "Topic" }, { "title": "Note" }, { "title": "User" }, { "title": "Date" } ], columnDefs: [ { type: 'date', targets: [ 6 ] } ], aaSorting: [ [ 1, "desc" ] ], pageLength: 100, lengthMenu: [ [50, 100, 250, -1], ['50...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
if( $('#research-notes').length ) {
	$('#research-notes').DataTable({
		dom: '<"top"lf>rt<"bottom"ip><"clear">',
    	columns: [
    		{ "title": "Page" },
			{ "title": "File" },
			{ "title": "URL" },
			{ "title": "Topic" },
			{ "title": "Note" },
			{ "title": "User" },
			{ "title": "Date" }
		],
		columnDefs: [
			{
				type: 'date',
				targets: [ 6 ]
			}
		],
		aaSorting: [
			[ 1, "desc" ]
		],
		pageLength: 100,
		lengthMenu: [
			[50, 100, 250, -1],
			['50 per page', '100 per page', '250 per page', 'Show all']
		],
    	language: {
    	searchPlaceholder: 'Search in notes',
		searchBuilder: {
    		title: ''
		},
		lengthMenu: '_MENU_',
	},
	initComplete: function () {
	}
});
}