mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Added missing docs!
This commit is contained in:
parent
b139516d91
commit
98eee6dc72
@ -1,82 +1,39 @@
|
|||||||
tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes.
|
tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes.
|
||||||
tablesorter can successfully parse and sort many types of data including linked data in a cell.
|
tablesorter can successfully parse and sort many types of data including linked data in a cell.
|
||||||
|
|
||||||
###Features ([Demo](http://mottie.github.com/tablesorter/))
|
See [Alpha-numeric sort Demo](http://mottie.github.com/tablesorter/) & [Full Documentation](http://mottie.github.com/tablesorter/docs/)
|
||||||
|
|
||||||
|
###Features
|
||||||
|
|
||||||
* Multi-column sorting.
|
* Multi-column sorting.
|
||||||
* Parsers for sorting text, alphanumeric text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. [Add your own easily](docs/example-parsers.html)
|
* Parsers for sorting text, alphanumeric text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. [Add your own easily](http://mottie.github.com/tablesorter/docs/example-parsers.html)
|
||||||
* Support for ROWSPAN and COLSPAN on TH elements.
|
* Support for ROWSPAN and COLSPAN on TH elements.
|
||||||
* Support secondary "hidden" sorting (e.g., maintain alphabetical sort when sorting on other criteria).
|
* Support secondary "hidden" sorting (e.g., maintain alphabetical sort when sorting on other criteria).
|
||||||
* Extensibility via [widget system](docs/example-widgets.html).
|
* Extensibility via [widget system](http://mottie.github.com/tablesorter/docs/example-widgets.html).
|
||||||
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+.
|
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+.
|
||||||
* Small code size.
|
* Small code size.
|
||||||
* Works with jQuery 1.2.3+
|
* Works with jQuery 1.2.3+
|
||||||
|
|
||||||
###Documentation
|
###Documentation
|
||||||
|
|
||||||
Included all original [document pages](http://mottie.github.com/tablesorter/docs/index.html).
|
Included all original [document pages](http://mottie.github.com/tablesorter/docs/index.html) with updates from my blog post on [undocumented options](http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html).
|
||||||
Also check out my blog post on [undocumented options](http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html) which I will add to the document pages when I get around to it.
|
|
||||||
|
|
||||||
###Licensing
|
###Licensing
|
||||||
|
|
||||||
* Copyright (c) 2007 Christian Bach
|
* Copyright (c) 2007 Christian Bach
|
||||||
* Main Examples and docs at: http://tablesorter.com
|
* Main Examples and docs at: [http://tablesorter.com](http://tablesorter.com)
|
||||||
* Dual licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL](http://www.gnu.org/licenses/gpl.html) licenses:
|
* Dual licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL](http://www.gnu.org/licenses/gpl.html) licenses:
|
||||||
|
|
||||||
###Change Log
|
###Change Log
|
||||||
|
|
||||||
#### Version 2.0.6 (2011-06-22)
|
View the [complete listing here](changelog.markdown).
|
||||||
|
|
||||||
* Forked original files and docs from [tablesorter.com](http://tablesorter.com) to GitHub.
|
#### Version 2.0.7 (2011-07-17)
|
||||||
* Replaced alphabetical sort with an alphanumeric sort
|
|
||||||
* This "slower" sort can be disabled by setting the `sortLocaleCompare` option to `true`
|
|
||||||
* The `sortLocaleCompare` option's default was changed to `false`.
|
|
||||||
* Added a very basic demo.
|
|
||||||
* Added `tableClass` option
|
|
||||||
* The value is "tablesorter" by default and should no longer be required in the default markup.
|
|
||||||
* This class is applied to the table in the script and should match the css styling.
|
|
||||||
* Each header cell now has its content wrapped with a span.
|
|
||||||
* This allows applying the direction icon to the span instead of the entire cell.
|
|
||||||
* Although, this might just be extra markup with the advent of multiple background images and gradient backgrounds available in CSS3.
|
|
||||||
* Reformatted the code to make jSLint "happier".
|
|
||||||
|
|
||||||
### Version 2.0.5b (?)
|
* Added "pagerChange" and "pagerComplete" events to the pager plugin which trigger on the table. See the [pager demo](http://mottie.github.com/tablesorter/docs/example-pager.html) for an example on how to bind to them.
|
||||||
|
* Added the "sortAppend" since the option was there, but apparently the code wasn't.
|
||||||
* General
|
* Added missing documentation from [my blog post](http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html)
|
||||||
* Added "cssChildRow" option - attach a child row to its parent.
|
* This included a few new example pages: apply widgets, child rows, render header, sort append and zebra widget.
|
||||||
* Added "sortLocaleCompare" to use the native `String.localeCampare` method during text sort.
|
* Added a methods and events table.
|
||||||
* Added "onRenderHeader" function that is called when classes are added to the header cells.
|
* Fixed the minified version. Apparently sorting functions called by the eval were removed by the Google Closure Compiler. Resolved by using "Whitespace only" optimization.
|
||||||
* Added "selectorHeaders" option to target the the header cells.
|
* Fixed syntax highlighting; updated Chili.
|
||||||
* Changed multisort function
|
|
||||||
|
|
||||||
#### Version 2.0.3 (2008-03-17)
|
|
||||||
|
|
||||||
* Bug fixes - Missing semicolon, broke the minified version.
|
|
||||||
|
|
||||||
#### Version 2.0.2 (2008-03-14)
|
|
||||||
|
|
||||||
* General
|
|
||||||
* Added support for the new metadata plugin.
|
|
||||||
* Added support for jQuery 1.2.3.
|
|
||||||
* Added support for decimal numbers and negative and positive digits.
|
|
||||||
* Updated documenation and website with new examples.
|
|
||||||
* Removed packed version.
|
|
||||||
|
|
||||||
* Bug fixes
|
|
||||||
* Sort force (Thanks to David Lynch).
|
|
||||||
|
|
||||||
#### Version 2.0.1 (2007-09-17)
|
|
||||||
|
|
||||||
* General
|
|
||||||
* Removed the need for Dimensions plugin when using the pagnation plugin thanks to offset being included in the jQuery 1.2 core.
|
|
||||||
* Added support for jQuery 1.2.
|
|
||||||
* Added new Minified version of tablesorter.
|
|
||||||
* Updated documenation and website with new examples.
|
|
||||||
|
|
||||||
* Bug fixes
|
|
||||||
* If row values are identical the original order is kept (Thanks to David hull).
|
|
||||||
* If thead includes a table $('tbody:first', table) breaks (Thanks to David Hull).
|
|
||||||
|
|
||||||
* Speed improvements:
|
|
||||||
* appendToTable, setting innerHTML to "" before appending new content to table body.
|
|
||||||
* zebra widget. (Thanks to James Dempster).
|
|
||||||
|
@ -20,6 +20,3 @@ div.tablesorterPager input {
|
|||||||
border: 1px solid #330000;
|
border: 1px solid #330000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,25 +1,15 @@
|
|||||||
(function($) {
|
(function($) {
|
||||||
$.extend({
|
$.extend({tablesorterPager: new function() {
|
||||||
tablesorterPager: new function() {
|
|
||||||
|
|
||||||
function updatePageDisplay(c) {
|
var updatePageDisplay = function(table,c) {
|
||||||
var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages);
|
var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages);
|
||||||
}
|
$(table).trigger('pagerComplete', c);
|
||||||
|
},
|
||||||
|
|
||||||
function setPageSize(table,size) {
|
fixPosition = function(table) {
|
||||||
var c = table.config;
|
|
||||||
c.size = size;
|
|
||||||
c.totalPages = Math.ceil(c.totalRows / c.size);
|
|
||||||
c.pagerPositionSet = false;
|
|
||||||
moveToPage(table);
|
|
||||||
fixPosition(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fixPosition(table) {
|
|
||||||
var c = table.config;
|
|
||||||
if(!c.pagerPositionSet && c.positionFixed) {
|
|
||||||
var c = table.config, o = $(table);
|
var c = table.config, o = $(table);
|
||||||
if(o.offset) {
|
if (!c.pagerPositionSet && c.positionFixed) {
|
||||||
|
if (o.offset) {
|
||||||
c.container.css({
|
c.container.css({
|
||||||
top: o.offset().top + o.height() + 'px',
|
top: o.offset().top + o.height() + 'px',
|
||||||
position: 'absolute'
|
position: 'absolute'
|
||||||
@ -27,97 +17,90 @@
|
|||||||
}
|
}
|
||||||
c.pagerPositionSet = true;
|
c.pagerPositionSet = true;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
function moveToFirstPage(table) {
|
renderTable = function(table,rows) {
|
||||||
|
var i, j, o,
|
||||||
|
tableBody,
|
||||||
|
c = table.config,
|
||||||
|
l = rows.length,
|
||||||
|
s = (c.page * c.size),
|
||||||
|
e = (s + c.size);
|
||||||
|
$(table).trigger('pagerChange',c);
|
||||||
|
if (e > rows.length ) {
|
||||||
|
e = rows.length;
|
||||||
|
}
|
||||||
|
tableBody = $(table.tBodies[0]);
|
||||||
|
// clear the table body
|
||||||
|
$.tablesorter.clearTableBody(table);
|
||||||
|
for(i = s; i < e; i++) {
|
||||||
|
//tableBody.append(rows[i]);
|
||||||
|
o = rows[i];
|
||||||
|
l = o.length;
|
||||||
|
for (j = 0; j < l; j++) {
|
||||||
|
tableBody[0].appendChild(o[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fixPosition(table,tableBody);
|
||||||
|
$(table).trigger("applyWidgets");
|
||||||
|
if( c.page >= c.totalPages ) {
|
||||||
|
moveToLastPage(table);
|
||||||
|
}
|
||||||
|
updatePageDisplay(table,c);
|
||||||
|
},
|
||||||
|
|
||||||
|
moveToPage = function(table) {
|
||||||
|
var c = table.config;
|
||||||
|
if(c.page < 0 || c.page > (c.totalPages-1)) {
|
||||||
|
c.page = 0;
|
||||||
|
}
|
||||||
|
renderTable(table,c.rowsCopy);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPageSize = function(table,size) {
|
||||||
|
var c = table.config;
|
||||||
|
c.size = size;
|
||||||
|
c.totalPages = Math.ceil(c.totalRows / c.size);
|
||||||
|
c.pagerPositionSet = false;
|
||||||
|
moveToPage(table);
|
||||||
|
fixPosition(table);
|
||||||
|
},
|
||||||
|
|
||||||
|
moveToFirstPage = function(table) {
|
||||||
var c = table.config;
|
var c = table.config;
|
||||||
c.page = 0;
|
c.page = 0;
|
||||||
moveToPage(table);
|
moveToPage(table);
|
||||||
}
|
},
|
||||||
|
|
||||||
function moveToLastPage(table) {
|
moveToLastPage = function(table) {
|
||||||
var c = table.config;
|
var c = table.config;
|
||||||
c.page = (c.totalPages-1);
|
c.page = (c.totalPages-1);
|
||||||
moveToPage(table);
|
moveToPage(table);
|
||||||
}
|
},
|
||||||
|
|
||||||
function moveToNextPage(table) {
|
moveToNextPage = function(table) {
|
||||||
var c = table.config;
|
var c = table.config;
|
||||||
c.page++;
|
c.page++;
|
||||||
if(c.page >= (c.totalPages-1)) {
|
if(c.page >= (c.totalPages-1)) {
|
||||||
c.page = (c.totalPages-1);
|
c.page = (c.totalPages-1);
|
||||||
}
|
}
|
||||||
moveToPage(table);
|
moveToPage(table);
|
||||||
}
|
},
|
||||||
|
|
||||||
function moveToPrevPage(table) {
|
moveToPrevPage = function(table) {
|
||||||
var c = table.config;
|
var c = table.config;
|
||||||
c.page--;
|
c.page--;
|
||||||
if(c.page <= 0) {
|
if(c.page <= 0) {
|
||||||
c.page = 0;
|
c.page = 0;
|
||||||
}
|
}
|
||||||
moveToPage(table);
|
moveToPage(table);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
function moveToPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
if(c.page < 0 || c.page > (c.totalPages-1)) {
|
|
||||||
c.page = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderTable(table,c.rowsCopy);
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderTable(table,rows) {
|
|
||||||
|
|
||||||
var c = table.config;
|
|
||||||
var l = rows.length;
|
|
||||||
var s = (c.page * c.size);
|
|
||||||
var e = (s + c.size);
|
|
||||||
if(e > rows.length ) {
|
|
||||||
e = rows.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var tableBody = $(table.tBodies[0]);
|
|
||||||
|
|
||||||
// clear the table body
|
|
||||||
|
|
||||||
$.tablesorter.clearTableBody(table);
|
|
||||||
|
|
||||||
for(var i = s; i < e; i++) {
|
|
||||||
|
|
||||||
//tableBody.append(rows[i]);
|
|
||||||
|
|
||||||
var o = rows[i];
|
|
||||||
var l = o.length;
|
|
||||||
for(var j=0; j < l; j++) {
|
|
||||||
|
|
||||||
tableBody[0].appendChild(o[j]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fixPosition(table,tableBody);
|
|
||||||
|
|
||||||
$(table).trigger("applyWidgets");
|
|
||||||
|
|
||||||
if( c.page >= c.totalPages ) {
|
|
||||||
moveToLastPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePageDisplay(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.appender = function(table,rows) {
|
this.appender = function(table,rows) {
|
||||||
|
|
||||||
var c = table.config;
|
var c = table.config;
|
||||||
|
|
||||||
c.rowsCopy = rows;
|
c.rowsCopy = rows;
|
||||||
c.totalRows = rows.length;
|
c.totalRows = rows.length;
|
||||||
c.totalPages = Math.ceil(c.totalRows / c.size);
|
c.totalPages = Math.ceil(c.totalRows / c.size);
|
||||||
|
|
||||||
renderTable(table,rows);
|
renderTable(table,rows);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -140,16 +123,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.construct = function(settings) {
|
this.construct = function(settings) {
|
||||||
|
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
|
var config = $.extend(this.config, $.tablesorterPager.defaults, settings),
|
||||||
config = $.extend(this.config, $.tablesorterPager.defaults, settings);
|
table = this,
|
||||||
|
pager = config.container;
|
||||||
var table = this, pager = config.container;
|
|
||||||
|
|
||||||
$(this).trigger("appendCache");
|
$(this).trigger("appendCache");
|
||||||
|
|
||||||
config.size = parseInt($(".pagesize",pager).val());
|
config.size = parseInt($(".pagesize",pager).val(), 10);
|
||||||
|
|
||||||
$(config.cssFirst,pager).click(function() {
|
$(config.cssFirst,pager).click(function() {
|
||||||
moveToFirstPage(table);
|
moveToFirstPage(table);
|
||||||
@ -168,17 +148,18 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$(config.cssPageSize,pager).change(function() {
|
$(config.cssPageSize,pager).change(function() {
|
||||||
setPageSize(table,parseInt($(this).val()));
|
setPageSize(table,parseInt($(this).val(), 10));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// extend plugin scope
|
// extend plugin scope
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
tablesorterPager: $.tablesorterPager.construct
|
tablesorterPager: $.tablesorterPager.construct
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
2
addons/pager/jquery.tablesorter.pager.min.js
vendored
Normal file
2
addons/pager/jquery.tablesorter.pager.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/* tablesorter pager plugin */
|
||||||
|
(function(d){d.extend({tablesorterPager:new function(){var k=function(b){var a=b.config,b=d(b);if(!a.pagerPositionSet&&a.positionFixed)b.offset&&a.container.css({top:b.offset().top+b.height()+"px",position:"absolute"}),a.pagerPositionSet=!0},m=function(b,a){var c,f,h,i,e=b.config,g=a.length;c=e.page*e.size;var j=c+e.size;d(b).trigger("pagerChange",e);if(j>a.length)j=a.length;i=d(b.tBodies[0]);for(d.tablesorter.clearTableBody(b);c<j;c++){h=a[c];g=h.length;for(f=0;f<g;f++)i[0].appendChild(h[f])}k(b, i);d(b).trigger("applyWidgets");e.page>=e.totalPages&&l(b);d(e.cssPageDisplay,e.container).val(e.page+1+e.seperator+e.totalPages);d(b).trigger("pagerComplete",e)},g=function(b){var a=b.config;if(a.page<0||a.page>a.totalPages-1)a.page=0;m(b,a.rowsCopy)},l=function(b){var a=b.config;a.page=a.totalPages-1;g(b)};this.appender=function(b,a){var c=b.config;c.rowsCopy=a;c.totalRows=a.length;c.totalPages=Math.ceil(c.totalRows/c.size);m(b,a)};this.defaults={size:10,offset:0,page:0,totalRows:0,totalPages:0, container:null,cssNext:".next",cssPrev:".prev",cssFirst:".first",cssLast:".last",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",seperator:"/",positionFixed:!0,appender:this.appender};this.construct=function(b){return this.each(function(){var a=d.extend(this.config,d.tablesorterPager.defaults,b),c=this,f=a.container;d(this).trigger("appendCache");a.size=parseInt(d(".pagesize",f).val(),10);d(a.cssFirst,f).click(function(){c.config.page=0;g(c);return!1});d(a.cssNext,f).click(function(){var a= c.config;a.page++;if(a.page>=a.totalPages-1)a.page=a.totalPages-1;g(c);return!1});d(a.cssPrev,f).click(function(){var a=c.config;a.page--;if(a.page<=0)a.page=0;g(c);return!1});d(a.cssLast,f).click(function(){l(c);return!1});d(a.cssPageSize,f).change(function(){var a=parseInt(d(this).val(),10),b=c.config;b.size=a;b.totalPages=Math.ceil(b.totalRows/b.size);b.pagerPositionSet=!1;g(c);k(c);return!1})})}}});d.fn.extend({tablesorterPager:d.tablesorterPager.construct})})(jQuery);
|
70
changelog
70
changelog
@ -1,70 +0,0 @@
|
|||||||
tablesorter changelog
|
|
||||||
======================
|
|
||||||
http://tablesorter.com
|
|
||||||
|
|
||||||
|
|
||||||
Changes in version 2.0.6 (2011-06-22)
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
General
|
|
||||||
* Forked original files and docs from [tablesorter.com](http://tablesorter.com) to GitHub.
|
|
||||||
* Replaced alphabetical sort with an alphanumeric sort
|
|
||||||
* This "slower" sort can be disabled by setting the `sortLocaleCompare` option to `true`
|
|
||||||
* The `sortLocaleCompare` option's default was changed to `false`.
|
|
||||||
* Added a very basic demo.
|
|
||||||
* Added `tableClass` option
|
|
||||||
* The value is "tablesorter" by default and should no longer be required in the default markup.
|
|
||||||
* This class is applied to the table in the script and should match the css styling.
|
|
||||||
* Each header cell now has its content wrapped with a span.
|
|
||||||
* This allows applying the direction icon to the span instead of the entire cell.
|
|
||||||
* Although, this might just be extra markup with the advent of multiple background images and gradient backgrounds available in CSS3.
|
|
||||||
* Reformatted the code to make jSLint "happier".
|
|
||||||
|
|
||||||
|
|
||||||
Changes in version 2.0.5b (???)
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
* General
|
|
||||||
* Added "cssChildRow" option
|
|
||||||
* Added "sortLocaleCompare" to use the native `String.localeCampare` method.
|
|
||||||
* Added "onRenderHeader" function that is called when classes are added to the header cells.
|
|
||||||
* Added "selectorHeaders" option to target the the header cells.
|
|
||||||
|
|
||||||
|
|
||||||
Changes in version 2.0.3 (2008-03-17)
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
Bug fixes
|
|
||||||
* Missing semicolon, broke the minified version
|
|
||||||
|
|
||||||
|
|
||||||
Changes in version 2.0.2 (2008-03-14)
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
General
|
|
||||||
* Added support for the new metadata plugin
|
|
||||||
* Added support for jQuery 1.2.3
|
|
||||||
* Added support for decimal numbers and negative and positive digits
|
|
||||||
* Updated documenation and website with new examples
|
|
||||||
* Removed packed version.
|
|
||||||
|
|
||||||
Bug fixes
|
|
||||||
* Sort force (Thanks to David Lynch)
|
|
||||||
|
|
||||||
|
|
||||||
Changes in version 2.0.1 (2007-09-17)
|
|
||||||
-------------------------------------
|
|
||||||
|
|
||||||
General
|
|
||||||
* Removed the need for Dimensions plugin when using the pagnation plugin thanks to offset being included in the jQuery 1.2 core.
|
|
||||||
* Added support for jQuery 1.2
|
|
||||||
* Added new Minified version of tablesorter
|
|
||||||
* Updated documenation and website with new examples
|
|
||||||
|
|
||||||
Bug fixes
|
|
||||||
* If row values are identical the original order is kept (Thanks to David hull)
|
|
||||||
* If thead includes a table $('tbody:first', table) breaks (Thanks to David Hull)
|
|
||||||
|
|
||||||
Speed improvements:
|
|
||||||
* appendToTable, setting innerHTML to "" before appending new content to table body.
|
|
||||||
* zebra widget. (Thanks to James Dempster)
|
|
67
changelog.markdown
Normal file
67
changelog.markdown
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
###TableSorter Change Log
|
||||||
|
|
||||||
|
#### Version 2.0.7 (2011-07-17)
|
||||||
|
|
||||||
|
* Added "pagerChange" and "pagerComplete" events to the pager plugin which trigger on the table. See the [pager demo](http://mottie.github.com/tablesorter/docs/example-pager.html) for an example on how to bind to them.
|
||||||
|
* Added the "sortAppend" since the option was there, but apparently the code wasn't.
|
||||||
|
* Added missing documentation from [my blog post](http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html)
|
||||||
|
* This included a few new example pages: apply widgets, child rows, render header, sort append and zebra widget.
|
||||||
|
* Added a methods and events table.
|
||||||
|
* Fixed the minified version. Apparently sorting functions called by the eval were removed by the Google Closure Compiler. Resolved by using "Whitespace only" optimization.
|
||||||
|
* Fixed syntax highlighting; updated Chili.
|
||||||
|
|
||||||
|
#### Version 2.0.6 (2011-06-22)
|
||||||
|
|
||||||
|
* Forked original files and docs from [tablesorter.com](http://tablesorter.com) to GitHub.
|
||||||
|
* Replaced alphabetical sort with an alphanumeric sort
|
||||||
|
* This "slower" sort can be disabled by setting the `sortLocaleCompare` option to `true`
|
||||||
|
* The `sortLocaleCompare` option's default was changed to `false`.
|
||||||
|
* Added a very basic demo.
|
||||||
|
* Added `tableClass` option
|
||||||
|
* The value is "tablesorter" by default and should no longer be required in the default markup.
|
||||||
|
* This class is applied to the table in the script and should match the css styling.
|
||||||
|
* Each header cell now has its content wrapped with a span.
|
||||||
|
* This allows applying the direction icon to the span instead of the entire cell.
|
||||||
|
* Although, this might just be extra markup with the advent of multiple background images and gradient backgrounds available in CSS3.
|
||||||
|
* Reformatted the code to make jSLint "happier".
|
||||||
|
|
||||||
|
#### Version 2.0.5b (?)
|
||||||
|
|
||||||
|
* General
|
||||||
|
* Added "cssChildRow" option - attach a child row to its parent.
|
||||||
|
* Added "sortLocaleCompare" to use the native `String.localeCampare` method during text sort.
|
||||||
|
* Added "onRenderHeader" function that is called when classes are added to the header cells.
|
||||||
|
* Added "selectorHeaders" option to target the the header cells.
|
||||||
|
* Changed multisort function
|
||||||
|
|
||||||
|
#### Version 2.0.3 (2008-03-17)
|
||||||
|
|
||||||
|
* Bug fixes - Missing semicolon, broke the minified version.
|
||||||
|
|
||||||
|
#### Version 2.0.2 (2008-03-14)
|
||||||
|
|
||||||
|
* General
|
||||||
|
* Added support for the new metadata plugin.
|
||||||
|
* Added support for jQuery 1.2.3.
|
||||||
|
* Added support for decimal numbers and negative and positive digits.
|
||||||
|
* Updated documenation and website with new examples.
|
||||||
|
* Removed packed version.
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
* Sort force (Thanks to David Lynch).
|
||||||
|
|
||||||
|
#### Version 2.0.1 (2007-09-17)
|
||||||
|
|
||||||
|
* General
|
||||||
|
* Removed the need for Dimensions plugin when using the pagnation plugin thanks to offset being included in the jQuery 1.2 core.
|
||||||
|
* Added support for jQuery 1.2.
|
||||||
|
* Added new Minified version of tablesorter.
|
||||||
|
* Updated documenation and website with new examples.
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
* If row values are identical the original order is kept (Thanks to David hull).
|
||||||
|
* If thead includes a table $('tbody:first', table) breaks (Thanks to David Hull).
|
||||||
|
|
||||||
|
* Speed improvements:
|
||||||
|
* appendToTable, setting innerHTML to "" before appending new content to table body.
|
||||||
|
* zebra widget. (Thanks to James Dempster).
|
Binary file not shown.
@ -1,8 +1,8 @@
|
|||||||
/* Blue Theme */
|
/* Blue Theme */
|
||||||
table.tablesorter {
|
table.tablesorter {
|
||||||
font-family:arial;
|
font-family: arial;
|
||||||
background-color: #CDCDCD;
|
background-color: #CDCDCD;
|
||||||
margin:10px 0pt 15px;
|
margin: 10px 0pt 15px;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@ -10,6 +10,7 @@ table.tablesorter {
|
|||||||
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
|
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
|
||||||
background-color: #e6EEEE;
|
background-color: #e6EEEE;
|
||||||
border: 1px solid #FFF;
|
border: 1px solid #FFF;
|
||||||
|
border-collapse: collapse;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
@ -26,7 +27,7 @@ table.tablesorter tbody td {
|
|||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
table.tablesorter tbody tr.odd td {
|
table.tablesorter tbody tr.odd td {
|
||||||
background-color:#F0F0F6;
|
background-color: #F0F0F6;
|
||||||
}
|
}
|
||||||
table.tablesorter thead tr .headerSortUp {
|
table.tablesorter thead tr .headerSortUp {
|
||||||
background-image: url(black-asc.gif);
|
background-image: url(black-asc.gif);
|
||||||
@ -35,5 +36,5 @@ table.tablesorter thead tr .headerSortDown {
|
|||||||
background-image: url(black-desc.gif);
|
background-image: url(black-desc.gif);
|
||||||
}
|
}
|
||||||
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
|
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
|
||||||
background-color: #8dbdd8;
|
background-color: #8dbdd8;
|
||||||
}
|
}
|
Binary file not shown.
@ -6,7 +6,12 @@ h2{color:#333;font-size:small;font-weight:400;margin:0;}
|
|||||||
.demo h1,.demo h1 a{font-size:120%;text-align:center;text-decoration:none;}
|
.demo h1,.demo h1 a{font-size:120%;text-align:center;text-decoration:none;}
|
||||||
.demo p{text-align:center;}
|
.demo p{text-align:center;}
|
||||||
.demo table.tablesorter{font-size:14px;}
|
.demo table.tablesorter{font-size:14px;}
|
||||||
pre{background-color:#eee;border:1px solid #ddd;border-left-width:5px;color:#333;font-size:small;overflow-x:auto;padding:15px;}
|
table.info{border:#000 1px solid;border-collapse:collapse;margin:10px 0 0 10px;}
|
||||||
|
table.tablesorter table.info tbody th,table.tablesorter table.info tbody td{border:#000 1px solid;}
|
||||||
|
table.tablesorter table.info tbody th{background:#eee;}
|
||||||
|
pre,#display{overflow-x:auto;padding:15px;border:1px solid #ddd;border-left-width:5px;}
|
||||||
|
pre,#display,code.hilight{background-color:#eee;color:#333;font-size:small;list-style:none;}
|
||||||
|
a code.hilight {text-decoration:underline;}
|
||||||
pre.normal{background-color:transparent;border:none;border-left-width:0;overflow-x:auto;}
|
pre.normal{background-color:transparent;border:none;border-left-width:0;overflow-x:auto;}
|
||||||
#logo{background:url(images/jq.png);display:block;float:right;height:31px;margin-right:10px;margin-top:10px;width:110px;}
|
#logo{background:url(images/jq.png);display:block;float:right;height:31px;margin-right:10px;margin-top:10px;width:110px;}
|
||||||
#main{margin:0 20px 20px;padding:0 15px 15px 0;}
|
#main{margin:0 20px 20px;padding:0 15px 15px 0;}
|
||||||
@ -27,6 +32,8 @@ form{font-size:10pt;margin-bottom:20px;width:auto;}
|
|||||||
form fieldset{padding:10px;text-align:left;width:140px;}
|
form fieldset{padding:10px;text-align:left;width:140px;}
|
||||||
div#main h1{border-bottom:1px solid #CDCDCD;display:block;margin-top:20px;padding:10px 0 2px;}
|
div#main h1{border-bottom:1px solid #CDCDCD;display:block;margin-top:20px;padding:10px 0 2px;}
|
||||||
table#tablesorter-demo {margin: 10px 0 0 0;}
|
table#tablesorter-demo {margin: 10px 0 0 0;}
|
||||||
table#options *{font-size:small;}
|
table#options *,table#methods *,table#events *{font-size:small;}
|
||||||
p.tip em {padding: 2px; background-color: #6cf; color: #FFF;}
|
p.tip em {padding: 2px; background-color: #6cf; color: #FFF;}
|
||||||
|
span.tip em {padding: 0 2px;background-color: #00ce53; color: #fff; font-size:90%; }
|
||||||
div.digg {float: right;}
|
div.digg {float: right;}
|
||||||
|
.next-up { padding-top: 10px; font-size: 90%; }
|
@ -1,54 +1,59 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Appending table data with ajax</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Appending table data with ajax</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
|
|
||||||
$("#ajax-append").click(function() {
|
$("#ajax-append").click(function() {
|
||||||
|
|
||||||
$.get("assets/ajax-content.html", function(html) {
|
$.get("assets/ajax-content.html", function(html) {
|
||||||
|
|
||||||
// append the "ajax'd" data to the table body
|
// append the "ajax'd" data to the table body
|
||||||
$("table tbody").append(html);
|
$("table tbody").append(html);
|
||||||
|
|
||||||
// let the plugin know that we made a update
|
// let the plugin know that we made a update
|
||||||
$("table").trigger("update");
|
$("table").trigger("update");
|
||||||
|
|
||||||
// set sorting column and direction, this will sort on the first and third column
|
// set sorting column and direction, this will sort on the first and third column
|
||||||
var sorting = [[2,1],[0,0]];
|
var sorting = [[2,1],[0,0]];
|
||||||
// sort on the first column
|
$("table").trigger("sorton", [sorting]);
|
||||||
$("table").trigger("sorton",[sorting]);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Appending table data with ajax</h2>
|
<h2>Appending table data with ajax</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -101,20 +106,28 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<a href="#" id="ajax-append">Append new table data</a>
|
|
||||||
<br/>
|
<a href="#" id="ajax-append">Append new table data</a></div>
|
||||||
<br/>
|
|
||||||
</div>
|
<p class="tip">
|
||||||
<p>*Note* This demo will only work when the ajax page is online - switch to jQuery v1.4.4 to test it locally</p>
|
<em>NOTE!</em> With the latest version of jQuery, this demo will only work when the ajax page is hosted online; This page is using jQuery v1.4.4 so it will work locally.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-update-cell.html">Advanced: Update the table after cell content has changed ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
129
docs/example-apply-widget.html
Normal file
129
docs/example-apply-widget.html
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - applyWidgetId vs. applyWidgets</title>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Demo stuff -->
|
||||||
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: required -->
|
||||||
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
|
// call the tablesorter plugin
|
||||||
|
$("table").tablesorter();
|
||||||
|
|
||||||
|
$("button.applyid").click(function(){
|
||||||
|
// This method needs to be applied after each sort
|
||||||
|
$('table').trigger('applyWidgetId', ['zebra']);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("button.apply").click(function(){
|
||||||
|
// Update the list of widgets to apply to the table (add or remove)
|
||||||
|
$("table").data("tablesorter").widgets = ["zebra"];
|
||||||
|
// This method applies the widget - no need to keep updating
|
||||||
|
$('table').trigger('applyWidgets');
|
||||||
|
});
|
||||||
|
|
||||||
|
});</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="banner">
|
||||||
|
<h1>table<em>sorter</em></h1>
|
||||||
|
<h2>applyWidgetId versus applyWidgets</h2>
|
||||||
|
<h3>Flexible client-side table sorting</h3>
|
||||||
|
<a href="index.html">Back to documentation</a>
|
||||||
|
</div>
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click on [ Apply Widget Id ], then sort the table a few times... then click on [ Apply Widgets ] and sort again.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h1>Demo</h1>
|
||||||
|
<br>
|
||||||
|
<div id="demo"><button class="applyid">Apply Widget Id</button> <button class="apply">Apply Widgets</button>
|
||||||
|
|
||||||
|
<table class="tablesorter">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>First Name</th>
|
||||||
|
<th>Last Name</th>
|
||||||
|
<th>Age</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Discount</th>
|
||||||
|
<th>Date</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Peter</td>
|
||||||
|
<td>Parker</td>
|
||||||
|
<td>28</td>
|
||||||
|
<td>$9.99</td>
|
||||||
|
<td>20%</td>
|
||||||
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>John</td>
|
||||||
|
<td>Hood</td>
|
||||||
|
<td>33</td>
|
||||||
|
<td>$19.99</td>
|
||||||
|
<td>25%</td>
|
||||||
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Clark</td>
|
||||||
|
<td>Kent</td>
|
||||||
|
<td>18</td>
|
||||||
|
<td>$15.89</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 12, 2003 11:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Almighty</td>
|
||||||
|
<td>45</td>
|
||||||
|
<td>$153.19</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Evans</td>
|
||||||
|
<td>22</td>
|
||||||
|
<td>$13.19</td>
|
||||||
|
<td>11%</td>
|
||||||
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>HTML</h1>
|
||||||
|
<div id="html">
|
||||||
|
<pre class="html"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-zebra.html">Basic: Applying the zebra stripe widget ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
425
docs/example-child-rows.html
Normal file
425
docs/example-child-rows.html
Normal file
@ -0,0 +1,425 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Child Rows</title>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Demo stuff -->
|
||||||
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: required -->
|
||||||
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: optional -->
|
||||||
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
|
$(".tablesorter")
|
||||||
|
.tablesorter({
|
||||||
|
// this is the default setting
|
||||||
|
cssChildRow: "expand-child"
|
||||||
|
})
|
||||||
|
.tablesorterPager({
|
||||||
|
container: $("#pager"),
|
||||||
|
positionFixed: false
|
||||||
|
});
|
||||||
|
|
||||||
|
// hide child rows
|
||||||
|
$('.expand-child td').hide();
|
||||||
|
|
||||||
|
// Toggle child row content (td), not hiding the row since we are using rowspan
|
||||||
|
// Using delegate because the pager plugin rebuilds the table after each page change
|
||||||
|
// "delegate" works in jQuery 1.4.2+; use "live" back to v1.3; for older jQuery - SOL
|
||||||
|
$('.tablesorter').delegate('.toggle', 'click' ,function(){
|
||||||
|
|
||||||
|
// use "nextUntil" to toggle multiple child rows
|
||||||
|
// toggle table cells instead of the row
|
||||||
|
$(this).closest('tr').nextUntil('tr:not(.expand-child)').find('td').toggle();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
});</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="banner">
|
||||||
|
<h1>table<em>sorter</em></h1>
|
||||||
|
<h2>Working with Child Rows</h2>
|
||||||
|
<h3>Flexible client-side table sorting</h3>
|
||||||
|
<a href="index.html">Back to documentation</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click the link in the Order # column to reveal the hidden child row cells
|
||||||
|
(<a href="http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm">original demo</a>).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h1>Demo</h1>
|
||||||
|
<div id="demo"><table class="tablesorter">
|
||||||
|
<colgroup>
|
||||||
|
<col width="85" />
|
||||||
|
<col width="250" />
|
||||||
|
<col width="100" />
|
||||||
|
<col width="90" />
|
||||||
|
<col width="70" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Order #</th>
|
||||||
|
<th>Customer</th>
|
||||||
|
<th>PO</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Total</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- First row expanded to reveal the layout -->
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2"> <!-- rowspan="2" makes the table look nicer -->
|
||||||
|
<a href="#" class="toggle">SO71774</a> <!-- link to toggle view of the child row -->
|
||||||
|
</td>
|
||||||
|
<td>Good Toys</td>
|
||||||
|
<td>PO348186287</td>
|
||||||
|
<td>Jul 20, 2007</td>
|
||||||
|
<td>$972.78</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>99700 Bell Road<br>Auburn, California 95603</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71775</a></td><td>Cycle Clearance</td><td>PO58159451</td><td>May 6, 2007</td><td>$2,313.13</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2255 254th Avenue Se<br>Albany, Oregon 97321</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71776</a></td><td>West Side Mart</td><td>PO19952192051</td><td>May 12, 2007</td><td>$87.09</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>251 The Metro Center<br>Wokingham, England RG41 1QW</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71777</a></td><td>Demand Distributors</td><td>PO20097113391</td><td>Apr 26, 2007</td><td>$1,267.82</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Judy</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>25102 Springwater<br>Wenatchee, Washington 98801</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71778</a></td><td>Purchase Mart</td><td>PO19894146890</td><td>Apr 18, 2007</td><td>$1,503.98</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Wrentham Village<br>Wrentham, Massachusetts 02093</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71779</a></td><td>Initial Bike Company</td><td>PO19633118218</td><td>Dec 20, 2007</td><td>$48,425.55</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>789 West Alameda<br>Westminster, Colorado 80030</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71780</a></td><td>Nearby Cycle Shop</td><td>PO19604173239</td><td>Aug 29, 2007</td><td>$42,452.65</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Burgess Hill<br>Edward Way<br>West Sussex, England RH15 9UD</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71781</a></td><td>Sundry Sporting Goods</td><td>PO19401117806</td><td>Mar 9, 2008</td><td>$29,262.41</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Rudolph</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>595 Burning Street<br>Vancouver, British Columbia V7L 4J4</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71782</a></td><td>Professional Sales and Service</td><td>PO19372114749</td><td>Jul 27, 2007</td><td>$43,962.79</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>57251 Serene Blvd<br>Van Nuys, California 91411</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71783</a></td><td>Eastside Department Store</td><td>PO19343113609</td><td>May 15, 2007</td><td>$92,663.56</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>9992 Whipple Rd<br>Union City, California 94587</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71784</a></td><td>Action Bicycle Specialists</td><td>PO19285135919</td><td>Nov 30, 2007</td><td>$119,960.82</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Warrington Ldc Unit 25/2<br>Woolston, England WA1 4SY</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71785</a></td><td>Metro Cycle Shop</td><td>PO19169115427</td><td>Feb 1, 2008</td><td>$39,805.12</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Henry</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2507 Pacific Ave S<br>Tacoma, Washington 98403</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71786</a></td><td>Greater Bike Store</td><td>PO17690128583</td><td>Dec 7, 2007</td><td>$4,657.19</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>55 Lakeshore Blvd East<br>Toronto, Ontario M4B 1V6</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71787</a></td><td>Fun Toys and Bikes</td><td>PO18038111279</td><td>Jun 1, 2007</td><td>$38,211.11</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6500 East Grant Road<br>Tucson, Arizona 85701</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71788</a></td><td>Reliable Retail Center</td><td>PO17951176595</td><td>Jul 10, 2007</td><td>$1,806.12</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>609 Evans Avenue<br>Toronto, Ontario M4B 1V4</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71789</a></td><td>Eastside Parts Shop</td><td>PO17516128941</td><td>May 22, 2007</td><td>$143.50</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Andrew</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>7000 Victoria Park Avenue<br>Toronto, Ontario M4B 1V4</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71790</a></td><td>Successful Sales Company</td><td>PO17487184338</td><td>Apr 15, 2007</td><td>$5,306.48</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>7009 Sw Hall Blvd.<br>Tigard, Oregon 97223</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71791</a></td><td>Convenient Sales and Service</td><td>PO17139191080</td><td>Nov 14, 2007</td><td>$26,692.85</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>950 Gateway Street<br>Springfield, Oregon 97477</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71792</a></td><td>Corner Bicycle Supply</td><td>PO17545115036</td><td>Mar 17, 2008</td><td>$67,683.32</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2511 Baker Road<br>Toronto, Ontario M4B 1V7</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71793</a></td><td>Mountain Toy Store</td><td>PO17226152414</td><td>Sep 5, 2007</td><td>$1,943.93</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Marvin</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>First Colony Mall<br>Sugar Land, Texas 77478</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71794</a></td><td>Vigorous Exercise Company</td><td>PO17574111985</td><td>Dec 14, 2007</td><td>$87,770.74</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>9950 Ferrand Drive, 9th Floor<br>Toronto, Ontario M4B 1V4</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71795</a></td><td>Bike Part Wholesalers</td><td>PO17371184627</td><td>Feb 6, 2008</td><td>$41,224.10</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>254a Baker Street<br>Botany<br>Sydney, New South Wales 1002</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71796</a></td><td>Extreme Riding Supplies</td><td>PO17052159664</td><td>Jul 13, 2007</td><td>$63,686.27</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Riverside<br>Sherman Oaks, California 91403</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71797</a></td><td>Riding Cycles</td><td>PO16501134889</td><td>Dec 2, 2007</td><td>$86,222.81</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Jon</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Galashiels<br>Liverpool, England L4 4HB</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71798</a></td><td>Work and Play Association</td><td>PO16994135863</td><td>Jan 20, 2008</td><td>$40,048.63</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2533 Eureka Rd.<br>Southgate, Michigan 48195</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71799</a></td><td>Metro Sports Equipment</td><td>PO15486196616</td><td>Oct 18, 2007</td><td>$23,080.67</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6, rue des Pyrenees<br>Saint Ouen, Loir et Cher 41100</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71800</a></td><td>Quick Parts and Service</td><td>PO15544127760</td><td>Feb 19, 2008</td><td>$37,253.44</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>99954 Boul. Laurier, Local 060, Place<br>Sainte-Foy, Quebec G1W</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71801</a></td><td>Getaway Inn</td><td>PO15515173664</td><td>Mar 6, 2008</td><td>$47,720.54</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Min</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>54, avenue des Ternes<br>Saint Ouen, Loir et Cher 41100</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71802</a></td><td>Blue-Ribbon Bike Company</td><td>PO15457184141</td><td>Sep 22, 2007</td><td>$42,013.42</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>790 Shelbyville Road<br>Saint Matthews, Kentucky 40207</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71803</a></td><td>World of Bikes</td><td>PO15341174104</td><td>Mar 1, 2008</td><td>$43,964.97</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>660 Lindbergh<br>Saint Louis, Missouri 63103</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71804</a></td><td>Bikes for Two</td><td>PO14906114459</td><td>Aug 18, 2007</td><td>$2,431.21</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>63 West Beaver Creek<br>Richmond Hill, Ontario L4E 3M5</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71805</a></td><td>Nationwide Supply</td><td>PO14703194514</td><td>Jun 27, 2007</td><td>$76,535.55</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Pilar</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>4250 Concord Road<br>Rhodes, New South Wales 2138</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71806</a></td><td>Valley Toy Store</td><td>PO14790111844</td><td>Jun 2, 2007</td><td>$20,261.90</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>252851 Rowan Place<br>Richmond, British Columbia V6B 3P7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71807</a></td><td>Courteous Bicycle Specialists</td><td>PO14935135211</td><td>Oct 28, 2007</td><td>$656.84</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>995 Crescent<br>Richmond Hill, Ontario L4E 3M5</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71808</a></td><td>Odometers and Accessories Company</td><td>PO14761198562</td><td>Oct 28, 2007</td><td>$42,231.51</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>253711 Mayfield Place, Unit 150<br>Richmond, British Columbia V6B 3P7</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71809</a></td><td>Fitness Bike Accessories</td><td>PO14645153239</td><td>Jan 12, 2008</td><td>$3,743.42</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: John</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Level 7<br>114 Albert Road<br>Rhodes, New South Wales 2138</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71810</a></td><td>Two-Seater Bikes</td><td>PO13804148315</td><td>May 27, 2007</td><td>$1,093.53</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>5700 Legacy Dr<br>Plano, Texas 75074</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71811</a></td><td>Racing Toys</td><td>PO13717180066</td><td>Feb 26, 2008</td><td>$3,493.04</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>9228 Via Del Sol<br>Phoenix, Arizona 85004</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71812</a></td><td>Fashionable Bikes and Accessories</td><td>PO13543115747</td><td>Apr 28, 2007</td><td>$35,146.04</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Sports Store At Park City<br>Park City, Utah 84098</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71813</a></td><td>Liquidation Sales</td><td>PO13630186295</td><td>Jan 17, 2008</td><td>$12,707.47</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Jenny</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>No. 6<br>Millenium Court<br>Perth, South Australia 6006</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71814</a></td><td>Our Sporting Goods Store</td><td>PO12818173864</td><td>May 31, 2007</td><td>$7,517.54</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6030 Conroy Road<br>Ottawa, Ontario K4B 1S3</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71815</a></td><td>Thrifty Parts and Sales</td><td>PO13021155785</td><td>Jan 1, 2008</td><td>$1,261.44</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Oxnard Outlet<br>Oxnard, California 93030</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71816</a></td><td>Engineered Bike Systems</td><td>PO12992180445</td><td>Jul 29, 2007</td><td>$3,754.97</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>123 Camelia Avenue<br>Oxnard, California 93030</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71817</a></td><td>Home Town Bike Store</td><td>PO12905185178</td><td>May 21, 2007</td><td>$689.96</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Danielle</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>955 Green Valley Crescent<br>Ottawa, Ontario K4B 1S1</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71818</a></td><td>Utilitarian Sporting Goods</td><td>PO12470139718</td><td>Apr 25, 2007</td><td>$61,356.31</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>4635 S. Harrison Blvd.<br>Ogden, Utah 84401</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71819</a></td><td>Fabrikam Inc., West</td><td>PO12354153257</td><td>May 19, 2007</td><td>$41,746.15</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>46460 West Oaks Drive<br>Novi, Michigan 48375</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71820</a></td><td>Racing Sales and Service</td><td>PO12673129941</td><td>Apr 26, 2007</td><td>$68,686.02</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>510, avenue de Villiers<br>Orleans, Loiret 45000</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71821</a></td><td>Bike Goods </td><td>PO11977190694</td><td>May 25, 2007</td><td>$5,904.88</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Gary</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>254075 Biscayne Blvd.<br>North Miami Beach, Florida 33162</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71822</a></td><td>Popular Bike Lines</td><td>PO11774139099</td><td>Dec 19, 2007</td><td>$31,191.60</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Level 7<br>80 Arthur Street<br>Newcastle, New South Wales 2300</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71823</a></td><td>Enterprise Center</td><td>PO11310159994</td><td>Sep 7, 2007</td><td>$2,818.81</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Kurfürstenstr 574<br>München, Hessen 80074</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71824</a></td><td>Outdoor Equipment Store</td><td>PO11455162600</td><td>Oct 29, 2007</td><td>$115,117.41</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6 Cotton Road<br>Nashua, New Hampshire 03064</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71825</a></td><td>One Bike Company</td><td>PO11165197222</td><td>Dec 28, 2007</td><td>$4,824.62</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Shanay</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>5 place Ville-Marie<br>Montreal, Quebec H1Y 2H7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71826</a></td><td>Rodeway Bike Store</td><td>PO11397155355</td><td>Oct 29, 2007</td><td>$40,083.06</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Winterfeldtstr 5557<br>Kreditorenbuchhaltung<br>Münster, Saarland 48001</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71827</a></td><td>Metal Processing Company</td><td>PO11107195325</td><td>Aug 22, 2007</td><td>$9,247.52</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>770 Notre Datme Quest Bureau 800<br>Montreal, Quebec H1Y 2H7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71828</a></td><td>Grand Industries</td><td>PO11194153355</td><td>Aug 10, 2007</td><td>$52,553.87</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6333 Cote Vertu<br>Montreal, Quebec H1Y 2H7</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71829</a></td><td>Family Cycle Store</td><td>PO10962123279</td><td>Jul 16, 2007</td><td>$40,095.88</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: James</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>660 Saint-Jacques, Bureau 400<br>Montreal, Quebec H1Y 2H8</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71830</a></td><td>Petroleum Products Distributors</td><td>PO10875112195</td><td>Nov 8, 2007</td><td>$55,088.00</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>20225 Lansing Ave<br>Montreal, Quebec H1Y 2H7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71831</a></td><td>Tachometers and Accessories</td><td>PO10295111084</td><td>Aug 8, 2007</td><td>$2,228.06</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Wymbush<br>Milton Keynes, England MK8 8DF</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71832</a></td><td>Closest Bicycle Store</td><td>PO10353140756</td><td>Sep 3, 2007</td><td>$39,531.61</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Garamonde Drive, Wymbush<br>PO Box 4023<br>Milton Keynes, England MK8 8ZD</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71833</a></td><td>Another Bicycle Company</td><td>PO10411123072</td><td>Jan 26, 2008</td><td>$70,377.54</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Stanley</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>567 Sw Mcloughlin Blvd<br>Milwaukie, Oregon 97222</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71834</a></td><td>Rustic Bike Store</td><td>PO377116268</td><td>Feb 22, 2008</td><td>$2,310.51</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Buergermeister-ulrich-str 3000<br>Buchhaltung<br>Augsburg, Bayern 86150</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71835</a></td><td>Running and Cycling Gear</td><td>PO870120974</td><td>Jun 13, 2007</td><td>$71,605.92</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>No. 60 Bellis Fair Parkway<br>Bellingham, Washington 98225</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71836</a></td><td>Safe Cycles Shop</td><td>PO841118259</td><td>Sep 13, 2007</td><td>$90,216.85</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2681 Eagle Peak<br>Bellevue, Washington 98004</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71837</a></td><td>Riders Company</td><td>PO1624180133</td><td>Aug 24, 2007</td><td>$39,989.36</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Kim</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Tanger Factory<br>Branch, Minnesota 55056</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71838</a></td><td>Cycles Sales and Repair</td><td>PO1305123041</td><td>Sep 7, 2007</td><td>$15,165.23</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>3387, rue Marbeuf<br>Bobigny, Seine Saint Denis 93000</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71839</a></td><td>Front Runner Bikes</td><td>PO1537119063</td><td>Jan 26, 2008</td><td>$75,173.33</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>DeSouth Square<br>Bradenton, Florida 34205</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71840</a></td><td>Community Department Stores</td><td>PO1450191043</td><td>Oct 2, 2007</td><td>$1,234.39</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>3639, rue des Grands Champs<br>Boulogne-sur-Mer, Pas de Calais 62200</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71841</a></td><td>Rural Cycle Emporium</td><td>PO1798133189</td><td>Nov 23, 2007</td><td>$112,758.77</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Kathleen</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6388 Lake City Way<br>Burnaby, British Columbia V5A 3A6</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71842</a></td><td>Price-Cutter Discount Bikes</td><td>PO1740169151</td><td>Nov 22, 2007</td><td>$12.91</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>6700 Boul Taschereau<br>Brossard, Quebec J4Z 1C5</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71843</a></td><td>Future Bikes</td><td>PO2001122796</td><td>Jun 24, 2007</td><td>$7,775.72</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>67255 - 8th Street N.E., Suite 350<br>Calgary, Alberta T2P 2G8</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71844</a></td><td>Sales and Supply Company</td><td>PO2813198985</td><td>Jun 12, 2007</td><td>$48,077.41</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Corporate Ofc A/p<br>123 Fourth Ave<br>Chantilly, Virginia 20151</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71845</a></td><td>Trailblazing Sports</td><td>PO2697119362</td><td>Mar 4, 2008</td><td>$45,992.37</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Frank</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>251340 E. South St.<br>Cerritos, California 90703</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71846</a></td><td>Sports Store</td><td>PO2378131604</td><td>Jul 2, 2007</td><td>$2,711.41</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Internet House, 3399 Science Park<br>Cambridge, England CB4 4BZ</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71847</a></td><td>Camping and Sports Store</td><td>PO18502143784</td><td>Jul 15, 2007</td><td>$119,981.15</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>400-25155 West Pender St<br>Vancouver, British Columbia V7L 4J4</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71848</a></td><td>Locks Company</td><td>PO18763153352</td><td>Nov 9, 2007</td><td>$16,667.88</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>70259 West Sunnyview Ave<br>Visalia, California 93291</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71849</a></td><td>Principal Bike Company</td><td>PO18125130930</td><td>Jan 18, 2008</td><td>$25,746.16</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Alvaro</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Mountain Square<br>Upland, California 91786</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71850</a></td><td>Quitting Business Distributors</td><td>PO18241134627</td><td>Aug 28, 2007</td><td>$10,492.47</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>University Plaza<br>Tampa, Florida 33602</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71851</a></td><td>Rapid Bikes</td><td>PO18299133687</td><td>Jun 17, 2007</td><td>$51,104.88</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>992 St Clair Ave East<br>Toronto, Ontario M4B 1V7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71852</a></td><td>Painters Bicycle Specialists</td><td>PO20213171866</td><td>Mar 24, 2008</td><td>$10,406.62</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>9975 Union St.<br>Waterbury, Connecticut 06710</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71853</a></td><td>Famous Bike Shop</td><td>PO18531164420</td><td>May 3, 2007</td><td>$4,578.20</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Jim</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>999 West Georgia St.<br>Vancouver, Ontario V5T 1Y9</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71854</a></td><td>Helpful Sales and Repair Service </td><td>PO16385143469</td><td>Nov 11, 2007</td><td>$36,819.69</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Licensing Account<br>Seaford, Victoria 3198</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71855</a></td><td>Self-Contained Cycle Parts Company</td><td>PO18589189353</td><td>Jun 23, 2007</td><td>$429.62</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>12, rue des Grands Champs<br>Verrieres Le Buisson, Essonne 91370</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71856</a></td><td>Transport Bikes</td><td>PO16530177647</td><td>Nov 18, 2007</td><td>$665.43</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>25130 South State Street<br>Sandy, Utah 84070</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71857</a></td><td>First Cycle Store</td><td>PO16269151631</td><td>Jan 4, 2008</td><td>$37,400.41</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Mike</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>25250 N 90th St<br>Scottsdale, Arizona 85257</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71858</a></td><td>Thrilling Bike Tours</td><td>PO16153112278</td><td>Oct 6, 2007</td><td>$15,275.20</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>4660 Rodeo Road<br>Santa Fe, New Mexico 87501</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71859</a></td><td>Bike World</td><td>PO16182112142</td><td>Apr 11, 2007</td><td>$8,654.14</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>60025 Bollinger Canyon Road<br>San Ramon, California 94583</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71860</a></td><td>Vinyl and Plastic Goods Corporation</td><td>PO17835163979</td><td>Feb 20, 2008</td><td>$3,651.79</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>No. 25800-130 King Street West<br>Toronto, Ontario M4B 1V5</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71861</a></td><td>Two Bike Shops</td><td>PO14152156429</td><td>Nov 30, 2007</td><td>$2,430.32</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Jim</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>35525-9th Street Sw<br>Puyallup, Washington 98371</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71862</a></td><td>Fad Outlet</td><td>PO14065190039</td><td>Feb 19, 2008</td><td>$1,622.62</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>2550 Ne Sandy Blvd<br>Portland, Oregon 97205</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71863</a></td><td>Sports Products Store</td><td>PO16124166561</td><td>Apr 30, 2007</td><td>$3,673.32</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Po Box 252525<br>Santa Ana, California 92701</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71864</a></td><td>Good Bike Shop</td><td>PO14268188903</td><td>Oct 9, 2007</td><td>$37,623.76</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>99433 S. Greenbay Rd.<br>Racine, Wisconsin 53182</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71865</a></td><td>Neighborhood Bicycle Storehouse</td><td>PO15109136609</td><td>May 30, 2007</td><td>$290.23</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Cecilia</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>69, boulevard Tremblay<br>Roncq, Nord 59223</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71866</a></td><td>Exchange Parts Inc.</td><td>PO14297151936</td><td>Jan 27, 2008</td><td>$43,277.65</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>7700 Green Road<br>Raleigh, North Carolina 27603</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71867</a></td><td>Vigorous Sports Store</td><td>PO13050111529</td><td>Jul 29, 2007</td><td>$1,170.54</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>Banbury<br>Oxon, England OX16 8RS</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71868</a></td><td>Cycle Merchants</td><td>PO14210134527</td><td>Aug 15, 2007</td><td>$1,932.67</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>575 Rue St Amable<br>Quebec, Quebec G1R</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71869</a></td><td>Certified Sports Supply</td><td>PO14877155420</td><td>Feb 21, 2008</td><td>$143.50</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Gabriele</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>250551 Shellbridge Way<br>Richmond, British Columbia V6B 3P7</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71870</a></td><td>Accessories Network</td><td>PO13195134898</td><td>Feb 1, 2008</td><td>$1,903.38</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>699bis, rue des Peupliers<br>Paris, Seine (Paris) 75008</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71871</a></td><td>Remote Bicycle Specialists</td><td>PO14239120760</td><td>Aug 10, 2007</td><td>$2,168.53</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>No. 2000-25080 Beaver Hall Hill<br>Quebec, Quebec G1R</div></td></tr>
|
||||||
|
<tr><td rowspan="2"><a href="#" class="toggle">SO71872</a></td><td>First Center</td><td>PO13137112099</td><td>Jan 2, 2008</td><td>$215.91</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>22, rue Lafayette<br>Pantin, Seine Saint Denis 93500</div></td></tr>
|
||||||
|
<tr><td rowspan="3"><a href="#" class="toggle">SO71873</a></td><td>Incomparable Bicycle Store</td><td>PO12325121185</td><td>Jul 5, 2007</td><td>$5,941.29</td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Comment</div><div>Please send ATTN: Faith</div></td></tr>
|
||||||
|
<tr class="expand-child"><td colspan="4"><div class="bold">Shipping Address</div><div>99 Edgewater Drive<br>Norwood, Massachusetts 02062</div></td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="pager" class="pager">
|
||||||
|
<form>
|
||||||
|
<input type="button" value="<<" class="first" />
|
||||||
|
<input type="button" value="<" class="prev" />
|
||||||
|
<input type="text" class="pagedisplay"/>
|
||||||
|
<input type="button" value=">" class="next" />
|
||||||
|
<input type="button" value=">>" class="last" />
|
||||||
|
<select class="pagesize">
|
||||||
|
<option selected="selected" value="10">10</option>
|
||||||
|
<option value="20">20</option>
|
||||||
|
<option value="30">30</option>
|
||||||
|
<option value="40">40</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>HTML</h1>
|
||||||
|
<div>
|
||||||
|
<pre class="html"><table class="tablesorter">
|
||||||
|
<colgroup>
|
||||||
|
<col width="85" />
|
||||||
|
<col width="250" />
|
||||||
|
<col width="100" />
|
||||||
|
<col width="90" />
|
||||||
|
<col width="70" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Order #</th>
|
||||||
|
<th>Customer</th>
|
||||||
|
<th>PO</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Total</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2"> <!-- rowspan="2" makes the table look nicer -->
|
||||||
|
<a href="#" class="toggle">SO71774</a> <!-- link to toggle view of the child row -->
|
||||||
|
</td>
|
||||||
|
<td>Good Toys</td>
|
||||||
|
<td>PO348186287</td>
|
||||||
|
<td>Jul 20, 2007</td>
|
||||||
|
<td>$972.78</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child">
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="bold">Shipping Address</div>
|
||||||
|
<div>99700 Bell Road<br>Auburn, California 95603</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2"> <!-- rowspan="2" makes the table look nicer -->
|
||||||
|
<a href="#" class="toggle">SO71775</a> <!-- link to toggle view of the child row -->
|
||||||
|
</td>
|
||||||
|
<td>Cycle Clearance</td>
|
||||||
|
<td>PO58159451</td>
|
||||||
|
<td>May 6, 2007</td>
|
||||||
|
<td>$2,313.13</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child">
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="bold">Shipping Address</div>
|
||||||
|
<div>2255 254th Avenue Se<br>Albany, Oregon 97321</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- View page source for complete HTML markup -->
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="pager" class="pager">
|
||||||
|
<form>
|
||||||
|
<input type="button" value="&lt;&lt;" class="first" />
|
||||||
|
<input type="button" value="&lt;" class="prev" />
|
||||||
|
<input type="text" class="pagedisplay"/>
|
||||||
|
<input type="button" value="&gt;" class="next" />
|
||||||
|
<input type="button" value="&gt;&gt;" class="last" />
|
||||||
|
<select class="pagesize">
|
||||||
|
<option selected="selected" value="10">10</option>
|
||||||
|
<option value="20">20</option>
|
||||||
|
<option value="30">30</option>
|
||||||
|
<option value="40">40</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-sort-force.html">Basic: Force a default sorting order ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,52 +1,63 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Initializing tablesorter on a empty table</title>
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Initializing tablesorter on an empty table</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(document).ready(function() {
|
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
|
|
||||||
$("#append").click(function() {
|
$("#append").click(function() {
|
||||||
|
|
||||||
// add some html
|
// add some html
|
||||||
var html = "<tr><td>Peter</td><td>Parker</td><td>28</td><td>$9.99</td><td>20%</td><td>Jul 6, 2006 8:14 AM</td></tr>";
|
var html = "<tr><td>Peter</td><td>Parker</td><td>28</td><td>$9.99</td><td>20%</td><td>Jul 6, 2006 8:14 AM</td></tr>" +
|
||||||
html += "<tr><td>John</td><td>Hood</td><td>33</td><td>$19.99</td><td>25%</td><td>Dec 10, 2002 5:14 AM</td></tr><tr><td>Clark</td><td>Kent</td><td>18</td><td>$15.89</td><td>44%</td><td>Jan 12, 2003 11:14 AM</td></tr>";
|
"<tr><td>John</td><td>Hood</td><td>33</td><td>$19.99</td><td>25%</td><td>Dec 10, 2002 5:14 AM</td></tr><tr><td>Clark</td>" +
|
||||||
html += "<tr><td>Bruce</td><td>Almighty</td><td>45</td><td>$153.19</td><td>44%</td><td>Jan 18, 2001 9:12 AM</td></tr>";
|
"<td>Kent</td><td>18</td><td>$15.89</td><td>44%</td><td>Jan 12, 2003 11:14 AM</td></tr>" +
|
||||||
|
"<tr><td>Bruce</td><td>Almighty</td><td>45</td><td>$153.19</td><td>44%</td><td>Jan 18, 2001 9:12 AM</td></tr>";
|
||||||
|
|
||||||
// append new html to table body
|
// append new html to table body
|
||||||
$("table tbody").append(html);
|
$("table tbody").append(html);
|
||||||
// let the plugin know that we made a update
|
|
||||||
$("table").trigger("update");
|
// resort on the third column
|
||||||
// set sorting column and direction, this will sort on the first and third column
|
|
||||||
var sorting = [[2,1],[0,0]];
|
var sorting = [[2,1],[0,0]];
|
||||||
// sort on the first column
|
|
||||||
$("table").trigger("sorton",[sorting]);
|
// let the plugin know that we made a update, then
|
||||||
|
// set sorting column and direction, this will sort on the first and third column
|
||||||
|
$("table")
|
||||||
|
.trigger("update")
|
||||||
|
.trigger("sorton",[sorting]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Initializing tablesorter on a empty table</h2>
|
<h2>Initializing tablesorter on an empty table</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -59,20 +70,26 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<a href="#" id="append">Append new table data</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a href="#" id="append">Append new table data</a>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-ajax.html">Advanced: Appending table data with ajax ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Extending default options</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Extending default options</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// extend the default setting to always include the zebra widget.
|
// extend the default setting to always include the zebra widget.
|
||||||
$.tablesorter.defaults.widgets = ['zebra'];
|
$.tablesorter.defaults.widgets = ['zebra'];
|
||||||
|
|
||||||
@ -30,19 +27,21 @@
|
|||||||
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
|
|
||||||
}); </script>
|
}); </script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Extending default options</h2>
|
<h2>Extending default options</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -84,7 +83,6 @@
|
|||||||
<td>45</td>
|
<td>45</td>
|
||||||
<td>$153.19</td>
|
<td>$153.19</td>
|
||||||
<td>44%</td>
|
<td>44%</td>
|
||||||
|
|
||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -96,16 +94,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-debug.html">Advanced: Enabling debug mode ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,45 +1,48 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Disable headers using metadata</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Disable headers using metadata</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<!-- Tablesorter: optional -->
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
<script src="../js/jquery.metadata.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
// not sure why this is here...
|
||||||
window.tableFile="table-metadata-disable.html";
|
window.tableFile="table-metadata-disable.html";
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
|
<script id="js">$(function() {
|
||||||
// call the tablesorter plugin, the magic happens in the markup
|
// call the tablesorter plugin, the magic happens in the markup
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
}); </script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Disable headers using metadata</h2>
|
<h2>Disable headers using metadata</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="{sorter: false}">First Name</th>
|
<th class="{sorter: false}">First Name</th>
|
||||||
@ -57,7 +60,6 @@
|
|||||||
<td>28</td>
|
<td>28</td>
|
||||||
<td>$9.99</td>
|
<td>$9.99</td>
|
||||||
<td>20%</td>
|
<td>20%</td>
|
||||||
|
|
||||||
<td>Jul 6, 2006 8:14 AM</td>
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -66,7 +68,6 @@
|
|||||||
<td>33</td>
|
<td>33</td>
|
||||||
<td>$19.99</td>
|
<td>$19.99</td>
|
||||||
<td>25%</td>
|
<td>25%</td>
|
||||||
|
|
||||||
<td>Dec 10, 2002 5:14 AM</td>
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -83,7 +84,6 @@
|
|||||||
<td>45</td>
|
<td>45</td>
|
||||||
<td>$153.19</td>
|
<td>$153.19</td>
|
||||||
<td>44%</td>
|
<td>44%</td>
|
||||||
|
|
||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -95,16 +95,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-meta-parsers.html">Metadata: Setting column parser using metadata ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,40 +1,41 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Setting column parser using metadata</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Setting column parser using metadata</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
<script src="../js/jquery.metadata.js"></script>
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(document).ready(function() {
|
<script id="js">$(function() {
|
||||||
// call the tablesorter plugin, the magic happens in the markup
|
// call the tablesorter plugin, the magic happens in the markup
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Setting column parser using metadata</h2>
|
<h2>Setting column parser using metadata</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="{sorter: 'text'}">First Name</th>
|
<th class="{sorter: 'text'}">First Name</th>
|
||||||
@ -87,18 +88,23 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-triggers.html">Advanced: Triggers sortEnd and sortStart ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -1,43 +1,44 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Setting initial sorting order with metadata</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Setting initial sorting order with metadata</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<!-- Tablesorter: optional -->
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
<script src="../js/jquery.metadata.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
// call the tablesorter plugin, the magic happens in the markup
|
// call the tablesorter plugin, the magic happens in the markup
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Setting initial sorting order with metadata</h2>
|
<h2>Setting initial sorting order with metadata</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><!-- sortlist is appended to the table using the class attribute and is picked up by metadata plugin -->
|
||||||
<!-- sortlist is appended to the table using the class attribute and is picked up by metadata plugin -->
|
<table class="tablesorter {sortlist: [[0,0],[4,0]]}">
|
||||||
<table cellspacing="1" class="tablesorter {sortlist: [[0,0],[4,0]]}">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -46,7 +47,6 @@
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -91,18 +91,23 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-meta-headers.html">Metadata: Disable header using metadata ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -1,51 +1,48 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Enabling debug mode</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Enabling debug mode</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(document).ready(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// enable debug mode
|
// enable debug mode
|
||||||
debug: true
|
debug: true
|
||||||
});
|
});
|
||||||
}); </script>
|
|
||||||
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Enabling debug mode</h2>
|
<h2>Enabling debug mode</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
<p class="tip">
|
<p class="tip">
|
||||||
<em>NOTE!</em> If firebug is installed the debuging information will be displayed in the firebug console.
|
<em>NOTE!</em> If firebug is installed the debuging information will be displayed in the firebug console.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
|
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -98,18 +95,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-parsers.html">Advanced: Parser, writing your own ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Enabling debug mode</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Enabling debug mode</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
});</script>
|
});</script>
|
||||||
@ -34,12 +31,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<p class="tip">
|
||||||
<div id="demo">
|
<em>NOTE!</em> Click on any column header to sort that column. Note the new alphanumeric sort working in the first column.
|
||||||
|
</p>
|
||||||
|
|
||||||
<table cellspacing="1" class="tablesorter">
|
<h1>Demo</h1>
|
||||||
|
<div id="demo"><table class="tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Account #</th>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
<th>Last Name</th>
|
<th>Last Name</th>
|
||||||
<th>Age</th>
|
<th>Age</th>
|
||||||
@ -50,6 +50,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A43</td>
|
||||||
<td>Peter</td>
|
<td>Peter</td>
|
||||||
<td>Parker</td>
|
<td>Parker</td>
|
||||||
<td>28</td>
|
<td>28</td>
|
||||||
@ -58,6 +59,7 @@
|
|||||||
<td>+3</td>
|
<td>+3</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A255</td>
|
||||||
<td>John</td>
|
<td>John</td>
|
||||||
<td>Hood</td>
|
<td>Hood</td>
|
||||||
<td>33</td>
|
<td>33</td>
|
||||||
@ -66,6 +68,7 @@
|
|||||||
<td>-7</td>
|
<td>-7</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A33</td>
|
||||||
<td>Clark</td>
|
<td>Clark</td>
|
||||||
<td>Kent</td>
|
<td>Kent</td>
|
||||||
<td>18</td>
|
<td>18</td>
|
||||||
@ -74,6 +77,7 @@
|
|||||||
<td>-15</td>
|
<td>-15</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A1</td>
|
||||||
<td>Bruce</td>
|
<td>Bruce</td>
|
||||||
<td>Almighty</td>
|
<td>Almighty</td>
|
||||||
<td>45</td>
|
<td>45</td>
|
||||||
@ -82,6 +86,7 @@
|
|||||||
<td>+19</td>
|
<td>+19</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A102</td>
|
||||||
<td>Bruce</td>
|
<td>Bruce</td>
|
||||||
<td>Evans</td>
|
<td>Evans</td>
|
||||||
<td>56</td>
|
<td>56</td>
|
||||||
@ -90,18 +95,22 @@
|
|||||||
<td>+9</td>
|
<td>+9</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-sort-order.html">Basic: Direction of initial sort ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
133
docs/example-option-render-header.html
Normal file
133
docs/example-option-render-header.html
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Render Header</title>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Demo stuff -->
|
||||||
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: required -->
|
||||||
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: optional -->
|
||||||
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<style id="css">.roundedCorners {
|
||||||
|
border: #000 1px solid;
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 1em;
|
||||||
|
-moz-border-radius: 1em;
|
||||||
|
-webkit-border-radius: 1em;
|
||||||
|
}
|
||||||
|
.headerSortDown .roundedCorners {
|
||||||
|
border-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
// call the tablesorter plugin
|
||||||
|
$("table").tablesorter({
|
||||||
|
onRenderHeader: function (){
|
||||||
|
// the TH content is wrapped with a span by default, so just add the class
|
||||||
|
$(this).find('span').addClass('roundedCorners');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="banner">
|
||||||
|
<h1>table<em>sorter</em></h1>
|
||||||
|
<h2>Render Headers</h2>
|
||||||
|
<h3>Flexible client-side table sorting</h3>
|
||||||
|
<a href="index.html">Back to documentation</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<h1>Demo</h1>
|
||||||
|
<div id="demo"><table class="tablesorter">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>First Name</th>
|
||||||
|
<th>Last Name</th>
|
||||||
|
<th>Age</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Discount</th>
|
||||||
|
<th>Date</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Peter</td>
|
||||||
|
<td>Parker</td>
|
||||||
|
<td>28</td>
|
||||||
|
<td>$9.99</td>
|
||||||
|
<td>20%</td>
|
||||||
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>John</td>
|
||||||
|
<td>Hood</td>
|
||||||
|
<td>33</td>
|
||||||
|
<td>$19.99</td>
|
||||||
|
<td>25%</td>
|
||||||
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Clark</td>
|
||||||
|
<td>Kent</td>
|
||||||
|
<td>18</td>
|
||||||
|
<td>$15.89</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 12, 2003 11:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Almighty</td>
|
||||||
|
<td>45</td>
|
||||||
|
<td>$153.19</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Evans</td>
|
||||||
|
<td>22</td>
|
||||||
|
<td>$13.19</td>
|
||||||
|
<td>11%</td>
|
||||||
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>CSS</h1>
|
||||||
|
<div id="css">
|
||||||
|
<pre class="css"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>HTML</h1>
|
||||||
|
<div id="html">
|
||||||
|
<pre class="html"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-extending-defaults.html">Advanced: Extending default options ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
120
docs/example-option-sort-append.html
Normal file
120
docs/example-option-sort-append.html
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Append a default sorting order</title>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Demo stuff -->
|
||||||
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: required -->
|
||||||
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: optional -->
|
||||||
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
// call the tablesorter plugin
|
||||||
|
$("table").tablesorter({
|
||||||
|
// set forced sort on the fourth column and in decending order.
|
||||||
|
sortAppend: [[0,0]]
|
||||||
|
});
|
||||||
|
});</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="banner">
|
||||||
|
<h1>table<em>sorter</em></h1>
|
||||||
|
<h2>Append to a sort order</h2>
|
||||||
|
<h3>Flexible client-side table sorting</h3>
|
||||||
|
<a href="index.html">Back to documentation</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click to sort any column header to see the the first column sort is appended to the selected sort order.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h1>Demo</h1>
|
||||||
|
<div id="demo"><table class="tablesorter">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>First Name</th>
|
||||||
|
<th>Last Name</th>
|
||||||
|
<th>Age</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Discount</th>
|
||||||
|
<th>Date</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Peter</td>
|
||||||
|
<td>Parker</td>
|
||||||
|
<td>28</td>
|
||||||
|
<td>$9.99</td>
|
||||||
|
<td>20%</td>
|
||||||
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>John</td>
|
||||||
|
<td>Evans</td>
|
||||||
|
<td>33</td>
|
||||||
|
<td>$9.99</td>
|
||||||
|
<td>25%</td>
|
||||||
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Clark</td>
|
||||||
|
<td>Kent</td>
|
||||||
|
<td>22</td>
|
||||||
|
<td>$15.89</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 12, 2003 11:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Almighty</td>
|
||||||
|
<td>45</td>
|
||||||
|
<td>$15.89</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Evans</td>
|
||||||
|
<td>22</td>
|
||||||
|
<td>$13.19</td>
|
||||||
|
<td>11%</td>
|
||||||
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>HTML</h1>
|
||||||
|
<div id="html">
|
||||||
|
<pre class="html"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-digits.html">Basic: Dealing with digits! ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,44 +1,52 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Force a default sorting order</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Force a default sorting order</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<!-- Tablesorter: optional -->
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// set forced sort on the fourth column and i decending order.
|
// set forced sort on the fourth column and in decending order.
|
||||||
sortForce: [[0,0]]
|
sortForce: [[0,0]]
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Force a default sorting order</h2>
|
<h2>Force a default sorting order</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click to sort any column header to see the forcing of the first column sort.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -47,7 +55,6 @@
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -57,7 +64,6 @@
|
|||||||
<td>28</td>
|
<td>28</td>
|
||||||
<td>$9.99</td>
|
<td>$9.99</td>
|
||||||
<td>20%</td>
|
<td>20%</td>
|
||||||
|
|
||||||
<td>Jul 6, 2006 8:14 AM</td>
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -66,7 +72,6 @@
|
|||||||
<td>33</td>
|
<td>33</td>
|
||||||
<td>$19.99</td>
|
<td>$19.99</td>
|
||||||
<td>25%</td>
|
<td>25%</td>
|
||||||
|
|
||||||
<td>Dec 10, 2002 5:14 AM</td>
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -83,7 +88,6 @@
|
|||||||
<td>45</td>
|
<td>45</td>
|
||||||
<td>$153.19</td>
|
<td>$153.19</td>
|
||||||
<td>44%</td>
|
<td>44%</td>
|
||||||
|
|
||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -95,16 +99,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-sort-append.html">Basic: Append a sort to the selected sorting order ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,33 +1,31 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Change multi-column sorting key</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Change multi-column sorting key</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// change the multi sort key from the default shift to alt button
|
// change the multi sort key from the default shift to alt button
|
||||||
sortMultiSortKey: 'altKey'
|
sortMultiSortKey: 'altKey'
|
||||||
});
|
});
|
||||||
}); </script>
|
|
||||||
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
@ -37,9 +35,13 @@
|
|||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click to sort any column header, then hold down the alt key and select a second column. Continue selecting columns as desired.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -92,16 +94,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-meta-sort-list.html">Metadata: Set a initial sorting order using metadata ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,44 +1,42 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Set a initial sorting order</title>
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Set an initial sort order</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// sort on the first column and third column, order asc
|
// sort on the first column and third column in ascending order
|
||||||
sortList: [[0,0],[2,0]]
|
sortList: [[0,0],[2,0]]
|
||||||
});
|
});
|
||||||
}); </script>
|
|
||||||
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Set a initial sorting order</h2>
|
<h2>Set an initial sort order</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -47,7 +45,6 @@
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -57,7 +54,6 @@
|
|||||||
<td>28</td>
|
<td>28</td>
|
||||||
<td>$9.99</td>
|
<td>$9.99</td>
|
||||||
<td>20%</td>
|
<td>20%</td>
|
||||||
|
|
||||||
<td>Jul 6, 2006 8:14 AM</td>
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -66,7 +62,6 @@
|
|||||||
<td>33</td>
|
<td>33</td>
|
||||||
<td>$19.99</td>
|
<td>$19.99</td>
|
||||||
<td>25%</td>
|
<td>25%</td>
|
||||||
|
|
||||||
<td>Dec 10, 2002 5:14 AM</td>
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -83,7 +78,6 @@
|
|||||||
<td>45</td>
|
<td>45</td>
|
||||||
<td>$153.19</td>
|
<td>$153.19</td>
|
||||||
<td>44%</td>
|
<td>44%</td>
|
||||||
|
|
||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -95,18 +89,24 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-trigger-sort.html">Basic: Sort table using a link outside the table ››</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -1,45 +1,42 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Set a initial sort order</title>
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Set an initial sort order direction</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// change the default sorting order from 'asc' to 'desc'
|
// change the default sorting order from 'asc' to 'desc'
|
||||||
sortInitialOrder: "desc"
|
sortInitialOrder: "desc"
|
||||||
});
|
});
|
||||||
|
|
||||||
}); </script>
|
}); </script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Set a initial sorting order</h2>
|
<h2>Set an initial sorting order direction</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -92,16 +89,21 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-apply-widget.html">Basic: Applying Widgets ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,48 +1,49 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Dealing with markup inside cells</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Dealing with markup inside cells</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function() {
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(document).ready(function() {
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
|
|
||||||
// define a custom text extraction function
|
// define a custom text extraction function
|
||||||
textExtraction: function(node) {
|
textExtraction: function(node) {
|
||||||
// extract data from markup and return it
|
// extract data from markup and return it
|
||||||
return node.childNodes[0].childNodes[0].innerHTML;
|
return $(node).text();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}); </script>
|
|
||||||
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Dealing with markup inside cells</h2>
|
<h2>Dealing with markup inside cells</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -51,7 +52,6 @@
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -71,17 +71,47 @@
|
|||||||
<td><strong><em>25%</em></strong></td>
|
<td><strong><em>25%</em></strong></td>
|
||||||
<td><strong><em>Dec 10, 2002 5:14 AM</em></strong></td>
|
<td><strong><em>Dec 10, 2002 5:14 AM</em></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong><em>Clark</em></strong></td>
|
||||||
|
<td><strong><em>Kent</em></strong></td>
|
||||||
|
<td><strong><em>18</em></strong></td>
|
||||||
|
<td><strong><em>$15.89</em></strong></td>
|
||||||
|
<td><strong><em>44%</em></strong></td>
|
||||||
|
<td><strong><em>Jan 12, 2003 11:14 AM</em></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong><em>Bruce</em></strong></td>
|
||||||
|
<td><strong><em>Almighty</em></strong></td>
|
||||||
|
<td><strong><em>45</em></strong></td>
|
||||||
|
<td><strong><em>$153.19</em></strong></td>
|
||||||
|
<td><strong><em>44%</em></strong></td>
|
||||||
|
<td><strong><em>Jan 18, 2001 9:12 AM</em></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong><em>Bruce</em></strong></td>
|
||||||
|
<td><strong><em>Evans</em></strong></td>
|
||||||
|
<td><strong><em>22</em></strong></td>
|
||||||
|
<td><strong><em>$13.19</em></strong></td>
|
||||||
|
<td><strong><em>11%</em></strong></td>
|
||||||
|
<td><strong><em>Jan 18, 2007 9:12 AM</em></strong></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-render-header.html">Advanced: Modify how the header is rendered to allow for custom styling ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,27 +1,23 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Disable headers using options</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Disable headers using options</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: optional -->
|
<script id="js">$(function(){
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript" src="../js/jquery.metadata.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function(){
|
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
// pass the headers argument and assing a object
|
// pass the headers argument and assing a object
|
||||||
headers: {
|
headers: {
|
||||||
@ -48,8 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -102,16 +97,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-sort-key.html">Basic: Change the default multi-sorting key ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,23 +1,24 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Writing custom parsers</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Writing custom parsers</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
<script type="text/javascript" id="js">// add parser through the tablesorter addParser method
|
|
||||||
|
<script id="js">// add parser through the tablesorter addParser method
|
||||||
$.tablesorter.addParser({
|
$.tablesorter.addParser({
|
||||||
// set a unique id
|
// set a unique id
|
||||||
id: 'grades',
|
id: 'grades',
|
||||||
@ -27,7 +28,10 @@ $.tablesorter.addParser({
|
|||||||
},
|
},
|
||||||
format: function(s) {
|
format: function(s) {
|
||||||
// format your data for normalization
|
// format your data for normalization
|
||||||
return s.toLowerCase().replace(/good/,2).replace(/medium/,1).replace(/bad/,0);
|
return s.toLowerCase()
|
||||||
|
.replace(/good/,2)
|
||||||
|
.replace(/medium/,1)
|
||||||
|
.replace(/bad/,0);
|
||||||
},
|
},
|
||||||
// set type, either numeric or text
|
// set type, either numeric or text
|
||||||
type: 'numeric'
|
type: 'numeric'
|
||||||
@ -37,24 +41,25 @@ $(function() {
|
|||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
headers: {
|
headers: {
|
||||||
6: {
|
6: {
|
||||||
sorter:'grades'
|
sorter: 'grades'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Writing custom parsers</h2>
|
<h2>Writing custom parsers</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
|
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -95,16 +100,22 @@ $(function() {
|
|||||||
<td>medium</td>
|
<td>medium</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-widgets.html">Advanced: Widgets, writing your own ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,33 +1,36 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Sort table using a link outside the table</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Sort table using a link outside the table</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function() {
|
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
|
|
||||||
$("#trigger-link").click(function() {
|
$("#trigger-link").click(function() {
|
||||||
// set sorting column and direction, this will sort on the first and third column the column index starts at zero
|
// set sorting column and direction, this will sort on the first and third column the column index starts at zero
|
||||||
var sorting = [[0,0],[2,0]];
|
var sorting = [[0,0],[2,0]];
|
||||||
// sort on the first column
|
// sort on the first column and third columns
|
||||||
$("table").trigger("sorton",[sorting]);
|
$("table").trigger("sorton",[sorting]);
|
||||||
// return false to stop default link action
|
// return false to stop default link action
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -39,8 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -92,19 +94,24 @@
|
|||||||
<td>11%</td>
|
<td>11%</td>
|
||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody></table>
|
</tbody>
|
||||||
<a href="#" id="trigger-link">Sort first and third columns</a>
|
</table>
|
||||||
</div>
|
|
||||||
<br/>
|
<a href="#" id="trigger-link">Sort first and third columns</a></div>
|
||||||
<br/>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-child-rows.html">Basic: How to add rows that sort with their parent row ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,61 +1,68 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Triggers sortStart and sortEnd</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Triggers sortStart and sortEnd</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function(){
|
||||||
|
|
||||||
<script type="text/javascript" id="js">$(function(){
|
|
||||||
var start;
|
var start;
|
||||||
// call the tablesorter plugin, the magic happens in the markup
|
// call the tablesorter plugin, the magic happens in the markup
|
||||||
|
|
||||||
$("table")
|
$("table")
|
||||||
.tablesorter()
|
.tablesorter()
|
||||||
//assign the sortStart event
|
|
||||||
.bind("sortStart",function(e){
|
// assign the sortStart event
|
||||||
|
.bind("sortStart",function(e, t){
|
||||||
start = e.timeStamp;
|
start = e.timeStamp;
|
||||||
$("#events").append('<li>Sort Started</li>').find('li:first').remove();
|
$("#display").append('<li>Sort Started</li>').find('li:first').remove();
|
||||||
})
|
})
|
||||||
.bind("sortEnd",function(e){
|
|
||||||
$("#events").append('<li>Sort Ended after ' + ((e.timeStamp - start)/1000).toFixed(2) +' seconds</li>').find('li:first').remove();
|
.bind("sortEnd",function(e, t){
|
||||||
|
$("#display").append('<li>Sort Ended after ' + ( (e.timeStamp - start)/1000 ).toFixed(2) + ' seconds</li>').find('li:first').remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
}); </script>
|
}); </script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Triggers sortStart and sortEnd</h2>
|
<h2>Triggers sortStart and sortEnd</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Demo</h1>
|
|
||||||
<div id="">
|
|
||||||
<ul id="events">
|
|
||||||
<li>...</li>
|
|
||||||
<li>...</li>
|
|
||||||
<li>...</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h1>Sort Events</h1>
|
||||||
|
<ul id="display">
|
||||||
|
<li>Sort events will appear here.</li>
|
||||||
|
<li> </li>
|
||||||
|
<li> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1>Demo</h1>
|
||||||
<!-- sortlist is appended to the table using the class attribute and is picked up by metadata plugin -->
|
<!-- sortlist is appended to the table using the class attribute and is picked up by metadata plugin -->
|
||||||
<table cellspacing="1" class="tablesorter">
|
<table class="tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>Name</th><th>Major</th><th>Sex</th><th>English</th><th>Japanese</th><th>Calculus</th><th>Geometry</th></tr>
|
<tr><th>Name</th><th>Major</th><th>Sex</th><th>English</th><th>Japanese</th><th>Calculus</th><th>Geometry</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -1088,6 +1095,10 @@
|
|||||||
<tr><td>student1022</td><td>Languages</td><td>female</td><td>75</td><td>22</td><td>7</td><td>52</td></tr>
|
<tr><td>student1022</td><td>Languages</td><td>female</td><td>75</td><td>22</td><td>7</td><td>52</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-empty-table.html">Advanced: Initializing tablesorter on a empty table ››</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,50 +1,65 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Appending table data with ajax</title>
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Updating a table cell</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
<script type="text/javascript" src="js/examples.js"></script>
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.discount { cursor: pointer; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
<script type="text/javascript" id="js">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$("table").tablesorter();
|
$("table").tablesorter();
|
||||||
|
|
||||||
$("table tbody td.discount").click(function() {
|
$("table tbody td.discount").click(function() {
|
||||||
|
|
||||||
// randomize a number
|
// randomize a number
|
||||||
var discount = '$' + Math.round(Math.random() * Math.random() * 100) + '.' + Math.round(Math.random() * Math.random() * 100);
|
var discount = '$' + Math.round(Math.random() * Math.random() * 100) + '.' + ('0' + Math.round(Math.random() * Math.random() * 100)).slice(-2);
|
||||||
$(this).text(discount);
|
$(this).text(discount);
|
||||||
$("table").trigger("updateCell",[this]);
|
|
||||||
|
("table").trigger("updateCell",[this]);
|
||||||
|
|
||||||
// set sorting column and direction, this will sort on the first and third column
|
// set sorting column and direction, this will sort on the first and third column
|
||||||
var sorting = [[3,1]];
|
var sorting = [[3,1]];
|
||||||
// sort on the first column
|
// sort on the fourth column
|
||||||
$("table").trigger("sorton",[sorting]);
|
$("table").trigger("sorton", [sorting]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
|
||||||
</script>
|
});</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Updating the table cache</h2>
|
<h2>Updating a table cell</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
<em>NOTE!</em> Click on any value in the Total column to change it to a random amount.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
<div id="demo">
|
<div id="demo"><table class="tablesorter">
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
@ -53,7 +68,6 @@
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -63,7 +77,6 @@
|
|||||||
<td>28</td>
|
<td>28</td>
|
||||||
<td class="discount">$9.99</td>
|
<td class="discount">$9.99</td>
|
||||||
<td>20%</td>
|
<td>20%</td>
|
||||||
|
|
||||||
<td>Jul 6, 2006 8:14 AM</td>
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -72,7 +85,6 @@
|
|||||||
<td>33</td>
|
<td>33</td>
|
||||||
<td class="discount">$19.99</td>
|
<td class="discount">$19.99</td>
|
||||||
<td>25%</td>
|
<td>25%</td>
|
||||||
|
|
||||||
<td>Dec 10, 2002 5:14 AM</td>
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -89,7 +101,6 @@
|
|||||||
<td>45</td>
|
<td>45</td>
|
||||||
<td class="discount">$153.19</td>
|
<td class="discount">$153.19</td>
|
||||||
<td>44%</td>
|
<td>44%</td>
|
||||||
|
|
||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -101,18 +112,22 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table></div>
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
<h1>Javascript</h1>
|
<h1>Javascript</h1>
|
||||||
<div id="javascript">
|
<div id="javascript">
|
||||||
<pre class="javascript"></pre>
|
<pre class="js"></pre>
|
||||||
</div>
|
</div>
|
||||||
<h1>HTML</h1>
|
<h1>HTML</h1>
|
||||||
<div id="html">
|
<div id="html">
|
||||||
<pre class="html"></pre>
|
<pre class="html"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-option-text-extraction.html">Advanced: Dealing with markup inside cells (textExtraction function) ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,31 +1,37 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>jQuery plugin: Tablesorter 2.0 - Writing custom widgets</title>
|
<title>jQuery plugin: Tablesorter 2.0 - Writing custom widgets</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
|
||||||
<script type="text/javascript">
|
<!-- Tablesorter: optional -->
|
||||||
$(function() {
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
// add new widget called repeatHeaders
|
// add new widget called repeatHeaders
|
||||||
$.tablesorter.addWidget({
|
$.tablesorter.addWidget({
|
||||||
// give the widget a id
|
|
||||||
|
// give the widget an id
|
||||||
id: "repeatHeaders",
|
id: "repeatHeaders",
|
||||||
|
|
||||||
// format is called when the on init and when a sorting has finished
|
// format is called when the on init and when a sorting has finished
|
||||||
format: function(table) {
|
format: function(table) {
|
||||||
// cache and collect all TH headers
|
// cache and collect all TH headers
|
||||||
if(!this.headers) {
|
if (!this.headers) {
|
||||||
var h = this.headers = [];
|
var h = this.headers = [];
|
||||||
$("thead th",table).each(function() {
|
$("thead th",table).each(function() {
|
||||||
h.push(
|
h.push(
|
||||||
@ -34,81 +40,46 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove appended headers by classname.
|
// remove appended headers by classname
|
||||||
$("tr.repated-header",table).remove();
|
$("tr.repeated-header",table).remove();
|
||||||
|
|
||||||
// loop all tr elements and insert a copy of the "headers"
|
// loop all tr elements and insert a copy of the "headers"
|
||||||
for(var i=0; i < table.tBodies[0].rows.length; i++) {
|
for (var i = 0; i < table.tBodies[0].rows.length; i++) {
|
||||||
// insert a copy of the table head every 10th row
|
// insert a copy of the table head every X rows
|
||||||
if((i%5) == 4) {
|
// i mod 5 = 4, is true every 4th row, starting from the 4th.
|
||||||
|
// i mod 6 = 5, is true every 5th row, starting from the 5th, etc.
|
||||||
|
if ((i%5) === 4) {
|
||||||
$("tbody tr:eq(" + i + ")",table).before(
|
$("tbody tr:eq(" + i + ")",table).before(
|
||||||
$("<tr></tr>").addClass("repated-header").html(this.headers.join(""))
|
$("<tr></tr>").addClass("repeated-header").html(this.headers.join(""))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// call the tablesorter plugin and assign widgets with id "zebra" (Default widget in the core) and the newly created "repeatHeaders"
|
// call the tablesorter plugin and assign widgets with id "zebra" (Default widget in the core) and the newly created "repeatHeaders"
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
widgets: ['zebra','repeatHeaders']
|
// apply both widgets
|
||||||
|
widgets: ['zebra', 'repeatHeaders']
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});</script>
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Writing custom widgets</h2>
|
<h2>Writing custom widgets</h2>
|
||||||
<h3>Flexible client-side table sorting</h3>
|
<h3>Flexible client-side table sorting</h3>
|
||||||
<a href="index.html">Back to documentation</a>
|
<a href="index.html">Back to documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
<h1>Demo</h1>
|
||||||
|
|
||||||
<h1>Javascript</h1>
|
<table class="tablesorter">
|
||||||
<pre class="javascript">
|
|
||||||
// add new widget called repeatHeaders
|
|
||||||
$.tablesorter.addWidget({
|
|
||||||
// give the widget a id
|
|
||||||
id: "repeatHeaders",
|
|
||||||
// format is called when the on init and when a sorting has finished
|
|
||||||
format: function(table) {
|
|
||||||
// cache and collect all TH headers
|
|
||||||
if(!this.headers) {
|
|
||||||
var h = this.headers = [];
|
|
||||||
$("thead th",table).each(function() {
|
|
||||||
h.push(
|
|
||||||
"<th>" + $(this).text() + "</th>"
|
|
||||||
);
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove appended headers by classname.
|
|
||||||
$("tr.repated-header",table).remove();
|
|
||||||
|
|
||||||
// loop all tr elements and insert a copy of the "headers"
|
|
||||||
for(var i=0; i < table.tBodies[0].rows.length; i++) {
|
|
||||||
// insert a copy of the table head every 10th row
|
|
||||||
if((i%5) == 4) {
|
|
||||||
$("tbody tr:eq(" + i + ")",table).before(
|
|
||||||
$("<tr></tr>").html(this.headers.join(""))
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// call the tablesorter plugin and assign widgets with id "zebra" (Default widget in the core) and the newly created "repeatHeaders"
|
|
||||||
$("table").tablesorter({
|
|
||||||
widgets: ['zebra','repeatHeaders']
|
|
||||||
});
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h1>Demo</h1>
|
|
||||||
<table cellspacing="1" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -341,6 +312,18 @@ $("table").tablesorter({
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-pager.html">Companion Plugins: file:///C:/Temp/tablesorter/docs/example-pager.html ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
133
docs/example-zebra.html
Normal file
133
docs/example-zebra.html
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0 - Zebra Stripe Widget</title>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Demo stuff -->
|
||||||
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: required -->
|
||||||
|
<link rel="stylesheet" href="../css/blue/style.css">
|
||||||
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
|
||||||
|
<!-- Tablesorter: optional -->
|
||||||
|
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
|
||||||
|
|
||||||
|
<style id="css">/* Extra selectors needed to override the default styling */
|
||||||
|
table.tablesorter tbody tr.normal-row td {
|
||||||
|
background: #888;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
table.tablesorter tbody tr.alt-row td {
|
||||||
|
background: #555;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script id="js">$(function() {
|
||||||
|
|
||||||
|
// call the tablesorter plugin
|
||||||
|
$("table").tablesorter({
|
||||||
|
// initialize zebra striping of the table
|
||||||
|
widgets: ["zebra"],
|
||||||
|
// change the default striping class names
|
||||||
|
// default is { css : ["even", "odd"] }
|
||||||
|
widgetZebra: { css: [ "normal-row", "alt-row" ] }
|
||||||
|
});
|
||||||
|
|
||||||
|
});</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="banner">
|
||||||
|
<h1>table<em>sorter</em></h1>
|
||||||
|
<h2>Zebra Stripe Widget</h2>
|
||||||
|
<h3>Flexible client-side table sorting</h3>
|
||||||
|
<a href="index.html">Back to documentation</a>
|
||||||
|
</div>
|
||||||
|
<div id="main">
|
||||||
|
<h1>Demo</h1>
|
||||||
|
<div id="demo"><table class="tablesorter">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>First Name</th>
|
||||||
|
<th>Last Name</th>
|
||||||
|
<th>Age</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Discount</th>
|
||||||
|
<th>Date</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Peter</td>
|
||||||
|
<td>Parker</td>
|
||||||
|
<td>28</td>
|
||||||
|
<td>$9.99</td>
|
||||||
|
<td>20%</td>
|
||||||
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>John</td>
|
||||||
|
<td>Hood</td>
|
||||||
|
<td>33</td>
|
||||||
|
<td>$19.99</td>
|
||||||
|
<td>25%</td>
|
||||||
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Clark</td>
|
||||||
|
<td>Kent</td>
|
||||||
|
<td>18</td>
|
||||||
|
<td>$15.89</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 12, 2003 11:14 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Almighty</td>
|
||||||
|
<td>45</td>
|
||||||
|
<td>$153.19</td>
|
||||||
|
<td>44%</td>
|
||||||
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bruce</td>
|
||||||
|
<td>Evans</td>
|
||||||
|
<td>22</td>
|
||||||
|
<td>$13.19</td>
|
||||||
|
<td>11%</td>
|
||||||
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
|
||||||
|
<h1>Javascript</h1>
|
||||||
|
<div id="javascript">
|
||||||
|
<pre class="js"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>CSS</h1>
|
||||||
|
<div id="css">
|
||||||
|
<pre class="css"></pre>
|
||||||
|
</div>
|
||||||
|
<h1>HTML</h1>
|
||||||
|
<div id="html">
|
||||||
|
<pre class="html"></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="next-up">
|
||||||
|
<hr />
|
||||||
|
Next up: <a href="example-options-headers.html">Basic: Disable header using options ››</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
803
docs/index.html
803
docs/index.html
@ -1,28 +1,30 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
|
|
||||||
<head>
|
<head>
|
||||||
<title>jQuery plugin: Tablesorter 2.0</title>
|
<meta charset="utf-8">
|
||||||
|
<title>jQuery plugin: Tablesorter 2.0</title>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script type="text/javascript" src="js/jquery-latest.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
|
||||||
|
|
||||||
<!-- Demo stuff -->
|
<!-- Demo stuff -->
|
||||||
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
|
<link rel="stylesheet" href="css/jq.css">
|
||||||
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script>
|
<script src="js/chili/jquery.chili-2.2.js"></script>
|
||||||
<script type="text/javascript" src="js/docs.js"></script>
|
<script src="js/chili/recipes.js"></script>
|
||||||
|
<script src="js/docs.js"></script>
|
||||||
|
|
||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/blue/style.css" type="text/css" media="print, projection, screen" />
|
<link href="../css/blue/style.css" rel="stylesheet">
|
||||||
<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#tablesorter-demo").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});
|
$("#tablesorter-demo").tablesorter({sortList:[[0,0],[2,1]],widgets:['zebra']});
|
||||||
$("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter: false}, 4:{sorter: false}}});
|
$("#options").tablesorter({sortList:[[0,0]],headers:{3:{sorter:false},4:{sorter:false},widthFixed:true}});
|
||||||
|
$("#methods,#events").tablesorter({sortList: [[0,0]],headers:{1:{sorter:false},2:{sorter:false},widthFixed:true}});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body id="root">
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<h1>table<em>sorter</em></h1>
|
<h1>table<em>sorter</em></h1>
|
||||||
<h2>Documentation</h2>
|
<h2>Documentation</h2>
|
||||||
@ -32,10 +34,9 @@
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="digg">
|
<div class="digg">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>Author:</strong> <a class="external" href="http://lovepeacenukes.com">Christian Bach</a><br />
|
<strong>Author:</strong> <a class="external" href="http://lovepeacenukes.com">Christian Bach</a><br>
|
||||||
<strong>Version:</strong> 2.0.6 (<a href="../changelog">changelog</a>)<br />
|
<strong>Version:</strong> 2.0.7 (<a href="../changelog.markdown">changelog</a>)<br>
|
||||||
<strong>Licence:</strong>
|
<strong>Licence:</strong>
|
||||||
Dual licensed under <a class="external" href="http://www.opensource.org/licenses/mit-license.php">MIT</a>
|
Dual licensed under <a class="external" href="http://www.opensource.org/licenses/mit-license.php">MIT</a>
|
||||||
or <a class="external" href="http://www.opensource.org/licenses/gpl-license.php">GPL</a> licenses.
|
or <a class="external" href="http://www.opensource.org/licenses/gpl-license.php">GPL</a> licenses.
|
||||||
@ -49,7 +50,7 @@
|
|||||||
<em>Helping out!</em> If you like tablesorter and you're feeling generous, take a look at my <a class="external" href="http://www.amazon.com/gp/registry/wishlist/3VAOWCL63NEA6/ref=wl_web/">Amazon Wish List</a> or make a donation.
|
<em>Helping out!</em> If you like tablesorter and you're feeling generous, take a look at my <a class="external" href="http://www.amazon.com/gp/registry/wishlist/3VAOWCL63NEA6/ref=wl_web/">Amazon Wish List</a> or make a donation.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||||
<input type="hidden" name="cmd" value="_donations">
|
<input type="hidden" name="cmd" value="_donations">
|
||||||
<input type="hidden" name="business" value="christian.bach@polyester.se">
|
<input type="hidden" name="business" value="christian.bach@polyester.se">
|
||||||
<input type="hidden" name="lc" value="US">
|
<input type="hidden" name="lc" value="US">
|
||||||
@ -59,7 +60,7 @@
|
|||||||
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
||||||
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||||
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p>Comments and love letters can be sent to: <span class="email">christian at tablesorter dot com</span>.</p>
|
<p>Comments and love letters can be sent to: <span class="email">christian at tablesorter dot com</span>.</p>
|
||||||
|
|
||||||
@ -80,18 +81,16 @@
|
|||||||
</form>
|
</form>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="Contents"></a>
|
<a name="Contents"></a>
|
||||||
<h1>Contents</h1>
|
<h1>Contents</h1>
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="#Introduction">Introduction</a></li>
|
<li><a href="#Introduction">Introduction</a></li>
|
||||||
<li><a href="#Demo">Demo</a></li>
|
<li><a href="#Demo">Demo</a></li>
|
||||||
<li><a href="#Getting-Started">Getting started</a></li>
|
<li><a href="#Getting-Started">Getting started</a></li>
|
||||||
|
|
||||||
<li><a href="#Examples">Examples</a></li>
|
<li><a href="#Examples">Examples</a></li>
|
||||||
|
|
||||||
<li><a href="#Configuration">Configuration</a></li>
|
<li><a href="#Configuration">Configuration</a></li>
|
||||||
|
<li><a href="#Methods">Methods</a> <span class="tip"><em>New!</em></span></li>
|
||||||
|
<li><a href="#Events">Events</a> <span class="tip"><em>New!</em></span></li>
|
||||||
<li><a href="#Download">Download</a></li>
|
<li><a href="#Download">Download</a></li>
|
||||||
<li><a href="#Compatibility">Compatibility</a></li>
|
<li><a href="#Compatibility">Compatibility</a></li>
|
||||||
<li><a href="#Support">Support</a></li>
|
<li><a href="#Support">Support</a></li>
|
||||||
@ -123,9 +122,10 @@
|
|||||||
<a name="Demo"></a>
|
<a name="Demo"></a>
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
|
|
||||||
<table id="tablesorter-demo" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
|
<table id="tablesorter-demo" class="tablesorter" border="0" cellpadding="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Account #</th>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
<th>Last Name</th>
|
<th>Last Name</th>
|
||||||
<th>Age</th>
|
<th>Age</th>
|
||||||
@ -137,6 +137,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A42b</td>
|
||||||
<td>Peter</td>
|
<td>Peter</td>
|
||||||
<td>Parker</td>
|
<td>Parker</td>
|
||||||
<td>28</td>
|
<td>28</td>
|
||||||
@ -146,6 +147,7 @@
|
|||||||
<td>Jul 6, 2006 8:14 AM</td>
|
<td>Jul 6, 2006 8:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A255</td>
|
||||||
<td>John</td>
|
<td>John</td>
|
||||||
<td>Hood</td>
|
<td>Hood</td>
|
||||||
<td>33</td>
|
<td>33</td>
|
||||||
@ -155,6 +157,7 @@
|
|||||||
<td>Dec 10, 2002 5:14 AM</td>
|
<td>Dec 10, 2002 5:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A33</td>
|
||||||
<td>Clark</td>
|
<td>Clark</td>
|
||||||
<td>Kent</td>
|
<td>Kent</td>
|
||||||
<td>18</td>
|
<td>18</td>
|
||||||
@ -164,6 +167,7 @@
|
|||||||
<td>Jan 12, 2003 11:14 AM</td>
|
<td>Jan 12, 2003 11:14 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A1</td>
|
||||||
<td>Bruce</td>
|
<td>Bruce</td>
|
||||||
<td>Almighty</td>
|
<td>Almighty</td>
|
||||||
<td>45</td>
|
<td>45</td>
|
||||||
@ -173,6 +177,7 @@
|
|||||||
<td>Jan 18, 2001 9:12 AM</td>
|
<td>Jan 18, 2001 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A102</td>
|
||||||
<td>Bruce</td>
|
<td>Bruce</td>
|
||||||
<td>Evans</td>
|
<td>Evans</td>
|
||||||
<td>22</td>
|
<td>22</td>
|
||||||
@ -182,6 +187,7 @@
|
|||||||
<td>Jan 18, 2007 9:12 AM</td>
|
<td>Jan 18, 2007 9:12 AM</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>A42a</td>
|
||||||
<td>Bruce</td>
|
<td>Bruce</td>
|
||||||
<td>Evans</td>
|
<td>Evans</td>
|
||||||
<td>22</td>
|
<td>22</td>
|
||||||
@ -202,20 +208,17 @@
|
|||||||
<h1>Getting started</h1>
|
<h1>Getting started</h1>
|
||||||
<p>
|
<p>
|
||||||
To use the tablesorter plugin, include the <a class="external" href="http://jquery.com">jQuery</a>
|
To use the tablesorter plugin, include the <a class="external" href="http://jquery.com">jQuery</a>
|
||||||
library and the tablesorter plugin inside the <code><head></code> tag
|
library and the tablesorter plugin inside the <code class="hilight"><head></code> tag
|
||||||
of your HTML document:
|
of your HTML document:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="javascript">
|
<pre class="html"><script type="text/javascript" src="/path/to/jquery-latest.js"></script>
|
||||||
<script type="text/javascript" src="/path/to/jquery-latest.js"></script>
|
<script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script></pre>
|
||||||
<script type="text/javascript" src="/path/to/jquery.tablesorter.js"></script>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<p>tablesorter works on standard HTML tables. You must include THEAD and TBODY tags:</p>
|
<p>tablesorter works on standard HTML tables. You must include THEAD and TBODY tags:</p>
|
||||||
|
|
||||||
<pre class="html">
|
<pre class="html"><table id="myTable" class="tablesorter">
|
||||||
<table id="myTable" class="tablesorter">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Last Name</th>
|
<th>Last Name</th>
|
||||||
@ -259,8 +262,7 @@
|
|||||||
|
|
||||||
<p>Start by telling tablesorter to sort your table when the document is loaded:</p>
|
<p>Start by telling tablesorter to sort your table when the document is loaded:</p>
|
||||||
|
|
||||||
<pre class="javascript">
|
<pre class="js">$(function(){
|
||||||
$(function(){
|
|
||||||
$("#myTable").tablesorter();
|
$("#myTable").tablesorter();
|
||||||
});</pre>
|
});</pre>
|
||||||
|
|
||||||
@ -270,8 +272,7 @@ $(function(){
|
|||||||
tablesorter to sort on the first and second column in ascending order.
|
tablesorter to sort on the first and second column in ascending order.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="javascript">
|
<pre class="js">$(function(){
|
||||||
$(function(){
|
|
||||||
$("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} );
|
$("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} );
|
||||||
});</pre>
|
});</pre>
|
||||||
|
|
||||||
@ -288,13 +289,17 @@ $(function(){
|
|||||||
|
|
||||||
<strong>Basic</strong>
|
<strong>Basic</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-option-sort-list.html">Set a initial sorting order using options</a></li>
|
<li><a href="example-option-sort-list.html">Set an initial sorting order using options</a></li>
|
||||||
<li><a href="example-option-digits.html">Dealing with digits!</a></li>
|
|
||||||
<li><a href="example-options-headers.html">Disable header using options</a></li>
|
|
||||||
<li><a href="example-trigger-sort.html">Sort table using a link outside the table</a></li>
|
<li><a href="example-trigger-sort.html">Sort table using a link outside the table</a></li>
|
||||||
|
<li><a href="example-child-rows.html">How to add rows that sort with their parent row</a></li>
|
||||||
<li><a href="example-option-sort-force.html">Force a default sorting order</a></li>
|
<li><a href="example-option-sort-force.html">Force a default sorting order</a></li>
|
||||||
<li><a href="example-option-sort-key.html">Change the default multi-sorting key</a></li>
|
<li><a href="example-option-sort-append.html">Append a sort to the selected sorting order</a></li>
|
||||||
|
<li><a href="example-option-digits.html">Dealing with digits!</a></li>
|
||||||
<li><a href="example-option-sort-order.html">Direction of initial sort</a></li>
|
<li><a href="example-option-sort-order.html">Direction of initial sort</a></li>
|
||||||
|
<li><a href="example-apply-widget.html">Applying widgets</a></li>
|
||||||
|
<li><a href="example-zebra.html">Applying the zebra stripe widget</a></li>
|
||||||
|
<li><a href="example-options-headers.html">Disable header using options</a></li>
|
||||||
|
<li><a href="example-option-sort-key.html">Change the default multi-sorting key</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<strong>Metadata - setting inline options</strong>
|
<strong>Metadata - setting inline options</strong>
|
||||||
<ul>
|
<ul>
|
||||||
@ -305,13 +310,14 @@ $(function(){
|
|||||||
|
|
||||||
<strong>Advanced</strong>
|
<strong>Advanced</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-triggers.html">Triggers sortEnd and sortStart(Displaying sorting progress)</a></li>
|
<li><a href="example-triggers.html">Triggers sortEnd and sortStart (Displaying sorting progress)</a></li>
|
||||||
<li><a href="example-ajax.html">Appending table data with ajax</a></li>
|
|
||||||
<li><a href="example-empty-table.html">Initializing tablesorter on a empty table</a></li>
|
<li><a href="example-empty-table.html">Initializing tablesorter on a empty table</a></li>
|
||||||
|
<li><a href="example-ajax.html">Appending table data with ajax</a></li>
|
||||||
<li><a href="example-update-cell.html">Update the table after cell content has changed</a></li>
|
<li><a href="example-update-cell.html">Update the table after cell content has changed</a></li>
|
||||||
<li><a href="example-option-text-extraction.html">Dealing with markup inside cells</a></li>
|
<li><a href="example-option-text-extraction.html">Dealing with markup inside cells (textExtraction function)</a></li>
|
||||||
|
<li><a href="example-option-render-header.html">Modify how the header is rendered to allow for custom styling</a></li>
|
||||||
<li><a href="example-extending-defaults.html">Extending default options</a></li>
|
<li><a href="example-extending-defaults.html">Extending default options</a></li>
|
||||||
<li><a href="example-option-debug.html">Enableing debug mode</a></li>
|
<li><a href="example-option-debug.html">Enabling debug mode</a></li>
|
||||||
<li><a href="example-parsers.html">Parser, writing your own</a></li>
|
<li><a href="example-parsers.html">Parser, writing your own</a></li>
|
||||||
<li><a href="example-widgets.html">Widgets, writing your own</a></li>
|
<li><a href="example-widgets.html">Widgets, writing your own</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -324,11 +330,12 @@ $(function(){
|
|||||||
<a name="Configuration"></a>
|
<a name="Configuration"></a>
|
||||||
<h1>Configuration</h1>
|
<h1>Configuration</h1>
|
||||||
|
|
||||||
<p>
|
<p class="tip">
|
||||||
tablesorter has many options you can pass in at initialization to achieve different effects:
|
tablesorter has many options you can pass in at initialization to achieve different effects<br>
|
||||||
|
<em>TIP!</em> Click on the link in the property column to reveal full details (or <a href="#" class="toggleAll">toggle</a>|<a href="#" class="showAll">show</a>|<a href="#" class="hideAll">hide</a> all)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table id="options" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
|
<table id="options" class="tablesorter" border="0" cellpadding="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Property</th>
|
<th>Property</th>
|
||||||
@ -339,86 +346,105 @@ $(function(){
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td>sortList</td>
|
|
||||||
<td>Array</td>
|
|
||||||
<td>null</td>
|
|
||||||
<td>An array of instructions for per-column sorting and direction in the format: <code>[[columnIndex, sortDirection], ... ]</code> where columnIndex is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code>[[0,0],[1,0]]</code></td>
|
|
||||||
<td><a href="example-option-sort-list.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>sortInitialOrder</td>
|
|
||||||
<td>String</td>
|
|
||||||
<td>asc</td>
|
|
||||||
<td>When clicking the header for the first time, the direction it sorts. Valid arguments are "asc" for Ascending or "desc" for Descending.</td>
|
|
||||||
<td><a href="example-option-sort-order.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>sortMultiSortKey</td>
|
|
||||||
<td>String</td>
|
|
||||||
<td>shiftKey</td>
|
|
||||||
<td>The key used to select more than one column for multi-column sorting. Defaults to the shift key. Other options might be ctrlKey, altKey. <br/>Reference: <a class="external" href="http://developer.mozilla.org/en/docs/DOM:event#Properties">http://developer.mozilla.org/en/docs/DOM:event#Properties</a></td>
|
|
||||||
<td><a href="example-option-sort-key.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>textExtraction</td>
|
|
||||||
<td>String Or Function</td>
|
|
||||||
<td>simple</td>
|
|
||||||
<td>
|
|
||||||
Defines which method is used to extract data from a table cell for sorting.
|
|
||||||
Built-in options include "simple" and "complex". Use complex if you have data marked up
|
|
||||||
inside of a table cell like: <code><td><strong><em>123 Main Street</em></strong></td></code>.
|
|
||||||
Complex can be slow in large tables so consider writing your own text extraction function "myTextExtraction" which you define like:
|
|
||||||
<pre class="javascript">var myTextExtraction = function(node){
|
|
||||||
// extract data from markup and return it
|
|
||||||
return node.childNodes[0].childNodes[0].innerHTML;
|
|
||||||
}
|
|
||||||
$(function(){
|
|
||||||
$("#myTable").tableSorter( {textExtraction: myTextExtraction} );
|
|
||||||
});</pre>
|
|
||||||
|
|
||||||
tablesorter will pass a jQuery object containing the contents of the current cell for you to parse and return. Thanks to Josh Nathanson for the examples.
|
<tr id="cancelselection">
|
||||||
</td>
|
|
||||||
<td><a href="example-option-text-extraction.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>headers</td>
|
|
||||||
<td>Object</td>
|
|
||||||
<td>null</td>
|
|
||||||
<td>
|
|
||||||
An object of instructions for per-column controls in the format: <code>headers: { 0: { option: setting }, ... }</code> For example, to disable
|
|
||||||
sorting on the first two columns of a table: <code>headers: { 0: { sorter: false}, 1: {sorter: false} }</code>
|
|
||||||
</td>
|
|
||||||
<td><a href="example-options-headers.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>sortForce</td>
|
|
||||||
<td>Array</td>
|
|
||||||
<td>null</td>
|
|
||||||
<td>Use to add an additional forced sort that will be appended to the dynamic selections by the user. For example, can be used to sort people alphabetically after some other user-selected sort that results in rows with the same value like dates or money due. It can help prevent data from appearing as though it has a random secondary sort.</td>
|
|
||||||
<td><a href="example-option-sort-force.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>widthFixed</td>
|
|
||||||
<td>Boolean</td>
|
|
||||||
<td>false</td>
|
|
||||||
<td>Indicates if tablesorter should apply fixed widths to the table columns. This is useful for the Pager companion. Requires the <a href="#Download-Addons">jQuery dimension plugin</a> to work.</a></td>
|
|
||||||
<td><a href="example-pager.html">Example</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>cancelSelection</td>
|
<td>cancelSelection</td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td>true</td>
|
<td>true</td>
|
||||||
<td>Indicates if tablesorter should disable selection of text in the table header (TH). Makes header behave more like a button.</td>
|
<td>Indicates if tablesorter should disable selection of text in the table header (TH). Makes header behave more like a button.</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>cssHeader</td>
|
<tr id="cssasc">
|
||||||
|
<td><a href="#" class="toggle2">cssAsc</a></td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"headerSortUp"</td>
|
||||||
|
<td>The CSS style used to style the header when sorting ascending. Example from the blue skin:
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="css">th.headerSortUp {
|
||||||
|
background-image: url(../img/small_asc.gif);
|
||||||
|
background-color: #3399FF;
|
||||||
|
}</pre></div>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="csschildrow">
|
||||||
|
<td><a class="toggle" href="#">cssChildRow</a></td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"expand-child"</td>
|
||||||
|
<td>Add this css class to a child row that should always be attached to its parent. Click on the "cssChildRow" link to toggle the view on the attached child row.</td>
|
||||||
|
<td><a href="example-child-rows.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child">
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>This is an entirely new row, but attached to the row above while sorting<br>
|
||||||
|
cssChildRow Example HTML:
|
||||||
|
<pre class="html">
|
||||||
|
<table width="100%" border="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Item #</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Available</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>12345</td>
|
||||||
|
<td>Toy Car</td>
|
||||||
|
<td>5</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child"> <!-- this row will remain attached to the above row, and not sort separately -->
|
||||||
|
<td colspan="3">
|
||||||
|
It's a toy car!
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>23456</td>
|
||||||
|
<td>Toy Plane</td>
|
||||||
|
<td>2</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child"> <!-- this row will remain attached to the above row, and not sort separately -->
|
||||||
|
<td colspan="3">
|
||||||
|
It's a toy plane!
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="expand-child"> <!-- this row will remain attached to the above two rows, and not sort separately -->
|
||||||
|
<td colspan="3">
|
||||||
|
and it flies!
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</pre>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="cssdesc">
|
||||||
|
<td><a href="#" class="toggle2">cssDesc</a></td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"headerSortDown"</td>
|
||||||
|
<td>The CSS style used to style the header when sorting descending. Example from the blue skin:
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="css">th.headerSortDown {
|
||||||
|
background-image: url(../img/small_desc.gif);
|
||||||
|
background-color: #3399FF;
|
||||||
|
}</pre></div>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="cssheader">
|
||||||
|
<td><a href="#" class="toggle2">cssHeader</a></td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td>"header"</td>
|
<td>"header"</td>
|
||||||
<td>The CSS style used to style the header in its unsorted state. Example from the blue skin:
|
<td>The CSS style used to style the header in its unsorted state. Example from the blue skin:
|
||||||
<pre class="css">
|
<div class="collapsible">
|
||||||
th.header {
|
<pre class="css">th.header {
|
||||||
background-image: url(../img/small.gif);
|
background-image: url(../img/small.gif);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -427,39 +453,28 @@ th.header {
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
border-right: 1px solid #dad9c7;
|
border-right: 1px solid #dad9c7;
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
}</pre>
|
}</pre></div>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>cssAsc</td>
|
<tr id="dateformat">
|
||||||
|
<td><a href="#" class="toggle2">dateFormat</a></td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td>"headerSortUp"</td>
|
<td>"us"</td>
|
||||||
<td>The CSS style used to style the header when sorting ascending. Example from the blue skin:
|
<td>Set the date format. Here are the available options:
|
||||||
<pre class="css">
|
<div class="collapsible">
|
||||||
th.headerSortUp {
|
<ul>
|
||||||
background-image: url(../img/small_asc.gif);
|
<li><code class="hilight">"us"</code> (default) - "mm-dd-yyyy" or "mm/dd/yyyy"</li>
|
||||||
background-color: #3399FF;
|
<li><code class="hilight">"uk"</code> - "dd-mm-yyyy" or "dd/mm/yyyy"</li>
|
||||||
}
|
<li><code class="hilight">"dd/mm/yy"</code> or <code class="hilight">"dd-mm-yy"</code> - Sort by short year (it appears to sort by day first, not the year)</li>
|
||||||
</pre>
|
</ul>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>cssDesc</td>
|
<tr id="debug">
|
||||||
<td>String</td>
|
|
||||||
<td>"headerSortDown"</td>
|
|
||||||
<td>The CSS style used to style the header when sorting descending. Example from the blue skin:
|
|
||||||
<pre class="css">
|
|
||||||
th.headerSortDown {
|
|
||||||
background-image: url(../img/small_desc.gif);
|
|
||||||
background-color: #3399FF;
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>debug</td>
|
<td>debug</td>
|
||||||
<td>Boolean</td>
|
<td>Boolean</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
@ -468,12 +483,499 @@ th.headerSortDown {
|
|||||||
</td>
|
</td>
|
||||||
<td><a href="example-option-debug.html">Example</a></td>
|
<td><a href="example-option-debug.html">Example</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="headerlist">
|
||||||
|
<td>headerList</td>
|
||||||
|
<td>Array</td>
|
||||||
|
<td>[] (empty array)</td>
|
||||||
|
<td>Internal list of each header element as selected using jQuery selectors in the <a href="#selectorheaders"><code class="hilight">selectorHeaders</code></a> option. Not really useful for normal usage.</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="headers">
|
||||||
|
<td><a href="#" class="toggle2">headers</a></td>
|
||||||
|
<td>Object</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>
|
||||||
|
An object of instructions for per-column controls in the format: <code class="hilight">headers: { 0: { option: setting }, ... }</code>
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
For example, to disable sorting on the first two columns of a table: <code class="hilight">headers: { 0: { sorter: false}, 1: {sorter: false} }</code>.<br>
|
||||||
|
<br>
|
||||||
|
The plugin attempts to detect the type of data that is contained in a column, but if it can't figure it out then it defaults to alphanumeric. You can easily override this by setting the header argument (or column parser).
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
$("table").tablesorter({
|
||||||
|
headers: {
|
||||||
|
0: { sorter: false }, // disable first column
|
||||||
|
1: { sorter: "digit" }, // sort second column numerically
|
||||||
|
4: { sorter: "shortDate" } // sort the fifth column by date (e.g. mm/dd/yyyy if the date format is "us")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-options-headers.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="onrenderheader">
|
||||||
|
<td><a href="#" class="toggle2">onRenderHeader</a></td>
|
||||||
|
<td>Function</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>
|
||||||
|
This function is called when classes are added to the TH tags. You can use this to modify the HTML in each header tag for additional styling.
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
In versions 2.0.6+, all TH text is wrapped in a span by default. In the example below, the header cell (TH) span is given a class name (<a href="http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm">source</a>).
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
$("table").tablesorter({
|
||||||
|
onRenderHeader: function (){
|
||||||
|
$(this).find('span').addClass('roundedCorners');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});</pre>and you'll end up with this HTML (only the thead is shown)<pre class="html"><thead>
|
||||||
|
<tr>
|
||||||
|
<th class="header"><span class="roundedCorners">Column 1</span></th>
|
||||||
|
<th class="header"><span class="roundedCorners">Column 2</span></th>
|
||||||
|
</tr>
|
||||||
|
</thead></pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-option-render-header.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="parsers">
|
||||||
|
<td><a href="#" class="toggle2">parsers</a></td>
|
||||||
|
<td>Object</td>
|
||||||
|
<td>{}</td>
|
||||||
|
<td>Internal list of all of the parsers. Here is a complete list of default parsers:
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
<table class="info"><tbody>
|
||||||
|
<tr><th><code class="hilight">sorter: false</code></th><td>disable sort for this column.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "text"</code></th><td>Sort alpha-numerically.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "digit"</code></th><td>Sort numerically.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "currency"</code></th><td>Sort by currency value (supports "£$€").</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "ipAddress"</code></th><td>Sort by IP Address.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "url"</code></th><td>Sort by url.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "isoDate"</code></th><td>Sort by ISO date (YYYY-MM-DD or YYYY/MM/DD).</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "percent"</code></th><td>Sort by percent.</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "usLongDate"</code></th><td>Sort by date (U.S. Standard, e.g. Jan 18, 2001 9:12 AM).</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "shortDate"</code></th><td>Sort by a shorten date (see <a href="#dateformat"><code class="hilight">"dateFormat"</code></a>).</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "time"</code></th><td>Sort by time (23:59 or 12:59 pm).</td></tr>
|
||||||
|
<tr><th><code class="hilight">sorter: "metadata"</code></th><td>Sort by the sorter value in the metadata - requires the metadata plugin.</td></tr>
|
||||||
|
</tbody></table><br>
|
||||||
|
Check out the <a href="#headers"><code class="hilight">headers</code></a> option to see how to use these parsers in your table.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="selectorheaders">
|
||||||
|
<td>selectorHeaders</td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"thead th"</td>
|
||||||
|
<td>jQuery selectors used to find the header cells. You can change this, but the table will still need the required thead and tbody before this plugin will work properly.</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortforce">
|
||||||
|
<td><a href="#" class="toggle2">sortForce</a></td>
|
||||||
|
<td>Array</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>Use to add an additional forced sort that is <strong>prepended</strong> to <code class="hilight">sortList</code>.
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
For example, <code class="hilight">sortForce: [[0,0]]</code> will sort the first column in ascending order. After the forced sort, the user selected column(s), or during initialzation, the sorting order defined in the sortList will follow. And lastly, the sort defined in the <a href="#sortappend"><code class="hilight">sortAppend</code></a> option will be applied. More explicitly:<br>
|
||||||
|
<br>
|
||||||
|
There are three options to determine the sort order and this is the order of priority:
|
||||||
|
<ol>
|
||||||
|
<li><a href="#sortforce"><code class="hilight">sortForce</code></a> forces the user to have this/these column(s) sorted first (null by default).</li>
|
||||||
|
<li><a href="#sortlist"><code class="hilight">SortList</code></a> is the initial sort order of the columns.</li>
|
||||||
|
<li><a href="#sortappend"><code class="hilight">SortAppend</code></a> is the default sort that is added to the end of the users sort selection (null by default).</li>
|
||||||
|
</ol>
|
||||||
|
The value of these sort options is an array of arrays and can include one or more columns. The format is an array of instructions for per-column sorting and direction in the format: <code class="hilight">[[columnIndex, sortDirection], ... ]</code> where <code class="hilight">columnIndex</code> is a zero-based index for your columns left-to-right and <code class="hilight">sortDirection</code> is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code class="hilight">[[0,0],[1,0]]</code>.
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
$("table").tablesorter({
|
||||||
|
sortForce : [[0,0]], // Always sort first column first
|
||||||
|
sortList : [[1,0], [2,0]], // initial sort columns (2nd and 3rd)
|
||||||
|
sortAppend : [[3,0]] // Always add this sort on the end (4th column)
|
||||||
|
});
|
||||||
|
});</pre></td>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-option-sort-force.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortlist">
|
||||||
|
<td><a href="#" class="toggle2">sortList</a></td>
|
||||||
|
<td>Array</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>Use to add an initial sort to the table.
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
The value contains an array of instructions for per-column sorting and direction in the format: <code class="hilight">[[columnIndex, sortDirection], ... ]</code> where columnIndex is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code class="hilight">[[0,0],[1,0]]</code>. Please see <a href="#sortforce"><code class="hilight">sortForce</code></a> for more details on other sort order options.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-option-sort-list.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortappend">
|
||||||
|
<td><a href="#" class="toggle2">sortAppend</a></td>
|
||||||
|
<td>Array</td>
|
||||||
|
<td>null</td>
|
||||||
|
<td>Use to add an additional forced sort that will be appended to the dynamic selections by the user.
|
||||||
|
<div class="collapsible">
|
||||||
|
<br>
|
||||||
|
For example, can be used to sort people alphabetically after some other user-selected sort that results in rows with the same value like dates or money due. It can help prevent data from appearing as though it has a random secondary sort.<br>
|
||||||
|
<br>
|
||||||
|
The value contains an array of instructions for per-column sorting and direction in the format: <code class="hilight">[[columnIndex, sortDirection], ... ]</code> where <code class="hilight">columnIndex</code> is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: <code class="hilight">[[0,0],[1,0]]</code>. Please see <a href="#sortforce"><code class="hilight">sortForce</code></a> for more details on other sort order options.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-option-sort-append.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortinitialorder">
|
||||||
|
<td>sortInitialOrder</td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"asc"</td>
|
||||||
|
<td>When clicking the header for the first time, the direction it sorts. Valid arguments are <code class="hilight">"asc"</code> for Ascending or <code class="hilight">"desc"</code> for Descending.</td>
|
||||||
|
<td><a href="example-option-sort-order.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortlocalecompare">
|
||||||
|
<td>sortLocaleCompare</td>
|
||||||
|
<td>Boolean</td>
|
||||||
|
<td>false</td>
|
||||||
|
<td>
|
||||||
|
Boolean flag indicating whenever to use javascript <code class="hilight">String.localeCampare</code> method or not. This is only used when comparing text strings.<br>
|
||||||
|
In Tablesorter version 2.0.6+, the default sort was replaced with an alpha-numeric sort. To over-ride this behaviour, set this <code class="hilight">sortLocaleCompare</code> to <code class="hilight">true</code>.
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortmultisortkey">
|
||||||
|
<td>sortMultiSortKey</td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>"shiftKey"</td>
|
||||||
|
<td>The key used to select more than one column for multi-column sorting. Defaults to the shift key. The other options are <code class="hilight">"ctrlKey"</code> or <code class="hilight">"altKey"</code>. <br>Reference: <a class="external" href="http://developer.mozilla.org/en/docs/DOM:event#Properties">http://developer.mozilla.org/en/docs/DOM:event#Properties</a></td>
|
||||||
|
<td><a href="example-option-sort-key.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="textextraction">
|
||||||
|
<td><a href="#" class="toggle2">textExtraction</a></td>
|
||||||
|
<td>String Or Function</td>
|
||||||
|
<td>"simple"</td>
|
||||||
|
<td>Defines which method is used to extract data from a table cell for sorting.
|
||||||
|
Built-in options include <code class="hilight">"simple"</code> and <code class="hilight">"complex"</code>. Use complex if you have data marked up
|
||||||
|
inside of a table cell like: <code class="hilight"><td><strong><em>123 Main Street</em></strong></td></code>.
|
||||||
|
<div class="collapsible">
|
||||||
|
Complex can be slow in large tables so consider writing your own text extraction function "myTextExtraction" which you define like:
|
||||||
|
<pre class="js">var myTextExtraction = function(node){
|
||||||
|
// extract data from markup and return it
|
||||||
|
// originally: return node.childNodes[0].childNodes[0].innerHTML;
|
||||||
|
return $(node).text();
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
$("#myTable").tableSorter( { textExtraction: myTextExtraction } );
|
||||||
|
});</pre>
|
||||||
|
tablesorter will pass a jQuery object containing the contents of the current cell for you to parse and return. Thanks to Josh Nathanson for the examples. Updated to a jQuery example by Rob G (Mottie).<br>
|
||||||
|
<br>
|
||||||
|
Now if the text you are finding in the script above is say a number, then just include the <a href="#headers"><code class="hilight">headers</code></a> sorter option to specify how to sort it. Also in this example, we will specify that the special textExtraction code is only needed for the second column ("1" because we are using a zero-based index). All other columns will ignore this textExtraction function.
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
$("table").tablesorter({
|
||||||
|
textExtraction: {
|
||||||
|
1: function(node) {
|
||||||
|
return $(node).find("span:last").text();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
1: { sorter : "digit" }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-option-text-extraction.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="widgets">
|
||||||
|
<td>widgets</td>
|
||||||
|
<td>Array</td>
|
||||||
|
<td>[] (empty array)</td>
|
||||||
|
<td>
|
||||||
|
Initialize widgets using this option ( e.g. <code class="hilight">widgets : ['zebra']</code>, or custom widgets <code class="hilight">widgets: ['zebra', 'myCustomWidget'];</code>, see <a href="example-widgets.html">this demo</a> on how to write your own custom widget ).
|
||||||
|
</td>
|
||||||
|
<td><a href="example-zebra.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="widgetzebra">
|
||||||
|
<td><a href="#" class="toggle2">widgetZebra</a></td>
|
||||||
|
<td>Object with Array</td>
|
||||||
|
<td>{<br> css :<br> ["even", "odd"]<br>}</td>
|
||||||
|
<td>
|
||||||
|
When the zebra striping widget is initialized, it automatically applied the default class names of <code class="hilight">"even"</code> and <code class="hilight">"odd"</code>.
|
||||||
|
<div class="collapsible">
|
||||||
|
Use the <a href="#widgetzebra"><code class="hilight">"widgetZebra"</code></a> option to change the css class name as follows:
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
$("table").tablesorter({
|
||||||
|
widgets: ["zebra"], // initialize zebra striping of the table
|
||||||
|
widgetZebra: { css: [ "normal-row", "alt-row" ] }
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-zebra.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="widthfixed">
|
||||||
|
<td>widthFixed</td>
|
||||||
|
<td>Boolean</td>
|
||||||
|
<td>false</td>
|
||||||
|
<td>Indicates if tablesorter should apply fixed widths to the table columns. This is useful for the Pager companion.
|
||||||
|
<br><br><del>Requires the <a href="#Download-Addons">jQuery dimension plugin</a> to work.</del> This is now part of the jQuery core.</a></td>
|
||||||
|
<td><a href="example-pager.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<a name="Methods"></a>
|
||||||
|
<h1>Methods</h1>
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
tablesorter has some methods available to allow updating, resorting or applying widgets to a table after it has been initialized.
|
||||||
|
<br>
|
||||||
|
<em>TIP!</em> Click on the link in the method column to reveal full details (or <a href="#" class="toggleAll">toggle</a>|<a href="#" class="showAll">show</a>|<a href="#" class="hideAll">hide</a> all):
|
||||||
|
</p>
|
||||||
|
|
||||||
<a name="Download"></a>
|
<table id="methods" class="tablesorter" border="0" cellpadding="0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Method</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Link</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr id="sorton">
|
||||||
|
<td><a href="#" class="toggle2">sorton</a></td>
|
||||||
|
<td>Use this method to sort an initialized table in the desired order.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">// Choose a new sort order
|
||||||
|
var sort = [[0,0],[2,0]];
|
||||||
|
// Note that the sort value below is inside of another array (inside another set of square brackets)
|
||||||
|
$("table").trigger("sorton", [sort]);</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-trigger-sort.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="update">
|
||||||
|
<td><a href="#" class="toggle2">update</a></td>
|
||||||
|
<td>Update the stored tablesorter data and the table.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">// Add new content
|
||||||
|
$("table tbody").append(html);
|
||||||
|
|
||||||
|
// let the plugin know that we made a update
|
||||||
|
$("table").trigger("update");
|
||||||
|
|
||||||
|
// set sorting column and direction, this will sort on the first and third column
|
||||||
|
var sorting = [[2,1],[0,0]];
|
||||||
|
$("table").trigger("sorton", [sorting]);</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-ajax.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="appendcache">
|
||||||
|
<td><a href="#" class="toggle2">appendCache</a></td>
|
||||||
|
<td>Update a table that has had its data dynamically changed; used in conjunction with "update".<br>
|
||||||
|
<div class="collapsible">
|
||||||
|
Use this method when more than just one cell like in the "updateCell" method, but you may possibly have to trigger two events: both "update" and "appendCache".<br>
|
||||||
|
<br>
|
||||||
|
Note: This is the only method the pager widget uses - the entire table is stored in the cache, but only the visible portion is actually exists in the table.
|
||||||
|
<pre class="js">// Table data was just dynamically changed (more than one cell)
|
||||||
|
$(table)
|
||||||
|
.trigger("update")
|
||||||
|
.trigger("appendCache");</pre></div>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="updatecell">
|
||||||
|
<td><a href="#" class="toggle2">updateCell</a></td>
|
||||||
|
<td>Update a table cell in the tablesorter data.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function() {
|
||||||
|
$("table").tablesorter();
|
||||||
|
|
||||||
|
$("td.discount").click(function(){
|
||||||
|
|
||||||
|
// randomize a number
|
||||||
|
var discount = '$' + Math.round(Math.random() * Math.random() * 100) + '.' + ('0' + Math.round(Math.random() * Math.random() * 100)).slice(-2);
|
||||||
|
$(this).text(discount);
|
||||||
|
|
||||||
|
// update the table, so the tablesorter plugin knows its value
|
||||||
|
$("table").trigger("updateCell",[this]);
|
||||||
|
|
||||||
|
// set sorting column and direction, this will sort on the first and third column
|
||||||
|
var sorting = [[3,1]];
|
||||||
|
$("table").trigger("sorton",[sorting]);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-update-cell.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="applywidgetid">
|
||||||
|
<td><a href="#" class="toggle2">applyWidgetId</a></td>
|
||||||
|
<td>Apply the selected widget to the table, but the widget will not continue to be applied after each sort. See the example, it's easier than describing it.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
// initialize tablesorter without the widget
|
||||||
|
$("table").tablesorter();
|
||||||
|
|
||||||
|
// click a button to apply the zebra striping
|
||||||
|
$("button").click(function(){
|
||||||
|
$('table').trigger('applyWidgetId', ['zebra']);
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-apply-widget.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="applywidgets">
|
||||||
|
<td><a href="#" class="toggle2">applyWidgets</a></td>
|
||||||
|
<td>Apply the set widgets to the table. This method can be used after a table has been initialized, but it won't work unless you update the configuration settings. See the example, it's easier than describing it.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">// Update the list of widgets to apply to the table (add or remove)
|
||||||
|
$("table").data("tablesorter").widgets = ["zebra"];
|
||||||
|
|
||||||
|
// This method applies the widget - no need to keep updating
|
||||||
|
$('table').trigger('applyWidgets');
|
||||||
|
}); </pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-apply-widget.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<a name="Events"></a>
|
||||||
|
<h1>Events</h1>
|
||||||
|
|
||||||
|
<p class="tip">
|
||||||
|
tablesorter has some methods available to allow updating, resorting or applying widgets to a table after it has been initialized.
|
||||||
|
<br>
|
||||||
|
<em>TIP!</em> Click on the link in the event column to reveal full details (or <a href="#" class="toggleAll">toggle</a>|<a href="#" class="showAll">show</a>|<a href="#" class="hideAll">hide</a> all):
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table id="events" class="tablesorter" border="0" cellpadding="0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Event</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Link</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr id="sortstart">
|
||||||
|
<td><a href="#" class="toggle2">sortStart</a></td>
|
||||||
|
<td>This event fires when tablesorter is about to start resorting the table.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
|
||||||
|
// initialize the tablesorter plugin
|
||||||
|
$("table").tablesorter();
|
||||||
|
|
||||||
|
// bind to sort events
|
||||||
|
$("table")
|
||||||
|
.bind("sortStart",function() {
|
||||||
|
$("#overlay").show();
|
||||||
|
})
|
||||||
|
.bind("sortEnd",function() {
|
||||||
|
$("#overlay").hide();
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-triggers.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="sortend">
|
||||||
|
<td><a href="#" class="toggle2">sortEnd</a></td>
|
||||||
|
<td>This event fires when tablesorter has completed resorting the table.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
|
||||||
|
// initialize the tablesorter plugin
|
||||||
|
$("table").tablesorter();
|
||||||
|
|
||||||
|
// bind to sort events
|
||||||
|
$("table")
|
||||||
|
.bind("sortStart",function() {
|
||||||
|
$("#overlay").show();
|
||||||
|
})
|
||||||
|
.bind("sortEnd",function() {
|
||||||
|
$("#overlay").hide();
|
||||||
|
});
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-triggers.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="pagerChange">
|
||||||
|
<td><a href="#" class="toggle2">pagerChange</a></td>
|
||||||
|
<td>This event fires when the pager plugin begins to render the table on the currently selected page. <span class="tip"><em>New!</em></span> in version 2.0.7.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
|
||||||
|
// initialize the sorter
|
||||||
|
$("table")
|
||||||
|
.tablesorter()
|
||||||
|
|
||||||
|
// initialize the pager plugin
|
||||||
|
.tablesorterPager({
|
||||||
|
container: $("#pager")
|
||||||
|
})
|
||||||
|
|
||||||
|
// bind to pager events
|
||||||
|
.bind('pagerChange pagerComplete', function(e,c){
|
||||||
|
// c.totalPages contains the total number of pages
|
||||||
|
$('#display').html( e.type + " event triggered, now on page " + (c.page + 1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-pager.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="pagerComplete">
|
||||||
|
<td><a href="#" class="toggle2">pagerComplete</a></td>
|
||||||
|
<td>This event fires when the pager plugin has completed its render of the table on the currently selected page. <span class="tip"><em>New!</em></span> in version 2.0.7.
|
||||||
|
<div class="collapsible">
|
||||||
|
<pre class="js">$(function(){
|
||||||
|
|
||||||
|
// initialize the sorter
|
||||||
|
$("table")
|
||||||
|
.tablesorter()
|
||||||
|
|
||||||
|
// initialize the pager plugin
|
||||||
|
.tablesorterPager({
|
||||||
|
container: $("#pager")
|
||||||
|
})
|
||||||
|
|
||||||
|
// bind to pager events
|
||||||
|
.bind('pagerChange pagerComplete', function(e,c){
|
||||||
|
// c.totalPages contains the total number of pages
|
||||||
|
$('#display').html( e.type + " event triggered, now on page " + (c.page + 1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
});</pre></div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-pager.html">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<a name="Download"></a>
|
||||||
<h1>Download</h1>
|
<h1>Download</h1>
|
||||||
|
|
||||||
<p><strong>Full release</strong> - Plugin, Documentation, Add-ons, Themes <a href="http://github.com/Mottie/tablesorter/downloads">jquery.tablesorter.zip</a></p>
|
<p><strong>Full release</strong> - Plugin, Documentation, Add-ons, Themes <a href="http://github.com/Mottie/tablesorter/downloads">jquery.tablesorter.zip</a></p>
|
||||||
@ -492,7 +994,7 @@ th.headerSortDown {
|
|||||||
<li><a class="external" href="http://plugins.jquery.com/files/jquery.metadata.2.1.zip">jQuery Metadata 2.1</a> (3,7kb <strong>Required for setting <a href="#Examples">inline options</a></strong>)</li>
|
<li><a class="external" href="http://plugins.jquery.com/files/jquery.metadata.2.1.zip">jQuery Metadata 2.1</a> (3,7kb <strong>Required for setting <a href="#Examples">inline options</a></strong>)</li>
|
||||||
<!--
|
<!--
|
||||||
<li><a class="external" href="http://dev.jquery.com/browser/trunk/plugins/dimensions/jquery.dimensions.
|
<li><a class="external" href="http://dev.jquery.com/browser/trunk/plugins/dimensions/jquery.dimensions.
|
||||||
.js?format=raw">jquery.dimensions.pack.js</a> (5,1kb, <a href="http://dean.edwards.name/packer/" class="external">packed</a>, for production. <strong>Required: for the <a href="example-pager.html">tablesorter pagination plugin</a></strong>)</li>
|
.js?format=raw">jquery.dimensions.pack.js</a> (5,1kb, <a href="http://dean.edwards.name/packer/" class="external">packed</a>, for production. <strong>Required: for the <a href="example-pager.html">tablesorter pagination plugin</a></strong>)</li>
|
||||||
-->
|
-->
|
||||||
<li><a href="../js/jquery.tablesorter.js">jquery.tablesorter.js</a> (17,7kb, for development)</li>
|
<li><a href="../js/jquery.tablesorter.js">jquery.tablesorter.js</a> (17,7kb, for development)</li>
|
||||||
<li><a href="../addons/pager/jquery.tablesorter.pager.js">jquery.tablesorter.pager.js</a> (3,6kb, <a href="example-pager.html">tablesorter pagination plugin</a>)</li>
|
<li><a href="../addons/pager/jquery.tablesorter.pager.js">jquery.tablesorter.pager.js</a> (3,6kb, <a href="example-pager.html">tablesorter pagination plugin</a>)</li>
|
||||||
@ -525,7 +1027,7 @@ th.headerSortDown {
|
|||||||
|
|
||||||
<p><a class="external" href="http://docs.jquery.com/Browser_Compatibility">jQuery Browser Compatibility</a></p>
|
<p><a class="external" href="http://docs.jquery.com/Browser_Compatibility">jQuery Browser Compatibility</a></p>
|
||||||
|
|
||||||
<a name="Support"></a>
|
<a name="Support"></a>
|
||||||
<h1>Support</h1>
|
<h1>Support</h1>
|
||||||
<p>
|
<p>
|
||||||
Support is available through the
|
Support is available through the
|
||||||
@ -541,7 +1043,8 @@ th.headerSortDown {
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Documentation written by <a class="external" href="http://www.ghidinelli.com">Brian Ghidinelli</a>,
|
Documentation written by <a class="external" href="http://www.ghidinelli.com">Brian Ghidinelli</a>,
|
||||||
based on <a class="external" href="http://malsup.com/jquery/">Mike Alsup's</a> great documention.
|
based on <a class="external" href="http://malsup.com/jquery/">Mike Alsup's</a> great documention.<br>
|
||||||
|
Missing documentation and alphanumeric sort added by <a class="external" href="https://github.com/Mottie/tablesorter">Mottie</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a class="external" href="http://ejohn.org">John Resig</a> for the fantastic <a class="external" href="http://jquery.com">jQuery</a>
|
<a class="external" href="http://ejohn.org">John Resig</a> for the fantastic <a class="external" href="http://jquery.com">jQuery</a>
|
||||||
|
@ -1,392 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
|
|
||||||
===============================================================================
|
|
||||||
Metaobjects is the jQuery metadata plugin on steroids
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/metaobjects/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
( function($) {
|
|
||||||
|
|
||||||
ChiliBook = { //implied global
|
|
||||||
|
|
||||||
version: "1.8b" // 2007-05-26
|
|
||||||
|
|
||||||
, automatic: true
|
|
||||||
, automaticSelector: "code"
|
|
||||||
|
|
||||||
, codeLanguage: function( el ) {
|
|
||||||
var recipeName = $( el ).attr( "class" );
|
|
||||||
return recipeName ? recipeName : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
, metadataSelector: "object.chili" // use an empty string for not executing
|
|
||||||
|
|
||||||
, recipeLoading: true
|
|
||||||
, recipeFolder: "" // used like: recipeFolder + recipeName + '.js'
|
|
||||||
, stylesheetLoading: true
|
|
||||||
, stylesheetFolder: "" // used like: stylesheetFolder + recipeName + '.css'
|
|
||||||
|
|
||||||
, defaultReplacement: '<span class="$0">$$</span>'
|
|
||||||
|
|
||||||
, replaceSpace: " " // use an empty string for not replacing
|
|
||||||
, replaceTab: "    " // use an empty string for not replacing
|
|
||||||
, replaceNewLine: " <br/>" // use an empty string for not replacing
|
|
||||||
|
|
||||||
, recipes: {} //repository
|
|
||||||
, queue: {} //register
|
|
||||||
|
|
||||||
//fix for IE: copy of PREformatted text strips off all html, losing newlines
|
|
||||||
, preFixCopy: document.selection && document.selection.createRange
|
|
||||||
, preContent: ""
|
|
||||||
, preElement: null
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
$.metaobjects = function( options ) {
|
|
||||||
|
|
||||||
options = $.extend( {
|
|
||||||
context: document
|
|
||||||
, clean: true
|
|
||||||
, selector: 'object.metaobject'
|
|
||||||
}, options );
|
|
||||||
|
|
||||||
function jsValue( value ) {
|
|
||||||
eval( 'value = ' + value + ";" );
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $( options.selector, options.context )
|
|
||||||
.each( function() {
|
|
||||||
|
|
||||||
var settings = { target: this.parentNode };
|
|
||||||
$( '> param[@name=metaparam]', this )
|
|
||||||
.each( function() {
|
|
||||||
$.extend( settings, jsValue( this.value ) );
|
|
||||||
} );
|
|
||||||
|
|
||||||
$( '> param', this )
|
|
||||||
.not( '[@name=metaparam]' )
|
|
||||||
.each( function() {
|
|
||||||
var name = this.name, value = jsValue( this.value );
|
|
||||||
$( settings.target )
|
|
||||||
.each( function() {
|
|
||||||
this[ name ] = value;
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
|
|
||||||
if( options.clean ) {
|
|
||||||
$( this ).remove();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.chili = function( options ) {
|
|
||||||
var book = $.extend( {}, ChiliBook, options || {} );
|
|
||||||
|
|
||||||
function cook( ingredients, recipe ) {
|
|
||||||
|
|
||||||
function prepareStep( stepName, step ) {
|
|
||||||
var exp = ( typeof step.exp == "string" ) ? step.exp : step.exp.source;
|
|
||||||
steps.push( {
|
|
||||||
stepName: stepName
|
|
||||||
, exp: "(" + exp + ")"
|
|
||||||
, length: 1 // add 1 to account for the newly added parentheses
|
|
||||||
+ (exp // count number of submatches in here
|
|
||||||
.replace( /\\./g, "%" ) // disable any escaped character
|
|
||||||
.replace( /\[.*?\]/g, "%" ) // disable any character class
|
|
||||||
.match( /\((?!\?)/g ) // match any open parenthesis, not followed by a ?
|
|
||||||
|| [] // make sure it is an empty array if there are no matches
|
|
||||||
).length // get the number of matches
|
|
||||||
, replacement: (step.replacement) ? step.replacement : book.defaultReplacement
|
|
||||||
} );
|
|
||||||
} // function prepareStep( stepName, step )
|
|
||||||
|
|
||||||
function knowHow() {
|
|
||||||
var prevLength = 0;
|
|
||||||
var exps = new Array;
|
|
||||||
for (var i = 0; i < steps.length; i++) {
|
|
||||||
var exp = steps[ i ].exp;
|
|
||||||
// adjust backreferences
|
|
||||||
exp = exp.replace( /\\\\|\\(\d+)/g, function( m, aNum ) {
|
|
||||||
return !aNum ? m : "\\" + ( prevLength + 1 + parseInt( aNum, 10 ) );
|
|
||||||
} );
|
|
||||||
exps.push( exp );
|
|
||||||
prevLength += steps[ i ].length;
|
|
||||||
}
|
|
||||||
var source = exps.join( "|" );
|
|
||||||
return new RegExp( source, (recipe.ignoreCase) ? "gi" : "g" );
|
|
||||||
} // function knowHow()
|
|
||||||
|
|
||||||
function escapeHTML( str ) {
|
|
||||||
return str.replace( /&/g, "&" ).replace( /</g, "<" );
|
|
||||||
} // function escapeHTML( str )
|
|
||||||
|
|
||||||
function replaceSpaces( str ) {
|
|
||||||
return str.replace( / +/g, function( spaces ) {
|
|
||||||
return spaces.replace( / /g, replaceSpace );
|
|
||||||
} );
|
|
||||||
} // function replaceSpaces( str )
|
|
||||||
|
|
||||||
function filter( str ) {
|
|
||||||
str = escapeHTML( str );
|
|
||||||
if( replaceSpace ) {
|
|
||||||
str = replaceSpaces( str );
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
} // function filter( str )
|
|
||||||
|
|
||||||
function chef( matched ) {
|
|
||||||
var i = 0; // iterate steps
|
|
||||||
var j = 1; // iterate chef's arguments
|
|
||||||
var step;
|
|
||||||
while( step = steps[ i++ ] ) {
|
|
||||||
var aux = arguments; // this unmasks chef's arguments inside the next function
|
|
||||||
if( aux[ j ] ) {
|
|
||||||
var pattern = /(\\\$)|(?:\$\$)|(?:\$(\d+))/g;
|
|
||||||
var replacement = step.replacement
|
|
||||||
.replace( pattern, function( m, escaped, K ) {
|
|
||||||
var bit = '';
|
|
||||||
if( escaped ) { /* \$ */
|
|
||||||
return "$";
|
|
||||||
}
|
|
||||||
else if( !K ) { /* $$ */
|
|
||||||
return filter( aux[ j ] );
|
|
||||||
}
|
|
||||||
else if( K == "0" ) { /* $0 */
|
|
||||||
return step.stepName;
|
|
||||||
}
|
|
||||||
else { /* $K */
|
|
||||||
return filter( aux[ j + parseInt( K, 10 ) ] );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
var offset = arguments[ arguments.length - 2 ];
|
|
||||||
var input = arguments[ arguments.length - 1 ];
|
|
||||||
var unmatched = input.substring( lastIndex, offset );
|
|
||||||
lastIndex = offset + matched.length; // lastIndex for the next call to chef
|
|
||||||
|
|
||||||
perfect += filter( unmatched ) + replacement; // use perfect for all the replacing
|
|
||||||
return replacement;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
j+= step.length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // function chef( matched )
|
|
||||||
|
|
||||||
var replaceSpace = book.replaceSpace;
|
|
||||||
var steps = new Array;
|
|
||||||
for( var stepName in recipe.steps ) {
|
|
||||||
prepareStep( stepName, recipe.steps[ stepName ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
var perfect = ""; //replace doesn't provide a handle to the ongoing partially replaced string
|
|
||||||
var lastIndex = 0; //regexp.lastIndex is available after a string.match, but not in a string.replace
|
|
||||||
ingredients.replace( knowHow(), chef );
|
|
||||||
var lastUnmatched = ingredients.substring( lastIndex, ingredients.length );
|
|
||||||
perfect += filter( lastUnmatched );
|
|
||||||
|
|
||||||
return perfect;
|
|
||||||
|
|
||||||
} // function cook( ingredients, recipe )
|
|
||||||
|
|
||||||
function checkCSS( stylesheetPath ) {
|
|
||||||
if( ! book.queue[ stylesheetPath ] ) {
|
|
||||||
var e = document.createElement( "link" );
|
|
||||||
e.rel = "stylesheet";
|
|
||||||
e.type = "text/css";
|
|
||||||
e.href = stylesheetPath;
|
|
||||||
document.getElementsByTagName( "head" )[0].appendChild( e );
|
|
||||||
|
|
||||||
book.queue[ stylesheetPath ] = true;
|
|
||||||
}
|
|
||||||
} // function checkCSS( recipeName )
|
|
||||||
|
|
||||||
function makeDish( el, recipePath ) {
|
|
||||||
var recipe = book.recipes[ recipePath ];
|
|
||||||
if( ! recipe ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var chunks = el && el.childNodes && el.childNodes.length;
|
|
||||||
if( chunks && chunks > 1 ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var ingredients = el.childNodes[0] && el.childNodes[0].data;
|
|
||||||
if( ! ingredients ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// hack for IE: \r is used instead of \n
|
|
||||||
ingredients = ingredients.replace(/\r\n?/g, "\n");
|
|
||||||
|
|
||||||
var dish = cook( ingredients, recipe ); // all happens here
|
|
||||||
|
|
||||||
if( book.replaceTab ) {
|
|
||||||
dish = dish.replace( /\t/g, book.replaceTab );
|
|
||||||
}
|
|
||||||
if( book.replaceNewLine ) {
|
|
||||||
dish = dish.replace( /\n/g, book.replaceNewLine );
|
|
||||||
}
|
|
||||||
|
|
||||||
$( el ).html( dish );
|
|
||||||
if( ChiliBook.preFixCopy ) {
|
|
||||||
$( el )
|
|
||||||
.parents()
|
|
||||||
.filter( "pre" )
|
|
||||||
.bind( "mousedown", function() {
|
|
||||||
ChiliBook.preElement = this;
|
|
||||||
} )
|
|
||||||
.bind( "mouseup", function() {
|
|
||||||
if( ChiliBook.preElement == this ) {
|
|
||||||
ChiliBook.preContent = document.selection.createRange().htmlText;
|
|
||||||
}
|
|
||||||
} )
|
|
||||||
;
|
|
||||||
}
|
|
||||||
} // function makeDish( el )
|
|
||||||
|
|
||||||
function getPath( recipeName, options ) {
|
|
||||||
var settingsDef = {
|
|
||||||
recipeFolder: book.recipeFolder
|
|
||||||
, recipeFile: recipeName + ".js"
|
|
||||||
, stylesheetFolder: book.stylesheetFolder
|
|
||||||
, stylesheetFile: recipeName + ".css"
|
|
||||||
};
|
|
||||||
var settings;
|
|
||||||
if( options && typeof options == "object" ) {
|
|
||||||
settings = $.extend( settingsDef, options );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
settings = settingsDef;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
recipe : settings.recipeFolder + settings.recipeFile
|
|
||||||
, stylesheet: settings.stylesheetFolder + settings.stylesheetFile
|
|
||||||
};
|
|
||||||
} //function getPath( recipeName, options )
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// initializations
|
|
||||||
if( book.metadataSelector ) {
|
|
||||||
$.metaobjects( { context: this, selector: book.metadataSelector } );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// the coloring starts here
|
|
||||||
this
|
|
||||||
.each( function() {
|
|
||||||
var el = this;
|
|
||||||
var recipeName = book.codeLanguage( el );
|
|
||||||
if( '' != recipeName ) {
|
|
||||||
var path = getPath( recipeName, el.chili );
|
|
||||||
if( book.recipeLoading || el.chili ) {
|
|
||||||
/* dynamic setups come here */
|
|
||||||
if( ! book.queue[ path.recipe ] ) {
|
|
||||||
/* this is a new recipe to download */
|
|
||||||
try {
|
|
||||||
book.queue[ path.recipe ] = [ el ];
|
|
||||||
$.getJSON( path.recipe, function( recipeLoaded ) {
|
|
||||||
recipeLoaded.path = path.recipe;
|
|
||||||
book.recipes[ path.recipe ] = recipeLoaded;
|
|
||||||
if( book.stylesheetLoading ) {
|
|
||||||
checkCSS( path.stylesheet );
|
|
||||||
}
|
|
||||||
var q = book.queue[ path.recipe ];
|
|
||||||
for( var i = 0, iTop = q.length; i < iTop; i++ ) {
|
|
||||||
makeDish( q[ i ], path.recipe );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
catch( recipeNotAvailable ) {
|
|
||||||
alert( "the recipe for '" + recipeName + "' was not found in '" + path.recipe + "'" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* not a new recipe, so just enqueue this element */
|
|
||||||
book.queue[ path.recipe ].push( el );
|
|
||||||
}
|
|
||||||
/* a recipe could have been already downloaded */
|
|
||||||
makeDish( el, path.recipe );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* static setups come here */
|
|
||||||
makeDish( el, path.recipe );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
return this;
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
};
|
|
||||||
|
|
||||||
//main
|
|
||||||
$( function() {
|
|
||||||
|
|
||||||
if( ChiliBook.automatic ) {
|
|
||||||
if( ChiliBook.elementPath ) {
|
|
||||||
//preserve backward compatibility
|
|
||||||
ChiliBook.automaticSelector = ChiliBook.elementPath;
|
|
||||||
if( ChiliBook.elementClass ) {
|
|
||||||
ChiliBook.codeLanguage = function ( el ) {
|
|
||||||
var selectClass = new RegExp( "\\b" + ChiliBook.elementClass + "\\b", "gi" );
|
|
||||||
var elClass = $( el ).attr( "class" );
|
|
||||||
if( ! elClass ) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
var recipeName = $.trim( elClass.replace( selectClass, "" ) );
|
|
||||||
return recipeName;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$( ChiliBook.automaticSelector ).chili();
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ChiliBook.preFixCopy ) {
|
|
||||||
function preformatted( text ) {
|
|
||||||
if( '' == text ) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
do {
|
|
||||||
var newline_flag = (new Date()).valueOf();
|
|
||||||
}
|
|
||||||
while( text.indexOf( newline_flag ) > -1 );
|
|
||||||
text = text.replace( /\<br[^>]*?\>/ig, newline_flag );
|
|
||||||
var el = document.createElement( '<pre>' );
|
|
||||||
el.innerHTML = text;
|
|
||||||
text = el.innerText.replace( new RegExp( newline_flag, "g" ), '\r\n' );
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
$( "body" )
|
|
||||||
.bind( "copy", function() {
|
|
||||||
if( '' != ChiliBook.preContent ) {
|
|
||||||
window.clipboardData.setData( 'Text', preformatted( ChiliBook.preContent ) );
|
|
||||||
event.returnValue = false;
|
|
||||||
}
|
|
||||||
} )
|
|
||||||
.bind( "mousedown", function() {
|
|
||||||
ChiliBook.preContent = "";
|
|
||||||
} )
|
|
||||||
.bind( "mouseup", function() {
|
|
||||||
ChiliBook.preElement = null;
|
|
||||||
} )
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
} ) ( jQuery );
|
|
File diff suppressed because one or more lines are too long
@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.cplusplus .mlcom { color: #4040c2; }
|
|
||||||
.cplusplus .com { color: green; }
|
|
||||||
.cplusplus .string { color: teal; }
|
|
||||||
.cplusplus .keyword { color: navy; font-weight: bold; }
|
|
||||||
.cplusplus .datatype { color: blue; }
|
|
||||||
.cplusplus .preproc { color: red; }
|
|
||||||
.cplusplus .number { color: red; }
|
|
@ -2,21 +2,44 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: "cpp"
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, com : { exp: /\/\/.*/ }
|
, _main: {
|
||||||
, preproc : { exp: /[\^\n]\s*#\w+/ }
|
mlcom : {
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
, number : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
|
, _style: "color: #4040c2;"
|
||||||
, datatype: { exp: /\b(?:ATOM|BOOL|BOOLEAN|BYTE|CHAR|COLORREF|DWORD|DWORD32|DWORD64|DWORDLONG|DWORD_PTR|FILE|FLOAT|HACCEL|HALF_PTR|HANDLE|HBITMAP|HBRUSH|HCOLORSPACE|HCONV|HCONVLIST|HCURSOR|HDC|HDDEDATA|HDESK|HDROP|HDWP|HENHMETAFILE|HFILE|HFONT|HGDIOBJ|HGLOBAL|HHOOK|HICON|HINSTANCE|HKEY|HKL|HLOCAL|HMENU|HMETAFILE|HMODULE|HMONITOR|HPALETTE|HPEN|HRESULT|HRGN|HRSRC|HSZ|HWINSTA|HWND|INT|INT32|INT64|INT_PTR|LANGID|LCID|LCTYPE|LGRPID|LONG|LONG32|LONG64|LONGLONG|LONG_PTR|LPARAM|LPBOOL|LPBYTE|LPCOLORREF|LPCSTR|LPCTSTR|LPCVOID|LPCWSTR|LPDWORD|LPHANDLE|LPINT|LPLONG|LPSTR|LPTSTR|LPVOID|LPWORD|LPWSTR|LRESULT|PBOOL|PBOOLEAN|PBYTE|PCHAR|PCSTR|PCTSTR|PCWSTR|PDWORD32|PDWORD64|PDWORDLONG|PDWORD_PTR|PFLOAT|PHALF_PTR|PHANDLE|PHKEY|PINT|PINT32|PINT64|PINT_PTR|PLCID|PLONG|PLONG32|PLONG64|PLONGLONG|PLONG_PTR|POINTER_32|POINTER_64|PSHORT|PSIZE_T|PSSIZE_T|PSTR|PTBYTE|PTCHAR|PTSTR|PUCHAR|PUHALF_PTR|PUINT|PUINT32|PUINT64|PUINT_PTR|PULONG|PULONG32|PULONG64|PULONGLONG|PULONG_PTR|PUSHORT|PVOID|PWCHAR|PWORD|PWSTR|SC_HANDLE|SC_LOCK|SERVICE_STATUS_HANDLE|SHORT|SIZE_T|SSIZE_T|TBYTE|TCHAR|UCHAR|UHALF_PTR|UINT|UINT32|UINT64|UINT_PTR|ULONG|ULONG32|ULONG64|ULONGLONG|ULONG_PTR|USHORT|USN|VOID|WCHAR|WORD|WPARAM|_EXCEPTION_POINTERS|_FPIEEE_RECORD|_HEAPINFO|_HFILE|_PNH|__finddata64_t|__int16|__int32|__int64|__int8|__stat64|__time64_t|__timeb64|__wchar_t|__wfinddata64_t|_complex|_dev_t|_diskfree_t|_exception|_finddata_t|_finddatai64_t|_off_t|_onexit_t|_purecall_handler|_stat|_stati64|_timeb|_utimbuf|_wfinddata_t|_wfinddatai64_t|bool|char|clock_t|div_t|double|float|fpos_t|int|intptr_t|jmp_buf|lconv|ldiv_t|long|mbstate_t|ptrdiff_t|short|sig_atomic_t|signed|size_t|terminate_function|time_t|tm|uintptr_t|va_list|wchar_t|wctrans_t|wctype_t|wint_t)\b/ }
|
}
|
||||||
, keyword : { exp: /\b(?:__declspec|__exception|__finally|__try|break|case|catch|class|const|const_cast|continue|default|delete|deprecated|dllexport|dllimport|do|dynamic_cast|else|enum|explicit|extern|false|for|friend|goto|if|inline|mutable|naked|namespace|new|noinline|noreturn|nothrow|private|protected|public|register|reinterpret_cast|return|selectany|sizeof|static|static_cast|struct|switch|template|this|thread|throw|true|try|typedef|typeid|typename|union|using|uuid|virtual|void|volatile|whcar_t|while)\b/ }
|
, com : {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, preproc : {
|
||||||
|
_match: /(?=^|\n)\s*#\w+/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, string : {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, number : {
|
||||||
|
_match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, datatype: {
|
||||||
|
_match: /\b(?:wint_t|wctype_t|wctrans_t|wchar_t|va_list|uintptr_t|tm|time_t|terminate_function|size_t|signed|sig_atomic_t|short|ptrdiff_t|mbstate_t|long|ldiv_t|lconv|jmp_buf|intptr_t|int|fpos_t|float|double|div_t|clock_t|char|bool|_wfinddatai64_t|_wfinddata_t|_utimbuf|_timeb|_stati64|_stat|_purecall_handler|_onexit_t|_off_t|_finddatai64_t|_finddata_t|_exception|_diskfree_t|_dev_t|_complex|__wfinddata64_t|__wchar_t|__timeb64|__time64_t|__stat64|__int8|__int64|__int32|__int16|__finddata64_t|_PNH|_HFILE|_HEAPINFO|_FPIEEE_RECORD|_EXCEPTION_POINTERS|WPARAM|WORD|WCHAR|VOID|USN|USHORT|ULONG_PTR|ULONGLONG|ULONG64|ULONG32|ULONG|UINT_PTR|UINT64|UINT32|UINT|UHALF_PTR|UCHAR|TCHAR|TBYTE|SSIZE_T|SIZE_T|SHORT|SERVICE_STATUS_HANDLE|SC_LOCK|SC_HANDLE|PWSTR|PWORD|PWCHAR|PVOID|PUSHORT|PULONG_PTR|PULONGLONG|PULONG64|PULONG32|PULONG|PUINT_PTR|PUINT64|PUINT32|PUINT|PUHALF_PTR|PUCHAR|PTSTR|PTCHAR|PTBYTE|PSTR|PSSIZE_T|PSIZE_T|PSHORT|POINTER_64|POINTER_32|PLONG_PTR|PLONGLONG|PLONG64|PLONG32|PLONG|PLCID|PINT_PTR|PINT64|PINT32|PINT|PHKEY|PHANDLE|PHALF_PTR|PFLOAT|PDWORD_PTR|PDWORDLONG|PDWORD64|PDWORD32|PCWSTR|PCTSTR|PCSTR|PCHAR|PBYTE|PBOOLEAN|PBOOL|LRESULT|LPWSTR|LPWORD|LPVOID|LPTSTR|LPSTR|LPLONG|LPINT|LPHANDLE|LPDWORD|LPCWSTR|LPCVOID|LPCTSTR|LPCSTR|LPCOLORREF|LPBYTE|LPBOOL|LPARAM|LONG_PTR|LONGLONG|LONG64|LONG32|LONG|LGRPID|LCTYPE|LCID|LANGID|INT_PTR|INT64|INT32|INT|HWND|HWINSTA|HSZ|HRSRC|HRGN|HRESULT|HPEN|HPALETTE|HMONITOR|HMODULE|HMETAFILE|HMENU|HLOCAL|HKL|HKEY|HINSTANCE|HICON|HHOOK|HGLOBAL|HGDIOBJ|HFONT|HFILE|HENHMETAFILE|HDWP|HDROP|HDESK|HDDEDATA|HDC|HCURSOR|HCONVLIST|HCONV|HCOLORSPACE|HBRUSH|HBITMAP|HANDLE|HALF_PTR|HACCEL|FLOAT|FILE|DWORD_PTR|DWORDLONG|DWORD64|DWORD32|DWORD|COLORREF|CHAR|BYTE|BOOLEAN|BOOL|ATOM)\b/
|
||||||
|
, _style: "color: blue;"
|
||||||
|
}
|
||||||
|
, keyword : {
|
||||||
|
_match: /\b(?:while|whcar_t|volatile|void|virtual|uuid|using|union|typename|typeid|typedef|try|true|throw|thread|this|template|switch|struct|static_cast|static|sizeof|selectany|return|reinterpret_cast|register|public|protected|private|nothrow|noreturn|noinline|new|namespace|naked|mutable|inline|if|goto|friend|for|false|extern|explicit|enum|else|dynamic_cast|do|dllimport|dllexport|deprecated|delete|default|continue|const_cast|const|class|catch|case|break|__try|__finally|__exception|__declspec)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.csharp .mlcom { color: #4040c2; }
|
|
||||||
.csharp .com { color: green; }
|
|
||||||
.csharp .string { color: teal; }
|
|
||||||
.csharp .keyword { color: navy; font-weight: bold; }
|
|
||||||
.csharp .preproc { color: red; }
|
|
||||||
.csharp .number { color: red; }
|
|
@ -2,20 +2,40 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: "cs"
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, com : { exp: /\/\/.*/ }
|
, _main: {
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
mlcom : {
|
||||||
, preproc: { exp: /^\s*#.*/ }
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
, number : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
|
, _style: "color: #4040c2;"
|
||||||
, keyword: { exp: /\b(?:abstract|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|get|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|while)\b/ }
|
}
|
||||||
|
, com : {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, string : {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, preproc: {
|
||||||
|
_match: /^\s*#.*/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, number : {
|
||||||
|
_match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, keyword: {
|
||||||
|
_match: /\b(?:while|volatile|void|virtual|using|ushort|unsafe|unchecked|ulong|uint|typeof|try|true|throw|this|switch|struct|string|static|stackalloc|sizeof|short|sealed|sbyte|return|ref|readonly|public|protected|private|params|override|out|operator|object|null|new|namespace|long|lock|is|internal|interface|int|in|implicit|if|goto|foreach|for|float|fixed|finally|false|extern|explicit|event|enum|else|double|do|delegate|default|decimal|continue|const|class|checked|char|catch|case|byte|break|bool|base|as|abstract)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.css .mlcom { color: #4040c2; }
|
|
||||||
.css .color { color: green; }
|
|
||||||
.css .string { color: teal; }
|
|
||||||
.css .attrib { color: navy; font-weight: bold; }
|
|
||||||
.css .value { color: blue; }
|
|
||||||
.css .number { color: red; }
|
|
@ -2,20 +2,84 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: 'css'
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, string: { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
, _main: {
|
||||||
, number: { exp: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/ }
|
comment: {
|
||||||
, attrib: { exp: /\b(?:z-index|x-height|word-spacing|widths|width|widows|white-space|volume|voice-family|visibility|vertical-align|units-per-em|unicode-range|unicode-bidi|text-transform|text-shadow|text-indent|text-decoration|text-align|table-layout|stress|stemv|stemh|src|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|slope|size|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|mathline|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|empty-cells|elevation|display|direction|descent|definition-src|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|centerline|caption-side|cap-height|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|bbox|baseline|background-repeat|background-position|background-image|background-color|background-attachment|background|azimuth|ascent)\b/ }
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
, value : { exp: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/ }
|
, _style: "color: olive;"
|
||||||
, color : { exp: /(?:\#[a-zA-Z0-9]{3,6})|(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua)/ }
|
}
|
||||||
|
, directive: {
|
||||||
|
_match: /@\w+/
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, url: {
|
||||||
|
_match: /\b(url\s*\()([^)]+)(\))/
|
||||||
|
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, block: {
|
||||||
|
_match: /\{([\w\W]*?)\}/
|
||||||
|
, _replace: function( all, pairs ) {
|
||||||
|
return '{' + this.x( pairs, '/definition' ) + '}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, 'class': {
|
||||||
|
_match: /\.\w+/
|
||||||
|
, _style: "color: #CC0066; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, id: {
|
||||||
|
_match: /#\w+/
|
||||||
|
, _style: "color: IndianRed; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, pseudo: {
|
||||||
|
_match: /:\w+/
|
||||||
|
, _style: "color: #CC9900;"
|
||||||
|
}
|
||||||
|
, element: {
|
||||||
|
_match: /\w+/
|
||||||
|
, _style: "color: Purple; font-weight: bold;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, definition: {
|
||||||
|
comment: {
|
||||||
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
|
}
|
||||||
|
, property: {
|
||||||
|
_match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
|
||||||
|
, _style: "color: #330066;"
|
||||||
|
}
|
||||||
|
, special: {
|
||||||
|
_match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
|
||||||
|
, _style: "color: #330066; text-decoration: underline;"
|
||||||
|
}
|
||||||
|
, url: {
|
||||||
|
_match: /\b(url\s*\()([^)]+)(\))/
|
||||||
|
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
|
||||||
|
}
|
||||||
|
, value: {
|
||||||
|
_match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
|
||||||
|
, _style: "color: #3366FF;"
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, number: {
|
||||||
|
_match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, color : {
|
||||||
|
_match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.delphi .mlcom { color: #4040c2; }
|
|
||||||
.delphi .com { color: green; }
|
|
||||||
.delphi .string { color: teal; }
|
|
||||||
.delphi .keyword { color: navy; font-weight: bold; }
|
|
||||||
.delphi .direct { color: red; }
|
|
||||||
.delphi .number { color: red; }
|
|
@ -2,20 +2,40 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: "pas"
|
||||||
mlcom : { exp: /(?:\(\*[\s\S]*?\*\))|(?:{(?!\$)[\s\S]*?})/ }
|
, _case: true
|
||||||
, com : { exp: /\/\/.*/ }
|
, _main: {
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')/ }
|
mlcom: {
|
||||||
, number : { exp: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:\$[a-zA-Z0-9]+\b)/ }
|
_match: /(?:\(\*[\w\W]*?\*\))|(?:{(?!\$)[\w\W]*?})/
|
||||||
, direct : { exp: /\{\$[a-zA-Z]+ .+\}/ }
|
, _style: "color: #4040c2;"
|
||||||
, keyword: { exp: /\b(?:abs|addr|and|ansichar|ansistring|array|as|asm|begin|boolean|byte|cardinal|case|char|class|comp|const|constructor|currency|destructor|div|do|double|downto|else|end|except|exports|extended|false|file|finalization|finally|for|function|goto|if|implementation|in|inherited|initialization|int64|integer|interface|is|label|library|longint|longword|mod|nil|not|object|of|on|or|packed|pansichar|pansistring|pchar|pcurrency|pdatetime|pextended|pint64|pointer|private|procedure|program|property|protected|pshortstring|pstring|public|published|pvariant|pwidechar|pwidestring|raise|real|real48|record|repeat|set|shl|shortint|shortstring|shr|single|smallint|string|then|threadvar|to|true|try|type|unit|until|uses|val|var|varirnt|while|widechar|widestring|with|word|write|writeln|xor)\b/ }
|
}
|
||||||
|
, com: {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, number: {
|
||||||
|
_match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:\$[a-zA-Z0-9]+\b)/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, direct: {
|
||||||
|
_match: /\{\$[a-zA-Z]+ .+\}/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, keyword: {
|
||||||
|
_match: /\b(?:abs|addr|and|ansichar|ansistring|array|as|asm|begin|boolean|byte|cardinal|case|char|class|comp|const|constructor|currency|destructor|div|do|double|downto|else|end|except|exports|extended|false|file|finalization|finally|for|function|goto|if|implementation|in|inherited|initialization|int64|integer|interface|is|label|library|longint|longword|mod|nil|not|object|of|on|or|packed|pansichar|pansistring|pchar|pcurrency|pdatetime|pextended|pint64|pointer|private|procedure|program|property|protected|pshortstring|pstring|public|published|pvariant|pwidechar|pwidestring|raise|real|real48|record|repeat|set|shl|shortint|shortstring|shr|single|smallint|string|then|threadvar|to|true|try|type|unit|until|uses|val|var|varirnt|while|widechar|widestring|with|word|write|writeln|xor)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.html .php { color: red; font-weight: bold; }
|
|
||||||
.html .tag { color: navy; font-weight: bold; }
|
|
||||||
.html .aname { color: purple; }
|
|
||||||
.html .avalue { color: fuchsia; }
|
|
||||||
.html .mlcom { color: green; }
|
|
||||||
.html .entity { color: teal; }
|
|
@ -2,22 +2,79 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: 'html'
|
||||||
mlcom : { exp: /\<!--(?:.|\n)*?--\>/ }
|
, _case: false
|
||||||
, tag : { exp: /(?:\<\!?[\w:]+)|(?:\>)|(?:\<\/[\w:]+\>)|(?:\/\>)/ }
|
, _main: {
|
||||||
, php : { exp: /(?:\<\?php\s)|(?:\<\?)|(?:\?\>)/ }
|
doctype: {
|
||||||
, aname : { exp: /\s+?[\w-]+:?\w+(?=\s*=)/ }
|
_match: /<!DOCTYPE\b[\w\W]*?>/
|
||||||
, avalue: {
|
, _style: "color: #CC6600;"
|
||||||
exp: /(=\s*)(([\"\'])(?:(?:[^\3\\]*?(?:\3\3|\\.))*?[^\3\\]*?)\3)/
|
}
|
||||||
, replacement: '$1<span class="$0">$2</span>' }
|
, ie_style: {
|
||||||
, entity: { exp: /&[\w#]+?;/ }
|
_match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return "<span class='ie_style'>" + this.x( open ) + "</span>"
|
||||||
|
+ this.x( content, '//style' )
|
||||||
|
+ "<span class='ie_style'>" + this.x( close ) + "</span>";
|
||||||
|
}
|
||||||
|
, _style: "color: DarkSlateGray; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, comment: {
|
||||||
|
_match: /<!--[\w\W]*?-->/
|
||||||
|
, _style: "color: #4040c2;"
|
||||||
|
}
|
||||||
|
, script: {
|
||||||
|
_match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return this.x( open, '//tag_start' )
|
||||||
|
+ this.x( content, 'js' )
|
||||||
|
+ this.x( close, '//tag_end' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, style: {
|
||||||
|
_match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return this.x( open, '//tag_start' )
|
||||||
|
+ this.x( content, 'css' )
|
||||||
|
+ this.x( close, '//tag_end' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// matches a starting tag of an element (with attrs)
|
||||||
|
// like "<div ... >" or "<img ... />"
|
||||||
|
, tag_start: {
|
||||||
|
_match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return "<span class='tag_start'>" + this.x( open ) + "</span>"
|
||||||
|
+ this.x( content, '/tag_attrs' )
|
||||||
|
+ "<span class='tag_start'>" + this.x( close ) + "</span>";
|
||||||
|
}
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
|
// matches an ending tag
|
||||||
|
// like "</div>"
|
||||||
|
, tag_end: {
|
||||||
|
_match: /<\/\w+\s*>|\/>/
|
||||||
|
, _style: "color: navy;"
|
||||||
|
}
|
||||||
|
, entity: {
|
||||||
|
_match: /&\w+?;/
|
||||||
|
, _style: "color: blue;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, tag_attrs: {
|
||||||
|
// matches a name/value pair
|
||||||
|
attr: {
|
||||||
|
// before in $1, name in $2, between in $3, value in $4
|
||||||
|
_match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
|
||||||
|
, _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
|
||||||
|
, _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.java .mlcom { color: #4040c2; }
|
|
||||||
.java .com { color: green; }
|
|
||||||
.java .string { color: teal; }
|
|
||||||
.java .meta { color: red; }
|
|
||||||
.java .keyword { color: navy; font-weight: bold; }
|
|
||||||
.java .number { color: red; }
|
|
@ -2,20 +2,40 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
steps: {
|
_name: "java"
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, com : { exp: /\/\/.*/ }
|
, _main: {
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
mlcom : {
|
||||||
, number : { exp: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:0x[a-f0-9]+)\b/ }
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
, meta : { exp: /(?!\@interface\b)\@[\$\w]+\b/ }
|
, _style: "color: #4040c2;"
|
||||||
, keyword: { exp: /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|false|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|true|try|void|volatile|while)\b/ }
|
}
|
||||||
|
, com : {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, string : {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, number : {
|
||||||
|
_match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:0x[a-f0-9]+)\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, meta : {
|
||||||
|
_match: /(?!\@interface\b)\@[\$\w]+\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, keyword: {
|
||||||
|
_match: /\b(?:while|volatile|void|try|true|transient|throws|throw|this|synchronized|switch|super|strictfp|static|short|return|public|protected|private|package|null|new|native|long|interface|int|instanceof|import|implements|if|goto|for|float|finally|final|false|extends|enum|else|double|do|default|continue|const|class|char|catch|case|byte|break|boolean|assert|abstract)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.javascript .mlcom { color: #4040c2; }
|
|
||||||
.javascript .com { color: green; }
|
|
||||||
.javascript .regexp { color: maroon; }
|
|
||||||
.javascript .string { color: teal; }
|
|
||||||
.javascript .keywords { color: navy; font-weight: bold; }
|
|
||||||
.javascript .global { color: blue; }
|
|
||||||
.javascript .numbers { color: red; }
|
|
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
|
||||||
steps: {
|
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
|
||||||
, com : { exp: /\/\/.*/ }
|
|
||||||
, regexp : { exp: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/ }
|
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
|
||||||
, numbers : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
|
|
||||||
, keywords: { exp: /\b(arguments|break|case|catch|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|try|typeof|var|void|while|with)\b/ }
|
|
||||||
, global : { exp: /\b(toString|valueOf|window|self|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ }
|
|
||||||
}
|
|
||||||
}
|
|
704
docs/js/chili/jquery.chili-2.2.js
Normal file
704
docs/js/chili/jquery.chili-2.2.js
Normal file
@ -0,0 +1,704 @@
|
|||||||
|
/*
|
||||||
|
===============================================================================
|
||||||
|
Chili is the jQuery code highlighter plugin
|
||||||
|
...............................................................................
|
||||||
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
|
===============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
( function($) {
|
||||||
|
|
||||||
|
ChiliBook = { //implied global
|
||||||
|
|
||||||
|
version: "2.2" // 2008-07-06
|
||||||
|
|
||||||
|
// options --------------------------------------------------------------------
|
||||||
|
|
||||||
|
, automatic: true
|
||||||
|
, automaticSelector: "code"
|
||||||
|
|
||||||
|
, lineNumbers: !true
|
||||||
|
|
||||||
|
, codeLanguage: function( el ) {
|
||||||
|
var recipeName = $( el ).attr( "class" );
|
||||||
|
return recipeName ? recipeName : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
, recipeLoading: true
|
||||||
|
, recipeFolder: "" // used like: recipeFolder + recipeName + '.js'
|
||||||
|
|
||||||
|
// IE and FF convert   to " ", Safari and Opera do not
|
||||||
|
, replaceSpace: " "
|
||||||
|
, replaceTab: "    "
|
||||||
|
, replaceNewLine: " <br/>"
|
||||||
|
|
||||||
|
, selectionStyle: [ "position:absolute; z-index:3000; overflow:scroll;"
|
||||||
|
, "width:16em;"
|
||||||
|
, "height:9em;"
|
||||||
|
, "border:1px solid gray;"
|
||||||
|
, "padding:15px;"
|
||||||
|
, "background-color:yellow;"
|
||||||
|
].join( ' ' )
|
||||||
|
|
||||||
|
// ------------------------------------------------------------- end of options
|
||||||
|
|
||||||
|
, defaultReplacement: '<span class="$0">$$</span>' // TODO: make this an option again
|
||||||
|
, recipes: {} //repository
|
||||||
|
, queue: {} //registry
|
||||||
|
|
||||||
|
, unique: function() {
|
||||||
|
return (new Date()).valueOf();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$.fn.chili = function( options ) {
|
||||||
|
var book = $.extend( {}, ChiliBook, options || {} );
|
||||||
|
|
||||||
|
function cook( ingredients, recipe, blockName ) {
|
||||||
|
|
||||||
|
function prepareBlock( recipe, blockName ) {
|
||||||
|
var steps = [];
|
||||||
|
for( var stepName in recipe[ blockName ] ) {
|
||||||
|
steps.push( prepareStep( recipe, blockName, stepName ) );
|
||||||
|
}
|
||||||
|
return steps;
|
||||||
|
} // prepareBlock
|
||||||
|
|
||||||
|
function prepareStep( recipe, blockName, stepName ) {
|
||||||
|
var step = recipe[ blockName ][ stepName ];
|
||||||
|
var exp = ( typeof step._match == "string" ) ? step._match : step._match.source;
|
||||||
|
return {
|
||||||
|
recipe: recipe
|
||||||
|
, blockName: blockName
|
||||||
|
, stepName: stepName
|
||||||
|
, exp: "(" + exp + ")"
|
||||||
|
, length: 1 // add 1 to account for the newly added parentheses
|
||||||
|
+ (exp // count number of submatches in here
|
||||||
|
.replace( /\\./g, "%" ) // disable any escaped character
|
||||||
|
.replace( /\[.*?\]/g, "%" ) // disable any character class
|
||||||
|
.match( /\((?!\?)/g ) // match any open parenthesis, not followed by a ?
|
||||||
|
|| [] // make sure it is an empty array if there are no matches
|
||||||
|
).length // get the number of matches
|
||||||
|
, replacement: step._replace ? step._replace : book.defaultReplacement
|
||||||
|
};
|
||||||
|
} // prepareStep
|
||||||
|
|
||||||
|
function knowHow( steps ) {
|
||||||
|
var prevLength = 1;
|
||||||
|
var exps = [];
|
||||||
|
for (var i = 0; i < steps.length; i++) {
|
||||||
|
var exp = steps[ i ].exp;
|
||||||
|
// adjust backreferences
|
||||||
|
exp = exp.replace( /\\\\|\\(\d+)/g, function( m, aNum ) {
|
||||||
|
return !aNum ? m : "\\" + ( prevLength + 1 + parseInt( aNum, 10 ) );
|
||||||
|
} );
|
||||||
|
exps.push( exp );
|
||||||
|
prevLength += steps[ i ].length;
|
||||||
|
}
|
||||||
|
var prolog = '((?:\\s|\\S)*?)';
|
||||||
|
var epilog = '((?:\\s|\\S)+)';
|
||||||
|
var source = '(?:' + exps.join( "|" ) + ')';
|
||||||
|
source = prolog + source + '|' + epilog;
|
||||||
|
return new RegExp( source, recipe._case ? "g" : "gi" );
|
||||||
|
} // knowHow
|
||||||
|
|
||||||
|
function escapeHTML( str ) {
|
||||||
|
return str.replace( /&/g, "&" ).replace( /</g, "<" );
|
||||||
|
} // escapeHTML
|
||||||
|
|
||||||
|
function replaceSpaces( str ) {
|
||||||
|
return str.replace( / +/g, function( spaces ) {
|
||||||
|
return spaces.replace( / /g, replaceSpace );
|
||||||
|
} );
|
||||||
|
} // replaceSpaces
|
||||||
|
|
||||||
|
function filter( str ) {
|
||||||
|
str = escapeHTML( str );
|
||||||
|
if( replaceSpace ) {
|
||||||
|
str = replaceSpaces( str );
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
} // filter
|
||||||
|
|
||||||
|
function applyRecipe( subject, recipe ) {
|
||||||
|
return cook( subject, recipe );
|
||||||
|
} // applyRecipe
|
||||||
|
|
||||||
|
function applyBlock( subject, recipe, blockName ) {
|
||||||
|
return cook( subject, recipe, blockName );
|
||||||
|
} // applyBlock
|
||||||
|
|
||||||
|
function applyStep( subject, recipe, blockName, stepName ) {
|
||||||
|
var replaceSpace = book.replaceSpace;
|
||||||
|
|
||||||
|
var step = prepareStep( recipe, blockName, stepName );
|
||||||
|
var steps = [step];
|
||||||
|
|
||||||
|
var perfect = subject.replace( knowHow( steps ), function() {
|
||||||
|
return chef.apply( { steps: steps }, arguments );
|
||||||
|
} );
|
||||||
|
return perfect;
|
||||||
|
} // applyStep
|
||||||
|
|
||||||
|
function applyModule( subject, module, context ) {
|
||||||
|
if( ! module ) {
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
|
||||||
|
var sub = module.split( '/' );
|
||||||
|
var recipeName = '';
|
||||||
|
var blockName = '';
|
||||||
|
var stepName = '';
|
||||||
|
switch( sub.length ) {
|
||||||
|
case 1:
|
||||||
|
recipeName = sub[0];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
recipeName = sub[0]; blockName = sub[1];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
recipeName = sub[0]; blockName = sub[1]; stepName = sub[2];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRecipe( recipeName ) {
|
||||||
|
var path = getPath( recipeName );
|
||||||
|
var recipe = book.recipes[ path ];
|
||||||
|
if( ! recipe ) {
|
||||||
|
throw {msg:"recipe not available"};
|
||||||
|
}
|
||||||
|
return recipe;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
var recipe;
|
||||||
|
if ( '' == stepName ) {
|
||||||
|
if ( '' == blockName ) {
|
||||||
|
if ( '' == recipeName ) {
|
||||||
|
//nothing to do
|
||||||
|
}
|
||||||
|
else { // ( '' != recipeName )
|
||||||
|
recipe = getRecipe( recipeName );
|
||||||
|
return applyRecipe( subject, recipe );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { // ( '' != blockName )
|
||||||
|
if( '' == recipeName ) {
|
||||||
|
recipe = context.recipe;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
recipe = getRecipe( recipeName );
|
||||||
|
}
|
||||||
|
if( ! (blockName in recipe) ) {
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
return applyBlock( subject, recipe, blockName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { // ( '' != stepName )
|
||||||
|
if( '' == recipeName ) {
|
||||||
|
recipe = context.recipe;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
recipe = getRecipe( recipeName );
|
||||||
|
}
|
||||||
|
if( '' == blockName ) {
|
||||||
|
blockName = context.blockName;
|
||||||
|
}
|
||||||
|
if( ! (blockName in recipe) ) {
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
if( ! (stepName in recipe[blockName]) ) {
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
return applyStep( subject, recipe, blockName, stepName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch( e ) {
|
||||||
|
if (e.msg && e.msg == "recipe not available") {
|
||||||
|
var cue = 'chili_' + book.unique();
|
||||||
|
if( book.recipeLoading ) {
|
||||||
|
var path = getPath( recipeName );
|
||||||
|
if( ! book.queue[ path ] ) {
|
||||||
|
/* this is a new recipe to download */
|
||||||
|
try {
|
||||||
|
book.queue[ path ] = [ {cue: cue, subject: subject, module: module, context: context} ];
|
||||||
|
$.getJSON( path, function( recipeLoaded ) {
|
||||||
|
book.recipes[ path ] = recipeLoaded;
|
||||||
|
var q = book.queue[ path ];
|
||||||
|
for( var i = 0, iTop = q.length; i < iTop; i++ ) {
|
||||||
|
var replacement = applyModule( q[ i ].subject, q[ i ].module, q[ i ].context );
|
||||||
|
if( book.replaceTab ) {
|
||||||
|
replacement = replacement.replace( /\t/g, book.replaceTab );
|
||||||
|
}
|
||||||
|
if( book.replaceNewLine ) {
|
||||||
|
replacement = replacement.replace( /\n/g, book.replaceNewLine );
|
||||||
|
}
|
||||||
|
$( '#' + q[ i ].cue ).replaceWith( replacement );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
catch( recipeNotAvailable ) {
|
||||||
|
alert( "the recipe for '" + recipeName + "' was not found in '" + path + "'" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* not a new recipe, so just enqueue this element */
|
||||||
|
book.queue[ path ].push( {cue: cue, subject: subject, module: module, context: context} );
|
||||||
|
}
|
||||||
|
return '<span id="' + cue + '">' + filter( subject ) + '</span>';
|
||||||
|
}
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return filter( subject );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // applyModule
|
||||||
|
|
||||||
|
function addPrefix( prefix, replacement ) {
|
||||||
|
var aux = replacement.replace( /(<span\s+class\s*=\s*(["']))((?:(?!__)\w)+\2\s*>)/ig, "$1" + prefix + "__$3" );
|
||||||
|
return aux;
|
||||||
|
} // addPrefix
|
||||||
|
|
||||||
|
function chef() {
|
||||||
|
if (! arguments[ 0 ]) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
var steps = this.steps;
|
||||||
|
var i = 0; // iterate steps
|
||||||
|
var j = 2; // iterate chef's arguments
|
||||||
|
var prolog = arguments[ 1 ];
|
||||||
|
var epilog = arguments[ arguments.length - 3 ];
|
||||||
|
if (! epilog) {
|
||||||
|
var step;
|
||||||
|
while( step = steps[ i++ ] ) {
|
||||||
|
var aux = arguments; // this unmasks chef's arguments inside the next function
|
||||||
|
if( aux[ j ] ) {
|
||||||
|
var replacement = '';
|
||||||
|
if( $.isFunction( step.replacement ) ) {
|
||||||
|
var matches = []; //Array.slice.call( aux, j, step.length );
|
||||||
|
for (var k = 0, kTop = step.length; k < kTop; k++) {
|
||||||
|
matches.push( aux[ j + k ] );
|
||||||
|
}
|
||||||
|
matches.push( aux[ aux.length - 2 ] );
|
||||||
|
matches.push( aux[ aux.length - 1 ] );
|
||||||
|
replacement = step.replacement
|
||||||
|
.apply( {
|
||||||
|
x: function() {
|
||||||
|
var subject = arguments[0];
|
||||||
|
var module = arguments[1];
|
||||||
|
var context = {
|
||||||
|
recipe: step.recipe
|
||||||
|
, blockName: step.blockName
|
||||||
|
};
|
||||||
|
return applyModule( subject, module, context );
|
||||||
|
}
|
||||||
|
}, matches );
|
||||||
|
}
|
||||||
|
else { //we expect step.replacement to be a string
|
||||||
|
replacement = step.replacement
|
||||||
|
.replace( /(\\\$)|(?:\$\$)|(?:\$(\d+))/g, function( m, escaped, K ) {
|
||||||
|
if( escaped ) { /* \$ */
|
||||||
|
return "$";
|
||||||
|
}
|
||||||
|
else if( !K ) { /* $$ */
|
||||||
|
return filter( aux[ j ] );
|
||||||
|
}
|
||||||
|
else if( K == "0" ) { /* $0 */
|
||||||
|
return step.stepName;
|
||||||
|
}
|
||||||
|
else { /* $K */
|
||||||
|
return filter( aux[ j + parseInt( K, 10 ) ] );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
replacement = addPrefix( step.recipe._name, replacement );
|
||||||
|
return filter( prolog ) + replacement;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
j+= step.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return filter( epilog );
|
||||||
|
}
|
||||||
|
} // chef
|
||||||
|
|
||||||
|
if( ! blockName ) {
|
||||||
|
blockName = '_main';
|
||||||
|
checkSpices( recipe );
|
||||||
|
}
|
||||||
|
if( ! (blockName in recipe) ) {
|
||||||
|
return filter( ingredients );
|
||||||
|
}
|
||||||
|
var replaceSpace = book.replaceSpace;
|
||||||
|
var steps = prepareBlock( recipe, blockName );
|
||||||
|
var kh = knowHow( steps );
|
||||||
|
var perfect = ingredients.replace( kh, function() {
|
||||||
|
return chef.apply( { steps: steps }, arguments );
|
||||||
|
} );
|
||||||
|
return perfect;
|
||||||
|
|
||||||
|
} // cook
|
||||||
|
|
||||||
|
function loadStylesheetInline( sourceCode ) {
|
||||||
|
if( document.createElement ) {
|
||||||
|
var e = document.createElement( "style" );
|
||||||
|
e.type = "text/css";
|
||||||
|
if( e.styleSheet ) { // IE
|
||||||
|
e.styleSheet.cssText = sourceCode;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var t = document.createTextNode( sourceCode );
|
||||||
|
e.appendChild( t );
|
||||||
|
}
|
||||||
|
document.getElementsByTagName( "head" )[0].appendChild( e );
|
||||||
|
}
|
||||||
|
} // loadStylesheetInline
|
||||||
|
|
||||||
|
function checkSpices( recipe ) {
|
||||||
|
var name = recipe._name;
|
||||||
|
if( ! book.queue[ name ] ) {
|
||||||
|
|
||||||
|
var content = ['/* Chili -- ' + name + ' */'];
|
||||||
|
for (var blockName in recipe) {
|
||||||
|
if( blockName.search( /^_(?!main\b)/ ) < 0 ) {
|
||||||
|
for (var stepName in recipe[ blockName ]) {
|
||||||
|
var step = recipe[ blockName ][ stepName ];
|
||||||
|
if( '_style' in step ) {
|
||||||
|
if( step[ '_style' ].constructor == String ) {
|
||||||
|
content.push( '.' + name + '__' + stepName + ' { ' + step[ '_style' ] + ' }' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (var className in step[ '_style' ]) {
|
||||||
|
content.push( '.' + name + '__' + className + ' { ' + step[ '_style' ][ className ] + ' }' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content = content.join('\n');
|
||||||
|
|
||||||
|
loadStylesheetInline( content );
|
||||||
|
|
||||||
|
book.queue[ name ] = true;
|
||||||
|
}
|
||||||
|
} // checkSpices
|
||||||
|
|
||||||
|
function askDish( el ) {
|
||||||
|
var recipeName = book.codeLanguage( el );
|
||||||
|
if( '' != recipeName ) {
|
||||||
|
var path = getPath( recipeName );
|
||||||
|
if( book.recipeLoading ) {
|
||||||
|
/* dynamic setups come here */
|
||||||
|
if( ! book.queue[ path ] ) {
|
||||||
|
/* this is a new recipe to download */
|
||||||
|
try {
|
||||||
|
book.queue[ path ] = [ el ];
|
||||||
|
$.getJSON( path, function( recipeLoaded ) {
|
||||||
|
book.recipes[ path ] = recipeLoaded;
|
||||||
|
var q = book.queue[ path ];
|
||||||
|
for( var i = 0, iTop = q.length; i < iTop; i++ ) {
|
||||||
|
makeDish( q[ i ], path );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
catch( recipeNotAvailable ) {
|
||||||
|
alert( "the recipe for '" + recipeName + "' was not found in '" + path + "'" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* not a new recipe, so just enqueue this element */
|
||||||
|
book.queue[ path ].push( el );
|
||||||
|
}
|
||||||
|
/* a recipe could have been already downloaded */
|
||||||
|
makeDish( el, path );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* static setups come here */
|
||||||
|
makeDish( el, path );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // askDish
|
||||||
|
|
||||||
|
function makeDish( el, recipePath ) {
|
||||||
|
var recipe = book.recipes[ recipePath ];
|
||||||
|
if( ! recipe ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var $el = $( el );
|
||||||
|
var ingredients = $el.text();
|
||||||
|
if( ! ingredients ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//fix for msie: \r (13) is used instead of \n (10)
|
||||||
|
//fix for opera: \r\n is used instead of \n
|
||||||
|
ingredients = ingredients.replace(/\r\n?/g, "\n");
|
||||||
|
|
||||||
|
//reverse fix for safari: msie, mozilla and opera render the initial \n
|
||||||
|
if( $el.parent().is('pre') ) {
|
||||||
|
if( ! $.browser.safari ) {
|
||||||
|
ingredients = ingredients.replace(/^\n/g, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var dish = cook( ingredients, recipe ); // all happens here
|
||||||
|
|
||||||
|
if( book.replaceTab ) {
|
||||||
|
dish = dish.replace( /\t/g, book.replaceTab );
|
||||||
|
}
|
||||||
|
if( book.replaceNewLine ) {
|
||||||
|
dish = dish.replace( /\n/g, book.replaceNewLine );
|
||||||
|
}
|
||||||
|
|
||||||
|
el.innerHTML = dish; //much faster than $el.html( dish );
|
||||||
|
//tried also the function replaceHtml from http://blog.stevenlevithan.com/archives/faster-than-innerhtml
|
||||||
|
//but it was not faster nor without sideffects (it was not possible to count spans into el)
|
||||||
|
|
||||||
|
//opera and safari select PRE text correctly
|
||||||
|
if( $.browser.msie || $.browser.mozilla ) {
|
||||||
|
enableSelectionHelper( el );
|
||||||
|
}
|
||||||
|
|
||||||
|
var $that = $el.parent();
|
||||||
|
var classes = $that.attr( 'class' );
|
||||||
|
var ln = /ln-(\d+)-([\w][\w\-]*)|ln-(\d+)|ln-/.exec( classes );
|
||||||
|
if( ln ) {
|
||||||
|
addLineNumbers( el );
|
||||||
|
var start = 0;
|
||||||
|
if( ln[1] ) {
|
||||||
|
start = parseInt( ln[1], 10 );
|
||||||
|
var $pieces = $( '.ln-' + ln[1] + '-' + ln[2] );
|
||||||
|
var pos = $pieces.index( $that[0] );
|
||||||
|
$pieces.slice( 0, pos ).each( function() {
|
||||||
|
start += $( this ).find( 'li' ).length;
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
else if( ln[3] ) {
|
||||||
|
start = parseInt( ln[3], 10 );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
start = 1;
|
||||||
|
}
|
||||||
|
$el.find( 'ol' )[0].start = start;
|
||||||
|
$('body').width( $('body').width() - 1 ).width( $('body').width() + 1 );
|
||||||
|
}
|
||||||
|
else if( book.lineNumbers ) {
|
||||||
|
addLineNumbers( el );
|
||||||
|
}
|
||||||
|
|
||||||
|
} // makeDish
|
||||||
|
|
||||||
|
function enableSelectionHelper( el ) {
|
||||||
|
var element = null;
|
||||||
|
$( el )
|
||||||
|
.parents()
|
||||||
|
.filter( "pre" )
|
||||||
|
.bind( "mousedown", function() {
|
||||||
|
element = this;
|
||||||
|
if( $.browser.msie ) {
|
||||||
|
document.selection.empty();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window.getSelection().removeAllRanges();
|
||||||
|
}
|
||||||
|
} )
|
||||||
|
.bind( "mouseup", function( event ) {
|
||||||
|
if( element && (element == this) ) {
|
||||||
|
element = null;
|
||||||
|
var selected = '';
|
||||||
|
if( $.browser.msie ) {
|
||||||
|
selected = document.selection.createRange().htmlText;
|
||||||
|
if( '' == selected ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
selected = preserveNewLines( selected );
|
||||||
|
var container_tag = '<textarea style="STYLE">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
selected = window.getSelection().toString(); //opera doesn't select new lines
|
||||||
|
if( '' == selected ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
selected = selected
|
||||||
|
.replace( /\r/g, '' )
|
||||||
|
.replace( /^# ?/g, '' )
|
||||||
|
.replace( /\n# ?/g, '\n' )
|
||||||
|
;
|
||||||
|
var container_tag = '<pre style="STYLE">';
|
||||||
|
}
|
||||||
|
var $container = $( container_tag.replace( /\bSTYLE\b/, ChiliBook.selectionStyle ) )
|
||||||
|
.appendTo( 'body' )
|
||||||
|
.text( selected )
|
||||||
|
.attr( 'id', 'chili_selection' )
|
||||||
|
.click( function() { $(this).remove(); } )
|
||||||
|
;
|
||||||
|
var top = event.pageY - Math.round( $container.height() / 2 ) + "px";
|
||||||
|
var left = event.pageX - Math.round( $container.width() / 2 ) + "px";
|
||||||
|
$container.css( { top: top, left: left } );
|
||||||
|
if( $.browser.msie ) {
|
||||||
|
// window.clipboardData.setData( 'Text', selected ); //I couldn't find anything similar for Mozilla
|
||||||
|
$container[0].focus();
|
||||||
|
$container[0].select();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var s = window.getSelection();
|
||||||
|
s.removeAllRanges();
|
||||||
|
var r = document.createRange();
|
||||||
|
r.selectNodeContents( $container[0] );
|
||||||
|
s.addRange( r );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} )
|
||||||
|
;
|
||||||
|
} // enableSelectionHelper
|
||||||
|
|
||||||
|
function getPath( recipeName ) {
|
||||||
|
return book.recipeFolder + recipeName + ".js";
|
||||||
|
} // getPath
|
||||||
|
|
||||||
|
function getSelectedText() {
|
||||||
|
var text = '';
|
||||||
|
if( $.browser.msie ) {
|
||||||
|
text = document.selection.createRange().htmlText;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
text = window.getSelection().toString();
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
} // getSelectedText
|
||||||
|
|
||||||
|
function preserveNewLines( html ) {
|
||||||
|
do {
|
||||||
|
var newline_flag = ChiliBook.unique();
|
||||||
|
}
|
||||||
|
while( html.indexOf( newline_flag ) > -1 );
|
||||||
|
var text = '';
|
||||||
|
if (/<br/i.test(html) || /<li/i.test(html)) {
|
||||||
|
if (/<br/i.test(html)) {
|
||||||
|
html = html.replace( /\<br[^>]*?\>/ig, newline_flag );
|
||||||
|
}
|
||||||
|
else if (/<li/i.test(html)) {
|
||||||
|
html = html.replace( /<ol[^>]*?>|<\/ol>|<li[^>]*?>/ig, '' ).replace( /<\/li>/ig, newline_flag );
|
||||||
|
}
|
||||||
|
var el = $( '<pre>' ).appendTo( 'body' ).hide()[0];
|
||||||
|
el.innerHTML = html;
|
||||||
|
text = $( el ).text().replace( new RegExp( newline_flag, "g" ), '\r\n' );
|
||||||
|
$( el ).remove();
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
} // preserveNewLines
|
||||||
|
|
||||||
|
function addLineNumbers( el ) {
|
||||||
|
|
||||||
|
function makeListItem1( not_last_line, not_last, last, open ) {
|
||||||
|
var close = open ? '</span>' : '';
|
||||||
|
var aux = '';
|
||||||
|
if( not_last_line ) {
|
||||||
|
aux = '<li>' + open + not_last + close + '</li>';
|
||||||
|
}
|
||||||
|
else if( last ) {
|
||||||
|
aux = '<li>' + open + last + close + '</li>';
|
||||||
|
}
|
||||||
|
return aux;
|
||||||
|
} // makeListItem1
|
||||||
|
|
||||||
|
function makeListItem2( not_last_line, not_last, last, prev_li ) {
|
||||||
|
var aux = '';
|
||||||
|
if( prev_li ) {
|
||||||
|
aux = prev_li;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
aux = makeListItem1( not_last_line, not_last, last, '' )
|
||||||
|
}
|
||||||
|
return aux;
|
||||||
|
} // makeListItem2
|
||||||
|
|
||||||
|
var html = $( el ).html();
|
||||||
|
var br = /<br>/.test(html) ? '<br>' : '<BR>';
|
||||||
|
var empty_line = '<li>' + book.replaceSpace + '</li>';
|
||||||
|
var list_items = html
|
||||||
|
//extract newlines at the beginning of a span
|
||||||
|
.replace( /(<span [^>]+>)((?:(?: |\xA0)<br>)+)(.*?)(<\/span>)/ig, '$2$1$3$4' ) // I don't know why <span .*?> does not work here
|
||||||
|
//transform newlines inside of a span
|
||||||
|
.replace( /(.*?)(<span .*?>)(.*?)(?:<\/span>(?: |\xA0)<br>|<\/span>)/ig, // but here it does
|
||||||
|
function( all, before, open, content ) {
|
||||||
|
if (/<br>/i.test(content)) {
|
||||||
|
var pieces = before.split( br );
|
||||||
|
var lastPiece = pieces.pop();
|
||||||
|
before = pieces.join( br );
|
||||||
|
var aux = (before ? before + br : '') //+ replace1( lastPiece + content, open );
|
||||||
|
+ (lastPiece + content).replace( /((.*?)(?: |\xA0)<br>)|(.*)/ig,
|
||||||
|
function( tmp, not_last_line, not_last, last ) {
|
||||||
|
var aux2 = makeListItem1( not_last_line, not_last, last, open );
|
||||||
|
return aux2;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return aux;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
//transform newlines outside of a span
|
||||||
|
.replace( /(<li>.*?<\/li>)|((.*?)(?: |\xA0)<br>)|(.+)/ig,
|
||||||
|
function( tmp, prev_li, not_last_line, not_last, last ) {
|
||||||
|
var aux2 = makeListItem2( not_last_line, not_last, last, prev_li );
|
||||||
|
return aux2;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
//fix empty lines for Opera
|
||||||
|
.replace( /<li><\/li>/ig, empty_line )
|
||||||
|
;
|
||||||
|
|
||||||
|
el.innerHTML = '<ol>' + list_items + '</ol>';
|
||||||
|
} // addLineNumbers
|
||||||
|
|
||||||
|
function revealChars( tmp ) {
|
||||||
|
return $
|
||||||
|
.map( tmp.split(''),
|
||||||
|
function(n, i) {
|
||||||
|
return ' ' + n + ' ' + n.charCodeAt( 0 ) + ' ';
|
||||||
|
} )
|
||||||
|
.join(' ');
|
||||||
|
} // revealChars
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// the coloring starts here
|
||||||
|
this
|
||||||
|
.each( function() {
|
||||||
|
var $this = $( this );
|
||||||
|
$this.trigger( 'chili.before_coloring' );
|
||||||
|
askDish( this );
|
||||||
|
$this.trigger( 'chili.after_coloring' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
return this;
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//main
|
||||||
|
$( function() {
|
||||||
|
|
||||||
|
if( ChiliBook.automatic ) {
|
||||||
|
$( ChiliBook.automaticSelector ).chili();
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
} ) ( jQuery );
|
@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.javascript .mlcom { color: #4040c2; }
|
|
||||||
.javascript .com { color: green; }
|
|
||||||
.javascript .regexp { color: maroon; }
|
|
||||||
.javascript .string { color: teal; }
|
|
||||||
.javascript .keywords { color: navy; font-weight: bold; }
|
|
||||||
.javascript .global { color: blue; }
|
|
||||||
.javascript .numbers { color: red; }
|
|
||||||
|
|
||||||
.javascript .jquery .object { color: red; font-weight: bold; }
|
|
||||||
.javascript .jquery .private { background-color: #CCCC99; }
|
|
||||||
.javascript .jquery .attributes { background-color: #CCCC00; }
|
|
||||||
.javascript .jquery .traversing { background-color: #CCCC00; }
|
|
||||||
.javascript .jquery .manipulation { background-color: #CCCC00; }
|
|
||||||
.javascript .jquery .utilities { background-color: #CCCCFF; }
|
|
||||||
.javascript .jquery .core { background-color: #7F7FFF; color: white; }
|
|
||||||
.javascript .jquery .ajax { background-color: #7F7FFF; color: #FFD400; }
|
|
||||||
.javascript .jquery .css { background-color: #999900; color: white; }
|
|
||||||
.javascript .jquery .effects { background-color: #FFAA00; }
|
|
||||||
.javascript .jquery .events { background-color: #FFD400; }
|
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
|
||||||
steps:
|
|
||||||
{
|
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
|
||||||
, com : { exp: /\/\/.*/ }
|
|
||||||
, regexp : { exp: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/ }
|
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
|
||||||
, numbers : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
|
|
||||||
, keywords: { exp: /\b(arguments|break|case|catch|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|try|typeof|var|void|while|with)\b/ }
|
|
||||||
, global : { exp: /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ }
|
|
||||||
|
|
||||||
, "jquery utilities" : {
|
|
||||||
exp : /(?:\$\.browser|\$\.each|\$\.extend|\$\.grep|\$\.map|\$\.merge|\$\.trim)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="global">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery private" : {
|
|
||||||
exp : /(?:\$\.find|\$\.parents|\$\.sibling|\.domManip|\.eventTesting|\.extend|\.get|\.init|\.jquery|\.pushStack)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="private">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery ajax" : {
|
|
||||||
exp : /(?:\$\.ajax|\$\.ajaxSetup|\$\.ajaxTimeout|\$\.get|\$\.getIfModified|\$\.getJSON|\$\.getScript|\$\.post|.ajaxComplete|.ajaxError|.ajaxSend|.ajaxStart|.ajaxStop|.ajaxSuccess|.load|.loadIfModified|.serialize)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="ajax">$$</span></span>'
|
|
||||||
}
|
|
||||||
, "jquery object" : {
|
|
||||||
exp : /jQuery|\$(?=\W)/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="object">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery core" : {
|
|
||||||
exp : /\$\.extend|\$\.noConflict|\.(?:each|eq|get|gt|index|lt|size)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="core">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery css" : {
|
|
||||||
exp : /\.(?:css|height|width)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="css">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery attributes" : {
|
|
||||||
exp : /\.(?:addClass|attr|html|removeAttr|removeClass|text|toggleClass|val)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="attributes">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery traversing" : {
|
|
||||||
exp : /\.(?:add|children|contains|end|filter|find|is|next|not|parent|parents|prev|siblings)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="traversing">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery manipulation": {
|
|
||||||
exp : /\.(?:after|append|appendTo|before|clone|empty|insertAfter|insertBefore|prepend|prependTo|remove|wrap)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="manipulation">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery effects" : {
|
|
||||||
exp : /\.(?:animate|fadeIn|fadeOut|fadeTo|hide|show|slideDown|slideToggle|slideUp|toggle)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="effects">$$</span></span>'
|
|
||||||
}
|
|
||||||
,"jquery events" : {
|
|
||||||
exp : /\.(?:bind|blur|change|click|dblclick|error|focus|hover|keydown|keypress|keyup|load|mousedown|mousemove|mouseout|mouseover|mouseup|one|ready|resize|scroll|select|submit|toggle|trigger|unbind|unload)\b/
|
|
||||||
, replacement: '<span class="jquery" title="$0"><span class="events">$$</span></span>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
75
docs/js/chili/js.js
Normal file
75
docs/js/chili/js.js
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
===============================================================================
|
||||||
|
Chili is the jQuery code highlighter plugin
|
||||||
|
...............................................................................
|
||||||
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
|
===============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
{
|
||||||
|
_name: 'js'
|
||||||
|
, _case: true
|
||||||
|
, _main: {
|
||||||
|
ml_comment: {
|
||||||
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
|
, _style: 'color: gray;'
|
||||||
|
}
|
||||||
|
, sl_comment: {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: 'color: green;'
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: 'color: teal;'
|
||||||
|
}
|
||||||
|
, num: {
|
||||||
|
_match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
|
||||||
|
, _style: 'color: red;'
|
||||||
|
}
|
||||||
|
, reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
|
||||||
|
_match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
|
||||||
|
, _replace: function( all ) {
|
||||||
|
return this.x( all, '//num' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, reg_exp: {
|
||||||
|
_match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
|
||||||
|
, _style: 'color: maroon;'
|
||||||
|
}
|
||||||
|
, brace: {
|
||||||
|
_match: /[\{\}]/
|
||||||
|
, _style: 'color: red; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, statement: {
|
||||||
|
_match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
|
||||||
|
, _style: 'color: navy; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, error: {
|
||||||
|
_match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
|
||||||
|
, _style: 'color: Coral;'
|
||||||
|
}
|
||||||
|
, object: {
|
||||||
|
_match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
|
||||||
|
, _style: 'color: DeepPink;'
|
||||||
|
}
|
||||||
|
, property: {
|
||||||
|
_match: /\b(undefined|arguments|NaN|Infinity)\b/
|
||||||
|
, _style: 'color: Purple; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, 'function': {
|
||||||
|
_match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
|
||||||
|
, _style: 'color: olive;'
|
||||||
|
}
|
||||||
|
, operator: {
|
||||||
|
_match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
|
||||||
|
, _style: 'color: RoyalBlue; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, liveconnect: {
|
||||||
|
_match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
|
||||||
|
, _style: 'text-decoration: overline;'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.lotusscript .mlcom { color: #4040c2; }
|
|
||||||
.lotusscript .com { color: green; }
|
|
||||||
.lotusscript .mlstr { color: red; }
|
|
||||||
.lotusscript .str { color: teal; }
|
|
||||||
.lotusscript .keyd { color: fuchsia; }
|
|
||||||
.lotusscript .keyw { color: maroon; font-weight: bold; }
|
|
||||||
.lotusscript .directive { color: #5f5f5f; }
|
|
||||||
.lotusscript .notes { color: navy; }
|
|
||||||
.lotusscript .notesui { color: purple; }
|
|
@ -2,26 +2,53 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
ignoreCase: true
|
_name: "ls"
|
||||||
, steps: {
|
, _case: false
|
||||||
mlcom : { exp : /((?:^|\n)%REM\b.*)((?:.|\n)*?)(\n%END\s*REM\b.*)/
|
, _main: {
|
||||||
,replacement: '<span class="directive">$1</span><span class="mlcom">$2</span><span class="directive">$3</span>'
|
mlcom: {
|
||||||
|
_match: /((?:^|\n)%REM\b.*)([\w\W]*?)(\n%END\s*REM\b.*)/
|
||||||
|
, _replace: '<span class="directive">$1</span><span class="mlcom">$2</span><span class="directive">$3</span>'
|
||||||
|
, _style: "color: #4040c2;"
|
||||||
|
}
|
||||||
|
, com: {
|
||||||
|
_match: /(?:\'.*)|(?:\bREM\b.*)/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, mlstr: {
|
||||||
|
_match: /(?:\{[^}]*\})|(?:\|[^|]*\|)/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, str: {
|
||||||
|
_match: /(?:\"[^\"].*?\")|\"\"/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, keyd: {
|
||||||
|
_match: /\b(?:Ustring|Uchr|Ucase|Trim|Time|Strtoken|Strrightback|Strright|Strleftback|Strleft|String|Str|Space|Rtrim|Rightc|Rightbp|Rightb|Right|Oct|Midc|Midbp|Midb|Mid|Ltrim|Leftc|Leftbp|Leftb|Left|Lcase|Inputbp|Inputbox|Inputb|Input|Implode|Hex|Format|Error|Environ|Dir|Date|Curdrive|Curdir|Command|Chr|Bin)[$](?:\s)/
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, keyw: {
|
||||||
|
_match: /\b(?:Yield|Year|Xor|Write|With|Width|While|Wend|Weekday|Vartype|Variant|Val|Ustring|Uselsx|Use|Until|Unlock|Unicode|Uni|Uchr|Ucase|Ubound|Typename|Type|True|Trim|Today|To|Timevalue|Timeserial|Timer|Timenumber|Time|Then|Text|Tan|Tab|Sub|Strtoken|Strrightback|Strright|Strleftback|Strleft|String|Strconv|Strcompare|Strcomp|Str|Stop|Step|Static|Sqr|Split|Spc|Space|Sleep|Single|Sin|Shell|Shared|Sgn|Setfileattr|Setattr|Set|Sendkeys|Select|Seek|Second|Rtrim|Rset|Round|Rnd|Rmdir|Rightc|Rightbp|Rightb|Right|Return|Resume|Reset|Replace|Remove|Redim|Read|Randomize|Random|Put|Published|Public|Property|Private|Print|Preserve|Pitch|Pi|Output|Or|Option|Open|On|Oct|Null|Now|Nothing|Not|Nopitch|Nocase|Next|New|Name|Msgbox|Month|Mod|Mkdir|Minute|Midc|Midbp|Midb|Mid|Messagebox|Me|Ltrim|Lsserver|Lsi_info|Lset|Loop|Long|Log|Lof|Lock|Loc|Lmbcs|Listtag|List|Line|Like|Lib|Let|Lenc|Lenbp|Lenb|Len|Leftc|Leftbp|Leftb|Left|Lcase|Lbound|Kill|Join|Isunknown|Isscalar|Isobject|Isnumeric|Isnull|Islist|Isempty|Iselement|Isdate|Isarray|Isa|Is|Integer|Int|Instrc|Instrbp|Instrb|Instr|Inputbp|Inputbox|Inputb|Input|In|Implode|Imp|Imestatus|Imesetmode|If|Hour|Hex|Goto|Gosub|Getthreadinfo|Getfileattr|Getattr|Get|Function|Fulltrim|From|Freefile|Fraction|Format|Forall|For|Fix|Filelen|Filedatetime|Filecopy|Fileattr|False|Explicit|Exp|Exit|Execute|Event|Evaluate|Error|Err|Erl|Erase|Eqv|Eof|Environ|End|Elseif|Else|Double|Doevents|Do|Dir|Dim|Destroylock|Delete|Defvar|Defstr|Defsng|Deflng|Defint|Defdbl|Defcur|Defbyte|Defbool|Declare|Day|Datevalue|Dateserial|Datenumber|Date|Datatype|Cvdate|Cvar|Currency|Curdrive|Curdir|Cstr|Csng|Createlock|Cos|Const|Compare|Command|Codeunlock|Codelockcheck|Codelock|Close|Clng|Class|Cint|Chr|Chdrive|Chdir|Cdbl|Cdat|Ccur|Cbyte|Cbool|Case|Call|Byval|Byte|Boolean|Bind|Binary|Bin|Beep|Base|Atn2|Atn|Asin|Asc|As|Arrayunique|Arrayreplace|Arraygetindex|Arrayappend|Append|Appactivate|Any|And|Alias|Activateapp|Acos|Access|Abs)\b/
|
||||||
|
, _style: "color: maroon; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, directive: {
|
||||||
|
_match: /((?:^|\n)(?:%if|%end|%elseif|%else)\b)|(?:(?:^|\n)%include\b.*)/
|
||||||
|
, _style: "color: #5f5f5f;"
|
||||||
|
}
|
||||||
|
, notes: {
|
||||||
|
_match: /\b(?:NotesXSLTransformer|NotesXMLProcessor|NotesViewNavigator|NotesViewEntryCollection|NotesViewEntry|NotesViewColumn|NotesView|NotesTimer|NotesStream|NotesSession|NotesSAXParser|NotesSAXException|NotesSAXAttributeList|NotesRichTextTable|NotesRichTextTab|NotesRichTextStyle|NotesRichTextSection|NotesRichTextRange|NotesRichTextParagraphStyle|NotesRichTextNavigator|NotesRichTextItem|NotesRichTextDocLink|NotesReplicationEntry|NotesReplication|NotesRegistration|NotesOutlineEntry|NotesOutline|NotesNoteCollection|NotesNewsLetter|NotesName|NotesMIMEHeader|NotesMIMEEntity|NotesLog|NotesItem|NotesInternational|NotesForm|NotesEmbeddedObject|NotesDocumentCollection|NotesDocument|NotesDbDirectory|NotesDateTime|NotesDateRange|NotesDatabase|NotesDXLImporter|NotesDXLExporter|NotesDOMXMLDeclNode|NotesDOMTextNode|NotesDOMProcessingInstructionNode|NotesDOMParser|NotesDOMNotationNode|NotesDOMNodeList|NotesDOMNode|NotesDOMNamedNodeMap|NotesDOMEntityReferenceNode|NotesDOMEntityNode|NotesDOMElementNode|NotesDOMDocumentTypeNode|NotesDOMDocumentNode|NotesDOMDocumentFragmentNode|NotesDOMCommentNode|NotesDOMCharacterDataNode|NotesDOMCDATASectionNode|NotesDOMAttributeNode|NotesColorObject|NotesAgent|NotesAdministrationProcess|NotesACLEntry|NotesACL)\b/
|
||||||
|
, _style: "color: navy;"
|
||||||
|
}
|
||||||
|
, notesui: {
|
||||||
|
_match: /\b(?:NotesUIWorkspace|NotesUIView|NotesUIScheduler|NotesUIDocument|NotesUIDatabase|Navigator|Field|Button)\b/
|
||||||
|
, _style: "color: purple;"
|
||||||
}
|
}
|
||||||
, com : { exp : /(?:\'.*)|(?:\bREM\b.*)/ }
|
|
||||||
, mlstr : { exp : /(?:\{[^}]*\})|(?:\|[^|]*\|)/ }
|
|
||||||
, str : { exp : /(?:\"[^\"].*?\")|\"\"/ }
|
|
||||||
, keyd : { exp : /\b(?:Bin|Chr|Command|Curdir|Curdrive|Date|Dir|Environ|Error|Format|Hex|Implode|Input|Inputb|Inputbox|Inputbp|Lcase|Left|Leftb|Leftbp|Leftc|Ltrim|Mid|Midb|Midbp|Midc|Oct|Right|Rightb|Rightbp|Rightc|Rtrim|Space|Str|String|Strleft|Strleftback|Strright|Strrightback|Strtoken|Time|Trim|Ucase|Uchr|Ustring)[$](?:\s)/ }
|
|
||||||
, keyw : { exp : /\b(?:Abs|Access|Acos|Activateapp|Alias|And|Any|Appactivate|Append|Arrayappend|Arraygetindex|Arrayreplace|Arrayunique|As|Asc|Asin|Atn|Atn2|Base|Beep|Bin|Binary|Bind|Boolean|Byte|Byval|Call|Case|Cbool|Cbyte|Ccur|Cdat|Cdbl|Chdir|Chdrive|Chr|Cint|Class|Clng|Close|Codelock|Codelockcheck|Codeunlock|Command|Compare|Const|Cos|Createlock|Csng|Cstr|Curdir|Curdrive|Currency|Cvar|Cvdate|Datatype|Date|Datenumber|Dateserial|Datevalue|Day|Declare|Defbool|Defbyte|Defcur|Defdbl|Defint|Deflng|Defsng|Defstr|Defvar|Delete|Destroylock|Dim|Dir|Do|Doevents|Double|Else|Elseif|End|Environ|Eof|Eqv|Erase|Erl|Err|Error|Evaluate|Event|Execute|Exit|Exp|Explicit|False|Fileattr|Filecopy|Filedatetime|Filelen|Fix|For|Forall|Format|Fraction|Freefile|From|Fulltrim|Function|Get|Getattr|Getfileattr|Getthreadinfo|Gosub|Goto|Hex|Hour|If|Imesetmode|Imestatus|Imp|Implode|In|Input|Inputb|Inputbox|Inputbp|Instr|Instrb|Instrbp|Instrc|Int|Integer|Is|Isa|Isarray|Isdate|Iselement|Isempty|Islist|Isnull|Isnumeric|Isobject|Isscalar|Isunknown|Join|Kill|Lbound|Lcase|Left|Leftb|Leftbp|Leftc|Len|Lenb|Lenbp|Lenc|Let|Lib|Like|Line|List|Listtag|Lmbcs|Loc|Lock|Lof|Log|Long|Loop|Lset|Lsi_info|Lsserver|Ltrim|Me|Messagebox|Mid|Midb|Midbp|Midc|Minute|Mkdir|Mod|Month|Msgbox|Name|New|Next|Nocase|Nopitch|Not|Nothing|Now|Null|Oct|On|Open|Option|Or|Output|Pi|Pitch|Preserve|Print|Private|Property|Public|Published|Put|Random|Randomize|Read|Redim|Remove|Replace|Reset|Resume|Return|Right|Rightb|Rightbp|Rightc|Rmdir|Rnd|Round|Rset|Rtrim|Second|Seek|Select|Sendkeys|Set|Setattr|Setfileattr|Sgn|Shared|Shell|Sin|Single|Sleep|Space|Spc|Split|Sqr|Static|Step|Stop|Str|Strcomp|Strcompare|Strconv|String|Strleft|Strleftback|Strright|Strrightback|Strtoken|Sub|Tab|Tan|Text|Then|Time|Timenumber|Timer|Timeserial|Timevalue|To|Today|Trim|True|Type|Typename|Ubound|Ucase|Uchr|Uni|Unicode|Unlock|Until|Use|Uselsx|Ustring|Val|Variant|Vartype|Weekday|Wend|While|Width|With|Write|Xor|Year|Yield)\b/ }
|
|
||||||
, directive: { exp : /((?:^|\n)(?:%else|%elseif|%end|%if)\b)|(?:(?:^|\n)%include\b.*)/ }
|
|
||||||
, notes : { exp : /\b(?:NotesACL|NotesACLEntry|NotesAdministrationProcess|NotesAgent|NotesColorObject|NotesDatabase|NotesDateRange|NotesDateTime|NotesDbDirectory|NotesDocument|NotesDocumentCollection|NotesDOMAttributeNode|NotesDOMCDATASectionNode|NotesDOMCharacterDataNode|NotesDOMCommentNode|NotesDOMDocumentFragmentNode|NotesDOMDocumentNode|NotesDOMDocumentTypeNode|NotesDOMElementNode|NotesDOMEntityNode|NotesDOMEntityReferenceNode|NotesDOMNamedNodeMap|NotesDOMNode|NotesDOMNodeList|NotesDOMNotationNode|NotesDOMParser|NotesDOMProcessingInstructionNode|NotesDOMTextNode|NotesDOMXMLDeclNode|NotesDXLExporter|NotesDXLImporter|NotesEmbeddedObject|NotesForm|NotesInternational|NotesItem|NotesLog|NotesMIMEEntity|NotesMIMEHeader|NotesName|NotesNewsLetter|NotesNoteCollection|NotesOutline|NotesOutlineEntry|NotesRegistration|NotesReplication|NotesReplicationEntry|NotesRichTextDocLink|NotesRichTextItem|NotesRichTextNavigator|NotesRichTextParagraphStyle|NotesRichTextRange|NotesRichTextSection|NotesRichTextStyle|NotesRichTextTab|NotesRichTextTable|NotesSAXAttributeList|NotesSAXException|NotesSAXParser|NotesSession|NotesStream|NotesTimer|NotesView|NotesViewColumn|NotesViewEntry|NotesViewEntryCollection|NotesViewNavigator|NotesXMLProcessor|NotesXSLTransformer)\b/ }
|
|
||||||
, notesui : { exp : /\b(?:Button|Field|Navigator|NotesUIDatabase|NotesUIDocument|NotesUIScheduler|NotesUIView|NotesUIWorkspace)\b/ }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.mysql .function { color: #e17100; }
|
|
||||||
.mysql .keyword { color: navy; font-weight: bold; }
|
|
||||||
.mysql .mlcom { color: gray; }
|
|
||||||
.mysql .com { color: green; }
|
|
||||||
.mysql .number { color: red; }
|
|
||||||
.mysql .hexnum { color: red; font-weight: bold; }
|
|
||||||
.mysql .string { color: purple; }
|
|
||||||
.mysql .quid { color: fuchsia; }
|
|
||||||
.mysql .id { color: maroon; }
|
|
||||||
.mysql .value { color: gray; font-weight: bold; }
|
|
||||||
.mysql .variable { color: #4040c2; }
|
|
@ -2,31 +2,62 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
|
|
||||||
|
Copyright 2008 / Andrea Ercolino
|
||||||
===============================================================================
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
ignoreCase: true
|
_name: "sql"
|
||||||
, steps: {
|
, _case: false
|
||||||
mlcom : { exp: /\/\*[^*]*\*+([^\/][^*]*\*+)*\// }
|
, _main: {
|
||||||
, com : { exp: /(?:--\s+.*)|(?:[^\\]\#.*)/ }
|
mlcom: {
|
||||||
, string : { exp: /([\"\'])(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/ }
|
_match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
|
||||||
, quid : { exp: /(`)(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/ }
|
, _style: "color: gray;"
|
||||||
, value : { exp: /\b(?:NULL|TRUE|FALSE)\b/ }
|
|
||||||
, number : { exp: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/ }
|
|
||||||
, hexnum : { exp: /\b0[xX][\dA-Fa-f]+\b|\b[xX]([\'\"])[\dA-Fa-f]+\1/ }
|
|
||||||
, op : { exp: /!=|&&|<|<<|<=|<=>|<>|=|>|>=|>>|\|\|/ }
|
|
||||||
, variable : { exp: /@([$.\w]+|([`\"\'])(?:(?:[^\2\\\r\n]*?(?:\2\2|\\.))*[^\2\\\r\n]*?)\2)/
|
|
||||||
, replacement: '<span class="keyword">@</span><span class="variable">$1</span>'
|
|
||||||
}
|
}
|
||||||
, keyword : { exp: /\b(?:A(?:CTION|DD|FTER|G(?:AINST|GREGATE)|L(?:GORITHM|L|TER)|N(?:ALYZE|D|Y)|S(?:C(?:II|)|ENSITIVE|)|UTO_INCREMENT|VG(?:_ROW_LENGTH|))|B(?:ACKUP|DB|E(?:FORE|GIN|RKELEYDB|TWEEN)|I(?:GINT|N(?:ARY|LOG)|T)|LOB|O(?:OL(?:EAN|)|TH)|TREE|Y(?:TE|))|C(?:A(?:CHE|LL|S(?:CADE(?:D|)|E))|H(?:A(?:IN|NGE(?:D|)|R(?:ACTER|SET|))|ECK(?:SUM|))|IPHER|L(?:IENT|OSE)|O(?:DE|L(?:LAT(?:E|ION)|UMN(?:S|))|M(?:M(?:ENT|IT(?:TED|))|P(?:ACT|RESSED))|N(?:CURRENT|DITION|NECTION|S(?:ISTENT|TRAINT)|T(?:AINS|INUE)|VERT))|R(?:EATE|OSS)|U(?:BE|R(?:RENT_(?:DATE|TIME(?:STAMP|)|USER)|SOR)))|D(?:A(?:T(?:A(?:BASE(?:S|)|)|E(?:TIME|))|Y(?:_(?:HOUR|MI(?:CROSECOND|NUTE)|SECOND)|))|E(?:ALLOCATE|C(?:IMAL|LARE|)|F(?:AULT|INER)|L(?:AY(?:ED|_KEY_WRITE)|ETE)|S(?:C(?:RIBE|)|_KEY_FILE)|TERMINISTIC)|I(?:RECTORY|S(?:ABLE|CARD|TINCT(?:ROW|))|V)|O(?:UBLE|)|ROP|U(?:AL|MPFILE|PLICATE)|YNAMIC)|E(?:ACH|LSE(?:IF|)|N(?:ABLE|CLOSED|D|GINE(?:S|)|UM)|RRORS|SCAPE(?:D|)|VENTS|X(?:ECUTE|I(?:STS|T)|P(?:ANSION|LAIN)|TENDED))|F(?:A(?:LSE|ST)|ETCH|I(?:ELDS|LE|RST|XED)|L(?:OAT(?:4|8|)|USH)|O(?:R(?:CE|EIGN|)|UND)|R(?:AC_SECOND|OM)|U(?:LL(?:TEXT|)|NCTION))|G(?:E(?:OMETRY(?:COLLECTION|)|T_FORMAT)|LOBAL|R(?:ANT(?:S|)|OUP))|H(?:A(?:NDLER|SH|VING)|ELP|IGH_PRIORITY|O(?:STS|UR(?:_(?:MI(?:CROSECOND|NUTE)|SECOND)|)))|I(?:DENTIFIED|F|GNORE|MPORT|N(?:DEX(?:ES|)|FILE|N(?:ER|O(?:BASE|DB))|OUT|SE(?:NSITIVE|RT(?:_METHOD|))|T(?:1|2|3|4|8|E(?:GER|RVAL)|O|)|VOKER|)|O_THREAD|S(?:OLATION|SUER|)|TERATE)|JOIN|K(?:EY(?:S|)|ILL)|L(?:A(?:NGUAGE|ST)|E(?:A(?:DING|VE(?:S|))|FT|VEL)|I(?:KE|MIT|NES(?:TRING|))|O(?:AD|C(?:AL(?:TIME(?:STAMP|)|)|K(?:S|))|GS|NG(?:BLOB|TEXT|)|OP|W_PRIORITY))|M(?:A(?:STER(?:_(?:CONNECT_RETRY|HOST|LOG_(?:FILE|POS)|P(?:ASSWORD|ORT)|S(?:ERVER_ID|SL(?:_(?:C(?:A(?:PATH|)|ERT|IPHER)|KEY)|))|USER)|)|TCH|X_(?:CONNECTIONS_PER_HOUR|QUERIES_PER_HOUR|ROWS|U(?:PDATES_PER_HOUR|SER_CONNECTIONS)))|E(?:DIUM(?:BLOB|INT|TEXT|)|RGE)|I(?:CROSECOND|DDLEINT|GRATE|N(?:UTE(?:_(?:MICROSECOND|SECOND)|)|_ROWS))|O(?:D(?:E|IF(?:IES|Y)|)|NTH)|U(?:LTI(?:LINESTRING|PO(?:INT|LYGON))|TEX))|N(?:A(?:ME(?:S|)|T(?:IONAL|URAL))|CHAR|DB(?:CLUSTER|)|E(?:W|XT)|O(?:NE|T|_WRITE_TO_BINLOG|)|U(?:LL|MERIC)|VARCHAR)|O(?:FFSET|LD_PASSWORD|N(?:E(?:_SHOT|)|)|P(?:EN|TI(?:MIZE|ON(?:ALLY|)))|R(?:DER|)|UT(?:ER|FILE|))|P(?:A(?:CK_KEYS|RTIAL|SSWORD)|HASE|O(?:INT|LYGON)|R(?:E(?:CISION|PARE|V)|I(?:MARY|VILEGES)|OCE(?:DURE|SS(?:LIST|)))|URGE)|QU(?:ARTER|ERY|ICK)|R(?:AID(?:0|_(?:CHUNKS(?:IZE|)|TYPE))|E(?:A(?:D(?:S|)|L)|COVER|DUNDANT|FERENCES|GEXP|L(?:AY_(?:LOG_(?:FILE|POS)|THREAD)|EASE|OAD)|NAME|P(?:AIR|EAT(?:ABLE|)|L(?:ACE|ICATION))|QUIRE|S(?:ET|T(?:ORE|RICT)|UME)|TURN(?:S|)|VOKE)|IGHT|LIKE|O(?:LL(?:BACK|UP)|UTINE|W(?:S|_FORMAT|))|TREE)|S(?:AVEPOINT|CHEMA(?:S|)|E(?:C(?:OND(?:_MICROSECOND|)|URITY)|LECT|NSITIVE|PARATOR|RIAL(?:IZABLE|)|SSION|T)|H(?:ARE|OW|UTDOWN)|I(?:GNED|MPLE)|LAVE|MALLINT|NAPSHOT|O(?:ME|NAME|UNDS)|P(?:ATIAL|ECIFIC)|QL(?:EXCEPTION|STATE|WARNING|_(?:B(?:IG_RESULT|UFFER_RESULT)|CA(?:CHE|LC_FOUND_ROWS)|NO_CACHE|SMALL_RESULT|T(?:HREAD|SI_(?:DAY|FRAC_SECOND|HOUR|M(?:INUTE|ONTH)|QUARTER|SECOND|WEEK|YEAR)))|)|SL|T(?:A(?:RT(?:ING|)|TUS)|O(?:P|RAGE)|R(?:AIGHT_JOIN|I(?:NG|PED)))|U(?:BJECT|PER|SPEND))|T(?:ABLE(?:S(?:PACE|)|)|E(?:MP(?:ORARY|TABLE)|RMINATED|XT)|HEN|I(?:ME(?:STAMP(?:ADD|DIFF|)|)|NY(?:BLOB|INT|TEXT))|O|R(?:A(?:ILING|NSACTION)|IGGER(?:S|)|U(?:E|NCATE))|YPE(?:S|))|U(?:N(?:COMMITTED|D(?:EFINED|O)|I(?:CODE|ON|QUE)|KNOWN|LOCK|SIGNED|TIL)|P(?:DATE|GRADE)|S(?:AGE|E(?:R(?:_RESOURCES|)|_FRM|)|ING)|TC_(?:DATE|TIME(?:STAMP|)))|V(?:A(?:LUE(?:S|)|R(?:BINARY|CHAR(?:ACTER|)|IABLES|YING))|IEW)|W(?:ARNINGS|EEK|H(?:E(?:N|RE)|ILE)|ITH|ORK|RITE)|X(?:509|A|OR)|YEAR(?:_MONTH|)|ZEROFILL)\b/
|
, com: {
|
||||||
|
_match: /(?:--\s+.*)|(?:[^\\]\#.*)/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /([\"\'])(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/
|
||||||
|
, _style: "color: purple;"
|
||||||
|
}
|
||||||
|
, quid: {
|
||||||
|
_match: /(`)(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, value: {
|
||||||
|
_match: /\b(?:NULL|TRUE|FALSE)\b/
|
||||||
|
, _style: "color: gray; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, number: {
|
||||||
|
_match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, hexnum: {
|
||||||
|
_match: /\b0[xX][\dA-Fa-f]+\b|\b[xX]([\'\"])[\dA-Fa-f]+\1/
|
||||||
|
, _style: "color: red; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, variable: {
|
||||||
|
_match: /@([$.\w]+|([`\"\'])(?:(?:[^\2\\\r\n]*?(?:\2\2|\\.))*[^\2\\\r\n]*?)\2)/
|
||||||
|
, _replace: '<span class="keyword">@</span><span class="variable">$1</span>'
|
||||||
|
, _style: "color: #4040c2;"
|
||||||
|
}
|
||||||
|
, keyword: {
|
||||||
|
_match: /\b(?:A(?:CTION|DD|FTER|G(?:AINST|GREGATE)|L(?:GORITHM|L|TER)|N(?:ALYZE|D|Y)|S(?:C(?:II|)|ENSITIVE|)|UTO_INCREMENT|VG(?:_ROW_LENGTH|))|B(?:ACKUP|DB|E(?:FORE|GIN|RKELEYDB|TWEEN)|I(?:GINT|N(?:ARY|LOG)|T)|LOB|O(?:OL(?:EAN|)|TH)|TREE|Y(?:TE|))|C(?:A(?:CHE|LL|S(?:CADE(?:D|)|E))|H(?:A(?:IN|NGE(?:D|)|R(?:ACTER|SET|))|ECK(?:SUM|))|IPHER|L(?:IENT|OSE)|O(?:DE|L(?:LAT(?:E|ION)|UMN(?:S|))|M(?:M(?:ENT|IT(?:TED|))|P(?:ACT|RESSED))|N(?:CURRENT|DITION|NECTION|S(?:ISTENT|TRAINT)|T(?:AINS|INUE)|VERT))|R(?:EATE|OSS)|U(?:BE|R(?:RENT_(?:DATE|TIME(?:STAMP|)|USER)|SOR)))|D(?:A(?:T(?:A(?:BASE(?:S|)|)|E(?:TIME|))|Y(?:_(?:HOUR|MI(?:CROSECOND|NUTE)|SECOND)|))|E(?:ALLOCATE|C(?:IMAL|LARE|)|F(?:AULT|INER)|L(?:AY(?:ED|_KEY_WRITE)|ETE)|S(?:C(?:RIBE|)|_KEY_FILE)|TERMINISTIC)|I(?:RECTORY|S(?:ABLE|CARD|TINCT(?:ROW|))|V)|O(?:UBLE|)|ROP|U(?:AL|MPFILE|PLICATE)|YNAMIC)|E(?:ACH|LSE(?:IF|)|N(?:ABLE|CLOSED|D|GINE(?:S|)|UM)|RRORS|SCAPE(?:D|)|VENTS|X(?:ECUTE|I(?:STS|T)|P(?:ANSION|LAIN)|TENDED))|F(?:A(?:LSE|ST)|ETCH|I(?:ELDS|LE|RST|XED)|L(?:OAT(?:4|8|)|USH)|O(?:R(?:CE|EIGN|)|UND)|R(?:AC_SECOND|OM)|U(?:LL(?:TEXT|)|NCTION))|G(?:E(?:OMETRY(?:COLLECTION|)|T_FORMAT)|LOBAL|R(?:ANT(?:S|)|OUP))|H(?:A(?:NDLER|SH|VING)|ELP|IGH_PRIORITY|O(?:STS|UR(?:_(?:MI(?:CROSECOND|NUTE)|SECOND)|)))|I(?:DENTIFIED|F|GNORE|MPORT|N(?:DEX(?:ES|)|FILE|N(?:ER|O(?:BASE|DB))|OUT|SE(?:NSITIVE|RT(?:_METHOD|))|T(?:1|2|3|4|8|E(?:GER|RVAL)|O|)|VOKER|)|O_THREAD|S(?:OLATION|SUER|)|TERATE)|JOIN|K(?:EY(?:S|)|ILL)|L(?:A(?:NGUAGE|ST)|E(?:A(?:DING|VE(?:S|))|FT|VEL)|I(?:KE|MIT|NES(?:TRING|))|O(?:AD|C(?:AL(?:TIME(?:STAMP|)|)|K(?:S|))|GS|NG(?:BLOB|TEXT|)|OP|W_PRIORITY))|M(?:A(?:STER(?:_(?:CONNECT_RETRY|HOST|LOG_(?:FILE|POS)|P(?:ASSWORD|ORT)|S(?:ERVER_ID|SL(?:_(?:C(?:A(?:PATH|)|ERT|IPHER)|KEY)|))|USER)|)|TCH|X_(?:CONNECTIONS_PER_HOUR|QUERIES_PER_HOUR|ROWS|U(?:PDATES_PER_HOUR|SER_CONNECTIONS)))|E(?:DIUM(?:BLOB|INT|TEXT|)|RGE)|I(?:CROSECOND|DDLEINT|GRATE|N(?:UTE(?:_(?:MICROSECOND|SECOND)|)|_ROWS))|O(?:D(?:E|IF(?:IES|Y)|)|NTH)|U(?:LTI(?:LINESTRING|PO(?:INT|LYGON))|TEX))|N(?:A(?:ME(?:S|)|T(?:IONAL|URAL))|CHAR|DB(?:CLUSTER|)|E(?:W|XT)|O(?:NE|T|_WRITE_TO_BINLOG|)|U(?:LL|MERIC)|VARCHAR)|O(?:FFSET|LD_PASSWORD|N(?:E(?:_SHOT|)|)|P(?:EN|TI(?:MIZE|ON(?:ALLY|)))|R(?:DER|)|UT(?:ER|FILE|))|P(?:A(?:CK_KEYS|RTIAL|SSWORD)|HASE|O(?:INT|LYGON)|R(?:E(?:CISION|PARE|V)|I(?:MARY|VILEGES)|OCE(?:DURE|SS(?:LIST|)))|URGE)|QU(?:ARTER|ERY|ICK)|R(?:AID(?:0|_(?:CHUNKS(?:IZE|)|TYPE))|E(?:A(?:D(?:S|)|L)|COVER|DUNDANT|FERENCES|GEXP|L(?:AY_(?:LOG_(?:FILE|POS)|THREAD)|EASE|OAD)|NAME|P(?:AIR|EAT(?:ABLE|)|L(?:ACE|ICATION))|QUIRE|S(?:ET|T(?:ORE|RICT)|UME)|TURN(?:S|)|VOKE)|IGHT|LIKE|O(?:LL(?:BACK|UP)|UTINE|W(?:S|_FORMAT|))|TREE)|S(?:AVEPOINT|CHEMA(?:S|)|E(?:C(?:OND(?:_MICROSECOND|)|URITY)|LECT|NSITIVE|PARATOR|RIAL(?:IZABLE|)|SSION|T)|H(?:ARE|OW|UTDOWN)|I(?:GNED|MPLE)|LAVE|MALLINT|NAPSHOT|O(?:ME|NAME|UNDS)|P(?:ATIAL|ECIFIC)|QL(?:EXCEPTION|STATE|WARNING|_(?:B(?:IG_RESULT|UFFER_RESULT)|CA(?:CHE|LC_FOUND_ROWS)|NO_CACHE|SMALL_RESULT|T(?:HREAD|SI_(?:DAY|FRAC_SECOND|HOUR|M(?:INUTE|ONTH)|QUARTER|SECOND|WEEK|YEAR)))|)|SL|T(?:A(?:RT(?:ING|)|TUS)|O(?:P|RAGE)|R(?:AIGHT_JOIN|I(?:NG|PED)))|U(?:BJECT|PER|SPEND))|T(?:ABLE(?:S(?:PACE|)|)|E(?:MP(?:ORARY|TABLE)|RMINATED|XT)|HEN|I(?:ME(?:STAMP(?:ADD|DIFF|)|)|NY(?:BLOB|INT|TEXT))|O|R(?:A(?:ILING|NSACTION)|IGGER(?:S|)|U(?:E|NCATE))|YPE(?:S|))|U(?:N(?:COMMITTED|D(?:EFINED|O)|I(?:CODE|ON|QUE)|KNOWN|LOCK|SIGNED|TIL)|P(?:DATE|GRADE)|S(?:AGE|E(?:R(?:_RESOURCES|)|_FRM|)|ING)|TC_(?:DATE|TIME(?:STAMP|)))|V(?:A(?:LUE(?:S|)|R(?:BINARY|CHAR(?:ACTER|)|IABLES|YING))|IEW)|W(?:ARNINGS|EEK|H(?:E(?:N|RE)|ILE)|ITH|ORK|RITE)|X(?:509|A|OR)|YEAR(?:_MONTH|)|ZEROFILL)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, 'function': {
|
||||||
|
_match: /\b(?:A(?:BS|COS|DD(?:DATE|TIME)|ES_(?:DECRYPT|ENCRYPT)|REA|S(?:BINARY|IN|TEXT|WK(?:B|T))|TAN(?:2|))|B(?:ENCHMARK|I(?:N|T_(?:AND|COUNT|LENGTH|OR|XOR)))|C(?:AST|E(?:IL(?:ING|)|NTROID)|HAR(?:ACTER_LENGTH|_LENGTH)|O(?:ALESCE|ERCIBILITY|MPRESS|N(?:CAT(?:_WS|)|NECTION_ID|V(?:ERT_TZ|))|S|T|UNT)|R(?:C32|OSSES)|UR(?:DATE|TIME))|D(?:A(?:TE(?:DIFF|_(?:ADD|FORMAT|SUB))|Y(?:NAME|OF(?:MONTH|WEEK|YEAR)))|E(?:CODE|GREES|S_(?:DECRYPT|ENCRYPT))|I(?:MENSION|SJOINT))|E(?:LT|N(?:C(?:ODE|RYPT)|DPOINT|VELOPE)|QUALS|X(?:P(?:ORT_SET|)|T(?:ERIORRING|RACT)))|F(?:I(?:ELD|ND_IN_SET)|LOOR|O(?:RMAT|UND_ROWS)|ROM_(?:DAYS|UNIXTIME))|G(?:E(?:OM(?:COLLFROM(?:TEXT|WKB)|ETRY(?:COLLECTIONFROM(?:TEXT|WKB)|FROM(?:TEXT|WKB)|N|TYPE)|FROM(?:TEXT|WKB))|T_LOCK)|LENGTH|R(?:EATEST|OUP_(?:CONCAT|UNIQUE_USERS)))|HEX|I(?:FNULL|N(?:ET_(?:ATON|NTOA)|STR|TER(?:IORRINGN|SECTS))|S(?:CLOSED|EMPTY|NULL|SIMPLE|_(?:FREE_LOCK|USED_LOCK)))|L(?:AST_(?:DAY|INSERT_ID)|CASE|E(?:AST|NGTH)|INE(?:FROM(?:TEXT|WKB)|STRINGFROM(?:TEXT|WKB))|N|O(?:AD_FILE|CATE|G(?:10|2|)|WER)|PAD|TRIM)|M(?:A(?:KE(?:DATE|TIME|_SET)|STER_POS_WAIT|X)|BR(?:CONTAINS|DISJOINT|EQUAL|INTERSECTS|OVERLAPS|TOUCHES|WITHIN)|D5|I(?:D|N)|LINEFROM(?:TEXT|WKB)|ONTHNAME|PO(?:INTFROM(?:TEXT|WKB)|LYFROM(?:TEXT|WKB))|ULTI(?:LINESTRINGFROM(?:TEXT|WKB)|PO(?:INTFROM(?:TEXT|WKB)|LYGONFROM(?:TEXT|WKB))))|N(?:AME_CONST|OW|U(?:LLIF|M(?:GEOMETRIES|INTERIORRINGS|POINTS)))|O(?:CT(?:ET_LENGTH|)|RD|VERLAPS)|P(?:ERIOD_(?:ADD|DIFF)|I|O(?:INT(?:FROM(?:TEXT|WKB)|N)|LY(?:FROM(?:TEXT|WKB)|GONFROM(?:TEXT|WKB))|SITION|W(?:ER|)))|QUOTE|R(?:A(?:DIANS|ND)|E(?:LEASE_LOCK|VERSE)|O(?:UND|W_COUNT)|PAD|TRIM)|S(?:E(?:C_TO_TIME|SSION_USER)|HA(?:1|)|I(?:GN|N)|LEEP|OUNDEX|PACE|QRT|RID|T(?:ARTPOINT|D(?:DEV(?:_(?:POP|SAMP)|)|)|R(?:CMP|_TO_DATE))|U(?:B(?:DATE|STR(?:ING(?:_INDEX|)|)|TIME)|M)|YS(?:DATE|TEM_USER))|T(?:AN|IME(?:DIFF|_(?:FORMAT|TO_SEC))|O(?:UCHES|_DAYS)|RIM)|U(?:CASE|N(?:COMPRESS(?:ED_LENGTH|)|HEX|I(?:QUE_USERS|X_TIMESTAMP))|PPER|UID)|V(?:AR(?:IANCE|_(?:POP|SAMP))|ERSION)|W(?:EEK(?:DAY|OFYEAR)|ITHIN)|X|Y(?:EARWEEK|))(?=\()/
|
||||||
|
, _style: "color: #e17100;"
|
||||||
|
}
|
||||||
|
, id: {
|
||||||
|
_match: /[$\w]+/
|
||||||
|
, _style: "color: maroon;"
|
||||||
}
|
}
|
||||||
, func : { exp: /\b(?:A(?:BS|COS|DD(?:DATE|TIME)|ES_(?:DECRYPT|ENCRYPT)|REA|S(?:BINARY|IN|TEXT|WK(?:B|T))|TAN(?:2|))|B(?:ENCHMARK|I(?:N|T_(?:AND|COUNT|LENGTH|OR|XOR)))|C(?:AST|E(?:IL(?:ING|)|NTROID)|HAR(?:ACTER_LENGTH|_LENGTH)|O(?:ALESCE|ERCIBILITY|MPRESS|N(?:CAT(?:_WS|)|NECTION_ID|V(?:ERT_TZ|))|S|T|UNT)|R(?:C32|OSSES)|UR(?:DATE|TIME))|D(?:A(?:TE(?:DIFF|_(?:ADD|FORMAT|SUB))|Y(?:NAME|OF(?:MONTH|WEEK|YEAR)))|E(?:CODE|GREES|S_(?:DECRYPT|ENCRYPT))|I(?:MENSION|SJOINT))|E(?:LT|N(?:C(?:ODE|RYPT)|DPOINT|VELOPE)|QUALS|X(?:P(?:ORT_SET|)|T(?:ERIORRING|RACT)))|F(?:I(?:ELD|ND_IN_SET)|LOOR|O(?:RMAT|UND_ROWS)|ROM_(?:DAYS|UNIXTIME))|G(?:E(?:OM(?:COLLFROM(?:TEXT|WKB)|ETRY(?:COLLECTIONFROM(?:TEXT|WKB)|FROM(?:TEXT|WKB)|N|TYPE)|FROM(?:TEXT|WKB))|T_LOCK)|LENGTH|R(?:EATEST|OUP_(?:CONCAT|UNIQUE_USERS)))|HEX|I(?:FNULL|N(?:ET_(?:ATON|NTOA)|STR|TER(?:IORRINGN|SECTS))|S(?:CLOSED|EMPTY|NULL|SIMPLE|_(?:FREE_LOCK|USED_LOCK)))|L(?:AST_(?:DAY|INSERT_ID)|CASE|E(?:AST|NGTH)|INE(?:FROM(?:TEXT|WKB)|STRINGFROM(?:TEXT|WKB))|N|O(?:AD_FILE|CATE|G(?:10|2|)|WER)|PAD|TRIM)|M(?:A(?:KE(?:DATE|TIME|_SET)|STER_POS_WAIT|X)|BR(?:CONTAINS|DISJOINT|EQUAL|INTERSECTS|OVERLAPS|TOUCHES|WITHIN)|D5|I(?:D|N)|LINEFROM(?:TEXT|WKB)|ONTHNAME|PO(?:INTFROM(?:TEXT|WKB)|LYFROM(?:TEXT|WKB))|ULTI(?:LINESTRINGFROM(?:TEXT|WKB)|PO(?:INTFROM(?:TEXT|WKB)|LYGONFROM(?:TEXT|WKB))))|N(?:AME_CONST|OW|U(?:LLIF|M(?:GEOMETRIES|INTERIORRINGS|POINTS)))|O(?:CT(?:ET_LENGTH|)|RD|VERLAPS)|P(?:ERIOD_(?:ADD|DIFF)|I|O(?:INT(?:FROM(?:TEXT|WKB)|N)|LY(?:FROM(?:TEXT|WKB)|GONFROM(?:TEXT|WKB))|SITION|W(?:ER|)))|QUOTE|R(?:A(?:DIANS|ND)|E(?:LEASE_LOCK|VERSE)|O(?:UND|W_COUNT)|PAD|TRIM)|S(?:E(?:C_TO_TIME|SSION_USER)|HA(?:1|)|I(?:GN|N)|LEEP|OUNDEX|PACE|QRT|RID|T(?:ARTPOINT|D(?:DEV(?:_(?:POP|SAMP)|)|)|R(?:CMP|_TO_DATE))|U(?:B(?:DATE|STR(?:ING(?:_INDEX|)|)|TIME)|M)|YS(?:DATE|TEM_USER))|T(?:AN|IME(?:DIFF|_(?:FORMAT|TO_SEC))|O(?:UCHES|_DAYS)|RIM)|U(?:CASE|N(?:COMPRESS(?:ED_LENGTH|)|HEX|I(?:QUE_USERS|X_TIMESTAMP))|PPER|UID)|V(?:AR(?:IANCE|_(?:POP|SAMP))|ERSION)|W(?:EEK(?:DAY|OFYEAR)|ITHIN)|X|Y(?:EARWEEK|))(?=\()/ }
|
|
||||||
, id : { exp: /[$\w]+/ }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
142
docs/js/chili/php-f.js
Normal file
142
docs/js/chili/php-f.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
.php .com { color: green; }
|
|
||||||
.php .const1 { color: red; }
|
|
||||||
.php .const2 { color: red; }
|
|
||||||
.php .func { color: #e17100; }
|
|
||||||
.php .global { color: red; }
|
|
||||||
.php .keyword { color: navy; font-weight: bold; }
|
|
||||||
.php .mlcom { color: gray; }
|
|
||||||
.php .name { color: maroon; }
|
|
||||||
.php .number { color: red; }
|
|
||||||
.php .string1 { color: purple; }
|
|
||||||
.php .string2 { color: fuchsia; }
|
|
||||||
.php .value { color: gray; font-weight: bold; }
|
|
||||||
.php .variable { color: #4040c2; }
|
|
File diff suppressed because one or more lines are too long
@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
===============================================================================
|
|
||||||
Chili is the jQuery code highlighter plugin
|
|
||||||
...............................................................................
|
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
|
||||||
WEBSITE: http://noteslog.com/chili/
|
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
this file shows how to configure a static setup
|
|
||||||
it must be linked from the head of a page like:
|
|
||||||
<link rel="stylesheet" type="text/css" href="chili/recipes.css"/>
|
|
||||||
*/
|
|
||||||
|
|
||||||
.html .php { color: red; font-weight: bold; }
|
|
||||||
.html .tag { color: navy; font-weight: bold; }
|
|
||||||
.html .aname { color: purple; }
|
|
||||||
.html .avalue { color: fuchsia; }
|
|
||||||
.html .mlcom { color: green; }
|
|
||||||
.html .entity { color: teal; }
|
|
||||||
|
|
||||||
.javascript .mlcom { color: #4040c2; }
|
|
||||||
.javascript .com { color: green; }
|
|
||||||
.javascript .regexp { color: maroon; }
|
|
||||||
.javascript .string { color: teal; }
|
|
||||||
.javascript .keywords { color: navy; font-weight: bold; }
|
|
||||||
.javascript .global { color: blue; }
|
|
||||||
.javascript .numbers { color: red; }
|
|
||||||
|
|
||||||
.mysql .function { color: #e17100; }
|
|
||||||
.mysql .keyword { color: navy; font-weight: bold; }
|
|
||||||
.mysql .mlcom { color: gray; }
|
|
||||||
.mysql .com { color: green; }
|
|
||||||
.mysql .number { color: red; }
|
|
||||||
.mysql .hexnum { color: red; font-weight: bold; }
|
|
||||||
.mysql .string { color: purple; }
|
|
||||||
.mysql .quid { color: fuchsia; }
|
|
||||||
.mysql .id { color: maroon; }
|
|
||||||
.mysql .value { color: gray; font-weight: bold; }
|
|
||||||
.mysql .variable { color: #4040c2; }
|
|
||||||
|
|
||||||
.php .com { color: green; }
|
|
||||||
.php .const1 { color: red; }
|
|
||||||
.php .const2 { color: red; }
|
|
||||||
.php .func { color: #e17100; }
|
|
||||||
.php .global { color: red; }
|
|
||||||
.php .keyword { color: navy; font-weight: bold; }
|
|
||||||
.php .mlcom { color: gray; }
|
|
||||||
.php .name { color: maroon; }
|
|
||||||
.php .number { color: red; }
|
|
||||||
.php .string1 { color: purple; }
|
|
||||||
.php .string2 { color: fuchsia; }
|
|
||||||
.php .value { color: gray; font-weight: bold; }
|
|
||||||
.php .variable { color: #4040c2; }
|
|
||||||
|
|
||||||
.css .mlcom { color: #4040c2; }
|
|
||||||
.css .color { color: green; }
|
|
||||||
.css .string { color: teal; }
|
|
||||||
.css .attrib { color: navy; font-weight: bold; }
|
|
||||||
.css .value { color: blue; }
|
|
||||||
.css .number { color: red; }
|
|
@ -2,97 +2,363 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
Chili is the jQuery code highlighter plugin
|
Chili is the jQuery code highlighter plugin
|
||||||
...............................................................................
|
...............................................................................
|
||||||
Copyright 2007 / Andrea Ercolino
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
LICENSE: http://www.opensource.org/licenses/mit-license.php
|
||||||
WEBSITE: http://noteslog.com/chili/
|
WEBSITE: http://noteslog.com/chili/
|
||||||
===============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
Copyright 2008 / Andrea Ercolino
|
||||||
this file shows how to configure a static setup
|
===============================================================================
|
||||||
it must be linked from the head of a page like:
|
|
||||||
<script type="text/javascript" src="chili/recipes.js"></script>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ChiliBook.recipeLoading = false;
|
ChiliBook.recipeLoading = false;
|
||||||
|
|
||||||
|
|
||||||
ChiliBook.recipes[ "html.js" ] =
|
|
||||||
{
|
|
||||||
steps: {
|
|
||||||
mlcom : { exp: /\<!--(?:.|\n)*?--\>/ }
|
|
||||||
, tag : { exp: /(?:\<\!?[\w:]+)|(?:\>)|(?:\<\/[\w:]+\>)|(?:\/\>)/ }
|
|
||||||
, php : { exp: /(?:\<\?php\s)|(?:\<\?)|(?:\?\>)/ }
|
|
||||||
, aname : { exp: /\s+?[\w-]+:?\w+(?=\s*=)/ }
|
|
||||||
, avalue: { exp: /(=\s*)(([\"\'])(?:(?:[^\3\\]*?(?:\3\3|\\.))*?[^\3\\]*?)\3)/
|
|
||||||
, replacement: '$1<span class="$0">$2</span>' }
|
|
||||||
, entity: { exp: /&[\w#]+?;/ }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ChiliBook.recipes[ "javascript.js" ] =
|
|
||||||
{
|
|
||||||
steps: {
|
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
|
||||||
, com : { exp: /\/\/.*/ }
|
|
||||||
, regexp : { exp: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/ }
|
|
||||||
, string : { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
|
||||||
, numbers : { exp: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/ }
|
|
||||||
, keywords: { exp: /\b(arguments|break|case|catch|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|try|typeof|var|void|while|with)\b/ }
|
|
||||||
, global : { exp: /\b(toString|valueOf|window|self|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ChiliBook.recipes[ "mysql.js" ] =
|
|
||||||
{
|
|
||||||
ignoreCase: true
|
|
||||||
, steps: {
|
|
||||||
mlcom : { exp: /\/\*[^*]*\*+([^\/][^*]*\*+)*\// }
|
|
||||||
, com : { exp: /(?:--\s+.*)|(?:[^\\]\#.*)/ }
|
|
||||||
, string : { exp: /([\"\'])(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/ }
|
|
||||||
, quid : { exp: /(`)(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/ }
|
|
||||||
, value : { exp: /\b(?:NULL|TRUE|FALSE)\b/ }
|
|
||||||
, number : { exp: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/ }
|
|
||||||
, hexnum : { exp: /\b0[xX][\dA-Fa-f]+\b|\b[xX]([\'\"])[\dA-Fa-f]+\1/ }
|
|
||||||
, op : { exp: /!=|&&|<|<<|<=|<=>|<>|=|>|>=|>>|\|\|/ }
|
|
||||||
, variable : { exp: /@([$.\w]+|([`\"\'])(?:(?:[^\2\\\r\n]*?(?:\2\2|\\.))*[^\2\\\r\n]*?)\2)/
|
|
||||||
, replacement: '<span class="keyword">@</span><span class="variable">$1</span>' }
|
|
||||||
, keyword : { exp: /\b(?:A(?:CTION|DD|FTER|G(?:AINST|GREGATE)|L(?:GORITHM|L|TER)|N(?:ALYZE|D|Y)|S(?:C(?:II|)|ENSITIVE|)|UTO_INCREMENT|VG(?:_ROW_LENGTH|))|B(?:ACKUP|DB|E(?:FORE|GIN|RKELEYDB|TWEEN)|I(?:GINT|N(?:ARY|LOG)|T)|LOB|O(?:OL(?:EAN|)|TH)|TREE|Y(?:TE|))|C(?:A(?:CHE|LL|S(?:CADE(?:D|)|E))|H(?:A(?:IN|NGE(?:D|)|R(?:ACTER|SET|))|ECK(?:SUM|))|IPHER|L(?:IENT|OSE)|O(?:DE|L(?:LAT(?:E|ION)|UMN(?:S|))|M(?:M(?:ENT|IT(?:TED|))|P(?:ACT|RESSED))|N(?:CURRENT|DITION|NECTION|S(?:ISTENT|TRAINT)|T(?:AINS|INUE)|VERT))|R(?:EATE|OSS)|U(?:BE|R(?:RENT_(?:DATE|TIME(?:STAMP|)|USER)|SOR)))|D(?:A(?:T(?:A(?:BASE(?:S|)|)|E(?:TIME|))|Y(?:_(?:HOUR|MI(?:CROSECOND|NUTE)|SECOND)|))|E(?:ALLOCATE|C(?:IMAL|LARE|)|F(?:AULT|INER)|L(?:AY(?:ED|_KEY_WRITE)|ETE)|S(?:C(?:RIBE|)|_KEY_FILE)|TERMINISTIC)|I(?:RECTORY|S(?:ABLE|CARD|TINCT(?:ROW|))|V)|O(?:UBLE|)|ROP|U(?:AL|MPFILE|PLICATE)|YNAMIC)|E(?:ACH|LSE(?:IF|)|N(?:ABLE|CLOSED|D|GINE(?:S|)|UM)|RRORS|SCAPE(?:D|)|VENTS|X(?:ECUTE|I(?:STS|T)|P(?:ANSION|LAIN)|TENDED))|F(?:A(?:LSE|ST)|ETCH|I(?:ELDS|LE|RST|XED)|L(?:OAT(?:4|8|)|USH)|O(?:R(?:CE|EIGN|)|UND)|R(?:AC_SECOND|OM)|U(?:LL(?:TEXT|)|NCTION))|G(?:E(?:OMETRY(?:COLLECTION|)|T_FORMAT)|LOBAL|R(?:ANT(?:S|)|OUP))|H(?:A(?:NDLER|SH|VING)|ELP|IGH_PRIORITY|O(?:STS|UR(?:_(?:MI(?:CROSECOND|NUTE)|SECOND)|)))|I(?:DENTIFIED|F|GNORE|MPORT|N(?:DEX(?:ES|)|FILE|N(?:ER|O(?:BASE|DB))|OUT|SE(?:NSITIVE|RT(?:_METHOD|))|T(?:1|2|3|4|8|E(?:GER|RVAL)|O|)|VOKER|)|O_THREAD|S(?:OLATION|SUER|)|TERATE)|JOIN|K(?:EY(?:S|)|ILL)|L(?:A(?:NGUAGE|ST)|E(?:A(?:DING|VE(?:S|))|FT|VEL)|I(?:KE|MIT|NES(?:TRING|))|O(?:AD|C(?:AL(?:TIME(?:STAMP|)|)|K(?:S|))|GS|NG(?:BLOB|TEXT|)|OP|W_PRIORITY))|M(?:A(?:STER(?:_(?:CONNECT_RETRY|HOST|LOG_(?:FILE|POS)|P(?:ASSWORD|ORT)|S(?:ERVER_ID|SL(?:_(?:C(?:A(?:PATH|)|ERT|IPHER)|KEY)|))|USER)|)|TCH|X_(?:CONNECTIONS_PER_HOUR|QUERIES_PER_HOUR|ROWS|U(?:PDATES_PER_HOUR|SER_CONNECTIONS)))|E(?:DIUM(?:BLOB|INT|TEXT|)|RGE)|I(?:CROSECOND|DDLEINT|GRATE|N(?:UTE(?:_(?:MICROSECOND|SECOND)|)|_ROWS))|O(?:D(?:E|IF(?:IES|Y)|)|NTH)|U(?:LTI(?:LINESTRING|PO(?:INT|LYGON))|TEX))|N(?:A(?:ME(?:S|)|T(?:IONAL|URAL))|CHAR|DB(?:CLUSTER|)|E(?:W|XT)|O(?:NE|T|_WRITE_TO_BINLOG|)|U(?:LL|MERIC)|VARCHAR)|O(?:FFSET|LD_PASSWORD|N(?:E(?:_SHOT|)|)|P(?:EN|TI(?:MIZE|ON(?:ALLY|)))|R(?:DER|)|UT(?:ER|FILE|))|P(?:A(?:CK_KEYS|RTIAL|SSWORD)|HASE|O(?:INT|LYGON)|R(?:E(?:CISION|PARE|V)|I(?:MARY|VILEGES)|OCE(?:DURE|SS(?:LIST|)))|URGE)|QU(?:ARTER|ERY|ICK)|R(?:AID(?:0|_(?:CHUNKS(?:IZE|)|TYPE))|E(?:A(?:D(?:S|)|L)|COVER|DUNDANT|FERENCES|GEXP|L(?:AY_(?:LOG_(?:FILE|POS)|THREAD)|EASE|OAD)|NAME|P(?:AIR|EAT(?:ABLE|)|L(?:ACE|ICATION))|QUIRE|S(?:ET|T(?:ORE|RICT)|UME)|TURN(?:S|)|VOKE)|IGHT|LIKE|O(?:LL(?:BACK|UP)|UTINE|W(?:S|_FORMAT|))|TREE)|S(?:AVEPOINT|CHEMA(?:S|)|E(?:C(?:OND(?:_MICROSECOND|)|URITY)|LECT|NSITIVE|PARATOR|RIAL(?:IZABLE|)|SSION|T)|H(?:ARE|OW|UTDOWN)|I(?:GNED|MPLE)|LAVE|MALLINT|NAPSHOT|O(?:ME|NAME|UNDS)|P(?:ATIAL|ECIFIC)|QL(?:EXCEPTION|STATE|WARNING|_(?:B(?:IG_RESULT|UFFER_RESULT)|CA(?:CHE|LC_FOUND_ROWS)|NO_CACHE|SMALL_RESULT|T(?:HREAD|SI_(?:DAY|FRAC_SECOND|HOUR|M(?:INUTE|ONTH)|QUARTER|SECOND|WEEK|YEAR)))|)|SL|T(?:A(?:RT(?:ING|)|TUS)|O(?:P|RAGE)|R(?:AIGHT_JOIN|I(?:NG|PED)))|U(?:BJECT|PER|SPEND))|T(?:ABLE(?:S(?:PACE|)|)|E(?:MP(?:ORARY|TABLE)|RMINATED|XT)|HEN|I(?:ME(?:STAMP(?:ADD|DIFF|)|)|NY(?:BLOB|INT|TEXT))|O|R(?:A(?:ILING|NSACTION)|IGGER(?:S|)|U(?:E|NCATE))|YPE(?:S|))|U(?:N(?:COMMITTED|D(?:EFINED|O)|I(?:CODE|ON|QUE)|KNOWN|LOCK|SIGNED|TIL)|P(?:DATE|GRADE)|S(?:AGE|E(?:R(?:_RESOURCES|)|_FRM|)|ING)|TC_(?:DATE|TIME(?:STAMP|)))|V(?:A(?:LUE(?:S|)|R(?:BINARY|CHAR(?:ACTER|)|IABLES|YING))|IEW)|W(?:ARNINGS|EEK|H(?:E(?:N|RE)|ILE)|ITH|ORK|RITE)|X(?:509|A|OR)|YEAR(?:_MONTH|)|ZEROFILL)\b/ }
|
|
||||||
, func : { exp: /\b(?:A(?:BS|COS|DD(?:DATE|TIME)|ES_(?:DECRYPT|ENCRYPT)|REA|S(?:BINARY|IN|TEXT|WK(?:B|T))|TAN(?:2|))|B(?:ENCHMARK|I(?:N|T_(?:AND|COUNT|LENGTH|OR|XOR)))|C(?:AST|E(?:IL(?:ING|)|NTROID)|HAR(?:ACTER_LENGTH|_LENGTH)|O(?:ALESCE|ERCIBILITY|MPRESS|N(?:CAT(?:_WS|)|NECTION_ID|V(?:ERT_TZ|))|S|T|UNT)|R(?:C32|OSSES)|UR(?:DATE|TIME))|D(?:A(?:TE(?:DIFF|_(?:ADD|FORMAT|SUB))|Y(?:NAME|OF(?:MONTH|WEEK|YEAR)))|E(?:CODE|GREES|S_(?:DECRYPT|ENCRYPT))|I(?:MENSION|SJOINT))|E(?:LT|N(?:C(?:ODE|RYPT)|DPOINT|VELOPE)|QUALS|X(?:P(?:ORT_SET|)|T(?:ERIORRING|RACT)))|F(?:I(?:ELD|ND_IN_SET)|LOOR|O(?:RMAT|UND_ROWS)|ROM_(?:DAYS|UNIXTIME))|G(?:E(?:OM(?:COLLFROM(?:TEXT|WKB)|ETRY(?:COLLECTIONFROM(?:TEXT|WKB)|FROM(?:TEXT|WKB)|N|TYPE)|FROM(?:TEXT|WKB))|T_LOCK)|LENGTH|R(?:EATEST|OUP_(?:CONCAT|UNIQUE_USERS)))|HEX|I(?:FNULL|N(?:ET_(?:ATON|NTOA)|STR|TER(?:IORRINGN|SECTS))|S(?:CLOSED|EMPTY|NULL|SIMPLE|_(?:FREE_LOCK|USED_LOCK)))|L(?:AST_(?:DAY|INSERT_ID)|CASE|E(?:AST|NGTH)|INE(?:FROM(?:TEXT|WKB)|STRINGFROM(?:TEXT|WKB))|N|O(?:AD_FILE|CATE|G(?:10|2|)|WER)|PAD|TRIM)|M(?:A(?:KE(?:DATE|TIME|_SET)|STER_POS_WAIT|X)|BR(?:CONTAINS|DISJOINT|EQUAL|INTERSECTS|OVERLAPS|TOUCHES|WITHIN)|D5|I(?:D|N)|LINEFROM(?:TEXT|WKB)|ONTHNAME|PO(?:INTFROM(?:TEXT|WKB)|LYFROM(?:TEXT|WKB))|ULTI(?:LINESTRINGFROM(?:TEXT|WKB)|PO(?:INTFROM(?:TEXT|WKB)|LYGONFROM(?:TEXT|WKB))))|N(?:AME_CONST|OW|U(?:LLIF|M(?:GEOMETRIES|INTERIORRINGS|POINTS)))|O(?:CT(?:ET_LENGTH|)|RD|VERLAPS)|P(?:ERIOD_(?:ADD|DIFF)|I|O(?:INT(?:FROM(?:TEXT|WKB)|N)|LY(?:FROM(?:TEXT|WKB)|GONFROM(?:TEXT|WKB))|SITION|W(?:ER|)))|QUOTE|R(?:A(?:DIANS|ND)|E(?:LEASE_LOCK|VERSE)|O(?:UND|W_COUNT)|PAD|TRIM)|S(?:E(?:C_TO_TIME|SSION_USER)|HA(?:1|)|I(?:GN|N)|LEEP|OUNDEX|PACE|QRT|RID|T(?:ARTPOINT|D(?:DEV(?:_(?:POP|SAMP)|)|)|R(?:CMP|_TO_DATE))|U(?:B(?:DATE|STR(?:ING(?:_INDEX|)|)|TIME)|M)|YS(?:DATE|TEM_USER))|T(?:AN|IME(?:DIFF|_(?:FORMAT|TO_SEC))|O(?:UCHES|_DAYS)|RIM)|U(?:CASE|N(?:COMPRESS(?:ED_LENGTH|)|HEX|I(?:QUE_USERS|X_TIMESTAMP))|PPER|UID)|V(?:AR(?:IANCE|_(?:POP|SAMP))|ERSION)|W(?:EEK(?:DAY|OFYEAR)|ITHIN)|X|Y(?:EARWEEK|))(?=\()/ }
|
|
||||||
, id : { exp: /[$\w]+/ }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ChiliBook.recipes[ "php.js" ] =
|
ChiliBook.recipes[ "php.js" ] =
|
||||||
|
/* ----------------------------------------------------------------------------
|
||||||
|
* this recipe uses a little trick for highlighting php code
|
||||||
|
* 1: replace each php snippet with a placeholder
|
||||||
|
* 2: highlight html without php and php snippets apart
|
||||||
|
* 3: replace each placeholder with its highlighted php snippet
|
||||||
|
*
|
||||||
|
* the trick is not perfect only if the html without php is broken
|
||||||
|
* however, in such a case many highlighters get fooled but Chili does not
|
||||||
|
*
|
||||||
|
* ---
|
||||||
|
* this recipe has been adapted for working with Safari
|
||||||
|
* in fact, Safari cannot match more than 101236 characters with a lazy star
|
||||||
|
* --------------------------------------------------------------------------*/
|
||||||
{
|
{
|
||||||
steps: {
|
_name: "php"
|
||||||
mlcom : { exp: /\/\*[^*]*\*+([^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, com : { exp: /(?:\/\/.*)|(?:[^\\]\#.*)/ }
|
, _main: {
|
||||||
, string1 : { exp: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/ }
|
all: {
|
||||||
, string2 : { exp: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/ }
|
_match: /[\w\W]*/
|
||||||
, value : { exp: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/ }
|
, _replace: function( all ) {
|
||||||
, number : { exp: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/ }
|
var placeholder = String.fromCharCode(0);
|
||||||
, const1 : { exp: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/ }
|
var blocks = [];
|
||||||
, const2 : { exp: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/ }
|
var that = this;
|
||||||
, global : { exp: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/ }
|
var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
|
||||||
, keyword : { exp: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/ }
|
blocks.push( that.x( block, '/block/php_1' ) );
|
||||||
, variable: { exp: /\$(\w+)/
|
return placeholder;
|
||||||
, replacement: '<span class="keyword">$</span><span class="variable">$1</span>' }
|
} );
|
||||||
, heredoc : { exp: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
|
var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
|
||||||
, replacement: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>' }
|
blocks.push( that.x( block, '/block/php_2' ) );
|
||||||
|
return placeholder;
|
||||||
|
} );
|
||||||
|
if( blocks.length ) {
|
||||||
|
var html = this.x( no_php_2, 'html' );
|
||||||
|
var count = 0;
|
||||||
|
return html.replace( new RegExp( placeholder, "g" ), function() {
|
||||||
|
return blocks[ count++ ];
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return this.x( all, '/php' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, block: {
|
||||||
|
php_1: { // --- <? +++ ?> ---
|
||||||
|
_match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
|
||||||
|
, _replace: function( all, open, content ) {
|
||||||
|
return "<span class='start'>" + this.x( open ) + "</span>"
|
||||||
|
+ this.x( content.replace( /\?>$/, '' ), '/php' )
|
||||||
|
+ "<span class='end'>" + this.x( '?>' ) + "</span>";
|
||||||
|
}
|
||||||
|
, _style: {
|
||||||
|
start: "color: red; font-weight: bold"
|
||||||
|
, end: "color: red;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, php_2: { // +++ ?> --- <? +++
|
||||||
|
_match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
|
||||||
|
, _replace: function( all, content, open2, content2 ) {
|
||||||
|
if( open2 ) {
|
||||||
|
return "<span class='start'>" + this.x( open2 ) + "</span>"
|
||||||
|
+ this.x( content2, '/php' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return this.x( content.replace( /\?>$/, '' ), '/php' )
|
||||||
|
+ "<span class='end'>" + this.x( '?>' ) + "</span>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, _style: {
|
||||||
|
start: "color: red; font-weight: bold"
|
||||||
|
, end: "color: red;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, php: {
|
||||||
|
mlcom: {
|
||||||
|
_match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
|
||||||
|
, _style: "color: gray;"
|
||||||
|
}
|
||||||
|
, com: {
|
||||||
|
_match: /(?:\/\/.*)|(?:[^\\]\#.*)/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
, string1: {
|
||||||
|
_match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
|
||||||
|
, _style: "color: purple;"
|
||||||
|
}
|
||||||
|
, string2: {
|
||||||
|
_match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, value: {
|
||||||
|
_match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
|
||||||
|
, _style: "color: gray; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, number: {
|
||||||
|
_match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, const1: {
|
||||||
|
_match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, const2: {
|
||||||
|
_match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, global: {
|
||||||
|
_match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, keyword: {
|
||||||
|
_match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, variable: {
|
||||||
|
_match: /\$(\w+)/
|
||||||
|
, _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
|
||||||
|
, _style: "color: #4040c2;"
|
||||||
|
}
|
||||||
|
, heredoc: {
|
||||||
|
_match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
|
||||||
|
, _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ChiliBook.recipes[ "html.js" ] =
|
||||||
|
{
|
||||||
|
_name: 'html'
|
||||||
|
, _case: false
|
||||||
|
, _main: {
|
||||||
|
doctype: {
|
||||||
|
_match: /<!DOCTYPE\b[\w\W]*?>/
|
||||||
|
, _style: "color: #CC6600;"
|
||||||
|
}
|
||||||
|
, ie_style: {
|
||||||
|
_match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return "<span class='ie_style'>" + this.x( open ) + "</span>"
|
||||||
|
+ this.x( content, '//style' )
|
||||||
|
+ "<span class='ie_style'>" + this.x( close ) + "</span>";
|
||||||
|
}
|
||||||
|
, _style: "color: DarkSlateGray; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, comment: {
|
||||||
|
_match: /<!--[\w\W]*?-->/
|
||||||
|
, _style: "color: #4040c2;"
|
||||||
|
}
|
||||||
|
, script: {
|
||||||
|
_match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return this.x( open, '//tag_start' )
|
||||||
|
+ this.x( content, 'js' )
|
||||||
|
+ this.x( close, '//tag_end' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, style: {
|
||||||
|
_match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return this.x( open, '//tag_start' )
|
||||||
|
+ this.x( content, 'css' )
|
||||||
|
+ this.x( close, '//tag_end' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// matches a starting tag of an element (with attrs)
|
||||||
|
// like "<div ... >" or "<img ... />"
|
||||||
|
, tag_start: {
|
||||||
|
_match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
|
||||||
|
, _replace: function( all, open, content, close ) {
|
||||||
|
return "<span class='tag_start'>" + this.x( open ) + "</span>"
|
||||||
|
+ this.x( content, '/tag_attrs' )
|
||||||
|
+ "<span class='tag_start'>" + this.x( close ) + "</span>";
|
||||||
|
}
|
||||||
|
, _style: "color: navy; font-weight: bold;"
|
||||||
|
}
|
||||||
|
// matches an ending tag
|
||||||
|
// like "</div>"
|
||||||
|
, tag_end: {
|
||||||
|
_match: /<\/\w+\s*>|\/>/
|
||||||
|
, _style: "color: navy;"
|
||||||
|
}
|
||||||
|
, entity: {
|
||||||
|
_match: /&\w+?;/
|
||||||
|
, _style: "color: blue;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, tag_attrs: {
|
||||||
|
// matches a name/value pair
|
||||||
|
attr: {
|
||||||
|
// before in $1, name in $2, between in $3, value in $4
|
||||||
|
_match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
|
||||||
|
, _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
|
||||||
|
, _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ChiliBook.recipes[ "js.js" ] =
|
||||||
|
{
|
||||||
|
_name: 'js'
|
||||||
|
, _case: true
|
||||||
|
, _main: {
|
||||||
|
ml_comment: {
|
||||||
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
|
, _style: 'color: gray;'
|
||||||
|
}
|
||||||
|
, sl_comment: {
|
||||||
|
_match: /\/\/.*/
|
||||||
|
, _style: 'color: green;'
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: 'color: teal;'
|
||||||
|
}
|
||||||
|
, num: {
|
||||||
|
_match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
|
||||||
|
, _style: 'color: red;'
|
||||||
|
}
|
||||||
|
, reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
|
||||||
|
_match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
|
||||||
|
, _replace: function( all ) {
|
||||||
|
return this.x( all, '//num' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, reg_exp: {
|
||||||
|
_match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
|
||||||
|
, _style: 'color: maroon;'
|
||||||
|
}
|
||||||
|
, brace: {
|
||||||
|
_match: /[\{\}]/
|
||||||
|
, _style: 'color: red; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, statement: {
|
||||||
|
_match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
|
||||||
|
, _style: 'color: navy; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, error: {
|
||||||
|
_match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
|
||||||
|
, _style: 'color: Coral;'
|
||||||
|
}
|
||||||
|
, object: {
|
||||||
|
_match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
|
||||||
|
, _style: 'color: DeepPink;'
|
||||||
|
}
|
||||||
|
, property: {
|
||||||
|
_match: /\b(undefined|arguments|NaN|Infinity)\b/
|
||||||
|
, _style: 'color: Purple; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, 'function': {
|
||||||
|
_match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
|
||||||
|
, _style: 'color: olive;'
|
||||||
|
}
|
||||||
|
, operator: {
|
||||||
|
_match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
|
||||||
|
, _style: 'color: RoyalBlue; font-weight: bold;'
|
||||||
|
}
|
||||||
|
, liveconnect: {
|
||||||
|
_match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
|
||||||
|
, _style: 'text-decoration: overline;'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ChiliBook.recipes[ "css.js" ] =
|
ChiliBook.recipes[ "css.js" ] =
|
||||||
{
|
{
|
||||||
steps: {
|
_name: 'css'
|
||||||
mlcom : { exp: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\// }
|
, _case: true
|
||||||
, string: { exp: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/ }
|
, _main: {
|
||||||
, number: { exp: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/ }
|
comment: {
|
||||||
, attrib: { exp: /\b(?:z-index|x-height|word-spacing|widths|width|widows|white-space|volume|voice-family|visibility|vertical-align|units-per-em|unicode-range|unicode-bidi|text-transform|text-shadow|text-indent|text-decoration|text-align|table-layout|stress|stemv|stemh|src|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|slope|size|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|mathline|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|empty-cells|elevation|display|direction|descent|definition-src|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|centerline|caption-side|cap-height|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|bbox|baseline|background-repeat|background-position|background-image|background-color|background-attachment|background|azimuth|ascent)\b/ }
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
, value : { exp: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/ }
|
, _style: "color: olive;"
|
||||||
, color : { exp: /(?:\#[a-zA-Z0-9]{3,6})|(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua)/ }
|
|
||||||
}
|
}
|
||||||
}
|
, directive: {
|
||||||
|
_match: /@\w+/
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, url: {
|
||||||
|
_match: /\b(url\s*\()([^)]+)(\))/
|
||||||
|
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
|
||||||
|
, _style: "color: fuchsia;"
|
||||||
|
}
|
||||||
|
, block: {
|
||||||
|
_match: /\{([\w\W]*?)\}/
|
||||||
|
, _replace: function( all, pairs ) {
|
||||||
|
return '{' + this.x( pairs, '/definition' ) + '}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, 'class': {
|
||||||
|
_match: /\.\w+/
|
||||||
|
, _style: "color: #CC0066; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, id: {
|
||||||
|
_match: /#\w+/
|
||||||
|
, _style: "color: IndianRed; font-weight: bold;"
|
||||||
|
}
|
||||||
|
, pseudo: {
|
||||||
|
_match: /:\w+/
|
||||||
|
, _style: "color: #CC9900;"
|
||||||
|
}
|
||||||
|
, element: {
|
||||||
|
_match: /\w+/
|
||||||
|
, _style: "color: Purple; font-weight: bold;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, definition: {
|
||||||
|
comment: {
|
||||||
|
_match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
|
||||||
|
}
|
||||||
|
, property: {
|
||||||
|
_match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
|
||||||
|
, _style: "color: #330066;"
|
||||||
|
}
|
||||||
|
, special: {
|
||||||
|
_match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
|
||||||
|
, _style: "color: #330066; text-decoration: underline;"
|
||||||
|
}
|
||||||
|
, url: {
|
||||||
|
_match: /\b(url\s*\()([^)]+)(\))/
|
||||||
|
, _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
|
||||||
|
}
|
||||||
|
, value: {
|
||||||
|
_match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
|
||||||
|
, _style: "color: #3366FF;"
|
||||||
|
}
|
||||||
|
, string: {
|
||||||
|
_match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
|
||||||
|
, _style: "color: teal;"
|
||||||
|
}
|
||||||
|
, number: {
|
||||||
|
_match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
|
||||||
|
, _style: "color: red;"
|
||||||
|
}
|
||||||
|
, color : {
|
||||||
|
_match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
|
||||||
|
, _style: "color: green;"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/* Stop IE flicker */
|
/* Stop IE flicker */
|
||||||
if ($.browser.msie == true) document.execCommand('BackgroundImageCache', false, true);
|
if ($.browser.msie == true) document.execCommand('BackgroundImageCache', false, true);
|
||||||
ChiliBook.recipeFolder = "js/chili/";
|
|
||||||
ChiliBook.stylesheetFolder = "js/chili/"
|
|
||||||
|
|
||||||
jQuery.fn.antispam = function() {
|
jQuery.fn.antispam = function() {
|
||||||
return this.each(function(){
|
return this.each(function(){
|
||||||
@ -13,10 +11,50 @@ jQuery.fn.antispam = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(function() {
|
$(function(){
|
||||||
$("pre.javascript").chili();
|
|
||||||
$("pre.html").chili();
|
|
||||||
$("pre.css").chili();
|
|
||||||
$("a.external").each(function() {this.target = '_new'});
|
$("a.external").each(function() {this.target = '_new'});
|
||||||
$("span.email").antispam();
|
$("span.email").antispam();
|
||||||
|
|
||||||
|
// get javascript source
|
||||||
|
if ($("#js").length) {
|
||||||
|
$("#javascript pre").text( $("#js").html().replace(/\t/g, " ") );
|
||||||
|
}
|
||||||
|
if ($("#css").length) {
|
||||||
|
$("pre.css").text( $("#css").html().replace(/\t/g, " ") );
|
||||||
|
}
|
||||||
|
if ($("#demo").length) {
|
||||||
|
$("#html pre").text(
|
||||||
|
$("#demo").html()
|
||||||
|
.replace(/\t/g, " ")
|
||||||
|
// .replace(/[<>]/g, function(m){ return {'<':'<','>':'>'}[m]; })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// hide child rows
|
||||||
|
$('#root .expand-child').hide();
|
||||||
|
// toggle child row content, not hiding the row since we are using rowspan
|
||||||
|
$('#root .toggle').click(function(){
|
||||||
|
$(this).closest('tr').nextUntil('tr:not(.expand-child)').toggle();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.collapsible').hide();
|
||||||
|
$('.toggle2').click(function(){
|
||||||
|
$(this).closest('tr').find('.collapsible').slideToggle();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.toggleAll, .showAll, .hideAll').click(function(){
|
||||||
|
var t = $.trim($(this).text());
|
||||||
|
$(this).parent().next('table').find('.collapsible')[t]();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).load(function(){
|
||||||
|
$(".js").chili();
|
||||||
|
$(".html").chili();
|
||||||
|
$(".css").chili();
|
||||||
});
|
});
|
@ -1,29 +0,0 @@
|
|||||||
$(function() {
|
|
||||||
|
|
||||||
// get javascript source
|
|
||||||
$("#javascript pre").text($("#js").html());
|
|
||||||
|
|
||||||
if($("#demo").size() > 0) {
|
|
||||||
// old school chaining...
|
|
||||||
var html = $("#demo").html()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/\n|\t|\r/g,'')
|
|
||||||
.replace(/<td/g,'\t\t\t<td')
|
|
||||||
.replace(/<\/td>/g,'</td>\n')
|
|
||||||
.replace(/<th/g,'\t\t\t<th')
|
|
||||||
.replace(/<\/th>/g,'</th>\n')
|
|
||||||
.replace(/<\/tr>/g,'\t\t</tr>')
|
|
||||||
.replace(/<tr>/g,'\n\t\t<tr>\n')
|
|
||||||
.replace(/<thead/g,'\n\t<thead>')
|
|
||||||
.replace(/<\/thead>/g,'\n\t</thead>')
|
|
||||||
.replace(/<tbody/g,'\n\t<tbody')
|
|
||||||
.replace(/<\/tbody>/g,'\n\t</tbody>')
|
|
||||||
.replace(/<\/table>/g,'\n</table>')
|
|
||||||
.replace(/-->/g,'-->\n');
|
|
||||||
|
|
||||||
$("#html pre").text(html);
|
|
||||||
}
|
|
||||||
$("pre.javascript").chili();
|
|
||||||
$("pre.html").chili();
|
|
||||||
$("pre.css").chili();
|
|
||||||
});
|
|
8936
docs/js/jquery-latest.js
vendored
8936
docs/js/jquery-latest.js
vendored
File diff suppressed because it is too large
Load Diff
@ -22,8 +22,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="demo">
|
<div class="demo">
|
||||||
<h1><a href="https://github.com/Mottie/tablesorter">TableSorter v2.0.6</a></h1>
|
|
||||||
<p>By Christian Bach, updated 6/22/2011 by Rob G<br><a href="docs/index.html">Docs included</a></p>
|
<h1><a href="https://github.com/Mottie/tablesorter">TableSorter v2.0.7</a></h1>
|
||||||
|
<p>By Christian Bach; github updates by Rob G<br>
|
||||||
|
<a href="docs/index.html">Complete docs included</a> (updated with missing docs from <a href="http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html">this blog post</a>)
|
||||||
|
</p>
|
||||||
|
|
||||||
<table class="tablesorter">
|
<table class="tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TableSorter 2.0 - Client-side table sorting with ease!
|
* TableSorter 2.0 - Client-side table sorting with ease!
|
||||||
* Version 2.0.6
|
* Version 2.0.7
|
||||||
* @requires jQuery v1.2.3
|
* @requires jQuery v1.2.3
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007 Christian Bach
|
* Copyright (c) 2007 Christian Bach
|
||||||
@ -9,7 +9,7 @@
|
|||||||
* http://www.opensource.org/licenses/mit-license.php
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* @description Create a sortable table with multi-column sorting capabilitys
|
* @description Create a sortable table with multi-column sorting capabilities
|
||||||
*
|
*
|
||||||
* @example $('table').tablesorter();
|
* @example $('table').tablesorter();
|
||||||
* @desc Create a simple tablesorter interface.
|
* @desc Create a simple tablesorter interface.
|
||||||
@ -308,7 +308,7 @@
|
|||||||
applyWidget(table);
|
applyWidget(table);
|
||||||
// trigger sortend
|
// trigger sortend
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$(table).trigger("sortEnd");
|
$(table).trigger("sortEnd", table);
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,7 +474,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* sorting methods - reverted sorting method back to version 2.0.3 */
|
/* sorting methods - reverted sorting method back to version 2.0.3 */
|
||||||
function multisort(table,sortList,cache){
|
function multisort(table,sortList,cache) {
|
||||||
var dynamicExp = "var sortWrapper = function(a,b) {",
|
var dynamicExp = "var sortWrapper = function(a,b) {",
|
||||||
l = sortList.length, sortTime, i, c, s, e, order, orgOrderCol;
|
l = sortList.length, sortTime, i, c, s, e, order, orgOrderCol;
|
||||||
if (table.config.debug) { sortTime = new Date(); }
|
if (table.config.debug) { sortTime = new Date(); }
|
||||||
@ -502,7 +502,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// http://www.webdeveloper.com/forum/showthread.php?t=107909
|
// http://www.webdeveloper.com/forum/showthread.php?t=107909
|
||||||
function sortText(a, b){
|
function sortText(a, b) {
|
||||||
if ($.data(tbl[0], "tablesorter").sortLocaleCompare) { return a.localeCompare(b); }
|
if ($.data(tbl[0], "tablesorter").sortLocaleCompare) { return a.localeCompare(b); }
|
||||||
if (a === b) { return 0; }
|
if (a === b) { return 0; }
|
||||||
try {
|
try {
|
||||||
@ -576,7 +576,7 @@
|
|||||||
totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
|
totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
|
||||||
if (!this.sortDisabled && totalRows > 0) {
|
if (!this.sortDisabled && totalRows > 0) {
|
||||||
// Only call sortStart if sorting is enabled.
|
// Only call sortStart if sorting is enabled.
|
||||||
$this.trigger("sortStart");
|
$this.trigger("sortStart", tbl[0]);
|
||||||
// store exp, for speed
|
// store exp, for speed
|
||||||
$cell = $(this);
|
$cell = $(this);
|
||||||
// get current column index
|
// get current column index
|
||||||
@ -621,6 +621,14 @@
|
|||||||
config.sortList.push([i, this.order]);
|
config.sortList.push([i, this.order]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (config.sortAppend !== null) {
|
||||||
|
a = config.sortAppend;
|
||||||
|
for (j = 0; j < a.length; j++) {
|
||||||
|
if (a[j][0] !== i) {
|
||||||
|
config.sortList.push(a[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
// set css for headers
|
// set css for headers
|
||||||
setHeadersCss($this[0], $headers, config.sortList, sortCSS);
|
setHeadersCss($this[0], $headers, config.sortList, sortCSS);
|
||||||
@ -663,7 +671,7 @@
|
|||||||
getElementText(config, cell), cell);
|
getElementText(config, cell), cell);
|
||||||
})
|
})
|
||||||
.bind("sorton", function(e, list) {
|
.bind("sorton", function(e, list) {
|
||||||
$(this).trigger("sortStart");
|
$(this).trigger("sortStart", tbl[0]);
|
||||||
config.sortList = list;
|
config.sortList = list;
|
||||||
// update and store the sortlist
|
// update and store the sortlist
|
||||||
var sortList = config.sortList;
|
var sortList = config.sortList;
|
||||||
|
4
js/jquery.tablesorter.min.js
vendored
4
js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,184 +0,0 @@
|
|||||||
(function($) {
|
|
||||||
$.extend({
|
|
||||||
tablesorterPager: new function() {
|
|
||||||
|
|
||||||
function updatePageDisplay(c) {
|
|
||||||
var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setPageSize(table,size) {
|
|
||||||
var c = table.config;
|
|
||||||
c.size = size;
|
|
||||||
c.totalPages = Math.ceil(c.totalRows / c.size);
|
|
||||||
c.pagerPositionSet = false;
|
|
||||||
moveToPage(table);
|
|
||||||
fixPosition(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fixPosition(table) {
|
|
||||||
var c = table.config;
|
|
||||||
if(!c.pagerPositionSet && c.positionFixed) {
|
|
||||||
var c = table.config, o = $(table);
|
|
||||||
if(o.offset) {
|
|
||||||
c.container.css({
|
|
||||||
top: o.offset().top + o.height() + 'px',
|
|
||||||
position: 'absolute'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
c.pagerPositionSet = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function moveToFirstPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
c.page = 0;
|
|
||||||
moveToPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
function moveToLastPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
c.page = (c.totalPages-1);
|
|
||||||
moveToPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
function moveToNextPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
c.page++;
|
|
||||||
if(c.page >= (c.totalPages-1)) {
|
|
||||||
c.page = (c.totalPages-1);
|
|
||||||
}
|
|
||||||
moveToPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
function moveToPrevPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
c.page--;
|
|
||||||
if(c.page <= 0) {
|
|
||||||
c.page = 0;
|
|
||||||
}
|
|
||||||
moveToPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function moveToPage(table) {
|
|
||||||
var c = table.config;
|
|
||||||
if(c.page < 0 || c.page > (c.totalPages-1)) {
|
|
||||||
c.page = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
renderTable(table,c.rowsCopy);
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderTable(table,rows) {
|
|
||||||
|
|
||||||
var c = table.config;
|
|
||||||
var l = rows.length;
|
|
||||||
var s = (c.page * c.size);
|
|
||||||
var e = (s + c.size);
|
|
||||||
if(e > rows.length ) {
|
|
||||||
e = rows.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var tableBody = $(table.tBodies[0]);
|
|
||||||
|
|
||||||
// clear the table body
|
|
||||||
|
|
||||||
$.tablesorter.clearTableBody(table);
|
|
||||||
|
|
||||||
for(var i = s; i < e; i++) {
|
|
||||||
|
|
||||||
//tableBody.append(rows[i]);
|
|
||||||
|
|
||||||
var o = rows[i];
|
|
||||||
var l = o.length;
|
|
||||||
for(var j=0; j < l; j++) {
|
|
||||||
|
|
||||||
tableBody[0].appendChild(o[j]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fixPosition(table,tableBody);
|
|
||||||
|
|
||||||
$(table).trigger("applyWidgets");
|
|
||||||
|
|
||||||
if( c.page >= c.totalPages ) {
|
|
||||||
moveToLastPage(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePageDisplay(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.appender = function(table,rows) {
|
|
||||||
|
|
||||||
var c = table.config;
|
|
||||||
|
|
||||||
c.rowsCopy = rows;
|
|
||||||
c.totalRows = rows.length;
|
|
||||||
c.totalPages = Math.ceil(c.totalRows / c.size);
|
|
||||||
|
|
||||||
renderTable(table,rows);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.defaults = {
|
|
||||||
size: 10,
|
|
||||||
offset: 0,
|
|
||||||
page: 0,
|
|
||||||
totalRows: 0,
|
|
||||||
totalPages: 0,
|
|
||||||
container: null,
|
|
||||||
cssNext: '.next',
|
|
||||||
cssPrev: '.prev',
|
|
||||||
cssFirst: '.first',
|
|
||||||
cssLast: '.last',
|
|
||||||
cssPageDisplay: '.pagedisplay',
|
|
||||||
cssPageSize: '.pagesize',
|
|
||||||
seperator: "/",
|
|
||||||
positionFixed: true,
|
|
||||||
appender: this.appender
|
|
||||||
};
|
|
||||||
|
|
||||||
this.construct = function(settings) {
|
|
||||||
|
|
||||||
return this.each(function() {
|
|
||||||
|
|
||||||
config = $.extend(this.config, $.tablesorterPager.defaults, settings);
|
|
||||||
|
|
||||||
var table = this, pager = config.container;
|
|
||||||
|
|
||||||
$(this).trigger("appendCache");
|
|
||||||
|
|
||||||
config.size = parseInt($(".pagesize",pager).val());
|
|
||||||
|
|
||||||
$(config.cssFirst,pager).click(function() {
|
|
||||||
moveToFirstPage(table);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
$(config.cssNext,pager).click(function() {
|
|
||||||
moveToNextPage(table);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
$(config.cssPrev,pager).click(function() {
|
|
||||||
moveToPrevPage(table);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
$(config.cssLast,pager).click(function() {
|
|
||||||
moveToLastPage(table);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
$(config.cssPageSize,pager).change(function() {
|
|
||||||
setPageSize(table,parseInt($(this).val()));
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// extend plugin scope
|
|
||||||
$.fn.extend({
|
|
||||||
tablesorterPager: $.tablesorterPager.construct
|
|
||||||
});
|
|
||||||
|
|
||||||
})(jQuery);
|
|
Loading…
Reference in New Issue
Block a user