Merge branch 'master' of git.fsfe.org:FSFE/fsfe-website
23
fsfe.org/events/2025/event-20251218-01.de.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<eventset>
|
||||
<version>1</version>
|
||||
<event start="2025-12-18T09:00:00Z" end="2025-12-18T17:00:00Z">
|
||||
<title>Where2B Konferenz 2025 in Bonn, Deutschland</title>
|
||||
<group>
|
||||
<name>None</name>
|
||||
<url></url>
|
||||
</group>
|
||||
|
||||
<body>
|
||||
<p>Alexander Sander hält einen Vortrag zur EU Beschaffungsreform bei der Where2B Konferenz 2025</p>
|
||||
</body>
|
||||
|
||||
<link>https://where2b-conference.com/vortragsprogramm/</link>
|
||||
<tags>
|
||||
<tag key="de">
|
||||
Deutschland </tag>
|
||||
<tag key="talk"/>
|
||||
<tag key="front-page"/>
|
||||
</tags>
|
||||
</event>
|
||||
</eventset>
|
||||
23
fsfe.org/events/2025/event-20251218-01.en.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<eventset>
|
||||
<version>1</version>
|
||||
<event start="2025-12-18T09:00:00Z" end="2025-12-18T17:00:00Z">
|
||||
<title>Where2B Konferenz 2025 in Bonn, Deutschland</title>
|
||||
<group>
|
||||
<name>None</name>
|
||||
<url></url>
|
||||
</group>
|
||||
|
||||
<body>
|
||||
<p>Alexander Sander will give a talk on the EU procurement reform at the Where2B Konferenz 2025.</p>
|
||||
</body>
|
||||
|
||||
<link>https://where2b-conference.com/vortragsprogramm/</link>
|
||||
<tags>
|
||||
<tag key="de">
|
||||
Deutschland </tag>
|
||||
<tag key="talk"/>
|
||||
<tag key="front-page"/>
|
||||
</tags>
|
||||
</event>
|
||||
</eventset>
|
||||
@@ -9,21 +9,37 @@
|
||||
</date>
|
||||
<head>
|
||||
<title>Αποτελέσματα: Δοκιμή Ελεύθερου Λογισμικού για φωνή & βίντεο </title>
|
||||
|
||||
<script type="text/javascript" src="/scripts/thirdparty/data-tables/media/js/jquery.js"/>
|
||||
<script type="text/javascript" src="/scripts/thirdparty/data-tables/media/js/jquery.dataTables.js"/>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#results').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{ "bVisible": false, "aTargets": [ 2 ] },
|
||||
{ "bVisible": false, "aTargets": [ 4 ] },
|
||||
{ "bVisible": false, "aTargets": [ 11 ] },
|
||||
{ "bVisible": false, "aTargets": [ 12 ] },
|
||||
{ "bVisible": false, "aTargets": [ 13 ] }
|
||||
] } );
|
||||
} );
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//
|
||||
function hideTableColumns() {
|
||||
var table = document.getElementById('results');
|
||||
if (!table) return;
|
||||
|
||||
// Column indices to hide (0-based)
|
||||
var colsToHide = [2, 4, 11, 12, 13];
|
||||
|
||||
// Get all rows (including header)
|
||||
var rows = table.getElementsByTagName('tr');
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var cells = rows[i].cells;
|
||||
for (var j = 0; j < colsToHide.length; j++) {
|
||||
var colIndex = colsToHide[j];
|
||||
if (cells[colIndex]) {
|
||||
cells[colIndex].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run on load
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', hideTableColumns, false);
|
||||
} else {
|
||||
window.attachEvent('onload', hideTableColumns);
|
||||
}
|
||||
//
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -9,21 +9,37 @@
|
||||
</date>
|
||||
<head>
|
||||
<title>Results: Free Software voice & video testing</title>
|
||||
|
||||
<script type="text/javascript" src="/scripts/thirdparty/data-tables/media/js/jquery.js"/>
|
||||
<script type="text/javascript" src="/scripts/thirdparty/data-tables/media/js/jquery.dataTables.js"/>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#results').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{ "bVisible": false, "aTargets": [ 2 ] },
|
||||
{ "bVisible": false, "aTargets": [ 4 ] },
|
||||
{ "bVisible": false, "aTargets": [ 11 ] },
|
||||
{ "bVisible": false, "aTargets": [ 12 ] },
|
||||
{ "bVisible": false, "aTargets": [ 13 ] }
|
||||
] } );
|
||||
} );
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//
|
||||
function hideTableColumns() {
|
||||
var table = document.getElementById('results');
|
||||
if (!table) return;
|
||||
|
||||
// Column indices to hide (0-based)
|
||||
var colsToHide = [2, 4, 11, 12, 13];
|
||||
|
||||
// Get all rows (including header)
|
||||
var rows = table.getElementsByTagName('tr');
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var cells = rows[i].cells;
|
||||
for (var j = 0; j < colsToHide.length; j++) {
|
||||
var colIndex = colsToHide[j];
|
||||
if (cells[colIndex]) {
|
||||
cells[colIndex].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run on load
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', hideTableColumns, false);
|
||||
} else {
|
||||
window.attachEvent('onload', hideTableColumns);
|
||||
}
|
||||
//
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -3,98 +3,104 @@
|
||||
<version>1</version>
|
||||
|
||||
<head>
|
||||
<title>Germany Stack: Only Free Software Enables Digital Sovereignty</title>
|
||||
<title>Deutschland-Stack: Nur Freie Software ermöglicht digitale Souveränität</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Germany Stack: Only Free Software Enables Digital Sovereignty</h1>
|
||||
<h1>Deutschland-Stack: Nur Freie Software ermöglicht digitale Souveränität</h1>
|
||||
|
||||
<p>The “Germany Stack” is a central digital-policy project of the German
|
||||
federal government. The FSFE calls for the Stack to be planned in close
|
||||
coordination with European partners and to be implemented entirely as
|
||||
Free Software, since only the four freedoms enable digital
|
||||
sovereignty.</p>
|
||||
<p>Der „Deutschland-Stack“ ist ein zentrales digitalpolitisches
|
||||
Vorhaben der deutschen Bundesregierung. Die FSFE fordert: Der Stack
|
||||
muss in enger europäischer Abstimmung geplant und vollständig als Freie
|
||||
Software umgesetzt werden, denn nur die vier Freiheiten ermöglicht
|
||||
digitale Souveränität.</p>
|
||||
|
||||
<figure>
|
||||
<img src="https://pics.fsfe.org/uploads/medium/5addbc152e4501f8867424798cc918ad.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE"/>
|
||||
</figure>
|
||||
<img src="https://pics.fsfe.org/uploads/medium/7d/8d/4c74446d39fa408e48558573a04d.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE"/> </figure>
|
||||
|
||||
<p>The Federal Ministry for Digital Affairs and State Modernisation is
|
||||
working on the so-called Germany Stack, which is intended to <a href="https://deutschland-stack.gov.de/gesamtbild/">“create a sovereign, European-compatible and interoperable digital infrastructure
|
||||
for federal, state and local governments” as “national sovereign technology platform”</a>. Until the end of November 2025, a public consultation is running, to which the Free Software Foundation Europe
|
||||
(FSFE) <a href="https://gitlab.opencode.de/dstack/d-stack-home/-/issues/347">has today submitted a statement</a>.</p>
|
||||
<p>Das Bundesministerium für Digitales und Staatsmodernisierung
|
||||
arbeitet am sogenannten Deutschland-Stack, der als <a href="https://deutschland-stack.gov.de/gesamtbild/">„nationale souveräne Technologie-Plattform […] eine souveräne, europäisch anschlussfähige
|
||||
und interoperable digitale Infrastruktur für Bund, Länder und Kommunen […] schaffen“</a> soll. Bis Ende November 2025 läuft dazu eine Konsultation, in dem die Free Software Foundation Europe (FSFE) heute
|
||||
<a href="https://gitlab.opencode.de/dstack/d-stack-home/-/issues/347">eine Stellungnahme eingereicht hat</a>.</p>
|
||||
|
||||
<p>Darin fordern wir eine strategische Ausrichtung des
|
||||
Deutschland-Stacks unter folgenden Prinzipien:</p>
|
||||
|
||||
<p>In this statement, we call for a strategic orientation of the Germany
|
||||
Stack based on the following principles:</p>
|
||||
<ol>
|
||||
|
||||
<li>The Germany Stack must be published entirely as Free Software,
|
||||
granting everyone the right to use, study, share and improve the
|
||||
software. All components included must be under a Free Software
|
||||
licence.</li>
|
||||
<li>Der Deutschland-Stack muss vollständig als Freie Software
|
||||
veröffentlicht werden und allen ermöglichen, die Software zu verstehen,
|
||||
zu verwenden, zu verbreiten und zu verbessern. Enthaltene Komponenten
|
||||
müssen unter einer Freie-Software-Lizenz stehen.</li>
|
||||
|
||||
<li>The Stack must be advanced in close cooperation with European
|
||||
partner countries and the EU. Instead of national go-it-alone approaches
|
||||
and silo stacks, we need Free Software solutions that are interoperable
|
||||
across Europe.</li>
|
||||
<li>Der Stack muss in enger Zusammenarbeit mit den europäischen
|
||||
Partnerländern und der EU vorangetrieben werden. Statt nationaler
|
||||
Alleingänge und Silo-Stacks brauchen wir europaweit anschlussfähige
|
||||
Freie-Software-Lösungen.</li>
|
||||
|
||||
<li>Free Software requires secure, long-term budgets. Establishing
|
||||
the Germany Stack must go hand in hand with strategic funding for the
|
||||
development and maintenance of Free Software.</li>
|
||||
<li>Freie Software braucht sichere, langfristige Budgets. Die
|
||||
Etablierung eines Deutschland-Stacks muss mit strategischer
|
||||
Finanzierung der Entwicklung und Maintenance Freier Software
|
||||
einhergehen.</li>
|
||||
|
||||
<li>Beyond the state and its administrations, European companies,
|
||||
civil society, and organisations from schools to volunteer fire brigades
|
||||
depend on digital sovereignty. The Stack must therefore be made
|
||||
available for reuse by non-state actors.</li>
|
||||
<li>Außer dem Staat und seinen Verwaltungen sind auch europäische
|
||||
Unternehmen, Zivilgesellschaft und Organisationen von Schulen bis hin
|
||||
zu freiwilligen Feuerwehren auf digitale Souveränität angewiesen. Der
|
||||
Stack muss daher nicht-staatlichen Akteuren zur Nachnutzung zur
|
||||
Verfügung stehen.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p>Free Software is the necessary prerequisite for sovereign digital
|
||||
infrastructures. Only the rights guaranteed by Free Software licences
|
||||
give the state control over the digital infrastructure it relies on.
|
||||
Only Free Software and open standards compatible with Free Software
|
||||
enable the highest level of interoperability and security. Only in this
|
||||
way can it be ensured that public authorities retain influence over the
|
||||
software products they deploy, and guarantee long-term access to the
|
||||
publicly funded code. Only the consistent use of Free Software enables
|
||||
the German state and its administrations to overcome existing critical
|
||||
dependencies on proprietary, mostly non-European software and to act in
|
||||
a sovereign manner.</p>
|
||||
<p>Freie Software ist die notwendige Voraussetzung für souveräne
|
||||
digitale Infrastrukturen. Nur die durch Freie-Software-Lizenzen
|
||||
garantierten Rechte geben dem Staat Kontrolle über die von ihm genutzte
|
||||
digitale Infrastruktur. Nur Freie Software und offene Standards, die
|
||||
mit Freier Software kompatibel sind, ermöglichen ein höchstes Maß an
|
||||
Interoperabilität und Sicherheit. Nur so kann sich die öffentliche Hand
|
||||
Einfluss auf die eingesetzten Software-Produkte und langfristigen
|
||||
Zugriff auf den mit öffentlichen Mitteln finanzierten Code sichern. Nur
|
||||
der konsequente Einsatz Freier Software versetzt den deutschen Staat
|
||||
und seine Verwaltungen in die Lage, bestehende kritische Abhängigkeiten
|
||||
von proprietären, zumeist nicht-europäischen Software- und
|
||||
Cloud-Anbietern aufzulösen und souverän zu agieren.</p>
|
||||
|
||||
<p>The Germany Stack can only achieve its stated aim if it consistently
|
||||
relies on Free Software. A proprietary stack would merely replace
|
||||
existing dependencies with new ones. Proprietary software developed by
|
||||
manufacturers in Germany or Europe does not provide the necessary
|
||||
conditions for sovereignty, creates new lock-in effects, and can at any
|
||||
time be withdrawn from access by public authorities – for instance, if a
|
||||
manufacturer becomes insolvent or is bought by a non-European
|
||||
competitor. Trust issues also remain when the code is intransparent, and
|
||||
security bugs may persist if there is no right to fix the software.
|
||||
Defining availability as Free Software as a criterion for components of
|
||||
the Stack does not disadvantage manufacturers of proprietary software.
|
||||
Rather, this decision creates an incentive for all manufacturers to
|
||||
produce and publish Free Software, from which not only public
|
||||
administrations but also the European economy and society as a whole
|
||||
will benefit.</p>
|
||||
<p>Der Deutschland-Stack kann das gesetzte Ziel daher nur erreichen,
|
||||
wenn er konsequent auf Freie Software setzt. Ein proprietärer Stack
|
||||
würde bedeuten, die bestehenden durch neue Abhängigkeiten zu ersetzen.
|
||||
Proprietäre Software von Herstellern aus Deutschland und Europa bietet
|
||||
nicht die genannten Voraussetzungen für Souveränität, bringt neue
|
||||
Lock-In-Effekte und kann zudem jederzeit dem Zugriff staatlicher
|
||||
Akteure entzogen werden, beispielsweise wenn Hersteller in Konkurs
|
||||
gehen oder aus dem nicht-europäischen Ausland aufgekauft werden.
|
||||
Vertrauensprobleme bleiben, wenn der Code intransparent ist, und
|
||||
Sicherheitslücken können fortbestehen, wenn es kein Recht gibt, die
|
||||
Software zu reparieren. Die Entscheidung, die Verfügbarkeit als Freie
|
||||
Software als Kriterium für Komponenten des Stacks zu formulieren,
|
||||
bedeutet keine Benachteiligung für Hersteller proprietärer Software.
|
||||
Vielmehr ist diese Entscheidung ein Anreiz für alle Hersteller, Freie
|
||||
Software zu produzieren und zu veröffentlichen, wovon nicht nur die
|
||||
öffentliche Verwaltung profitiert, sondern auch die europäische
|
||||
Wirtschaft und die ganze Gesellschaft.</p>
|
||||
|
||||
<p>Studies show that governments and public administrations account for
|
||||
up to 27% of the turnover of software vendors. However, this turnover is
|
||||
predominantly generated by proprietary software manufacturers outside
|
||||
Europe. Strategic procurement of Free Software within the framework of
|
||||
the Germany Stack, by contrast, can stimulate the European market and
|
||||
industry and strengthen autonomy. A consistent use of Free Software in
|
||||
the Stack also creates spill-over effects for European companies and
|
||||
civil society, whose sovereignty is likewise strengthened through the
|
||||
use of Free Software.</p>
|
||||
<p>Regierungen und Verwaltungen tragen Untersuchungen zufolge mit bis
|
||||
zu 27 % zum Umsatz von Softwareherstellern bei. Dieser Umsatz wird
|
||||
jedoch vorwiegend durch Hersteller proprietärer Software außerhalb
|
||||
Europas generiert. Strategische Beschaffung Freier Software im Rahmen
|
||||
des Deutschland-Stacks hingegen kann den europäischen Markt und die
|
||||
Industrie stimulieren und mehr Eigenständigkeit ermöglichen. Ein
|
||||
konsequenter Einsatz Freier Software im Stack bringt überdies
|
||||
Spill-Over-Effekte für europäische Unternehmen und Zivilgesellschaft,
|
||||
deren Souveränität durch die Nutzung Freier Software ebenfalls gestärkt
|
||||
wird.</p>
|
||||
|
||||
<p>Further arguments for Free Software in public administrations can be
|
||||
found in <a href="https://download.fsfe.org/policy/20241204_Bundestag_Stellungnahme_FSFE.pdf">the
|
||||
FSFE’s statement submitted for the “Open Source” hearing</a> in
|
||||
the German Bundestag’s Digital Committee on 04.11.2024. The <a href="https://deutschland-stack.gov.de/beteiligung/">consultation
|
||||
on the Germany Stack</a> runs until 30 November 2025. Until then, everyone
|
||||
has the opportunity to provide well-founded feedback on openCode.</p>
|
||||
<p>Weitere Argumente für Freie Software in öffentlichen Verwaltungen
|
||||
finden sich <a href="https://download.fsfe.org/policy/20241204_Bundestag_Stellungnahme_FSFE.pdf">Stellungnahme
|
||||
der FSFE im Rahmen der Anhörung „Open Source“</a>
|
||||
im Digitalausschuss des Deutschen Bundestags am 04.12.2024. Die <a href="https://deutschland-stack.gov.de/beteiligung/">Konsultation zum
|
||||
Deutschland-Stack</a> läuft bis zum 30.11.2025. Solange besteht für alle die Möglichkeit, fundiertes Feedback auf openCode zu
|
||||
geben.</p>
|
||||
|
||||
|
||||
</body>
|
||||
@@ -112,8 +118,8 @@ has the opportunity to provide well-founded feedback on openCode.</p>
|
||||
|
||||
<discussion href="https://mastodon.social/deck/@fsfe/"/>
|
||||
|
||||
<image
|
||||
url="https://pics.fsfe.org/uploads/medium/5addbc152e4501f8867424798cc918ad.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE."/>
|
||||
</html>
|
||||
<image url="https://pics.fsfe.org/uploads/medium/7d/8d/4c74446d39fa408e48558573a04d.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE."/>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,104 +3,98 @@
|
||||
<version>1</version>
|
||||
|
||||
<head>
|
||||
<title>Deutschland-Stack: Nur Freie Software ermöglicht digitale Souveränität</title>
|
||||
<title>Germany Stack: Only Free Software Enables Digital Sovereignty</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Deutschland-Stack: Nur Freie Software ermöglicht digitale Souveränität</h1>
|
||||
<h1>Germany Stack: Only Free Software Enables Digital Sovereignty</h1>
|
||||
|
||||
<p>Der „Deutschland-Stack“ ist ein zentrales digitalpolitisches
|
||||
Vorhaben der deutschen Bundesregierung. Die FSFE fordert: Der Stack
|
||||
muss in enger europäischer Abstimmung geplant und vollständig als Freie
|
||||
Software umgesetzt werden, denn nur die vier Freiheiten ermöglicht
|
||||
digitale Souveränität.</p>
|
||||
<p>The “Germany Stack” is a central digital-policy project of the German
|
||||
federal government. The FSFE calls for the Stack to be planned in close
|
||||
coordination with European partners and to be implemented entirely as
|
||||
Free Software, since only the four freedoms enable digital
|
||||
sovereignty.</p>
|
||||
|
||||
<figure>
|
||||
<img src="https://pics.fsfe.org/uploads/medium/5addbc152e4501f8867424798cc918ad.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE"/> </figure>
|
||||
<img src="https://pics.fsfe.org/uploads/medium/7d/8d/4c74446d39fa408e48558573a04d.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE"/>
|
||||
</figure>
|
||||
|
||||
<p>Das Bundesministerium für Digitales und Staatsmodernisierung
|
||||
arbeitet am sogenannten Deutschland-Stack, der als <a href="https://deutschland-stack.gov.de/gesamtbild/">„nationale souveräne Technologie-Plattform […] eine souveräne, europäisch anschlussfähige
|
||||
und interoperable digitale Infrastruktur für Bund, Länder und Kommunen […] schaffen“</a> soll. Bis Ende November 2025 läuft dazu eine Konsultation, in dem die Free Software Foundation Europe (FSFE) heute
|
||||
<a href="https://gitlab.opencode.de/dstack/d-stack-home/-/issues/347">eine Stellungnahme eingereicht hat</a>.</p>
|
||||
|
||||
<p>Darin fordern wir eine strategische Ausrichtung des
|
||||
Deutschland-Stacks unter folgenden Prinzipien:</p>
|
||||
<p>The Federal Ministry for Digital Affairs and State Modernisation is
|
||||
working on the so-called Germany Stack, which is intended to <a href="https://deutschland-stack.gov.de/gesamtbild/">“create a sovereign, European-compatible and interoperable digital infrastructure
|
||||
for federal, state and local governments” as “national sovereign technology platform”</a>. Until the end of November 2025, a public consultation is running, to which the Free Software Foundation Europe
|
||||
(FSFE) <a href="https://gitlab.opencode.de/dstack/d-stack-home/-/issues/347">has today submitted a statement</a>.</p>
|
||||
|
||||
<p>In this statement, we call for a strategic orientation of the Germany
|
||||
Stack based on the following principles:</p>
|
||||
<ol>
|
||||
|
||||
<li>Der Deutschland-Stack muss vollständig als Freie Software
|
||||
veröffentlicht werden und allen ermöglichen, die Software zu verstehen,
|
||||
zu verwenden, zu verbreiten und zu verbessern. Enthaltene Komponenten
|
||||
müssen unter einer Freie-Software-Lizenz stehen.</li>
|
||||
<li>The Germany Stack must be published entirely as Free Software,
|
||||
granting everyone the right to use, study, share and improve the
|
||||
software. All components included must be under a Free Software
|
||||
licence.</li>
|
||||
|
||||
<li>Der Stack muss in enger Zusammenarbeit mit den europäischen
|
||||
Partnerländern und der EU vorangetrieben werden. Statt nationaler
|
||||
Alleingänge und Silo-Stacks brauchen wir europaweit anschlussfähige
|
||||
Freie-Software-Lösungen.</li>
|
||||
<li>The Stack must be advanced in close cooperation with European
|
||||
partner countries and the EU. Instead of national go-it-alone approaches
|
||||
and silo stacks, we need Free Software solutions that are interoperable
|
||||
across Europe.</li>
|
||||
|
||||
<li>Freie Software braucht sichere, langfristige Budgets. Die
|
||||
Etablierung eines Deutschland-Stacks muss mit strategischer
|
||||
Finanzierung der Entwicklung und Maintenance Freier Software
|
||||
einhergehen.</li>
|
||||
<li>Free Software requires secure, long-term budgets. Establishing
|
||||
the Germany Stack must go hand in hand with strategic funding for the
|
||||
development and maintenance of Free Software.</li>
|
||||
|
||||
<li>Außer dem Staat und seinen Verwaltungen sind auch europäische
|
||||
Unternehmen, Zivilgesellschaft und Organisationen von Schulen bis hin
|
||||
zu freiwilligen Feuerwehren auf digitale Souveränität angewiesen. Der
|
||||
Stack muss daher nicht-staatlichen Akteuren zur Nachnutzung zur
|
||||
Verfügung stehen.</li>
|
||||
<li>Beyond the state and its administrations, European companies,
|
||||
civil society, and organisations from schools to volunteer fire brigades
|
||||
depend on digital sovereignty. The Stack must therefore be made
|
||||
available for reuse by non-state actors.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p>Freie Software ist die notwendige Voraussetzung für souveräne
|
||||
digitale Infrastrukturen. Nur die durch Freie-Software-Lizenzen
|
||||
garantierten Rechte geben dem Staat Kontrolle über die von ihm genutzte
|
||||
digitale Infrastruktur. Nur Freie Software und offene Standards, die
|
||||
mit Freier Software kompatibel sind, ermöglichen ein höchstes Maß an
|
||||
Interoperabilität und Sicherheit. Nur so kann sich die öffentliche Hand
|
||||
Einfluss auf die eingesetzten Software-Produkte und langfristigen
|
||||
Zugriff auf den mit öffentlichen Mitteln finanzierten Code sichern. Nur
|
||||
der konsequente Einsatz Freier Software versetzt den deutschen Staat
|
||||
und seine Verwaltungen in die Lage, bestehende kritische Abhängigkeiten
|
||||
von proprietären, zumeist nicht-europäischen Software- und
|
||||
Cloud-Anbietern aufzulösen und souverän zu agieren.</p>
|
||||
<p>Free Software is the necessary prerequisite for sovereign digital
|
||||
infrastructures. Only the rights guaranteed by Free Software licences
|
||||
give the state control over the digital infrastructure it relies on.
|
||||
Only Free Software and open standards compatible with Free Software
|
||||
enable the highest level of interoperability and security. Only in this
|
||||
way can it be ensured that public authorities retain influence over the
|
||||
software products they deploy, and guarantee long-term access to the
|
||||
publicly funded code. Only the consistent use of Free Software enables
|
||||
the German state and its administrations to overcome existing critical
|
||||
dependencies on proprietary, mostly non-European software and to act in
|
||||
a sovereign manner.</p>
|
||||
|
||||
<p>Der Deutschland-Stack kann das gesetzte Ziel daher nur erreichen,
|
||||
wenn er konsequent auf Freie Software setzt. Ein proprietärer Stack
|
||||
würde bedeuten, die bestehenden durch neue Abhängigkeiten zu ersetzen.
|
||||
Proprietäre Software von Herstellern aus Deutschland und Europa bietet
|
||||
nicht die genannten Voraussetzungen für Souveränität, bringt neue
|
||||
Lock-In-Effekte und kann zudem jederzeit dem Zugriff staatlicher
|
||||
Akteure entzogen werden, beispielsweise wenn Hersteller in Konkurs
|
||||
gehen oder aus dem nicht-europäischen Ausland aufgekauft werden.
|
||||
Vertrauensprobleme bleiben, wenn der Code intransparent ist, und
|
||||
Sicherheitslücken können fortbestehen, wenn es kein Recht gibt, die
|
||||
Software zu reparieren. Die Entscheidung, die Verfügbarkeit als Freie
|
||||
Software als Kriterium für Komponenten des Stacks zu formulieren,
|
||||
bedeutet keine Benachteiligung für Hersteller proprietärer Software.
|
||||
Vielmehr ist diese Entscheidung ein Anreiz für alle Hersteller, Freie
|
||||
Software zu produzieren und zu veröffentlichen, wovon nicht nur die
|
||||
öffentliche Verwaltung profitiert, sondern auch die europäische
|
||||
Wirtschaft und die ganze Gesellschaft.</p>
|
||||
<p>The Germany Stack can only achieve its stated aim if it consistently
|
||||
relies on Free Software. A proprietary stack would merely replace
|
||||
existing dependencies with new ones. Proprietary software developed by
|
||||
manufacturers in Germany or Europe does not provide the necessary
|
||||
conditions for sovereignty, creates new lock-in effects, and can at any
|
||||
time be withdrawn from access by public authorities – for instance, if a
|
||||
manufacturer becomes insolvent or is bought by a non-European
|
||||
competitor. Trust issues also remain when the code is intransparent, and
|
||||
security bugs may persist if there is no right to fix the software.
|
||||
Defining availability as Free Software as a criterion for components of
|
||||
the Stack does not disadvantage manufacturers of proprietary software.
|
||||
Rather, this decision creates an incentive for all manufacturers to
|
||||
produce and publish Free Software, from which not only public
|
||||
administrations but also the European economy and society as a whole
|
||||
will benefit.</p>
|
||||
|
||||
<p>Regierungen und Verwaltungen tragen Untersuchungen zufolge mit bis
|
||||
zu 27 % zum Umsatz von Softwareherstellern bei. Dieser Umsatz wird
|
||||
jedoch vorwiegend durch Hersteller proprietärer Software außerhalb
|
||||
Europas generiert. Strategische Beschaffung Freier Software im Rahmen
|
||||
des Deutschland-Stacks hingegen kann den europäischen Markt und die
|
||||
Industrie stimulieren und mehr Eigenständigkeit ermöglichen. Ein
|
||||
konsequenter Einsatz Freier Software im Stack bringt überdies
|
||||
Spill-Over-Effekte für europäische Unternehmen und Zivilgesellschaft,
|
||||
deren Souveränität durch die Nutzung Freier Software ebenfalls gestärkt
|
||||
wird.</p>
|
||||
<p>Studies show that governments and public administrations account for
|
||||
up to 27% of the turnover of software vendors. However, this turnover is
|
||||
predominantly generated by proprietary software manufacturers outside
|
||||
Europe. Strategic procurement of Free Software within the framework of
|
||||
the Germany Stack, by contrast, can stimulate the European market and
|
||||
industry and strengthen autonomy. A consistent use of Free Software in
|
||||
the Stack also creates spill-over effects for European companies and
|
||||
civil society, whose sovereignty is likewise strengthened through the
|
||||
use of Free Software.</p>
|
||||
|
||||
<p>Weitere Argumente für Freie Software in öffentlichen Verwaltungen
|
||||
finden sich <a href="https://download.fsfe.org/policy/20241204_Bundestag_Stellungnahme_FSFE.pdf">Stellungnahme
|
||||
der FSFE im Rahmen der Anhörung „Open Source“</a>
|
||||
im Digitalausschuss des Deutschen Bundestags am 04.12.2024. Die <a href="https://deutschland-stack.gov.de/beteiligung/">Konsultation zum
|
||||
Deutschland-Stack</a> läuft bis zum 30.11.2025. Solange besteht für alle die Möglichkeit, fundiertes Feedback auf openCode zu
|
||||
geben.</p>
|
||||
<p>Further arguments for Free Software in public administrations can be
|
||||
found in <a href="https://download.fsfe.org/policy/20241204_Bundestag_Stellungnahme_FSFE.pdf">the
|
||||
FSFE’s statement submitted for the “Open Source” hearing</a> in
|
||||
the German Bundestag’s Digital Committee on 04.11.2024. The <a href="https://deutschland-stack.gov.de/beteiligung/">consultation
|
||||
on the Germany Stack</a> runs until 30 November 2025. Until then, everyone
|
||||
has the opportunity to provide well-founded feedback on openCode.</p>
|
||||
|
||||
|
||||
</body>
|
||||
@@ -118,8 +112,8 @@ geben.</p>
|
||||
|
||||
<discussion href="https://mastodon.social/deck/@fsfe/"/>
|
||||
|
||||
<image url="https://pics.fsfe.org/uploads/medium/5addbc152e4501f8867424798cc918ad.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE."/>
|
||||
|
||||
</html>
|
||||
<image
|
||||
url="https://pics.fsfe.org/uploads/medium/7d/8d/4c74446d39fa408e48558573a04d.jpg"
|
||||
alt="A nighttime view across the Spree River in Berlin showing the illuminated façade of the Reichstag building with the German flag on top. To its right, the wall of another official building with the projection of the sentence GIVE FREE SOFTWARE A CHANCE."/>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
This DataTables plugin (v1.9.x) for jQuery was developed out of the desire to allow highly configurable access to HTML tables with advanced access features.
|
||||
|
||||
For detailed installation, usage and API instructions, please refer to the DataTables web-pages: http://www.datatables.net
|
||||
|
||||
Questions, feature requests and bug reports (etc) can all be asked on the DataTables forums: http://www.datatables.net/forums/
|
||||
|
||||
The DataTables source can be found in the media/js/ directory of this archive.
|
||||
|
||||
DataTables is released with dual licensing, using the GPL v2 (license-gpl2.txt) and an BSD style license (license-bsd.txt). You may select which of the two licenses you wish to use DataTables under. Please see the corresponding license file for details of these licenses. You are free to use, modify and distribute this software, but all copyright information must remain.
|
||||
|
||||
If you discover any bugs in DataTables, have any suggestions for improvements or even if you just like using it, please free to get in touch with me: www.datatables.net/contact
|
||||
@@ -1,10 +0,0 @@
|
||||
Copyright (c) 2008-2010, Allan Jardine
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Allan Jardine nor SpryMedia UK may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* General page setup
|
||||
*/
|
||||
#dt_example {
|
||||
font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#dt_example #container {
|
||||
width: 800px;
|
||||
margin: 30px auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#dt_example #footer {
|
||||
margin: 50px auto 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dt_example #demo {
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
|
||||
#dt_example .demo_jui {
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
|
||||
#dt_example .big {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
}
|
||||
|
||||
#dt_example .spacer {
|
||||
height: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example .clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example pre {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
#dt_example h1 {
|
||||
margin-top: 2em;
|
||||
font-size: 1.3em;
|
||||
font-weight: normal;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
border-bottom: 1px solid #B0BED9;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example h2 {
|
||||
font-size: 1.2em;
|
||||
font-weight: normal;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example a {
|
||||
color: #0063DC;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#dt_example a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#dt_example ul {
|
||||
color: #4E6CA3;
|
||||
}
|
||||
|
||||
.css_right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.css_left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.demo_links {
|
||||
float: left;
|
||||
width: 50%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#demo_info {
|
||||
padding: 5px;
|
||||
border: 1px solid #B0BED9;
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -1,576 +0,0 @@
|
||||
/*
|
||||
* File: demo_table.css
|
||||
* CVS: $Id$
|
||||
* Description: CSS descriptions for DataTables demo pages
|
||||
* Author: Allan Jardine
|
||||
* Created: Tue May 12 06:47:22 BST 2009
|
||||
* Modified: $Date$ by $Author$
|
||||
* Language: CSS
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
||||
*
|
||||
* ***************************************************************************
|
||||
* DESCRIPTION
|
||||
*
|
||||
* The styles given here are suitable for the demos that are used with the standard DataTables
|
||||
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
||||
* meet the layout requirements of your site.
|
||||
*
|
||||
* Common issues:
|
||||
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
||||
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
||||
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
||||
* modify that selector.
|
||||
* Note that the path used for Images is relative. All images are by default located in
|
||||
* ../images/ - relative to this CSS file.
|
||||
*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables features
|
||||
*/
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
zoom: 1; /* Feeling sorry for IE */
|
||||
}
|
||||
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
width: 60%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Pagination nested */
|
||||
.paginate_disabled_previous, .paginate_enabled_previous,
|
||||
.paginate_disabled_next, .paginate_enabled_next {
|
||||
height: 19px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover, .paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active, .paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active, .paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous, .paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next, .paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous {
|
||||
background: url('../images/back_disabled.png') no-repeat top left;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous {
|
||||
background: url('../images/back_enabled.png') no-repeat top left;
|
||||
}
|
||||
.paginate_enabled_previous:hover {
|
||||
background: url('../images/back_enabled_hover.png') no-repeat top left;
|
||||
}
|
||||
|
||||
.paginate_disabled_next {
|
||||
background: url('../images/forward_disabled.png') no-repeat top right;
|
||||
}
|
||||
|
||||
.paginate_enabled_next {
|
||||
background: url('../images/forward_enabled.png') no-repeat top right;
|
||||
}
|
||||
.paginate_enabled_next:hover {
|
||||
background: url('../images/forward_enabled_hover.png') no-repeat top right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables display
|
||||
*/
|
||||
table.display {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
|
||||
/* Note Firefox 3.5 and before have a bug with border-collapse
|
||||
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
|
||||
* border-spacing: 0; is one possible option. Conditional-css.com is
|
||||
* useful for this kind of thing
|
||||
*
|
||||
* Further note IE 6/7 has problems when calculating widths with border width.
|
||||
* It subtracts one px relative to the other browsers from the first column, and
|
||||
* adds one to the end...
|
||||
*
|
||||
* If you want that effect I'd suggest setting a border-top/left on th/td's and
|
||||
* then filling in the gaps with other borders.
|
||||
*/
|
||||
}
|
||||
|
||||
table.display thead th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-bottom: 1px solid black;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
table.display tfoot th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-top: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.display tr.heading2 td {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.display td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.display td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background: url('../images/sort_asc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background: url('../images/sort_desc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background: url('../images/sort_both.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_asc_disabled {
|
||||
background: url('../images/sort_asc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc_disabled {
|
||||
background: url('../images/sort_desc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables row classes
|
||||
*/
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeC {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeX {
|
||||
background-color: #ffeeee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeU {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
tr.odd {
|
||||
background-color: #E2E4FF;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Misc
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.top .dataTables_info {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tfoot input {
|
||||
margin: 0.5em 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
tfoot input.search_init {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
td.group {
|
||||
background-color: #d1cfd0;
|
||||
border-bottom: 2px solid #A19B9E;
|
||||
border-top: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
td.details {
|
||||
background-color: #d1cfd0;
|
||||
border: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
|
||||
.example_alt_pagination div.dataTables_info {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.paging_full_numbers {
|
||||
width: 400px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.paging_full_numbers a:active {
|
||||
outline: none
|
||||
}
|
||||
|
||||
.paging_full_numbers a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
table.display tr.even.row_selected td {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
table.display tr.odd.row_selected td {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting classes for columns
|
||||
*/
|
||||
/* For the standard odd/even */
|
||||
tr.odd td.sorting_1 {
|
||||
background-color: #D3D6FF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_2 {
|
||||
background-color: #DADCFF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_3 {
|
||||
background-color: #E0E2FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_1 {
|
||||
background-color: #EAEBFF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_2 {
|
||||
background-color: #F2F3FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_3 {
|
||||
background-color: #F9F9FF;
|
||||
}
|
||||
|
||||
|
||||
/* For the Conditional-CSS grading rows */
|
||||
/*
|
||||
Colour calculations (based off the main row colours)
|
||||
Level 1:
|
||||
dd > c4
|
||||
ee > d5
|
||||
Level 2:
|
||||
dd > d1
|
||||
ee > e2
|
||||
*/
|
||||
tr.odd.gradeA td.sorting_1 {
|
||||
background-color: #c4ffc4;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_2 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_3 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_1 {
|
||||
background-color: #d5ffd5;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_2 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_3 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_1 {
|
||||
background-color: #c4c4ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_2 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_3 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_1 {
|
||||
background-color: #d5d5ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_2 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_3 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_1 {
|
||||
background-color: #ffc4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_2 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_3 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_1 {
|
||||
background-color: #ffd5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_2 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_3 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_1 {
|
||||
background-color: #c4c4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_2 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_3 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_1 {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_2 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_3 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Row highlighting example
|
||||
*/
|
||||
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
||||
background-color: #E6FF99;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_1 {
|
||||
background-color: #DDFF75;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_2 {
|
||||
background-color: #E7FF9E;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_3 {
|
||||
background-color: #E2FF89;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover {
|
||||
background-color: #E6FF99;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_1 {
|
||||
background-color: #D6FF5C;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_2 {
|
||||
background-color: #E0FF84;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_3 {
|
||||
background-color: #DBFF70;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* KeyTable
|
||||
*/
|
||||
table.KeyTable td {
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
table.KeyTable td.focus {
|
||||
border: 3px solid #3366FF;
|
||||
}
|
||||
|
||||
table.display tr.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
div.box {
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
border: 1px solid #8080FF;
|
||||
background-color: #E5E5FF;
|
||||
}
|
||||
@@ -1,501 +0,0 @@
|
||||
/*
|
||||
* File: demo_table_jui.css
|
||||
* CVS: $Id$
|
||||
* Description: CSS descriptions for DataTables demo pages
|
||||
* Author: Allan Jardine
|
||||
* Created: Tue May 12 06:47:22 BST 2009
|
||||
* Modified: $Date$ by $Author$
|
||||
* Language: CSS
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
||||
*
|
||||
* ***************************************************************************
|
||||
* DESCRIPTION
|
||||
*
|
||||
* The styles given here are suitable for the demos that are used with the standard DataTables
|
||||
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
||||
* meet the layout requirements of your site.
|
||||
*
|
||||
* Common issues:
|
||||
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
||||
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
||||
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
||||
* modify that selector.
|
||||
* Note that the path used for Images is relative. All images are by default located in
|
||||
* ../images/ - relative to this CSS file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI specific styling
|
||||
*/
|
||||
|
||||
.paging_two_button .ui-button {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers .ui-button {
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.dataTables_paginate .ui-button {
|
||||
margin-right: -0.1em !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers {
|
||||
width: 350px !important;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .ui-toolbar {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
table.display thead th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper .ui-widget-header {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sort arrow icon positioning
|
||||
*/
|
||||
table.display thead th div.DataTables_sort_wrapper {
|
||||
position: relative;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table.display thead th div.DataTables_sort_wrapper span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Everything below this line is the same as demo_table.css. This file is
|
||||
* required for 'cleanliness' of the markup
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables features
|
||||
*/
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
margin-left: -125px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables display
|
||||
*/
|
||||
table.display {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.display tfoot th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.display tr.heading2 td {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.display td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.display td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background: url('../images/sort_asc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background: url('../images/sort_desc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background: url('../images/sort_both.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_asc_disabled {
|
||||
background: url('../images/sort_asc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc_disabled {
|
||||
background: url('../images/sort_desc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables row classes
|
||||
*/
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeC {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeX {
|
||||
background-color: #ffeeee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeU {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
tr.odd {
|
||||
background-color: #E2E4FF;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Misc
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.top .dataTables_info {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tfoot input {
|
||||
margin: 0.5em 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
tfoot input.search_init {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
td.group {
|
||||
background-color: #d1cfd0;
|
||||
border-bottom: 2px solid #A19B9E;
|
||||
border-top: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
td.details {
|
||||
background-color: #d1cfd0;
|
||||
border: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
|
||||
.example_alt_pagination div.dataTables_info {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
table.display tr.even.row_selected td {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
table.display tr.odd.row_selected td {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting classes for columns
|
||||
*/
|
||||
/* For the standard odd/even */
|
||||
tr.odd td.sorting_1 {
|
||||
background-color: #D3D6FF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_2 {
|
||||
background-color: #DADCFF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_3 {
|
||||
background-color: #E0E2FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_1 {
|
||||
background-color: #EAEBFF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_2 {
|
||||
background-color: #F2F3FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_3 {
|
||||
background-color: #F9F9FF;
|
||||
}
|
||||
|
||||
|
||||
/* For the Conditional-CSS grading rows */
|
||||
/*
|
||||
Colour calculations (based off the main row colours)
|
||||
Level 1:
|
||||
dd > c4
|
||||
ee > d5
|
||||
Level 2:
|
||||
dd > d1
|
||||
ee > e2
|
||||
*/
|
||||
tr.odd.gradeA td.sorting_1 {
|
||||
background-color: #c4ffc4;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_2 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_3 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_1 {
|
||||
background-color: #d5ffd5;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_2 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_3 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_1 {
|
||||
background-color: #c4c4ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_2 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_3 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_1 {
|
||||
background-color: #d5d5ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_2 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_3 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_1 {
|
||||
background-color: #ffc4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_2 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_3 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_1 {
|
||||
background-color: #ffd5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_2 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_3 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_1 {
|
||||
background-color: #c4c4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_2 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_3 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_1 {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_2 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_3 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Row highlighting example
|
||||
*/
|
||||
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
||||
background-color: #E6FF99;
|
||||
}
|
||||
@@ -1,220 +0,0 @@
|
||||
|
||||
/*
|
||||
* Table
|
||||
*/
|
||||
table.dataTable {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-bottom: 1px solid black;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
table.dataTable tfoot th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-top: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.dataTable td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td.center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.dataTable tr.odd { background-color: #E2E4FF; }
|
||||
table.dataTable tr.even { background-color: white; }
|
||||
|
||||
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
|
||||
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
|
||||
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
|
||||
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
|
||||
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
|
||||
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
|
||||
|
||||
/*
|
||||
* Table wrapper
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Page length menu
|
||||
*/
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter
|
||||
*/
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Table information
|
||||
*/
|
||||
.dataTables_info {
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Pagination
|
||||
*/
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Two button pagination - previous / next */
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous,
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
height: 19px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover,
|
||||
.paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover,
|
||||
.paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active,
|
||||
.paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active,
|
||||
.paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
|
||||
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
|
||||
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
|
||||
|
||||
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
|
||||
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
|
||||
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
|
||||
|
||||
/* Full number pagination */
|
||||
.paging_full_numbers {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.paging_full_numbers a:active {
|
||||
outline: none
|
||||
}
|
||||
.paging_full_numbers a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Processing indicator
|
||||
*/
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
.sorting { background: url('../images/sort_both.png') no-repeat center right; }
|
||||
.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
|
||||
.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
|
||||
|
||||
.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
|
||||
.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
|
||||
|
||||
table.dataTable th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Scrolling
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
|
||||
|
||||
/*
|
||||
* Table
|
||||
*/
|
||||
table.dataTable {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
table.dataTable tfoot th {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td.center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.dataTable tr.odd { background-color: #E2E4FF; }
|
||||
table.dataTable tr.even { background-color: white; }
|
||||
|
||||
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
|
||||
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
|
||||
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
|
||||
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
|
||||
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
|
||||
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
|
||||
|
||||
/*
|
||||
* Table wrapper
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
}
|
||||
.dataTables_wrapper .ui-widget-header {
|
||||
font-weight: normal;
|
||||
}
|
||||
.dataTables_wrapper .ui-toolbar {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Page length menu
|
||||
*/
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter
|
||||
*/
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Table information
|
||||
*/
|
||||
.dataTables_info {
|
||||
padding-top: 3px;
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Pagination
|
||||
*/
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate .ui-button {
|
||||
margin-right: -0.1em !important;
|
||||
}
|
||||
|
||||
.paging_two_button .ui-button {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers .ui-button {
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
/* Two button pagination - previous / next */
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous,
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
height: 19px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover,
|
||||
.paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover,
|
||||
.paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active,
|
||||
.paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active,
|
||||
.paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
|
||||
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
|
||||
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
|
||||
|
||||
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
|
||||
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
|
||||
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
|
||||
|
||||
/* Full number pagination */
|
||||
.paging_full_numbers a:active {
|
||||
outline: none
|
||||
}
|
||||
.paging_full_numbers a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Processing indicator
|
||||
*/
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
table.dataTable thead th div.DataTables_sort_wrapper {
|
||||
position: relative;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table.dataTable thead th div.DataTables_sort_wrapper span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
table.dataTable th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Scrolling
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 894 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,156 +0,0 @@
|
||||
/*
|
||||
* File: jquery.dataTables.min.js
|
||||
* Version: 1.9.3
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Info: www.datatables.net
|
||||
*
|
||||
* Copyright 2008-2012 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* This source file is free software, under either the GPL v2 license or a
|
||||
* BSD style license, available at:
|
||||
* http://datatables.net/license_gpl2
|
||||
* http://datatables.net/license_bsd
|
||||
*
|
||||
* This source file is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
||||
*/
|
||||
(function(i,O,l,n){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=i.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=i.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d],
|
||||
c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;r(a,d,null)}function r(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),i.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var h=d.mRender?S(d.mRender):null,f=S(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?h(c,b,a):c};d.fnSetData=
|
||||
ta(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):d.bSortable||-1==i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):
|
||||
-1==i.inArray("asc",d.asSorting)&&-1!=i.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;ca(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){var c=v(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function t(a,b){var c=v(a,"bVisible"),c=i.inArray(b,c);return-1!==c?c:null}function w(a){return v(a,"bVisible").length}
|
||||
function v(a,b){var c=[];i.map(a.aoColumns,function(a,h){a[b]&&c.push(h)});return c}function D(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var h=b[d](a);if(null!==h)return h}return"string"}function y(a,b){for(var c=b.split(","),d=[],h=0,f=a.aoColumns.length;h<f;h++)for(var g=0;g<f;g++)if(a.aoColumns[h].sName==c[g]){d.push(g);break}return d}function H(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function ua(a,b,c,d){var h,f,
|
||||
g,e,s;if(b)for(h=b.length-1;0<=h;h--){var m=b[h].aTargets;i.isArray(m)||E(a,1,"aTargets must be an array of targets, not a "+typeof m);f=0;for(g=m.length;f<g;f++)if("number"===typeof m[f]&&0<=m[f]){for(;a.aoColumns.length<=m[f];)o(a);d(m[f],b[h])}else if("number"===typeof m[f]&&0>m[f])d(a.aoColumns.length+m[f],b[h]);else if("string"===typeof m[f]){e=0;for(s=a.aoColumns.length;e<s;e++)("_all"==m[f]||i(a.aoColumns[e].nTh).hasClass(m[f]))&&d(e,b[h])}}if(c){h=0;for(a=c.length;h<a;h++)d(h,c[h])}}function J(a,
|
||||
b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b);var d=a.aoData.length,h=i.extend(!0,{},j.models.oRow);h._aData=c;a.aoData.push(h);for(var f,h=0,g=a.aoColumns.length;h<g;h++)c=a.aoColumns[h],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mData?I(a,d,h,T(a,d,h)):I(a,d,h,x(a,d,h)),c._bAutoType&&"string"!=c.sType&&(f=x(a,d,h,"type"),null!==f&&""!==f&&(f=D(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||da(a,
|
||||
d);return d}function va(a){var b,c,d,h,f,g,e,s,m;if(a.bDeferLoading||null===a.sAjaxSource){e=a.nTBody.childNodes;b=0;for(c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){s=a.aoData.length;e[b]._DT_RowIndex=s;a.aoData.push(i.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(s);g=e[b].childNodes;d=f=0;for(h=g.length;d<h;d++)if(m=g[d].nodeName.toUpperCase(),"TD"==m||"TH"==m)I(a,s,f,i.trim(g[d].innerHTML)),f++}}e=U(a);g=[];b=0;for(c=e.length;b<c;b++){d=0;for(h=e[b].childNodes.length;d<
|
||||
h;d++)f=e[b].childNodes[d],m=f.nodeName.toUpperCase(),("TD"==m||"TH"==m)&&g.push(f)}h=0;for(e=a.aoColumns.length;h<e;h++){m=a.aoColumns[h];null===m.sTitle&&(m.sTitle=m.nTh.innerHTML);f=m._bAutoType;s="function"===typeof m.fnRender;var o=null!==m.sClass,k=m.bVisible,r,n;if(f||s||o||!k){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],r=g[b*e+h],f&&"string"!=m.sType&&(n=x(a,b,h,"type"),""!==n&&(n=D(n),null===m.sType?m.sType=n:m.sType!=n&&"html"!=m.sType&&(m.sType="string"))),"function"===typeof m.mData&&
|
||||
(r.innerHTML=x(a,b,h,"display")),s&&(n=T(a,b,h),r.innerHTML=n,m.bUseRendered&&I(a,b,h,n)),o&&(r.className+=" "+m.sClass),k?d._anHidden[h]=null:(d._anHidden[h]=r,r.parentNode.removeChild(r)),m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,r,x(a,b,h,"display"),d._aData,b,h)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}}function K(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function ea(a,b,c){for(var b=
|
||||
L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===c)return d;return-1}function Y(a,b,c,d){for(var h=[],f=0,g=d.length;f<g;f++)h.push(x(a,b,d[f],c));return h}function x(a,b,c,d){var h=a.aoColumns[c];if((c=h.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===h.sDefaultContent&&(E(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{mData function}":"'"+h.mData+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),h.sDefaultContent;if(null===c&&null!==h.sDefaultContent)c=
|
||||
h.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function I(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function S(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d,h){return a(b,d,h)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,h){var f=h.split("."),g;if(""!==h){var e=0;for(g=f.length;e<g;e++){if(h=f[e].match(V)){f[e]=f[e].replace(V,"");""!==f[e]&&(a=a[f[e]]);
|
||||
g=[];f.splice(0,e+1);for(var f=f.join("."),e=0,i=a.length;e<i;e++)g.push(b(a[e],d,f));a=h[0].substring(1,h[0].length-1);a=""===a?g:g.join(a);break}if(null===a||a[f[e]]===n)return n;a=a[f[e]]}}return a};return function(c,d){return b(c,d,a)}}return function(b){return b[a]}}function ta(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,h){var h=h.split("."),f,g,e=0;for(g=
|
||||
h.length-1;e<g;e++){if(f=h[e].match(V)){h[e]=h[e].replace(V,"");a[h[e]]=[];f=h.slice();f.splice(0,e+1);g=f.join(".");for(var i=0,m=d.length;i<m;i++)f={},b(f,d[i],g),a[h[e]].push(f);return}if(null===a[h[e]]||a[h[e]]===n)a[h[e]]={};a=a[h[e]]}a[h[h.length-1].replace(V,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Z(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function fa(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,
|
||||
a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);A(a)}function ga(a,b){for(var c=-1,d=0,h=a.length;d<h;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function T(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},x(a,b,c,"display"))}function da(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&
|
||||
i(c.nTr).addClass(c._aData.DT_RowClass);for(var h=0,f=a.aoColumns.length;h<f;h++){var g=a.aoColumns[h];d=l.createElement(g.sCellType);d.innerHTML="function"===typeof g.fnRender&&(!g.bUseRendered||null===g.mData)?T(a,b,h):x(a,b,h,"display");null!==g.sClass&&(d.className=g.sClass);g.bVisible?(c.nTr.appendChild(d),c._anHidden[h]=null):c._anHidden[h]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,x(a,b,h,"display"),c._aData,b,h)}C(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function wa(a){var b,
|
||||
c,d;if(0!==a.nTHead.getElementsByTagName("th").length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var h=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=
|
||||
a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),h.appendChild(c);i(a.nTHead).html("")[0].appendChild(h);W(a.aoHeader,a.nTHead)}i(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;h=l.createElement("div");h.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(h);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;h.appendChild(f);c.appendChild(h)}}if(a.oFeatures.bSort)for(b=
|
||||
0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ha(a,a.aoColumns[b].nTh,b):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=P(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&i(c[b]).addClass(a.aoColumns[b].sClass))}}function X(a,b,c){var d,h,f,g=[],e=[],i=a.aoColumns.length,m;c===n&&(c=!1);d=0;for(h=
|
||||
b.length;d<h;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);e.push([])}d=0;for(h=g.length;d<h;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,e[d][f]===n){a.appendChild(g[d][f].cell);for(e[d][f]=1;g[d+i]!==n&&g[d][f].cell==g[d+i][f].cell;)e[d+i][f]=1,i++;for(;g[d][f+m]!==n&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)e[d+c][f+m]=1;m++}g[d][f].cell.rowSpan=i;g[d][f].cell.colSpan=m}}}function z(a){var b=
|
||||
C(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==i.inArray(!1,b))F(a,!1);else{var c,d,b=[],h=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,A(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!xa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=
|
||||
a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g<d;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&da(a,a.aiDisplay[g]);var s=e.nTr;if(0!==f){var m=a.asStripeClasses[h%f];e._sRowStripe!=m&&(i(s).removeClass(e._sRowStripe).addClass(m),e._sRowStripe=m)}C(a,"aoRowCallback",null,[s,a.aoData[a.aiDisplay[g]]._aData,h,g]);b.push(s);h++;if(0!==c)for(e=0;e<c;e++)if(s==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&
|
||||
(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide?f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=w(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ia(a,f),b[h].appendChild(c);C(a,"aoHeaderCallback","header",[i(a.nTHead).children("tr")[0],Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);C(a,"aoFooterCallback","footer",[i(a.nTFoot).children("tr")[0],
|
||||
Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);h=l.createDocumentFragment();c=l.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)h.appendChild(b[c]);a.nTBody.appendChild(h);null!==f&&f.appendChild(a.nTBody)}C(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(F(a,!1),
|
||||
a._bInitComplete||$(a))}}function aa(a){a.oFeatures.bSort?Q(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(A(a),z(a))}function ya(a){var b=i("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=i('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),h,f,g,e,s,m,o,k=0;k<d.length;k++){f=0;g=d[k];if("<"==g){e=i("<div></div>")[0];s=d[k+
|
||||
1];if("'"==s||'"'==s){m="";for(o=2;d[k+o]!=s;)m+=d[k+o],o++;"H"==m?m=a.oClasses.sJUIHeader:"F"==m&&(m=a.oClasses.sJUIFooter);-1!=m.indexOf(".")?(s=m.split("."),e.id=s[0].substr(1,s[0].length-1),e.className=s[1]):"#"==m.charAt(0)?e.id=m.substr(1,m.length-1):e.className=m;k+=o}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)h=za(a),f=1;else if("f"==g&&a.oFeatures.bFilter)h=Aa(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)h=Ba(a),f=
|
||||
1;else if("t"==g)h=Ca(a),f=1;else if("i"==g&&a.oFeatures.bInfo)h=Da(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)h=Ea(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(s=e.length;o<s;o++)if(g==e[o].cFeature){(h=e[o].fnInit(a))&&(f=1);break}}1==f&&null!==h&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(h),c.appendChild(h))}b.parentNode.replaceChild(a.nTableWrapper,b)}function W(a,b){var c=i(b).children("tr"),d,h,f,g,e,s,m,j;a.splice(0,a.length);
|
||||
h=0;for(s=c.length;h<s;h++)a.push([]);h=0;for(s=c.length;h<s;h++){f=0;for(m=c[h].childNodes.length;f<m;f++)if(d=c[h].childNodes[f],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var o=1*d.getAttribute("colspan"),k=1*d.getAttribute("rowspan"),o=!o||0===o||1===o?1:o,k=!k||0===k||1===k?1:k;for(g=0;a[h][g];)g++;j=g;for(e=0;e<o;e++)for(g=0;g<k;g++)a[h+g][j+e]={cell:d,unique:1==o?!0:!1},a[h+g].nTr=c[h]}}}function P(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],W(c,b)));for(var b=0,h=c.length;b<
|
||||
h;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function xa(a){if(a.bAjaxDataGet){a.iDraw++;F(a,!0);var b=Fa(a);ja(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Ga(a,b)},a);return!1}return!0}function Fa(a){var b=a.aoColumns.length,c=[],d,h,f,g;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:H(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",
|
||||
value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mData,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==
|
||||
a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){h=a.aoColumns[d[f][0]].aDataSort;for(g=0;g<h.length;g++)c.push({name:"iSortCol_"+e,value:h[g]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ja(a,b){C(a,"aoServerParams","serverParams",[b])}function Ga(a,b){if(b.sEcho!==n){if(1*b.sEcho<
|
||||
a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&fa(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=H(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=y(a,b.sColumns));for(var h=S(a.sAjaxDataProp)(b),f=0,g=h.length;f<g;f++)if(c){for(var e=[],i=0,m=a.aoColumns.length;i<m;i++)e.push(h[f][d[i]]);J(a,e)}else J(a,h[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;z(a);a.bAjaxDataGet=
|
||||
!0;F(a,!1)}function Aa(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=i('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"""));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,
|
||||
g=0,e=c.length;g<e;g++)c[g]!=i(this).parents("div.dataTables_filter")[0]&&i(c[g]._DT_Input).val(d);d!=b.sSearch&&M(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function M(a,b,c){var d=a.oPreviousSearch,h=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);
|
||||
else{Ha(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ia(a,h[b].sSearch,b,h[b].bRegex,h[b].bSmart,h[b].bCaseInsensitive);Ja(a)}a.bFiltered=!0;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;A(a);z(a);ka(a,0)}function Ja(a){for(var b=j.ext.afnFiltering,c=v(a,"bSearchable"),d=0,h=b.length;d<h;d++)for(var f=0,g=0,e=a.aiDisplay.length;g<e;g++){var i=a.aiDisplay[g-f];b[d](a,Y(a,i,"filter",c),i)||(a.aiDisplay.splice(g-f,1),f++)}}function Ia(a,b,c,
|
||||
d,h,f){if(""!==b)for(var g=0,b=la(b,d,h,f),d=a.aiDisplay.length-1;0<=d;d--)h=Ka(x(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(h)||(a.aiDisplay.splice(d,1),g++)}function Ha(a,b,c,d,h,f){d=la(b,d,h,f);h=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||h.sSearch.length>b.length||1==c||0!==b.indexOf(h.sSearch)){a.aiDisplay.splice(0,
|
||||
a.aiDisplay.length);ka(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ka(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch=[];for(var c=v(a,"bSearchable"),d=1===b?a.aiDisplayMaster:a.aiDisplay,h=0,f=d.length;h<f;h++)a.asDataSearch[h]=ma(a,Y(a,d[h],"filter",c))}}function ma(a,b){var c=b.join(" ");-1!==c.indexOf("&")&&(c=i("<div>").html(c).text());
|
||||
return c.replace(/[\n\r]/g," ")}function la(a,b,c,d){if(c)return a=b?a.split(" "):na(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:na(a);return RegExp(a,d?"i":"")}function Ka(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function na(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),
|
||||
"\\$1")}function Da(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:La,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function La(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),h=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f&&f==h?b.sInfoEmpty:0===f?b.sInfoEmpty+" "+b.sInfoFiltered:f==h?b.sInfo:b.sInfo+
|
||||
" "+b.sInfoFiltered;g+=b.sInfoPostFix;g=ia(a,g);null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,h,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(g)}}function ia(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),h=a.fnRecordsDisplay(),h=a.fnFormatNumber(h),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace("_START_",c).replace("_END_",d).replace("_TOTAL_",h).replace("_MAX_",
|
||||
f)}function ba(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){ba(a)},200);else{ya(a);wa(a);X(a,a.aoHeader);a.nTFoot&&X(a,a.aoFooter);F(a,!0);a.oFeatures.bAutoWidth&&ca(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?Q(a):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),A(a),z(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ja(a,
|
||||
c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var f=a.sAjaxDataProp!==""?S(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)J(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)Q(a);else{a.aiDisplay=a.aiDisplayMaster.slice();A(a);z(a)}F(a,false);$(a,c)},a)):a.oFeatures.bServerSide||(F(a,!1),$(a))}}function $(a,b){a._bInitComplete=!0;C(a,"aoInitComplete","init",[a,b])}function oa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&&
|
||||
p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function za(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,h=a.aLengthMenu;if(2==h.length&&"object"===typeof h[0]&&"object"===typeof h[1]){c=0;for(d=h[0].length;c<d;c++)b+='<option value="'+h[0][c]+'">'+h[1][c]+"</option>"}else{c=0;for(d=h.length;c<d;c++)b+='<option value="'+h[c]+'">'+h[c]+"</option>"}b+=
|
||||
"</select>";h=l.createElement("div");a.aanFeatures.l||(h.id=a.sTableId+"_length");h.className=a.oClasses.sLength;h.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+a._iDisplayLength+'"]',h).attr("selected",!0);i("select",h).bind("change.DT",function(){var b=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(b);a._iDisplayLength=parseInt(b,10);A(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=
|
||||
a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;z(a)});i("select",h).attr("aria-controls",a.sTableId);return h}function A(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Ea(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;
|
||||
j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){A(a);z(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){A(a);z(a)})},sName:"pagination"});return b}function pa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-
|
||||
a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else E(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Ba(a){var b=
|
||||
l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function F(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,h=c.length;d<h;d++)c[d].style.visibility=b?"visible":"hidden";i(a.oInstance).trigger("processing",[a,b])}function Ca(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=
|
||||
l.createElement("div"),h=l.createElement("div"),f=l.createElement("div"),g=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),m=a.nTable.getElementsByTagName("thead")[0],o=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],k=a.oClasses;c.appendChild(d);f.appendChild(g);h.appendChild(a.nTable);b.appendChild(c);b.appendChild(h);d.appendChild(e);e.appendChild(m);null!==o&&(b.appendChild(f),g.appendChild(j),j.appendChild(o));b.className=
|
||||
k.sScrollWrapper;c.className=k.sScrollHead;d.className=k.sScrollHeadInner;h.className=k.sScrollBody;f.className=k.sScrollFoot;g.className=k.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",h.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==o&&(j.removeAttribute("id"),
|
||||
j.style.marginLeft="0");d=i(a.nTable).children("caption");0<d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&o&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),h.style.width=q(a.oScroll.sX),null!==o&&(f.style.width=q(a.oScroll.sX)),i(h).scroll(function(){c.scrollLeft=this.scrollLeft;if(o!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(h.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:Ma,sName:"scrolling"});a.oScroll.bInfinite&&
|
||||
i(h).scroll(function(){if(!a.bDrawing&&i(this).scrollTop()!==0&&i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){pa(a,"next");A(a);z(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function Ma(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,h,f,g,e,j,m,o,k,r=[],n=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,p=null!==a.nTFoot?n.getElementsByTagName("table")[0]:
|
||||
null,l=a.oBrowser.bScrollOversize;i(a.nTable).children("thead, tfoot").remove();g=i(a.nTHead).clone()[0];a.nTable.insertBefore(g,a.nTable.childNodes[0]);null!==a.nTFoot&&(j=i(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width="100%");var t=P(a,g);h=0;for(f=t.length;h<f;h++)o=G(a,h),t[h].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=""},j.getElementsByTagName("tr"));a.oScroll.bCollapse&&
|
||||
""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");h=i(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",l&&(i("tbody",d).height()>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=q(a.oScroll.sXInner):h==i(d).width()&&i(d).height()<i(a.nTable).height()?(a.nTable.style.width=q(h-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>h-a.oScroll.iBarWidth&&
|
||||
(a.nTable.style.width=q(h))):a.nTable.style.width=q(h);h=i(a.nTable).outerWidth();f=a.nTHead.getElementsByTagName("tr");g=g.getElementsByTagName("tr");N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);r.push(k)},g,f);i(g).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth=
|
||||
"0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);r.push(k)},e,j),i(e).height(0));N(function(a){a.innerHTML="";a.style.width=q(r.shift())},g);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=q(r.shift())},e);if(i(a.nTable).outerWidth()<h){e=d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")?h+a.oScroll.iBarWidth:h;if(l&&(d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(e-a.oScroll.iBarWidth);d.style.width=q(e);b.parentNode.style.width=
|
||||
q(e);null!==a.nTFoot&&(n.parentNode.style.width=q(e));""===a.oScroll.sX?E(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&E(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),b.parentNode.style.width=q("100%"),null!==a.nTFoot&&(n.parentNode.style.width=
|
||||
q("100%"));""===a.oScroll.sY&&l&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),l=""!==a.oScroll.sX&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+l)));l=i(a.nTable).outerWidth();c.style.width=q(l);b.style.width=q(l);c=i(a.nTable).height()>d.clientHeight||"scroll"==i(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+
|
||||
"px":"0px";null!==a.nTFoot&&(p.style.width=q(l),n.style.width=q(l),n.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");i(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,h=b.length;d<h;d++)for(var f=0,g=b[d].childNodes.length;f<g;f++)1==b[d].childNodes[f].nodeType&&(c?a(b[d].childNodes[f],c[d].childNodes[f]):a(b[d].childNodes[f]))}function Na(a,b){if(!a||null===a||""===a)return 0;b||(b=l.getElementsByTagName("body")[0]);var c,d=l.createElement("div");d.style.width=
|
||||
q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ca(a){var b=0,c,d=0,h=a.aoColumns.length,f,g=i("th",a.nTHead),e=a.nTable.getAttribute("width");for(f=0;f<h;f++)a.aoColumns[f].bVisible&&(d++,null!==a.aoColumns[f].sWidth&&(c=Na(a.aoColumns[f].sWidthOrig,a.nTable.parentNode),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(h==g.length&&0===b&&d==h&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=i(g[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b=
|
||||
a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=i("thead th",b);0===d.length&&(d=i("tbody tr:eq(0)>td",b));g=P(a,f);for(f=d=0;f<h;f++){var j=a.aoColumns[f];j.bVisible&&null!==j.sWidthOrig&&""!==j.sWidthOrig?g[f-d].style.width=q(j.sWidthOrig):j.bVisible?g[f-
|
||||
d].style.width="":d++}for(f=0;f<h;f++)a.aoColumns[f].bVisible&&(d=Oa(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));h=a.nTable.parentNode;h.appendChild(b);""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",i(b).width()<h.offsetWidth&&(b.style.width=q(h.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(h.offsetWidth):e&&(b.style.width=q(e));b.style.visibility=
|
||||
"hidden";Pa(a,b);h=i("tbody tr:eq(0)",b).children();0===h.length&&(h=P(a,i("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=c=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=null===a.aoColumns[f].sWidthOrig?c+i(h[d]).outerWidth():c+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(i(h[d]).outerWidth()-i(h[d]).width())),d++);b.style.width=q(c);a.nTable.style.width=q(c)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=i(h[d]).width(),null!==c&&0<c&&(a.aoColumns[f].sWidth=q(c)),
|
||||
d++);h=i(b).css("width");a.nTable.style.width=-1!==h.indexOf("%")?h:q(i(b).outerWidth());b.parentNode.removeChild(b)}e&&(a.nTable.style.width=q(e))}function Pa(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(i(b).width(),b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(i(b).outerWidth()))}function Oa(a,b){var c=Qa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=x(a,c,b,"");return d}return L(a,c)[b]}function Qa(a,b){for(var c=
|
||||
-1,d=-1,h=0;h<a.aoData.length;h++){var f=x(a,h,b,"display")+"",f=f.replace(/<.*?>/g,"");f.length>c&&(c=f.length,d=h)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Ra(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";
|
||||
b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function Q(a,b){var c,d,h,f,g,e,o=[],m=[],k=j.ext.oSort,r=a.aoData,l=a.aoColumns,p=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],h=t(a,d),f=
|
||||
a.aoColumns[d].sSortDataType,j.ext.afnSortData[f])if(g=j.ext.afnSortData[f].call(a.oInstance,a,d,h),g.length===r.length){h=0;for(f=r.length;h<f;h++)I(a,h,d,g[h])}else E(a,0,"Returned data sort array (col "+d+") is the wrong length");c=0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var q=o.length,G;c=0;for(d=r.length;c<d;c++)for(h=0;h<q;h++){G=l[o[h][0]].aDataSort;g=0;for(e=G.length;g<e;g++)f=l[G[g]].sType,f=k[(f?f:"string")+"-pre"],r[c]._aSortData[G[g]]=f?f(x(a,c,G[g],"sort")):
|
||||
x(a,c,G[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,h,f,g;for(c=0;c<q;c++){g=l[o[c][0]].aDataSort;d=0;for(h=g.length;d<h;d++)if(f=l[g[d]].sType,f=k[(f?f:"string")+"-"+o[c][1]](r[a]._aSortData[g[d]],r[b]._aSortData[g[d]]),0!==f)return f}return k["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&R(a);c=0;for(d=a.aoColumns.length;c<d;c++)f=l[c].sTitle.replace(/<.*?>/g,""),h=l[c].nTh,h.removeAttribute("aria-sort"),h.removeAttribute("aria-label"),l[c].bSortable?0<o.length&&
|
||||
o[0][0]==c?(h.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),h.setAttribute("aria-label",f+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):h.setAttribute("aria-label",f+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):h.setAttribute("aria-label",f);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,
|
||||
A(a),z(a))}function ha(a,b,c,d){Sa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var f=function(){var d,f;if(b.shiftKey){for(var e=!1,i=0;i<a.aaSorting.length;i++)if(a.aaSorting[i][0]==c){e=!0;d=a.aaSorting[i][0];f=a.aaSorting[i][2]+1;a.aoColumns[d].asSorting[f]?(a.aaSorting[i][1]=a.aoColumns[d].asSorting[f],a.aaSorting[i][2]=f):a.aaSorting.splice(i,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],f=a.aaSorting[0][2]+
|
||||
1,a.aoColumns[d].asSorting[f]||(f=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[f],a.aaSorting[0][2]=f):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));Q(a)};a.oFeatures.bProcessing?(F(a,!0),setTimeout(function(){f();a.oFeatures.bServerSide||F(a,!1)},0)):f();"function"==typeof d&&d(a)}})}function R(a){var b,c,d,h,f,e=a.aoColumns.length,j=a.oClasses;for(b=0;b<e;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+
|
||||
" "+a.aoColumns[b].sSortingClass);h=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<h.length;c++)if(h[c][0]==b){f="asc"==h[c][1]?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(c=i("span."+j.sSortIcon,a.aoColumns[b].nTh),c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),
|
||||
c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==h[d][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)i(d).removeClass(f+"1 "+f+"2 "+f+"3");else if(d.length>=e)for(b=0;b<e;b++)if(-1!=d[b].className.indexOf(f+"1")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(f+"1",""))}else if(-1!=d[b].className.indexOf(f+
|
||||
"2")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(f+"2",""))}else if(-1!=d[b].className.indexOf(f+"3")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(" "+f+"3",""))}var j=1,o;for(b=0;b<h.length;b++){o=parseInt(h[b][0],10);c=0;for(a=d.length/e;c<a;c++)d[e*c+o].className+=" "+f+j;3>j&&j++}}}function qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,
|
||||
iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:i.extend(!0,[],a.aaSorting),oSearch:i.extend(!0,{},a.oPreviousSearch),aoSearchCols:i.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);C(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Ta(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=C(a,"aoStateLoadParams","stateLoadParams",
|
||||
[a,c]);if(-1===i.inArray(!1,d)){a.oLoadedState=i.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();i.extend(a.oPreviousSearch,c.oSearch);i.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];C(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Ua(a){for(var b=
|
||||
O.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function u(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function U(a){for(var b=[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,
|
||||
b){var c=[],d,h,f,e,i,j;h=0;var o=a.aoData.length;b!==n&&(h=b,o=b+1);for(f=h;f<o;f++)if(j=a.aoData[f],null!==j.nTr){h=[];e=0;for(i=j.nTr.childNodes.length;e<i;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&h.push(j.nTr.childNodes[e]);e=d=0;for(i=a.aoColumns.length;e<i;e++)a.aoColumns[e].bVisible?c.push(h[e-d]):(c.push(j._anHidden[e]),d++)}return c}function E(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==
|
||||
j.ext.sErrMode)alert(a);else throw Error(a);else O.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Va(a,b){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=b[d],"object"===typeof e[d]&&null!==c&&!1===i.isArray(c)?i.extend(!0,a[d],c):a[d]=c);return a}function Sa(a,b,c){i(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}function B(a,b,c,d){c&&a[b].push({fn:c,
|
||||
sName:d})}function C(a,b,c,d){for(var b=a[b],h=[],e=b.length-1;0<=e;e--)h.push(b[e].fn.apply(a.oInstance,d));null!==c&&i(a.oInstance).trigger(c,d);return h}function Wa(a){var b=i('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; height:50px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize=100===i("#DT_BrowserTest",
|
||||
b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Xa(a){return function(){var b=[u(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var V=/\[.*?\]$/,Ya=O.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,h=[],e=i.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Ya(d)),h.push((e?"":'"'+c+'":')+d);return(e?"[":"{")+h+(e?"]":"}")};
|
||||
this.$=function(a,b){var c,d,h=[],e;d=u(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=i.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(e=g[o[c]].nTr)&&h.push(e)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(e=g[k[c]].nTr)&&h.push(e)}else if("current"==b.order&&"applied"==b.filter){c=0;for(d=o.length;c<d;c++)(e=g[o[c]].nTr)&&h.push(e)}else if("original"==
|
||||
b.order&&"none"==b.filter){c=0;for(d=g.length;c<d;c++)(e=g[c].nTr)&&h.push(e)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=g.length;c<d;c++)e=g[c].nTr,-1!==i.inArray(c,o)&&e&&h.push(e)}else E(d,1,"Unknown selection options");h=i(h);c=h.filter(a);h=h.find(a);return i([].concat(i.makeArray(c),i.makeArray(h)))};this._=function(a,b){var c=[],d,e,f=this.$(a,b);d=0;for(e=f.length;d<e;d++)c.push(this.fnGetData(f[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],
|
||||
d,e=u(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var f=0;f<a.length;f++){d=J(e,a[f]);if(-1==d)return c;c.push(d)}else{d=J(e,a);if(-1==d)return c;c.push(d)}e.aiDisplay=e.aiDisplayMaster.slice();(b===n||b)&&aa(e);return c};this.fnAdjustColumnSizing=function(a){var b=u(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=u(this[j.ext.iApiIndex]);fa(b);(a===n||a)&&z(b)};this.fnClose=
|
||||
function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=u(this[j.ext.iApiIndex]),e,f,a="object"===typeof a?K(d,a):a,g=d.aoData.splice(a,1);e=0;for(f=d.aoData.length;e<f;e++)null!==d.aoData[e].nTr&&(d.aoData[e].nTr._DT_RowIndex=e);e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ga(d.aiDisplayMaster,
|
||||
a);ga(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,g);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)A(d),z(d);return g};this.fnDestroy=function(a){var b=u(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,e,f,a=a===n?!1:!0;b.bDestroying=!0;C(b,"aoDestroyCallback","destroy",[b]);e=0;for(f=b.aoColumns.length;e<f;e++)!1===b.aoColumns[e].bVisible&&this.fnSetColumnVis(e,!0);i(b.nTableWrapper).find("*").andSelf().unbind(".DT");
|
||||
i("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(i(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(i(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);i(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];R(b);i(U(b)).removeClass(b.asStripeClasses.join(" "));i("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,
|
||||
b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(i("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),i("th, td",b.nTHead).each(function(){var a=i("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();i(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);e=0;for(f=b.aoData.length;e<f;e++)null!==b.aoData[e].nTr&&d.appendChild(b.aoData[e].nTr);!0===b.oFeatures.bAutoWidth&&
|
||||
(b.nTable.style.width=q(b.sDestroyWidth));i(d).children("tr:even").addClass(b.asDestroyStripes[0]);i(d).children("tr:odd").addClass(b.asDestroyStripes[1]);e=0;for(f=j.settings.length;e<f;e++)j.settings[e]==b&&j.settings.splice(e,1);b=null};this.fnDraw=function(a){var b=u(this[j.ext.iApiIndex]);!1===a?(A(b),z(b)):aa(b)};this.fnFilter=function(a,b,c,d,e,f){var g=u(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===n||null===c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===e)e=!0;if(f===n||null===
|
||||
f)f=!0;if(b===n||null===b){if(M(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i(b[c]._DT_Input).val(a)}}else i.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),M(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=u(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();"tr"===e?d=K(c,a):"td"===e&&(d=K(c,a.parentNode),b=ea(c,d,a))}return b!==
|
||||
n?x(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Z(c)};this.fnGetNodes=function(a){var b=u(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:U(b)};this.fnGetPosition=function(a){var b=u(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?K(b,a):"TD"==c||"TH"==c?(c=K(b,a.parentNode),a=ea(b,c,a),[c,t(b,a),a]):null};this.fnIsOpen=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};
|
||||
this.fnOpen=function(a,b,c){var d=u(this[j.ext.iApiIndex]),e=U(d);if(-1!==i.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=w(d);"string"===typeof b?f.innerHTML=b:i(f).html(b);b=i("tr",d.nTBody);-1!=i.inArray(a,b)&&i(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=u(this[j.ext.iApiIndex]);pa(c,a);A(c);(b===n||b)&&z(c)};this.fnSetColumnVis=function(a,b,c){var d=u(this[j.ext.iApiIndex]),
|
||||
e,f,g=d.aoColumns,i=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)g[e].bVisible&&f++;m=f>=w(d);if(!m)for(e=a;e<g.length;e++)if(g[e].bVisible){o=e;break}e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(m?i[e].nTr.appendChild(i[e]._anHidden[a]):i[e].nTr.insertBefore(i[e]._anHidden[a],L(d,e)[o]))}else{e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(o=L(d,e)[a],i[e]._anHidden[a]=o,o.parentNode.removeChild(o))}g[a].bVisible=b;X(d,d.aoHeader);d.nTFoot&&X(d,d.aoFooter);e=0;for(f=d.aoOpenRows.length;e<
|
||||
f;e++)d.aoOpenRows[e].nTr.colSpan=w(d);if(c===n||c)k(d),z(d);qa(d)}};this.fnSettings=function(){return u(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=u(this[j.ext.iApiIndex]);b.aaSorting=a;Q(b)};this.fnSortListener=function(a,b,c){ha(u(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=u(this[j.ext.iApiIndex]),b="object"===typeof b?K(f,b):b;if(i.isArray(a)&&c===n){f.aoData[b]._aData=a.slice();for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(x(f,b,c),b,c,!1,!1)}else if(i.isPlainObject(a)&&
|
||||
c===n){f.aoData[b]._aData=i.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(x(f,b,c),b,c,!1,!1)}else{I(f,b,c,a);var a=x(f,b,c,"display"),g=f.aoColumns[c];null!==g.fnRender&&(a=T(f,b,c),g.bUseRendered&&I(f,b,c,a));null!==f.aoData[b].nTr&&(L(f,b)[c].innerHTML=a)}c=i.inArray(b,f.aiDisplay);f.asDataSearch[c]=ma(f,Y(f,b,"filter",v(f,"bSearchable")));(e===n||e)&&k(f);(d===n||d)&&aa(f);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Xa,_fnInitialise:ba,_fnInitComplete:$,
|
||||
_fnLanguageCompat:oa,_fnAddColumn:o,_fnColumnOptions:r,_fnAddData:J,_fnCreateTr:da,_fnGatherData:va,_fnBuildHead:wa,_fnDrawHead:X,_fnDraw:z,_fnReDraw:aa,_fnAjaxUpdate:xa,_fnAjaxParameters:Fa,_fnAjaxUpdateDraw:Ga,_fnServerParams:ja,_fnAddOptionsHtml:ya,_fnFeatureHtmlTable:Ca,_fnScrollDraw:Ma,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:Aa,_fnFilterComplete:M,_fnFilterCustom:Ja,_fnFilterColumn:Ia,_fnFilter:Ha,_fnBuildSearchArray:ka,_fnBuildSearchRow:ma,_fnFilterCreateSearch:la,_fnDataToSearch:Ka,_fnSort:Q,
|
||||
_fnSortAttachListener:ha,_fnSortingClasses:R,_fnFeatureHtmlPaginate:Ea,_fnPageChange:pa,_fnFeatureHtmlInfo:Da,_fnUpdateInfo:La,_fnFeatureHtmlLength:za,_fnFeatureHtmlProcessing:Ba,_fnProcessingDisplay:F,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:t,_fnNodeToDataIndex:K,_fnVisbleColumns:w,_fnCalculateEnd:A,_fnConvertToWidth:Na,_fnCalculateColumnWidths:ca,_fnScrollingWidthAdjust:Pa,_fnGetWidestNode:Oa,_fnGetMaxLenString:Qa,_fnStringToCss:q,_fnDetectType:D,_fnSettingsFromNode:u,_fnGetDataMaster:Z,
|
||||
_fnGetTrNodes:U,_fnGetTdNodes:L,_fnEscapeRegex:na,_fnDeleteIndex:ga,_fnReOrderIndex:y,_fnColumnOrdering:H,_fnLog:E,_fnClearTable:fa,_fnSaveState:qa,_fnLoadState:Ta,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=O.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof i.parseJSON?i.parseJSON(b):eval("("+b+")"),b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+
|
||||
"; path="+c.join("/")+"/";e="";f=9999999999999;if(4096<(null!==Ua(a)?l.cookie.length:b.length+l.cookie.length)+10){for(var a=l.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{g=eval("("+decodeURIComponent(k[1])+")")}catch(r){continue}g.iCreate&&g.iCreate<f&&(e=k[0],f=g.iCreate)}""!==e&&(l.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/")}l.cookie=b},_fnReadCookie:Ua,_fnDetectHeader:W,_fnGetUniqueThs:P,_fnScrollBarWidth:Ra,_fnApplyToChildren:N,
|
||||
_fnMap:p,_fnGetRowData:Y,_fnGetCellData:x,_fnSetCellData:I,_fnGetObjectDataFn:S,_fnSetObjectDataFn:ta,_fnApplyColumnDefs:ua,_fnBindAction:Sa,_fnExtend:Va,_fnCallbackReg:B,_fnCallbackFire:C,_fnJsonString:Ya,_fnRender:T,_fnNodeToColumnIndex:ea,_fnInfoMacros:ia,_fnBrowserDetect:Wa,_fnGetColumns:v};i.extend(j.ext.oApi,this.oApi);for(var ra in j.ext.oApi)ra&&(this[ra]=Xa(ra));var sa=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var h=!1,f=!1;if("table"!=this.nodeName.toLowerCase())E(null,
|
||||
0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{E(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,
|
||||
1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var g=i.extend(!0,{},j.models.oSettings,{nTable:this,oApi:sa.oApi,oInit:e,sDestroyWidth:i(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===sa.length?sa:i(this).dataTable();e||(e={});e.oLanguage&&oa(e.oLanguage);e=Va(i.extend(!0,{},j.defaults),e);p(g.oFeatures,e,"bPaginate");p(g.oFeatures,e,"bLengthChange");p(g.oFeatures,e,"bFilter");p(g.oFeatures,e,"bSort");p(g.oFeatures,e,"bInfo");
|
||||
p(g.oFeatures,e,"bProcessing");p(g.oFeatures,e,"bAutoWidth");p(g.oFeatures,e,"bSortClasses");p(g.oFeatures,e,"bServerSide");p(g.oFeatures,e,"bDeferRender");p(g.oScroll,e,"sScrollX","sX");p(g.oScroll,e,"sScrollXInner","sXInner");p(g.oScroll,e,"sScrollY","sY");p(g.oScroll,e,"bScrollCollapse","bCollapse");p(g.oScroll,e,"bScrollInfinite","bInfinite");p(g.oScroll,e,"iScrollLoadGap","iLoadGap");p(g.oScroll,e,"bScrollAutoCss","bAutoCss");p(g,e,"asStripeClasses");p(g,e,"asStripClasses","asStripeClasses");
|
||||
p(g,e,"fnServerData");p(g,e,"fnFormatNumber");p(g,e,"sServerMethod");p(g,e,"aaSorting");p(g,e,"aaSortingFixed");p(g,e,"aLengthMenu");p(g,e,"sPaginationType");p(g,e,"sAjaxSource");p(g,e,"sAjaxDataProp");p(g,e,"iCookieDuration");p(g,e,"sCookiePrefix");p(g,e,"sDom");p(g,e,"bSortCellsTop");p(g,e,"iTabIndex");p(g,e,"oSearch","oPreviousSearch");p(g,e,"aoSearchCols","aoPreSearchCols");p(g,e,"iDisplayLength","_iDisplayLength");p(g,e,"bJQueryUI","bJUI");p(g,e,"fnCookieCallback");p(g,e,"fnStateLoad");p(g,e,
|
||||
"fnStateSave");p(g.oLanguage,e,"fnInfoCallback");B(g,"aoDrawCallback",e.fnDrawCallback,"user");B(g,"aoServerParams",e.fnServerParams,"user");B(g,"aoStateSaveParams",e.fnStateSaveParams,"user");B(g,"aoStateLoadParams",e.fnStateLoadParams,"user");B(g,"aoStateLoaded",e.fnStateLoaded,"user");B(g,"aoRowCallback",e.fnRowCallback,"user");B(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");B(g,"aoHeaderCallback",e.fnHeaderCallback,"user");B(g,"aoFooterCallback",e.fnFooterCallback,"user");B(g,"aoInitComplete",
|
||||
e.fnInitComplete,"user");B(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&g.oFeatures.bSort&&g.oFeatures.bSortClasses?B(g,"aoDrawCallback",R,"server_side_sort_classes"):g.oFeatures.bDeferRender&&B(g,"aoDrawCallback",R,"defer_sort_classes");e.bJQueryUI?(i.extend(g.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(g.sDom='<"H"lfr>t<"F"ip>')):i.extend(g.oClasses,j.ext.oStdClasses);i(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==
|
||||
g.oScroll.sY)g.oScroll.iBarWidth=Ra();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart,g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Ta(g,e),B(g,"aoDrawCallback",qa,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=i.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,i.getJSON(g.oLanguage.sUrl,
|
||||
null,function(a){oa(a);i.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),h=!0):i.extend(!0,g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);c=!1;d=i(this).children("tbody").children("tr");a=0;for(b=g.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(g.asStripeClasses[a])){c=!0;break}c&&(g.asDestroyStripes=["",""],i(d[0]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[0]+=g.oClasses.sStripeOdd+" "),i(d[0]).hasClass(g.oClasses.sStripeEven)&&
|
||||
(g.asDestroyStripes[0]+=g.oClasses.sStripeEven),i(d[1]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeOdd+" "),i(d[1]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeEven),d.removeClass(g.asStripeClasses.join(" ")));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(W(g.aoHeader,a[0]),c=P(g));if(null===e.aoColumns){d=[];a=0;for(b=c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b=d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==
|
||||
b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(g,c?c[a]:null);ua(g,e.aoColumnDefs,d,function(a,b){r(g,a,b)});a=0;for(b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]=k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(g.aaSorting[a][1]==k.asSorting[c]){g.aaSorting[a][2]=c;break}}R(g);Wa(g);
|
||||
a=i(this).children("caption").each(function(){this._captionSide=i(this).css("caption-side")});b=i(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));g.nTHead=b[0];b=i(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));g.nTBody=b[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live","polite");g.nTBody.setAttribute("aria-relevant","all");b=i(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==
|
||||
g.oScroll.sX||""!==g.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(g.nTFoot=b[0],W(g.aoFooter,g.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)J(g,e.aaData[a]);else va(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===h&&ba(g)}})};j.fnVersionCheck=function(e){for(var i=function(e,i){for(;e.length<i;)e+="0";return e},r=j.ext.sVersion.split("."),e=e.split("."),k="",l="",n=0,w=e.length;n<w;n++)k+=i(r[n],3),l+=i(e[n],3);return parseInt(k,10)>=parseInt(l,10)};
|
||||
j.fnIsDataTable=function(e){for(var i=j.settings,r=0;r<i.length;r++)if(i[r].nTable===e||i[r].nScrollHead===e||i[r].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&i(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.3";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},
|
||||
oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,
|
||||
sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,
|
||||
bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var i=e+"",e=i.split(""),j="",i=i.length,k=0;k<i;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[i-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,n,k){k.jqXHR=i.ajax({url:e,data:j,success:function(e){e.sError&&k.oApi._fnLog(k,0,
|
||||
e.sError);i(k.oInstance).trigger("xhr",[k,e]);n(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,i){"parsererror"==i&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof i.parseJSON?i.parseJSON(e):eval("("+e+")")}catch(n){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,
|
||||
fnStateSave:function(e,i){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(i),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",
|
||||
sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:i.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",
|
||||
sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,
|
||||
bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],
|
||||
aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,
|
||||
aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,
|
||||
10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=i.extend(!0,{},j.models.ext);i.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",
|
||||
sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",
|
||||
sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",
|
||||
sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""});i.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",
|
||||
sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",
|
||||
sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",
|
||||
sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});i.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+
|
||||
'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';i(j).append(k);var t=i("a",j),k=t[0],t=t[1];e.oApi._fnBindAction(k,{action:"previous"},
|
||||
l);e.oApi._fnBindAction(t,{action:"next"},l);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",t.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),t.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var i=e.oClasses,j=e.aanFeatures.p,k=0,n=j.length;k<n;k++)0!==j[k].childNodes.length&&(j[k].childNodes[0].className=0===e._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,j[k].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?
|
||||
i.sPageNextDisabled:i.sPageNextEnabled)}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=e.oClasses,t=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)};i(j).append('<a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+
|
||||
e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var w=i("a",j),k=w[0],l=w[1],v=w[2],w=w[3];e.oApi._fnBindAction(k,{action:"first"},t);e.oApi._fnBindAction(l,{action:"previous"},t);e.oApi._fnBindAction(v,{action:"next"},t);e.oApi._fnBindAction(w,{action:"last"},t);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",v.id=e.sTableId+"_next",w.id=e.sTableId+"_last")},fnUpdate:function(e,o){if(e.aanFeatures.p){var l=j.ext.oPagination.iFullNumbersShowPages,
|
||||
k=Math.floor(l/2),n=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),t=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,w="",v,D=e.oClasses,y,H=e.aanFeatures.p,O=function(i){e.oApi._fnBindAction(this,{page:i+v-1},function(i){e.oApi._fnPageChange(e,i.data.page);o(e);i.preventDefault()})};-1===e._iDisplayLength?t=k=v=1:n<l?(v=1,k=n):t<=k?(v=1,k=l):t>=n-k?(v=n-l+1,k=n):(v=t-Math.ceil(l/2)+1,k=v+l-1);for(l=v;l<=k;l++)w+=t!==l?'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButton+'">'+e.fnFormatNumber(l)+
|
||||
"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButtonActive+'">'+e.fnFormatNumber(l)+"</a>";l=0;for(k=H.length;l<k;l++)0!==H[l].childNodes.length&&(i("span:eq(0)",H[l]).html(w).children("a").each(O),y=H[l].getElementsByTagName("a"),y=[y[0],y[1],y[y.length-2],y[y.length-1]],i(y).removeClass(D.sPageButton+" "+D.sPageButtonActive+" "+D.sPageButtonStaticDisabled),i([y[0],y[1]]).addClass(1==t?D.sPageButtonStaticDisabled:D.sPageButton),i([y[2],y[3]]).addClass(0===n||t===n||-1===e._iDisplayLength?
|
||||
D.sPageButtonStaticDisabled:D.sPageButton))}}}});i.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,i){return e<i?-1:e>i?1:0},"string-desc":function(e,i){return e<i?1:e>i?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,i){return e<i?-1:e>i?1:0},"html-desc":function(e,i){return e<i?1:e>i?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===
|
||||
e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,i){return e-i},"date-desc":function(e,i){return i-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,i){return e-i},"numeric-desc":function(e,i){return i-e}});i.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var i,j=!1;i=e.charAt(0);if(-1=="0123456789-".indexOf(i))return null;for(var k=1;k<e.length;k++){i=e.charAt(k);if(-1=="0123456789.".indexOf(i))return null;
|
||||
if("."==i){if(j)return null;j=!0}}return"numeric"},function(e){var i=Date.parse(e);return null!==i&&!isNaN(i)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);i.fn.DataTable=j;i.fn.dataTable=j;i.fn.dataTableSettings=j.settings;i.fn.dataTableExt=j.ext})(jQuery,window,document,void 0);
|
||||
@@ -1,260 +0,0 @@
|
||||
/**
|
||||
* @summary DataTables
|
||||
* @description Paginate, search and sort HTML tables
|
||||
* @version 1.9.3
|
||||
* @file jquery.dataTables.js
|
||||
* @author Allan Jardine (www.sprymedia.co.uk)
|
||||
* @contact www.sprymedia.co.uk/contact
|
||||
*
|
||||
* @copyright Copyright 2008-2012 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* This source file is free software, under either the GPL v2 license or a
|
||||
* BSD style license, available at:
|
||||
* http://datatables.net/license_gpl2
|
||||
* http://datatables.net/license_bsd
|
||||
*
|
||||
* This source file is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
||||
*
|
||||
* For details please refer to: http://www.datatables.net
|
||||
*/
|
||||
|
||||
/*jslint evil: true, undef: true, browser: true */
|
||||
/*globals $, jQuery,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros,_fnBrowserDetect,_fnGetColumns*/
|
||||
|
||||
(/** @lends <global> */function($, window, document, undefined) {
|
||||
/**
|
||||
* DataTables is a plug-in for the jQuery Javascript library. It is a
|
||||
* highly flexible tool, based upon the foundations of progressive
|
||||
* enhancement, which will add advanced interaction controls to any
|
||||
* HTML table. For a full list of features please refer to
|
||||
* <a href="http://datatables.net">DataTables.net</a>.
|
||||
*
|
||||
* Note that the <i>DataTable</i> object is not a global variable but is
|
||||
* aliased to <i>jQuery.fn.DataTable</i> and <i>jQuery.fn.dataTable</i> through which
|
||||
* it may be accessed.
|
||||
*
|
||||
* @class
|
||||
* @param {object} [oInit={}] Configuration object for DataTables. Options
|
||||
* are defined by {@link DataTable.defaults}
|
||||
* @requires jQuery 1.3+
|
||||
*
|
||||
* @example
|
||||
* // Basic initialisation
|
||||
* $(document).ready( function {
|
||||
* $('#example').dataTable();
|
||||
* } );
|
||||
*
|
||||
* @example
|
||||
* // Initialisation with configuration options - in this case, disable
|
||||
* // pagination and sorting.
|
||||
* $(document).ready( function {
|
||||
* $('#example').dataTable( {
|
||||
* "bPaginate": false,
|
||||
* "bSort": false
|
||||
* } );
|
||||
* } );
|
||||
*/
|
||||
var DataTable = function( oInit )
|
||||
{
|
||||
require('core.columns.js');
|
||||
require('core.data.js');
|
||||
require('core.draw.js');
|
||||
require('core.ajax.js');
|
||||
require('core.filter.js');
|
||||
require('core.info.js');
|
||||
require('core.init.js');
|
||||
require('core.length.js');
|
||||
require('core.page.js');
|
||||
require('core.processing.js');
|
||||
require('core.scrolling.js');
|
||||
require('core.sizing.js');
|
||||
require('core.sort.js');
|
||||
require('core.state.js');
|
||||
require('core.support.js');
|
||||
|
||||
require('api.methods.js');
|
||||
require('api.internal.js');
|
||||
|
||||
var _that = this;
|
||||
return this.each(function() {
|
||||
require('core.constructor.js');
|
||||
} );
|
||||
};
|
||||
|
||||
require('api.static.js');
|
||||
|
||||
/**
|
||||
* Version string for plug-ins to check compatibility. Allowed format is
|
||||
* a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and
|
||||
* e are optional
|
||||
* @member
|
||||
* @type string
|
||||
* @default Version number
|
||||
*/
|
||||
DataTable.version = "1.9.3";
|
||||
|
||||
/**
|
||||
* Private data store, containing all of the settings objects that are created for the
|
||||
* tables on a given page.
|
||||
*
|
||||
* Note that the <i>DataTable.settings</i> object is aliased to <i>jQuery.fn.dataTableExt</i>
|
||||
* through which it may be accessed and manipulated, or <i>jQuery.fn.dataTable.settings</i>.
|
||||
* @member
|
||||
* @type array
|
||||
* @default []
|
||||
* @private
|
||||
*/
|
||||
DataTable.settings = [];
|
||||
|
||||
/**
|
||||
* Object models container, for the various models that DataTables has available
|
||||
* to it. These models define the objects that are used to hold the active state
|
||||
* and configuration of the table.
|
||||
* @namespace
|
||||
*/
|
||||
DataTable.models = {};
|
||||
require('model.ext.js');
|
||||
require('model.search.js');
|
||||
require('model.row.js');
|
||||
require('model.column.js');
|
||||
require('model.defaults.js');
|
||||
require('model.defaults.columns.js');
|
||||
require('model.settings.js');
|
||||
|
||||
/**
|
||||
* Extension object for DataTables that is used to provide all extension options.
|
||||
*
|
||||
* Note that the <i>DataTable.ext</i> object is available through
|
||||
* <i>jQuery.fn.dataTable.ext</i> where it may be accessed and manipulated. It is
|
||||
* also aliased to <i>jQuery.fn.dataTableExt</i> for historic reasons.
|
||||
* @namespace
|
||||
* @extends DataTable.models.ext
|
||||
*/
|
||||
DataTable.ext = $.extend( true, {}, DataTable.models.ext );
|
||||
require('ext.classes.js');
|
||||
require('ext.paging.js');
|
||||
require('ext.sorting.js');
|
||||
require('ext.types.js');
|
||||
|
||||
// jQuery aliases
|
||||
$.fn.DataTable = DataTable;
|
||||
$.fn.dataTable = DataTable;
|
||||
$.fn.dataTableSettings = DataTable.settings;
|
||||
$.fn.dataTableExt = DataTable.ext;
|
||||
|
||||
|
||||
// Information about events fired by DataTables - for documentation.
|
||||
/**
|
||||
* Draw event, fired whenever the table is redrawn on the page, at the same point as
|
||||
* fnDrawCallback. This may be useful for binding events or performing calculations when
|
||||
* the table is altered at all.
|
||||
* @name DataTable#draw
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Filter event, fired when the filtering applied to the table (using the build in global
|
||||
* global filter, or column filters) is altered.
|
||||
* @name DataTable#filter
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Page change event, fired when the paging of the table is altered.
|
||||
* @name DataTable#page
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sort event, fired when the sorting applied to the table is altered.
|
||||
* @name DataTable#sort
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables initialisation complete event, fired when the table is fully drawn,
|
||||
* including Ajax data loaded, if Ajax data is required.
|
||||
* @name DataTable#init
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} oSettings DataTables settings object
|
||||
* @param {object} json The JSON object request from the server - only
|
||||
* present if client-side Ajax sourced data is used</li></ol>
|
||||
*/
|
||||
|
||||
/**
|
||||
* State save event, fired when the table has changed state a new state save is required.
|
||||
* This method allows modification of the state saving object prior to actually doing the
|
||||
* save, including addition or other state properties (for plug-ins) or modification
|
||||
* of a DataTables core property.
|
||||
* @name DataTable#stateSaveParams
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} oSettings DataTables settings object
|
||||
* @param {object} json The state information to be saved
|
||||
*/
|
||||
|
||||
/**
|
||||
* State load event, fired when the table is loading state from the stored data, but
|
||||
* prior to the settings object being modified by the saved state - allowing modification
|
||||
* of the saved state is required or loading of state for a plug-in.
|
||||
* @name DataTable#stateLoadParams
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} oSettings DataTables settings object
|
||||
* @param {object} json The saved state information
|
||||
*/
|
||||
|
||||
/**
|
||||
* State loaded event, fired when state has been loaded from stored data and the settings
|
||||
* object has been modified by the loaded data.
|
||||
* @name DataTable#stateLoaded
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} oSettings DataTables settings object
|
||||
* @param {object} json The saved state information
|
||||
*/
|
||||
|
||||
/**
|
||||
* Processing event, fired when DataTables is doing some kind of processing (be it,
|
||||
* sort, filter or anything else). Can be used to indicate to the end user that
|
||||
* there is something happening, or that something has finished.
|
||||
* @name DataTable#processing
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} oSettings DataTables settings object
|
||||
* @param {boolean} bShow Flag for if DataTables is doing processing or not
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ajax (XHR) event, fired whenever an Ajax request is completed from a request to
|
||||
* made to the server for new data (note that this trigger is called in fnServerData,
|
||||
* if you override fnServerData and which to use this event, you need to trigger it in
|
||||
* you success function).
|
||||
* @name DataTable#xhr
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
* @param {object} json JSON returned from the server
|
||||
*/
|
||||
|
||||
/**
|
||||
* Destroy event, fired when the DataTable is destroyed by calling fnDestroy or passing
|
||||
* the bDestroy:true parameter in the initialisation object. This can be used to remove
|
||||
* bound events, added DOM nodes, etc.
|
||||
* @name DataTable#destroy
|
||||
* @event
|
||||
* @param {event} e jQuery event object
|
||||
* @param {object} o DataTables settings object {@link DataTable.models.oSettings}
|
||||
*/
|
||||
}(jQuery, window, document, undefined));
|
||||
@@ -1,130 +0,0 @@
|
||||
|
||||
/*
|
||||
* This is really a good bit rubbish this method of exposing the internal methods
|
||||
* publicly... - To be fixed in 2.0 using methods on the prototype
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Create a wrapper function for exporting an internal functions to an external API.
|
||||
* @param {string} sFunc API function name
|
||||
* @returns {function} wrapped function
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnExternApiFunc (sFunc)
|
||||
{
|
||||
return function() {
|
||||
var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat(
|
||||
Array.prototype.slice.call(arguments) );
|
||||
return DataTable.ext.oApi[sFunc].apply( this, aArgs );
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reference to internal functions for use by plug-in developers. Note that these
|
||||
* methods are references to internal functions and are considered to be private.
|
||||
* If you use these methods, be aware that they are liable to change between versions
|
||||
* (check the upgrade notes).
|
||||
* @namespace
|
||||
*/
|
||||
this.oApi = {
|
||||
"_fnExternApiFunc": _fnExternApiFunc,
|
||||
"_fnInitialise": _fnInitialise,
|
||||
"_fnInitComplete": _fnInitComplete,
|
||||
"_fnLanguageCompat": _fnLanguageCompat,
|
||||
"_fnAddColumn": _fnAddColumn,
|
||||
"_fnColumnOptions": _fnColumnOptions,
|
||||
"_fnAddData": _fnAddData,
|
||||
"_fnCreateTr": _fnCreateTr,
|
||||
"_fnGatherData": _fnGatherData,
|
||||
"_fnBuildHead": _fnBuildHead,
|
||||
"_fnDrawHead": _fnDrawHead,
|
||||
"_fnDraw": _fnDraw,
|
||||
"_fnReDraw": _fnReDraw,
|
||||
"_fnAjaxUpdate": _fnAjaxUpdate,
|
||||
"_fnAjaxParameters": _fnAjaxParameters,
|
||||
"_fnAjaxUpdateDraw": _fnAjaxUpdateDraw,
|
||||
"_fnServerParams": _fnServerParams,
|
||||
"_fnAddOptionsHtml": _fnAddOptionsHtml,
|
||||
"_fnFeatureHtmlTable": _fnFeatureHtmlTable,
|
||||
"_fnScrollDraw": _fnScrollDraw,
|
||||
"_fnAdjustColumnSizing": _fnAdjustColumnSizing,
|
||||
"_fnFeatureHtmlFilter": _fnFeatureHtmlFilter,
|
||||
"_fnFilterComplete": _fnFilterComplete,
|
||||
"_fnFilterCustom": _fnFilterCustom,
|
||||
"_fnFilterColumn": _fnFilterColumn,
|
||||
"_fnFilter": _fnFilter,
|
||||
"_fnBuildSearchArray": _fnBuildSearchArray,
|
||||
"_fnBuildSearchRow": _fnBuildSearchRow,
|
||||
"_fnFilterCreateSearch": _fnFilterCreateSearch,
|
||||
"_fnDataToSearch": _fnDataToSearch,
|
||||
"_fnSort": _fnSort,
|
||||
"_fnSortAttachListener": _fnSortAttachListener,
|
||||
"_fnSortingClasses": _fnSortingClasses,
|
||||
"_fnFeatureHtmlPaginate": _fnFeatureHtmlPaginate,
|
||||
"_fnPageChange": _fnPageChange,
|
||||
"_fnFeatureHtmlInfo": _fnFeatureHtmlInfo,
|
||||
"_fnUpdateInfo": _fnUpdateInfo,
|
||||
"_fnFeatureHtmlLength": _fnFeatureHtmlLength,
|
||||
"_fnFeatureHtmlProcessing": _fnFeatureHtmlProcessing,
|
||||
"_fnProcessingDisplay": _fnProcessingDisplay,
|
||||
"_fnVisibleToColumnIndex": _fnVisibleToColumnIndex,
|
||||
"_fnColumnIndexToVisible": _fnColumnIndexToVisible,
|
||||
"_fnNodeToDataIndex": _fnNodeToDataIndex,
|
||||
"_fnVisbleColumns": _fnVisbleColumns,
|
||||
"_fnCalculateEnd": _fnCalculateEnd,
|
||||
"_fnConvertToWidth": _fnConvertToWidth,
|
||||
"_fnCalculateColumnWidths": _fnCalculateColumnWidths,
|
||||
"_fnScrollingWidthAdjust": _fnScrollingWidthAdjust,
|
||||
"_fnGetWidestNode": _fnGetWidestNode,
|
||||
"_fnGetMaxLenString": _fnGetMaxLenString,
|
||||
"_fnStringToCss": _fnStringToCss,
|
||||
"_fnDetectType": _fnDetectType,
|
||||
"_fnSettingsFromNode": _fnSettingsFromNode,
|
||||
"_fnGetDataMaster": _fnGetDataMaster,
|
||||
"_fnGetTrNodes": _fnGetTrNodes,
|
||||
"_fnGetTdNodes": _fnGetTdNodes,
|
||||
"_fnEscapeRegex": _fnEscapeRegex,
|
||||
"_fnDeleteIndex": _fnDeleteIndex,
|
||||
"_fnReOrderIndex": _fnReOrderIndex,
|
||||
"_fnColumnOrdering": _fnColumnOrdering,
|
||||
"_fnLog": _fnLog,
|
||||
"_fnClearTable": _fnClearTable,
|
||||
"_fnSaveState": _fnSaveState,
|
||||
"_fnLoadState": _fnLoadState,
|
||||
"_fnCreateCookie": _fnCreateCookie,
|
||||
"_fnReadCookie": _fnReadCookie,
|
||||
"_fnDetectHeader": _fnDetectHeader,
|
||||
"_fnGetUniqueThs": _fnGetUniqueThs,
|
||||
"_fnScrollBarWidth": _fnScrollBarWidth,
|
||||
"_fnApplyToChildren": _fnApplyToChildren,
|
||||
"_fnMap": _fnMap,
|
||||
"_fnGetRowData": _fnGetRowData,
|
||||
"_fnGetCellData": _fnGetCellData,
|
||||
"_fnSetCellData": _fnSetCellData,
|
||||
"_fnGetObjectDataFn": _fnGetObjectDataFn,
|
||||
"_fnSetObjectDataFn": _fnSetObjectDataFn,
|
||||
"_fnApplyColumnDefs": _fnApplyColumnDefs,
|
||||
"_fnBindAction": _fnBindAction,
|
||||
"_fnExtend": _fnExtend,
|
||||
"_fnCallbackReg": _fnCallbackReg,
|
||||
"_fnCallbackFire": _fnCallbackFire,
|
||||
"_fnJsonString": _fnJsonString,
|
||||
"_fnRender": _fnRender,
|
||||
"_fnNodeToColumnIndex": _fnNodeToColumnIndex,
|
||||
"_fnInfoMacros": _fnInfoMacros,
|
||||
"_fnBrowserDetect": _fnBrowserDetect,
|
||||
"_fnGetColumns": _fnGetColumns
|
||||
};
|
||||
|
||||
$.extend( DataTable.ext.oApi, this.oApi );
|
||||
|
||||
for ( var sFunc in DataTable.ext.oApi )
|
||||
{
|
||||
if ( sFunc )
|
||||
{
|
||||
this[sFunc] = _fnExternApiFunc(sFunc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Provide a common method for plug-ins to check the version of DataTables being used, in order
|
||||
* to ensure compatibility.
|
||||
* @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
|
||||
* formats "X" and "X.Y" are also acceptable.
|
||||
* @returns {boolean} true if this version of DataTables is greater or equal to the required
|
||||
* version, or false if this version of DataTales is not suitable
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* alert( $.fn.dataTable.fnVersionCheck( '1.9.0' ) );
|
||||
*/
|
||||
DataTable.fnVersionCheck = function( sVersion )
|
||||
{
|
||||
/* This is cheap, but effective */
|
||||
var fnZPad = function (Zpad, count)
|
||||
{
|
||||
while(Zpad.length < count) {
|
||||
Zpad += '0';
|
||||
}
|
||||
return Zpad;
|
||||
};
|
||||
var aThis = DataTable.ext.sVersion.split('.');
|
||||
var aThat = sVersion.split('.');
|
||||
var sThis = '', sThat = '';
|
||||
|
||||
for ( var i=0, iLen=aThat.length ; i<iLen ; i++ )
|
||||
{
|
||||
sThis += fnZPad( aThis[i], 3 );
|
||||
sThat += fnZPad( aThat[i], 3 );
|
||||
}
|
||||
|
||||
return parseInt(sThis, 10) >= parseInt(sThat, 10);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Check if a TABLE node is a DataTable table already or not.
|
||||
* @param {node} nTable The TABLE node to check if it is a DataTable or not (note that other
|
||||
* node types can be passed in, but will always return false).
|
||||
* @returns {boolean} true the table given is a DataTable, or false otherwise
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* var ex = document.getElementById('example');
|
||||
* if ( ! $.fn.DataTable.fnIsDataTable( ex ) ) {
|
||||
* $(ex).dataTable();
|
||||
* }
|
||||
*/
|
||||
DataTable.fnIsDataTable = function ( nTable )
|
||||
{
|
||||
var o = DataTable.settings;
|
||||
|
||||
for ( var i=0 ; i<o.length ; i++ )
|
||||
{
|
||||
if ( o[i].nTable === nTable || o[i].nScrollHead === nTable || o[i].nScrollFoot === nTable )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get all DataTable tables that have been initialised - optionally you can select to
|
||||
* get only currently visible tables.
|
||||
* @param {boolean} [bVisible=false] Flag to indicate if you want all (default) or
|
||||
* visible tables only.
|
||||
* @returns {array} Array of TABLE nodes (not DataTable instances) which are DataTables
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* var table = $.fn.dataTable.fnTables(true);
|
||||
* if ( table.length > 0 ) {
|
||||
* $(table).dataTable().fnAdjustColumnSizing();
|
||||
* }
|
||||
*/
|
||||
DataTable.fnTables = function ( bVisible )
|
||||
{
|
||||
var out = [];
|
||||
|
||||
jQuery.each( DataTable.settings, function (i, o) {
|
||||
if ( !bVisible || (bVisible === true && $(o.nTable).is(':visible')) )
|
||||
{
|
||||
out.push( o.nTable );
|
||||
}
|
||||
} );
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Update the table using an Ajax call
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {boolean} Block the table drawing or not
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnAjaxUpdate( oSettings )
|
||||
{
|
||||
if ( oSettings.bAjaxDataGet )
|
||||
{
|
||||
oSettings.iDraw++;
|
||||
_fnProcessingDisplay( oSettings, true );
|
||||
var iColumns = oSettings.aoColumns.length;
|
||||
var aoData = _fnAjaxParameters( oSettings );
|
||||
_fnServerParams( oSettings, aoData );
|
||||
|
||||
oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData,
|
||||
function(json) {
|
||||
_fnAjaxUpdateDraw( oSettings, json );
|
||||
}, oSettings );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build up the parameters in an object needed for a server-side processing request
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {bool} block the table drawing or not
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnAjaxParameters( oSettings )
|
||||
{
|
||||
var iColumns = oSettings.aoColumns.length;
|
||||
var aoData = [], mDataProp, aaSort, aDataSort;
|
||||
var i, j;
|
||||
|
||||
aoData.push( { "name": "sEcho", "value": oSettings.iDraw } );
|
||||
aoData.push( { "name": "iColumns", "value": iColumns } );
|
||||
aoData.push( { "name": "sColumns", "value": _fnColumnOrdering(oSettings) } );
|
||||
aoData.push( { "name": "iDisplayStart", "value": oSettings._iDisplayStart } );
|
||||
aoData.push( { "name": "iDisplayLength", "value": oSettings.oFeatures.bPaginate !== false ?
|
||||
oSettings._iDisplayLength : -1 } );
|
||||
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
mDataProp = oSettings.aoColumns[i].mData;
|
||||
aoData.push( { "name": "mDataProp_"+i, "value": typeof(mDataProp)==="function" ? 'function' : mDataProp } );
|
||||
}
|
||||
|
||||
/* Filtering */
|
||||
if ( oSettings.oFeatures.bFilter !== false )
|
||||
{
|
||||
aoData.push( { "name": "sSearch", "value": oSettings.oPreviousSearch.sSearch } );
|
||||
aoData.push( { "name": "bRegex", "value": oSettings.oPreviousSearch.bRegex } );
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
aoData.push( { "name": "sSearch_"+i, "value": oSettings.aoPreSearchCols[i].sSearch } );
|
||||
aoData.push( { "name": "bRegex_"+i, "value": oSettings.aoPreSearchCols[i].bRegex } );
|
||||
aoData.push( { "name": "bSearchable_"+i, "value": oSettings.aoColumns[i].bSearchable } );
|
||||
}
|
||||
}
|
||||
|
||||
/* Sorting */
|
||||
if ( oSettings.oFeatures.bSort !== false )
|
||||
{
|
||||
var iCounter = 0;
|
||||
|
||||
aaSort = ( oSettings.aaSortingFixed !== null ) ?
|
||||
oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
|
||||
oSettings.aaSorting.slice();
|
||||
|
||||
for ( i=0 ; i<aaSort.length ; i++ )
|
||||
{
|
||||
aDataSort = oSettings.aoColumns[ aaSort[i][0] ].aDataSort;
|
||||
|
||||
for ( j=0 ; j<aDataSort.length ; j++ )
|
||||
{
|
||||
aoData.push( { "name": "iSortCol_"+iCounter, "value": aDataSort[j] } );
|
||||
aoData.push( { "name": "sSortDir_"+iCounter, "value": aaSort[i][1] } );
|
||||
iCounter++;
|
||||
}
|
||||
}
|
||||
aoData.push( { "name": "iSortingCols", "value": iCounter } );
|
||||
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
aoData.push( { "name": "bSortable_"+i, "value": oSettings.aoColumns[i].bSortable } );
|
||||
}
|
||||
}
|
||||
|
||||
return aoData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add Ajax parameters from plug-ins
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param array {objects} aoData name/value pairs to send to the server
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnServerParams( oSettings, aoData )
|
||||
{
|
||||
_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [aoData] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data the data from the server (nuking the old) and redraw the table
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {object} json json data return from the server.
|
||||
* @param {string} json.sEcho Tracking flag for DataTables to match requests
|
||||
* @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
|
||||
* @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
|
||||
* @param {array} json.aaData The data to display on this page
|
||||
* @param {string} [json.sColumns] Column ordering (sName, comma separated)
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnAjaxUpdateDraw ( oSettings, json )
|
||||
{
|
||||
if ( json.sEcho !== undefined )
|
||||
{
|
||||
/* Protect against old returns over-writing a new one. Possible when you get
|
||||
* very fast interaction, and later queries are completed much faster
|
||||
*/
|
||||
if ( json.sEcho*1 < oSettings.iDraw )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings.iDraw = json.sEcho * 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !oSettings.oScroll.bInfinite ||
|
||||
(oSettings.oScroll.bInfinite && (oSettings.bSorted || oSettings.bFiltered)) )
|
||||
{
|
||||
_fnClearTable( oSettings );
|
||||
}
|
||||
oSettings._iRecordsTotal = parseInt(json.iTotalRecords, 10);
|
||||
oSettings._iRecordsDisplay = parseInt(json.iTotalDisplayRecords, 10);
|
||||
|
||||
/* Determine if reordering is required */
|
||||
var sOrdering = _fnColumnOrdering(oSettings);
|
||||
var bReOrder = (json.sColumns !== undefined && sOrdering !== "" && json.sColumns != sOrdering );
|
||||
var aiIndex;
|
||||
if ( bReOrder )
|
||||
{
|
||||
aiIndex = _fnReOrderIndex( oSettings, json.sColumns );
|
||||
}
|
||||
|
||||
var aData = _fnGetObjectDataFn( oSettings.sAjaxDataProp )( json );
|
||||
for ( var i=0, iLen=aData.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( bReOrder )
|
||||
{
|
||||
/* If we need to re-order, then create a new array with the correct order and add it */
|
||||
var aDataSorted = [];
|
||||
for ( var j=0, jLen=oSettings.aoColumns.length ; j<jLen ; j++ )
|
||||
{
|
||||
aDataSorted.push( aData[i][ aiIndex[j] ] );
|
||||
}
|
||||
_fnAddData( oSettings, aDataSorted );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No re-order required, sever got it "right" - just straight add */
|
||||
_fnAddData( oSettings, aData[i] );
|
||||
}
|
||||
}
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
|
||||
oSettings.bAjaxDataGet = false;
|
||||
_fnDraw( oSettings );
|
||||
oSettings.bAjaxDataGet = true;
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
}
|
||||
|
||||
@@ -1,374 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Add a column to the list used for the table with default values
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {node} nTh The th element for this column
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnAddColumn( oSettings, nTh )
|
||||
{
|
||||
var oDefaults = DataTable.defaults.columns;
|
||||
var iCol = oSettings.aoColumns.length;
|
||||
var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
|
||||
"sSortingClass": oSettings.oClasses.sSortable,
|
||||
"sSortingClassJUI": oSettings.oClasses.sSortJUI,
|
||||
"nTh": nTh ? nTh : document.createElement('th'),
|
||||
"sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
|
||||
"aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
|
||||
"mData": oDefaults.mData ? oDefaults.oDefaults : iCol
|
||||
} );
|
||||
oSettings.aoColumns.push( oCol );
|
||||
|
||||
/* Add a column specific filter */
|
||||
if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null )
|
||||
{
|
||||
oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch );
|
||||
}
|
||||
else
|
||||
{
|
||||
var oPre = oSettings.aoPreSearchCols[ iCol ];
|
||||
|
||||
/* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */
|
||||
if ( oPre.bRegex === undefined )
|
||||
{
|
||||
oPre.bRegex = true;
|
||||
}
|
||||
|
||||
if ( oPre.bSmart === undefined )
|
||||
{
|
||||
oPre.bSmart = true;
|
||||
}
|
||||
|
||||
if ( oPre.bCaseInsensitive === undefined )
|
||||
{
|
||||
oPre.bCaseInsensitive = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Use the column options function to initialise classes etc */
|
||||
_fnColumnOptions( oSettings, iCol, null );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Apply options for a column
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {int} iCol column index to consider
|
||||
* @param {object} oOptions object with sType, bVisible and bSearchable etc
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnColumnOptions( oSettings, iCol, oOptions )
|
||||
{
|
||||
var oCol = oSettings.aoColumns[ iCol ];
|
||||
|
||||
/* User specified column options */
|
||||
if ( oOptions !== undefined && oOptions !== null )
|
||||
{
|
||||
/* Backwards compatibility for mDataProp */
|
||||
if ( oOptions.mDataProp && !oOptions.mData )
|
||||
{
|
||||
oOptions.mData = oOptions.mDataProp;
|
||||
}
|
||||
|
||||
if ( oOptions.sType !== undefined )
|
||||
{
|
||||
oCol.sType = oOptions.sType;
|
||||
oCol._bAutoType = false;
|
||||
}
|
||||
|
||||
$.extend( oCol, oOptions );
|
||||
_fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
|
||||
|
||||
/* iDataSort to be applied (backwards compatibility), but aDataSort will take
|
||||
* priority if defined
|
||||
*/
|
||||
if ( oOptions.iDataSort !== undefined )
|
||||
{
|
||||
oCol.aDataSort = [ oOptions.iDataSort ];
|
||||
}
|
||||
_fnMap( oCol, oOptions, "aDataSort" );
|
||||
}
|
||||
|
||||
/* Cache the data get and set functions for speed */
|
||||
var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
|
||||
var mData = _fnGetObjectDataFn( oCol.mData );
|
||||
|
||||
oCol.fnGetData = function (oData, sSpecific) {
|
||||
var innerData = mData( oData, sSpecific );
|
||||
|
||||
if ( oCol.mRender && (sSpecific && sSpecific !== '') )
|
||||
{
|
||||
return mRender( innerData, sSpecific, oData );
|
||||
}
|
||||
return innerData;
|
||||
};
|
||||
oCol.fnSetData = _fnSetObjectDataFn( oCol.mData );
|
||||
|
||||
/* Feature sorting overrides column specific when off */
|
||||
if ( !oSettings.oFeatures.bSort )
|
||||
{
|
||||
oCol.bSortable = false;
|
||||
}
|
||||
|
||||
/* Check that the class assignment is correct for sorting */
|
||||
if ( !oCol.bSortable ||
|
||||
($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
|
||||
{
|
||||
oCol.sSortingClass = oSettings.oClasses.sSortableNone;
|
||||
oCol.sSortingClassJUI = "";
|
||||
}
|
||||
else if ( oCol.bSortable ||
|
||||
($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
|
||||
{
|
||||
oCol.sSortingClass = oSettings.oClasses.sSortable;
|
||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
|
||||
}
|
||||
else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 )
|
||||
{
|
||||
oCol.sSortingClass = oSettings.oClasses.sSortableAsc;
|
||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed;
|
||||
}
|
||||
else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 )
|
||||
{
|
||||
oCol.sSortingClass = oSettings.oClasses.sSortableDesc;
|
||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adjust the table column widths for new data. Note: you would probably want to
|
||||
* do a redraw after calling this function!
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnAdjustColumnSizing ( oSettings )
|
||||
{
|
||||
/* Not interested in doing column width calculation if auto-width is disabled */
|
||||
if ( oSettings.oFeatures.bAutoWidth === false )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_fnCalculateColumnWidths( oSettings );
|
||||
for ( var i=0 , iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
oSettings.aoColumns[i].nTh.style.width = oSettings.aoColumns[i].sWidth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Covert the index of a visible column to the index in the data array (take account
|
||||
* of hidden columns)
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {int} iMatch Visible column index to lookup
|
||||
* @returns {int} i the data index
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnVisibleToColumnIndex( oSettings, iMatch )
|
||||
{
|
||||
var aiVis = _fnGetColumns( oSettings, 'bVisible' );
|
||||
|
||||
return typeof aiVis[iMatch] === 'number' ?
|
||||
aiVis[iMatch] :
|
||||
null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Covert the index of an index in the data array and convert it to the visible
|
||||
* column index (take account of hidden columns)
|
||||
* @param {int} iMatch Column index to lookup
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {int} i the data index
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnColumnIndexToVisible( oSettings, iMatch )
|
||||
{
|
||||
var aiVis = _fnGetColumns( oSettings, 'bVisible' );
|
||||
var iPos = $.inArray( iMatch, aiVis );
|
||||
|
||||
return iPos !== -1 ? iPos : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of visible columns
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {int} i the number of visible columns
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnVisbleColumns( oSettings )
|
||||
{
|
||||
return _fnGetColumns( oSettings, 'bVisible' ).length;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get an array of column indexes that match a given property
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {string} sParam Parameter in aoColumns to look for - typically
|
||||
* bVisible or bSearchable
|
||||
* @returns {array} Array of indexes with matched properties
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnGetColumns( oSettings, sParam )
|
||||
{
|
||||
var a = [];
|
||||
|
||||
$.map( oSettings.aoColumns, function(val, i) {
|
||||
if ( val[sParam] ) {
|
||||
a.push( i );
|
||||
}
|
||||
} );
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the sort type based on an input string
|
||||
* @param {string} sData data we wish to know the type of
|
||||
* @returns {string} type (defaults to 'string' if no type can be detected)
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnDetectType( sData )
|
||||
{
|
||||
var aTypes = DataTable.ext.aTypes;
|
||||
var iLen = aTypes.length;
|
||||
|
||||
for ( var i=0 ; i<iLen ; i++ )
|
||||
{
|
||||
var sType = aTypes[i]( sData );
|
||||
if ( sType !== null )
|
||||
{
|
||||
return sType;
|
||||
}
|
||||
}
|
||||
|
||||
return 'string';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Figure out how to reorder a display list
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns array {int} aiReturn index list for reordering
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnReOrderIndex ( oSettings, sColumns )
|
||||
{
|
||||
var aColumns = sColumns.split(',');
|
||||
var aiReturn = [];
|
||||
|
||||
for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
for ( var j=0 ; j<iLen ; j++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].sName == aColumns[j] )
|
||||
{
|
||||
aiReturn.push( j );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return aiReturn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the column ordering that DataTables expects
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {string} comma separated list of names
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnColumnOrdering ( oSettings )
|
||||
{
|
||||
var sNames = '';
|
||||
for ( var i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
sNames += oSettings.aoColumns[i].sName+',';
|
||||
}
|
||||
if ( sNames.length == iLen )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return sNames.slice(0, -1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Take the column definitions and static columns arrays and calculate how
|
||||
* they relate to column indexes. The callback function will then apply the
|
||||
* definition found for a column to a suitable configuration object.
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {array} aoColDefs The aoColumnDefs array that is to be applied
|
||||
* @param {array} aoCols The aoColumns array that defines columns individually
|
||||
* @param {function} fn Callback function - takes two parameters, the calculated
|
||||
* column index and the definition for that column.
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
|
||||
{
|
||||
var i, iLen, j, jLen, k, kLen;
|
||||
|
||||
// Column definitions with aTargets
|
||||
if ( aoColDefs )
|
||||
{
|
||||
/* Loop over the definitions array - loop in reverse so first instance has priority */
|
||||
for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
|
||||
{
|
||||
/* Each definition can target multiple columns, as it is an array */
|
||||
var aTargets = aoColDefs[i].aTargets;
|
||||
if ( !$.isArray( aTargets ) )
|
||||
{
|
||||
_fnLog( oSettings, 1, 'aTargets must be an array of targets, not a '+(typeof aTargets) );
|
||||
}
|
||||
|
||||
for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
|
||||
{
|
||||
if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
|
||||
{
|
||||
/* Add columns that we don't yet know about */
|
||||
while( oSettings.aoColumns.length <= aTargets[j] )
|
||||
{
|
||||
_fnAddColumn( oSettings );
|
||||
}
|
||||
|
||||
/* Integer, basic index */
|
||||
fn( aTargets[j], aoColDefs[i] );
|
||||
}
|
||||
else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
|
||||
{
|
||||
/* Negative integer, right to left column counting */
|
||||
fn( oSettings.aoColumns.length+aTargets[j], aoColDefs[i] );
|
||||
}
|
||||
else if ( typeof aTargets[j] === 'string' )
|
||||
{
|
||||
/* Class name matching on TH element */
|
||||
for ( k=0, kLen=oSettings.aoColumns.length ; k<kLen ; k++ )
|
||||
{
|
||||
if ( aTargets[j] == "_all" ||
|
||||
$(oSettings.aoColumns[k].nTh).hasClass( aTargets[j] ) )
|
||||
{
|
||||
fn( k, aoColDefs[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Statically defined columns array
|
||||
if ( aoCols )
|
||||
{
|
||||
for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
|
||||
{
|
||||
fn( i, aoCols[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,442 +0,0 @@
|
||||
|
||||
var i=0, iLen, j, jLen, k, kLen;
|
||||
var sId = this.getAttribute( 'id' );
|
||||
var bInitHandedOff = false;
|
||||
var bUsePassedData = false;
|
||||
|
||||
|
||||
/* Sanity check */
|
||||
if ( this.nodeName.toLowerCase() != 'table' )
|
||||
{
|
||||
_fnLog( null, 0, "Attempted to initialise DataTables on a node which is not a "+
|
||||
"table: "+this.nodeName );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check to see if we are re-initialising a table */
|
||||
for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
|
||||
{
|
||||
/* Base check on table node */
|
||||
if ( DataTable.settings[i].nTable == this )
|
||||
{
|
||||
if ( oInit === undefined || oInit.bRetrieve )
|
||||
{
|
||||
return DataTable.settings[i].oInstance;
|
||||
}
|
||||
else if ( oInit.bDestroy )
|
||||
{
|
||||
DataTable.settings[i].oInstance.fnDestroy();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_fnLog( DataTable.settings[i], 0, "Cannot reinitialise DataTable.\n\n"+
|
||||
"To retrieve the DataTables object for this table, pass no arguments or see "+
|
||||
"the docs for bRetrieve and bDestroy" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the element we are initialising has the same ID as a table which was previously
|
||||
* initialised, but the table nodes don't match (from before) then we destroy the old
|
||||
* instance by simply deleting it. This is under the assumption that the table has been
|
||||
* destroyed by other methods. Anyone using non-id selectors will need to do this manually
|
||||
*/
|
||||
if ( DataTable.settings[i].sTableId == this.id )
|
||||
{
|
||||
DataTable.settings.splice( i, 1 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure the table has an ID - required for accessibility */
|
||||
if ( sId === null || sId === "" )
|
||||
{
|
||||
sId = "DataTables_Table_"+(DataTable.ext._oExternConfig.iNextUnique++);
|
||||
this.id = sId;
|
||||
}
|
||||
|
||||
/* Create the settings object for this table and set some of the default parameters */
|
||||
var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
|
||||
"nTable": this,
|
||||
"oApi": _that.oApi,
|
||||
"oInit": oInit,
|
||||
"sDestroyWidth": $(this).width(),
|
||||
"sInstance": sId,
|
||||
"sTableId": sId
|
||||
} );
|
||||
DataTable.settings.push( oSettings );
|
||||
|
||||
// Need to add the instance after the instance after the settings object has been added
|
||||
// to the settings array, so we can self reference the table instance if more than one
|
||||
oSettings.oInstance = (_that.length===1) ? _that : $(this).dataTable();
|
||||
|
||||
/* Setting up the initialisation object */
|
||||
if ( !oInit )
|
||||
{
|
||||
oInit = {};
|
||||
}
|
||||
|
||||
// Backwards compatibility, before we apply all the defaults
|
||||
if ( oInit.oLanguage )
|
||||
{
|
||||
_fnLanguageCompat( oInit.oLanguage );
|
||||
}
|
||||
|
||||
oInit = _fnExtend( $.extend(true, {}, DataTable.defaults), oInit );
|
||||
|
||||
// Map the initialisation options onto the settings object
|
||||
_fnMap( oSettings.oFeatures, oInit, "bPaginate" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bLengthChange" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bFilter" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bSort" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bInfo" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bProcessing" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bAutoWidth" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bSortClasses" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bServerSide" );
|
||||
_fnMap( oSettings.oFeatures, oInit, "bDeferRender" );
|
||||
_fnMap( oSettings.oScroll, oInit, "sScrollX", "sX" );
|
||||
_fnMap( oSettings.oScroll, oInit, "sScrollXInner", "sXInner" );
|
||||
_fnMap( oSettings.oScroll, oInit, "sScrollY", "sY" );
|
||||
_fnMap( oSettings.oScroll, oInit, "bScrollCollapse", "bCollapse" );
|
||||
_fnMap( oSettings.oScroll, oInit, "bScrollInfinite", "bInfinite" );
|
||||
_fnMap( oSettings.oScroll, oInit, "iScrollLoadGap", "iLoadGap" );
|
||||
_fnMap( oSettings.oScroll, oInit, "bScrollAutoCss", "bAutoCss" );
|
||||
_fnMap( oSettings, oInit, "asStripeClasses" );
|
||||
_fnMap( oSettings, oInit, "asStripClasses", "asStripeClasses" ); // legacy
|
||||
_fnMap( oSettings, oInit, "fnServerData" );
|
||||
_fnMap( oSettings, oInit, "fnFormatNumber" );
|
||||
_fnMap( oSettings, oInit, "sServerMethod" );
|
||||
_fnMap( oSettings, oInit, "aaSorting" );
|
||||
_fnMap( oSettings, oInit, "aaSortingFixed" );
|
||||
_fnMap( oSettings, oInit, "aLengthMenu" );
|
||||
_fnMap( oSettings, oInit, "sPaginationType" );
|
||||
_fnMap( oSettings, oInit, "sAjaxSource" );
|
||||
_fnMap( oSettings, oInit, "sAjaxDataProp" );
|
||||
_fnMap( oSettings, oInit, "iCookieDuration" );
|
||||
_fnMap( oSettings, oInit, "sCookiePrefix" );
|
||||
_fnMap( oSettings, oInit, "sDom" );
|
||||
_fnMap( oSettings, oInit, "bSortCellsTop" );
|
||||
_fnMap( oSettings, oInit, "iTabIndex" );
|
||||
_fnMap( oSettings, oInit, "oSearch", "oPreviousSearch" );
|
||||
_fnMap( oSettings, oInit, "aoSearchCols", "aoPreSearchCols" );
|
||||
_fnMap( oSettings, oInit, "iDisplayLength", "_iDisplayLength" );
|
||||
_fnMap( oSettings, oInit, "bJQueryUI", "bJUI" );
|
||||
_fnMap( oSettings, oInit, "fnCookieCallback" );
|
||||
_fnMap( oSettings, oInit, "fnStateLoad" );
|
||||
_fnMap( oSettings, oInit, "fnStateSave" );
|
||||
_fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
|
||||
|
||||
/* Callback functions which are array driven */
|
||||
_fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
|
||||
_fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );
|
||||
|
||||
if ( oSettings.oFeatures.bServerSide && oSettings.oFeatures.bSort &&
|
||||
oSettings.oFeatures.bSortClasses )
|
||||
{
|
||||
/* Enable sort classes for server-side processing. Safe to do it here, since server-side
|
||||
* processing must be enabled by the developer
|
||||
*/
|
||||
_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSortingClasses, 'server_side_sort_classes' );
|
||||
}
|
||||
else if ( oSettings.oFeatures.bDeferRender )
|
||||
{
|
||||
_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSortingClasses, 'defer_sort_classes' );
|
||||
}
|
||||
|
||||
if ( oInit.bJQueryUI )
|
||||
{
|
||||
/* Use the JUI classes object for display. You could clone the oStdClasses object if
|
||||
* you want to have multiple tables with multiple independent classes
|
||||
*/
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oJUIClasses );
|
||||
|
||||
if ( oInit.sDom === DataTable.defaults.sDom && DataTable.defaults.sDom === "lfrtip" )
|
||||
{
|
||||
/* Set the DOM to use a layout suitable for jQuery UI's theming */
|
||||
oSettings.sDom = '<"H"lfr>t<"F"ip>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oStdClasses );
|
||||
}
|
||||
$(this).addClass( oSettings.oClasses.sTable );
|
||||
|
||||
/* Calculate the scroll bar width and cache it for use later on */
|
||||
if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" )
|
||||
{
|
||||
oSettings.oScroll.iBarWidth = _fnScrollBarWidth();
|
||||
}
|
||||
|
||||
if ( oSettings.iInitDisplayStart === undefined )
|
||||
{
|
||||
/* Display start point, taking into account the save saving */
|
||||
oSettings.iInitDisplayStart = oInit.iDisplayStart;
|
||||
oSettings._iDisplayStart = oInit.iDisplayStart;
|
||||
}
|
||||
|
||||
/* Must be done after everything which can be overridden by a cookie! */
|
||||
if ( oInit.bStateSave )
|
||||
{
|
||||
oSettings.oFeatures.bStateSave = true;
|
||||
_fnLoadState( oSettings, oInit );
|
||||
_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
|
||||
}
|
||||
|
||||
if ( oInit.iDeferLoading !== null )
|
||||
{
|
||||
oSettings.bDeferLoading = true;
|
||||
var tmp = $.isArray( oInit.iDeferLoading );
|
||||
oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
|
||||
oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
|
||||
}
|
||||
|
||||
if ( oInit.aaData !== null )
|
||||
{
|
||||
bUsePassedData = true;
|
||||
}
|
||||
|
||||
/* Language definitions */
|
||||
if ( oInit.oLanguage.sUrl !== "" )
|
||||
{
|
||||
/* Get the language definitions from a file - because this Ajax call makes the language
|
||||
* get async to the remainder of this function we use bInitHandedOff to indicate that
|
||||
* _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
|
||||
*/
|
||||
oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl;
|
||||
$.getJSON( oSettings.oLanguage.sUrl, null, function( json ) {
|
||||
_fnLanguageCompat( json );
|
||||
$.extend( true, oSettings.oLanguage, oInit.oLanguage, json );
|
||||
_fnInitialise( oSettings );
|
||||
} );
|
||||
bInitHandedOff = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$.extend( true, oSettings.oLanguage, oInit.oLanguage );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Stripes
|
||||
*/
|
||||
if ( oInit.asStripeClasses === null )
|
||||
{
|
||||
oSettings.asStripeClasses =[
|
||||
oSettings.oClasses.sStripeOdd,
|
||||
oSettings.oClasses.sStripeEven
|
||||
];
|
||||
}
|
||||
|
||||
/* Remove row stripe classes if they are already on the table row */
|
||||
var bStripeRemove = false;
|
||||
var anRows = $(this).children('tbody').children('tr');
|
||||
for ( i=0, iLen=oSettings.asStripeClasses.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( anRows.filter(":lt(2)").hasClass( oSettings.asStripeClasses[i]) )
|
||||
{
|
||||
bStripeRemove = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bStripeRemove )
|
||||
{
|
||||
/* Store the classes which we are about to remove so they can be re-added on destroy */
|
||||
oSettings.asDestroyStripes = [ '', '' ];
|
||||
if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripeOdd) )
|
||||
{
|
||||
oSettings.asDestroyStripes[0] += oSettings.oClasses.sStripeOdd+" ";
|
||||
}
|
||||
if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripeEven) )
|
||||
{
|
||||
oSettings.asDestroyStripes[0] += oSettings.oClasses.sStripeEven;
|
||||
}
|
||||
if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripeOdd) )
|
||||
{
|
||||
oSettings.asDestroyStripes[1] += oSettings.oClasses.sStripeOdd+" ";
|
||||
}
|
||||
if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripeEven) )
|
||||
{
|
||||
oSettings.asDestroyStripes[1] += oSettings.oClasses.sStripeEven;
|
||||
}
|
||||
|
||||
anRows.removeClass( oSettings.asStripeClasses.join(' ') );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Columns
|
||||
* See if we should load columns automatically or use defined ones
|
||||
*/
|
||||
var anThs = [];
|
||||
var aoColumnsInit;
|
||||
var nThead = this.getElementsByTagName('thead');
|
||||
if ( nThead.length !== 0 )
|
||||
{
|
||||
_fnDetectHeader( oSettings.aoHeader, nThead[0] );
|
||||
anThs = _fnGetUniqueThs( oSettings );
|
||||
}
|
||||
|
||||
/* If not given a column array, generate one with nulls */
|
||||
if ( oInit.aoColumns === null )
|
||||
{
|
||||
aoColumnsInit = [];
|
||||
for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
|
||||
{
|
||||
aoColumnsInit.push( null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aoColumnsInit = oInit.aoColumns;
|
||||
}
|
||||
|
||||
/* Add the columns */
|
||||
for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
|
||||
{
|
||||
/* Short cut - use the loop to check if we have column visibility state to restore */
|
||||
if ( oInit.saved_aoColumns !== undefined && oInit.saved_aoColumns.length == iLen )
|
||||
{
|
||||
if ( aoColumnsInit[i] === null )
|
||||
{
|
||||
aoColumnsInit[i] = {};
|
||||
}
|
||||
aoColumnsInit[i].bVisible = oInit.saved_aoColumns[i].bVisible;
|
||||
}
|
||||
|
||||
_fnAddColumn( oSettings, anThs ? anThs[i] : null );
|
||||
}
|
||||
|
||||
/* Apply the column definitions */
|
||||
_fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
|
||||
_fnColumnOptions( oSettings, iCol, oDef );
|
||||
} );
|
||||
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
* Check the aaSorting array
|
||||
*/
|
||||
for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( oSettings.aaSorting[i][0] >= oSettings.aoColumns.length )
|
||||
{
|
||||
oSettings.aaSorting[i][0] = 0;
|
||||
}
|
||||
var oColumn = oSettings.aoColumns[ oSettings.aaSorting[i][0] ];
|
||||
|
||||
/* Add a default sorting index */
|
||||
if ( oSettings.aaSorting[i][2] === undefined )
|
||||
{
|
||||
oSettings.aaSorting[i][2] = 0;
|
||||
}
|
||||
|
||||
/* If aaSorting is not defined, then we use the first indicator in asSorting */
|
||||
if ( oInit.aaSorting === undefined && oSettings.saved_aaSorting === undefined )
|
||||
{
|
||||
oSettings.aaSorting[i][1] = oColumn.asSorting[0];
|
||||
}
|
||||
|
||||
/* Set the current sorting index based on aoColumns.asSorting */
|
||||
for ( j=0, jLen=oColumn.asSorting.length ; j<jLen ; j++ )
|
||||
{
|
||||
if ( oSettings.aaSorting[i][1] == oColumn.asSorting[j] )
|
||||
{
|
||||
oSettings.aaSorting[i][2] = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do a first pass on the sorting classes (allows any size changes to be taken into
|
||||
* account, and also will apply sorting disabled classes if disabled
|
||||
*/
|
||||
_fnSortingClasses( oSettings );
|
||||
|
||||
|
||||
/*
|
||||
* Final init
|
||||
* Cache the header, body and footer as required, creating them if needed
|
||||
*/
|
||||
|
||||
/* Browser support detection */
|
||||
_fnBrowserDetect( oSettings );
|
||||
|
||||
// Work around for Webkit bug 83867 - store the caption-side before removing from doc
|
||||
var captions = $(this).children('caption').each( function () {
|
||||
this._captionSide = $(this).css('caption-side');
|
||||
} );
|
||||
|
||||
var thead = $(this).children('thead');
|
||||
if ( thead.length === 0 )
|
||||
{
|
||||
thead = [ document.createElement( 'thead' ) ];
|
||||
this.appendChild( thead[0] );
|
||||
}
|
||||
oSettings.nTHead = thead[0];
|
||||
|
||||
var tbody = $(this).children('tbody');
|
||||
if ( tbody.length === 0 )
|
||||
{
|
||||
tbody = [ document.createElement( 'tbody' ) ];
|
||||
this.appendChild( tbody[0] );
|
||||
}
|
||||
oSettings.nTBody = tbody[0];
|
||||
oSettings.nTBody.setAttribute( "role", "alert" );
|
||||
oSettings.nTBody.setAttribute( "aria-live", "polite" );
|
||||
oSettings.nTBody.setAttribute( "aria-relevant", "all" );
|
||||
|
||||
var tfoot = $(this).children('tfoot');
|
||||
if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") )
|
||||
{
|
||||
// If we are a scrolling table, and no footer has been given, then we need to create
|
||||
// a tfoot element for the caption element to be appended to
|
||||
tfoot = [ document.createElement( 'tfoot' ) ];
|
||||
this.appendChild( tfoot[0] );
|
||||
}
|
||||
|
||||
if ( tfoot.length > 0 )
|
||||
{
|
||||
oSettings.nTFoot = tfoot[0];
|
||||
_fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
|
||||
}
|
||||
|
||||
/* Check if there is data passing into the constructor */
|
||||
if ( bUsePassedData )
|
||||
{
|
||||
for ( i=0 ; i<oInit.aaData.length ; i++ )
|
||||
{
|
||||
_fnAddData( oSettings, oInit.aaData[ i ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Grab the data from the page */
|
||||
_fnGatherData( oSettings );
|
||||
}
|
||||
|
||||
/* Copy the data index array */
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
|
||||
/* Initialisation complete - table can be drawn */
|
||||
oSettings.bInitialised = true;
|
||||
|
||||
/* Check if we need to initialise the table (it might not have been handed off to the
|
||||
* language processor)
|
||||
*/
|
||||
if ( bInitHandedOff === false )
|
||||
{
|
||||
_fnInitialise( oSettings );
|
||||
}
|
||||
@@ -1,399 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Generate the node required for filtering text
|
||||
* @returns {node} Filter control element
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlFilter ( oSettings )
|
||||
{
|
||||
var oPreviousSearch = oSettings.oPreviousSearch;
|
||||
|
||||
var sSearchStr = oSettings.oLanguage.sSearch;
|
||||
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
|
||||
sSearchStr.replace('_INPUT_', '<input type="text" />') :
|
||||
sSearchStr==="" ? '<input type="text" />' : sSearchStr+' <input type="text" />';
|
||||
|
||||
var nFilter = document.createElement( 'div' );
|
||||
nFilter.className = oSettings.oClasses.sFilter;
|
||||
nFilter.innerHTML = '<label>'+sSearchStr+'</label>';
|
||||
if ( !oSettings.aanFeatures.f )
|
||||
{
|
||||
nFilter.id = oSettings.sTableId+'_filter';
|
||||
}
|
||||
|
||||
var jqFilter = $('input[type="text"]', nFilter);
|
||||
|
||||
// Store a reference to the input element, so other input elements could be
|
||||
// added to the filter wrapper if needed (submit button for example)
|
||||
nFilter._DT_Input = jqFilter[0];
|
||||
|
||||
jqFilter.val( oPreviousSearch.sSearch.replace('"','"') );
|
||||
jqFilter.bind( 'keyup.DT', function(e) {
|
||||
/* Update all other filter input elements for the new display */
|
||||
var n = oSettings.aanFeatures.f;
|
||||
var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
|
||||
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( n[i] != $(this).parents('div.dataTables_filter')[0] )
|
||||
{
|
||||
$(n[i]._DT_Input).val( val );
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do the filter */
|
||||
if ( val != oPreviousSearch.sSearch )
|
||||
{
|
||||
_fnFilterComplete( oSettings, {
|
||||
"sSearch": val,
|
||||
"bRegex": oPreviousSearch.bRegex,
|
||||
"bSmart": oPreviousSearch.bSmart ,
|
||||
"bCaseInsensitive": oPreviousSearch.bCaseInsensitive
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
jqFilter
|
||||
.attr('aria-controls', oSettings.sTableId)
|
||||
.bind( 'keypress.DT', function(e) {
|
||||
/* Prevent form submission */
|
||||
if ( e.keyCode == 13 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return nFilter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter the table using both the global filter and column based filtering
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {object} oSearch search information
|
||||
* @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFilterComplete ( oSettings, oInput, iForce )
|
||||
{
|
||||
var oPrevSearch = oSettings.oPreviousSearch;
|
||||
var aoPrevSearch = oSettings.aoPreSearchCols;
|
||||
var fnSaveFilter = function ( oFilter ) {
|
||||
/* Save the filtering values */
|
||||
oPrevSearch.sSearch = oFilter.sSearch;
|
||||
oPrevSearch.bRegex = oFilter.bRegex;
|
||||
oPrevSearch.bSmart = oFilter.bSmart;
|
||||
oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
|
||||
};
|
||||
|
||||
/* In server-side processing all filtering is done by the server, so no point hanging around here */
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
/* Global filter */
|
||||
_fnFilter( oSettings, oInput.sSearch, iForce, oInput.bRegex, oInput.bSmart, oInput.bCaseInsensitive );
|
||||
fnSaveFilter( oInput );
|
||||
|
||||
/* Now do the individual column filter */
|
||||
for ( var i=0 ; i<oSettings.aoPreSearchCols.length ; i++ )
|
||||
{
|
||||
_fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, aoPrevSearch[i].bRegex,
|
||||
aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
|
||||
}
|
||||
|
||||
/* Custom filtering */
|
||||
_fnFilterCustom( oSettings );
|
||||
}
|
||||
else
|
||||
{
|
||||
fnSaveFilter( oInput );
|
||||
}
|
||||
|
||||
/* Tell the draw function we have been filtering */
|
||||
oSettings.bFiltered = true;
|
||||
$(oSettings.oInstance).trigger('filter', oSettings);
|
||||
|
||||
/* Redraw the table */
|
||||
oSettings._iDisplayStart = 0;
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
|
||||
/* Rebuild search array 'offline' */
|
||||
_fnBuildSearchArray( oSettings, 0 );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Apply custom filtering functions
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFilterCustom( oSettings )
|
||||
{
|
||||
var afnFilters = DataTable.ext.afnFiltering;
|
||||
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
||||
|
||||
for ( var i=0, iLen=afnFilters.length ; i<iLen ; i++ )
|
||||
{
|
||||
var iCorrector = 0;
|
||||
for ( var j=0, jLen=oSettings.aiDisplay.length ; j<jLen ; j++ )
|
||||
{
|
||||
var iDisIndex = oSettings.aiDisplay[j-iCorrector];
|
||||
var bTest = afnFilters[i](
|
||||
oSettings,
|
||||
_fnGetRowData( oSettings, iDisIndex, 'filter', aiFilterColumns ),
|
||||
iDisIndex
|
||||
);
|
||||
|
||||
/* Check if we should use this row based on the filtering function */
|
||||
if ( !bTest )
|
||||
{
|
||||
oSettings.aiDisplay.splice( j-iCorrector, 1 );
|
||||
iCorrector++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter the table on a per-column basis
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {string} sInput string to filter on
|
||||
* @param {int} iColumn column to filter
|
||||
* @param {bool} bRegex treat search string as a regular expression or not
|
||||
* @param {bool} bSmart use smart filtering or not
|
||||
* @param {bool} bCaseInsensitive Do case insenstive matching or not
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFilterColumn ( oSettings, sInput, iColumn, bRegex, bSmart, bCaseInsensitive )
|
||||
{
|
||||
if ( sInput === "" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var iIndexCorrector = 0;
|
||||
var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive );
|
||||
|
||||
for ( var i=oSettings.aiDisplay.length-1 ; i>=0 ; i-- )
|
||||
{
|
||||
var sData = _fnDataToSearch( _fnGetCellData( oSettings, oSettings.aiDisplay[i], iColumn, 'filter' ),
|
||||
oSettings.aoColumns[iColumn].sType );
|
||||
if ( ! rpSearch.test( sData ) )
|
||||
{
|
||||
oSettings.aiDisplay.splice( i, 1 );
|
||||
iIndexCorrector++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter the data table based on user input and draw the table
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {string} sInput string to filter on
|
||||
* @param {int} iForce optional - force a research of the master array (1) or not (undefined or 0)
|
||||
* @param {bool} bRegex treat as a regular expression or not
|
||||
* @param {bool} bSmart perform smart filtering or not
|
||||
* @param {bool} bCaseInsensitive Do case insenstive matching or not
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive )
|
||||
{
|
||||
var i;
|
||||
var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart, bCaseInsensitive );
|
||||
var oPrevSearch = oSettings.oPreviousSearch;
|
||||
|
||||
/* Check if we are forcing or not - optional parameter */
|
||||
if ( !iForce )
|
||||
{
|
||||
iForce = 0;
|
||||
}
|
||||
|
||||
/* Need to take account of custom filtering functions - always filter */
|
||||
if ( DataTable.ext.afnFiltering.length !== 0 )
|
||||
{
|
||||
iForce = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the input is blank - we want the full data set
|
||||
*/
|
||||
if ( sInput.length <= 0 )
|
||||
{
|
||||
oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length);
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* We are starting a new search or the new search string is smaller
|
||||
* then the old one (i.e. delete). Search from the master array
|
||||
*/
|
||||
if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
|
||||
oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
|
||||
sInput.indexOf(oPrevSearch.sSearch) !== 0 )
|
||||
{
|
||||
/* Nuke the old display array - we are going to rebuild it */
|
||||
oSettings.aiDisplay.splice( 0, oSettings.aiDisplay.length);
|
||||
|
||||
/* Force a rebuild of the search array */
|
||||
_fnBuildSearchArray( oSettings, 1 );
|
||||
|
||||
/* Search through all records to populate the search array
|
||||
* The the oSettings.aiDisplayMaster and asDataSearch arrays have 1 to 1
|
||||
* mapping
|
||||
*/
|
||||
for ( i=0 ; i<oSettings.aiDisplayMaster.length ; i++ )
|
||||
{
|
||||
if ( rpSearch.test(oSettings.asDataSearch[i]) )
|
||||
{
|
||||
oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Using old search array - refine it - do it this way for speed
|
||||
* Don't have to search the whole master array again
|
||||
*/
|
||||
var iIndexCorrector = 0;
|
||||
|
||||
/* Search the current results */
|
||||
for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
|
||||
{
|
||||
if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
|
||||
{
|
||||
oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
|
||||
iIndexCorrector++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create an array which can be quickly search through
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {int} iMaster use the master data array - optional
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnBuildSearchArray ( oSettings, iMaster )
|
||||
{
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
/* Clear out the old data */
|
||||
oSettings.asDataSearch = [];
|
||||
|
||||
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
||||
var aiIndex = (iMaster===1) ?
|
||||
oSettings.aiDisplayMaster :
|
||||
oSettings.aiDisplay;
|
||||
|
||||
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
|
||||
{
|
||||
oSettings.asDataSearch[i] = _fnBuildSearchRow(
|
||||
oSettings,
|
||||
_fnGetRowData( oSettings, aiIndex[i], 'filter', aiFilterColumns )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a searchable string from a single data row
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {array} aData Row data array to use for the data to search
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnBuildSearchRow( oSettings, aData )
|
||||
{
|
||||
var sSearch = aData.join(' ');
|
||||
|
||||
/* If it looks like there is an HTML entity in the string, attempt to decode it */
|
||||
if ( sSearch.indexOf('&') !== -1 )
|
||||
{
|
||||
sSearch = $('<div>').html(sSearch).text();
|
||||
}
|
||||
|
||||
// Strip newline characters
|
||||
return sSearch.replace( /[\n\r]/g, " " );
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a regular expression object suitable for searching a table
|
||||
* @param {string} sSearch string to search for
|
||||
* @param {bool} bRegex treat as a regular expression or not
|
||||
* @param {bool} bSmart perform smart filtering or not
|
||||
* @param {bool} bCaseInsensitive Do case insensitive matching or not
|
||||
* @returns {RegExp} constructed object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFilterCreateSearch( sSearch, bRegex, bSmart, bCaseInsensitive )
|
||||
{
|
||||
var asSearch, sRegExpString;
|
||||
|
||||
if ( bSmart )
|
||||
{
|
||||
/* Generate the regular expression to use. Something along the lines of:
|
||||
* ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$
|
||||
*/
|
||||
asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' );
|
||||
sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$';
|
||||
return new RegExp( sRegExpString, bCaseInsensitive ? "i" : "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
sSearch = bRegex ? sSearch : _fnEscapeRegex( sSearch );
|
||||
return new RegExp( sSearch, bCaseInsensitive ? "i" : "" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert raw data into something that the user can search on
|
||||
* @param {string} sData data to be modified
|
||||
* @param {string} sType data type
|
||||
* @returns {string} search string
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnDataToSearch ( sData, sType )
|
||||
{
|
||||
if ( typeof DataTable.ext.ofnSearch[sType] === "function" )
|
||||
{
|
||||
return DataTable.ext.ofnSearch[sType]( sData );
|
||||
}
|
||||
else if ( sData === null )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
else if ( sType == "html" )
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ").replace( /<.*?>/g, "" );
|
||||
}
|
||||
else if ( typeof sData === "string" )
|
||||
{
|
||||
return sData.replace(/[\r\n]/g," ");
|
||||
}
|
||||
return sData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* scape a string such that it can be used in a regular expression
|
||||
* @param {string} sVal string to escape
|
||||
* @returns {string} escaped string
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnEscapeRegex ( sVal )
|
||||
{
|
||||
var acEscape = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ];
|
||||
var reReplace = new RegExp( '(\\' + acEscape.join('|\\') + ')', 'g' );
|
||||
return sVal.replace(reReplace, '\\$1');
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Generate the node required for the info display
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {node} Information element
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlInfo ( oSettings )
|
||||
{
|
||||
var nInfo = document.createElement( 'div' );
|
||||
nInfo.className = oSettings.oClasses.sInfo;
|
||||
|
||||
/* Actions that are to be taken once only for this feature */
|
||||
if ( !oSettings.aanFeatures.i )
|
||||
{
|
||||
/* Add draw callback */
|
||||
oSettings.aoDrawCallback.push( {
|
||||
"fn": _fnUpdateInfo,
|
||||
"sName": "information"
|
||||
} );
|
||||
|
||||
/* Add id */
|
||||
nInfo.id = oSettings.sTableId+'_info';
|
||||
}
|
||||
oSettings.nTable.setAttribute( 'aria-describedby', oSettings.sTableId+'_info' );
|
||||
|
||||
return nInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the information elements in the display
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnUpdateInfo ( oSettings )
|
||||
{
|
||||
/* Show information about the table */
|
||||
if ( !oSettings.oFeatures.bInfo || oSettings.aanFeatures.i.length === 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var
|
||||
oLang = oSettings.oLanguage,
|
||||
iStart = oSettings._iDisplayStart+1,
|
||||
iEnd = oSettings.fnDisplayEnd(),
|
||||
iMax = oSettings.fnRecordsTotal(),
|
||||
iTotal = oSettings.fnRecordsDisplay(),
|
||||
sOut;
|
||||
|
||||
if ( iTotal === 0 && iTotal == iMax )
|
||||
{
|
||||
/* Empty record set */
|
||||
sOut = oLang.sInfoEmpty;
|
||||
}
|
||||
else if ( iTotal === 0 )
|
||||
{
|
||||
/* Empty record set after filtering */
|
||||
sOut = oLang.sInfoEmpty +' '+ oLang.sInfoFiltered;
|
||||
}
|
||||
else if ( iTotal == iMax )
|
||||
{
|
||||
/* Normal record set */
|
||||
sOut = oLang.sInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Record set after filtering */
|
||||
sOut = oLang.sInfo +' '+ oLang.sInfoFiltered;
|
||||
}
|
||||
|
||||
// Convert the macros
|
||||
sOut += oLang.sInfoPostFix;
|
||||
sOut = _fnInfoMacros( oSettings, sOut );
|
||||
|
||||
if ( oLang.fnInfoCallback !== null )
|
||||
{
|
||||
sOut = oLang.fnInfoCallback.call( oSettings.oInstance,
|
||||
oSettings, iStart, iEnd, iMax, iTotal, sOut );
|
||||
}
|
||||
|
||||
var n = oSettings.aanFeatures.i;
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
$(n[i]).html( sOut );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _fnInfoMacros ( oSettings, str )
|
||||
{
|
||||
var
|
||||
iStart = oSettings._iDisplayStart+1,
|
||||
sStart = oSettings.fnFormatNumber( iStart ),
|
||||
iEnd = oSettings.fnDisplayEnd(),
|
||||
sEnd = oSettings.fnFormatNumber( iEnd ),
|
||||
iTotal = oSettings.fnRecordsDisplay(),
|
||||
sTotal = oSettings.fnFormatNumber( iTotal ),
|
||||
iMax = oSettings.fnRecordsTotal(),
|
||||
sMax = oSettings.fnFormatNumber( iMax );
|
||||
|
||||
// When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
|
||||
// internally
|
||||
if ( oSettings.oScroll.bInfinite )
|
||||
{
|
||||
sStart = oSettings.fnFormatNumber( 1 );
|
||||
}
|
||||
|
||||
return str.
|
||||
replace('_START_', sStart).
|
||||
replace('_END_', sEnd).
|
||||
replace('_TOTAL_', sTotal).
|
||||
replace('_MAX_', sMax);
|
||||
}
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Draw the table for the first time, adding all required features
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnInitialise ( oSettings )
|
||||
{
|
||||
var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
|
||||
|
||||
/* Ensure that the table data is fully initialised */
|
||||
if ( oSettings.bInitialised === false )
|
||||
{
|
||||
setTimeout( function(){ _fnInitialise( oSettings ); }, 200 );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show the display HTML options */
|
||||
_fnAddOptionsHtml( oSettings );
|
||||
|
||||
/* Build and draw the header / footer for the table */
|
||||
_fnBuildHead( oSettings );
|
||||
_fnDrawHead( oSettings, oSettings.aoHeader );
|
||||
if ( oSettings.nTFoot )
|
||||
{
|
||||
_fnDrawHead( oSettings, oSettings.aoFooter );
|
||||
}
|
||||
|
||||
/* Okay to show that something is going on now */
|
||||
_fnProcessingDisplay( oSettings, true );
|
||||
|
||||
/* Calculate sizes for columns */
|
||||
if ( oSettings.oFeatures.bAutoWidth )
|
||||
{
|
||||
_fnCalculateColumnWidths( oSettings );
|
||||
}
|
||||
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].sWidth !== null )
|
||||
{
|
||||
oSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is default sorting required - let's do it. The sort function will do the
|
||||
* drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows
|
||||
* the table to look initialised for Ajax sourcing data (show 'loading' message possibly)
|
||||
*/
|
||||
if ( oSettings.oFeatures.bSort )
|
||||
{
|
||||
_fnSort( oSettings );
|
||||
}
|
||||
else if ( oSettings.oFeatures.bFilter )
|
||||
{
|
||||
_fnFilterComplete( oSettings, oSettings.oPreviousSearch );
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
}
|
||||
|
||||
/* if there is an ajax source load the data */
|
||||
if ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
var aoData = [];
|
||||
_fnServerParams( oSettings, aoData );
|
||||
oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData, function(json) {
|
||||
var aData = (oSettings.sAjaxDataProp !== "") ?
|
||||
_fnGetObjectDataFn( oSettings.sAjaxDataProp )(json) : json;
|
||||
|
||||
/* Got the data - add it to the table */
|
||||
for ( i=0 ; i<aData.length ; i++ )
|
||||
{
|
||||
_fnAddData( oSettings, aData[i] );
|
||||
}
|
||||
|
||||
/* Reset the init display for cookie saving. We've already done a filter, and
|
||||
* therefore cleared it before. So we need to make it appear 'fresh'
|
||||
*/
|
||||
oSettings.iInitDisplayStart = iAjaxStart;
|
||||
|
||||
if ( oSettings.oFeatures.bSort )
|
||||
{
|
||||
_fnSort( oSettings );
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
}
|
||||
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
_fnInitComplete( oSettings, json );
|
||||
}, oSettings );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Server-side processing initialisation complete is done at the end of _fnDraw */
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
_fnInitComplete( oSettings );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draw the table for the first time, adding all required features
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {object} [json] JSON from the server that completed the table, if using Ajax source
|
||||
* with client-side processing (optional)
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnInitComplete ( oSettings, json )
|
||||
{
|
||||
oSettings._bInitComplete = true;
|
||||
_fnCallbackFire( oSettings, 'aoInitComplete', 'init', [oSettings, json] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Language compatibility - when certain options are given, and others aren't, we
|
||||
* need to duplicate the values over, in order to provide backwards compatibility
|
||||
* with older language files.
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnLanguageCompat( oLanguage )
|
||||
{
|
||||
var oDefaults = DataTable.defaults.oLanguage;
|
||||
|
||||
/* Backwards compatibility - if there is no sEmptyTable given, then use the same as
|
||||
* sZeroRecords - assuming that is given.
|
||||
*/
|
||||
if ( !oLanguage.sEmptyTable && oLanguage.sZeroRecords &&
|
||||
oDefaults.sEmptyTable === "No data available in table" )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sEmptyTable' );
|
||||
}
|
||||
|
||||
/* Likewise with loading records */
|
||||
if ( !oLanguage.sLoadingRecords && oLanguage.sZeroRecords &&
|
||||
oDefaults.sLoadingRecords === "Loading..." )
|
||||
{
|
||||
_fnMap( oLanguage, oLanguage, 'sZeroRecords', 'sLoadingRecords' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Generate the node required for user display length changing
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {node} Display length feature node
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlLength ( oSettings )
|
||||
{
|
||||
if ( oSettings.oScroll.bInfinite )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/* This can be overruled by not using the _MENU_ var/macro in the language variable */
|
||||
var sName = 'name="'+oSettings.sTableId+'_length"';
|
||||
var sStdMenu = '<select size="1" '+sName+'>';
|
||||
var i, iLen;
|
||||
var aLengthMenu = oSettings.aLengthMenu;
|
||||
|
||||
if ( aLengthMenu.length == 2 && typeof aLengthMenu[0] === 'object' &&
|
||||
typeof aLengthMenu[1] === 'object' )
|
||||
{
|
||||
for ( i=0, iLen=aLengthMenu[0].length ; i<iLen ; i++ )
|
||||
{
|
||||
sStdMenu += '<option value="'+aLengthMenu[0][i]+'">'+aLengthMenu[1][i]+'</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( i=0, iLen=aLengthMenu.length ; i<iLen ; i++ )
|
||||
{
|
||||
sStdMenu += '<option value="'+aLengthMenu[i]+'">'+aLengthMenu[i]+'</option>';
|
||||
}
|
||||
}
|
||||
sStdMenu += '</select>';
|
||||
|
||||
var nLength = document.createElement( 'div' );
|
||||
if ( !oSettings.aanFeatures.l )
|
||||
{
|
||||
nLength.id = oSettings.sTableId+'_length';
|
||||
}
|
||||
nLength.className = oSettings.oClasses.sLength;
|
||||
nLength.innerHTML = '<label>'+oSettings.oLanguage.sLengthMenu.replace( '_MENU_', sStdMenu )+'</label>';
|
||||
|
||||
/*
|
||||
* Set the length to the current display length - thanks to Andrea Pavlovic for this fix,
|
||||
* and Stefan Skopnik for fixing the fix!
|
||||
*/
|
||||
$('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true);
|
||||
|
||||
$('select', nLength).bind( 'change.DT', function(e) {
|
||||
var iVal = $(this).val();
|
||||
|
||||
/* Update all other length options for the new display */
|
||||
var n = oSettings.aanFeatures.l;
|
||||
for ( i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( n[i] != this.parentNode )
|
||||
{
|
||||
$('select', n[i]).val( iVal );
|
||||
}
|
||||
}
|
||||
|
||||
/* Redraw the table */
|
||||
oSettings._iDisplayLength = parseInt(iVal, 10);
|
||||
_fnCalculateEnd( oSettings );
|
||||
|
||||
/* If we have space to show extra rows (backing up from the end point - then do so */
|
||||
if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
|
||||
{
|
||||
oSettings._iDisplayStart = oSettings.fnDisplayEnd() - oSettings._iDisplayLength;
|
||||
if ( oSettings._iDisplayStart < 0 )
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( oSettings._iDisplayLength == -1 )
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
|
||||
_fnDraw( oSettings );
|
||||
} );
|
||||
|
||||
|
||||
$('select', nLength).attr('aria-controls', oSettings.sTableId);
|
||||
|
||||
return nLength;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recalculate the end point based on the start point
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnCalculateEnd( oSettings )
|
||||
{
|
||||
if ( oSettings.oFeatures.bPaginate === false )
|
||||
{
|
||||
oSettings._iDisplayEnd = oSettings.aiDisplay.length;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set the end point of the display - based on how many elements there are
|
||||
* still to display
|
||||
*/
|
||||
if ( oSettings._iDisplayStart + oSettings._iDisplayLength > oSettings.aiDisplay.length ||
|
||||
oSettings._iDisplayLength == -1 )
|
||||
{
|
||||
oSettings._iDisplayEnd = oSettings.aiDisplay.length;
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings._iDisplayEnd = oSettings._iDisplayStart + oSettings._iDisplayLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Note that most of the paging logic is done in
|
||||
* DataTable.ext.oPagination
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generate the node required for default pagination
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {node} Pagination feature node
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlPaginate ( oSettings )
|
||||
{
|
||||
if ( oSettings.oScroll.bInfinite )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var nPaginate = document.createElement( 'div' );
|
||||
nPaginate.className = oSettings.oClasses.sPaging+oSettings.sPaginationType;
|
||||
|
||||
DataTable.ext.oPagination[ oSettings.sPaginationType ].fnInit( oSettings, nPaginate,
|
||||
function( oSettings ) {
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
}
|
||||
);
|
||||
|
||||
/* Add a draw callback for the pagination on first instance, to update the paging display */
|
||||
if ( !oSettings.aanFeatures.p )
|
||||
{
|
||||
oSettings.aoDrawCallback.push( {
|
||||
"fn": function( oSettings ) {
|
||||
DataTable.ext.oPagination[ oSettings.sPaginationType ].fnUpdate( oSettings, function( oSettings ) {
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
} );
|
||||
},
|
||||
"sName": "pagination"
|
||||
} );
|
||||
}
|
||||
return nPaginate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alter the display settings to change the page
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
|
||||
* or page number to jump to (integer)
|
||||
* @returns {bool} true page has changed, false - no change (no effect) eg 'first' on page 1
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnPageChange ( oSettings, mAction )
|
||||
{
|
||||
var iOldStart = oSettings._iDisplayStart;
|
||||
|
||||
if ( typeof mAction === "number" )
|
||||
{
|
||||
oSettings._iDisplayStart = mAction * oSettings._iDisplayLength;
|
||||
if ( oSettings._iDisplayStart > oSettings.fnRecordsDisplay() )
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
}
|
||||
else if ( mAction == "first" )
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
else if ( mAction == "previous" )
|
||||
{
|
||||
oSettings._iDisplayStart = oSettings._iDisplayLength>=0 ?
|
||||
oSettings._iDisplayStart - oSettings._iDisplayLength :
|
||||
0;
|
||||
|
||||
/* Correct for under-run */
|
||||
if ( oSettings._iDisplayStart < 0 )
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
}
|
||||
else if ( mAction == "next" )
|
||||
{
|
||||
if ( oSettings._iDisplayLength >= 0 )
|
||||
{
|
||||
/* Make sure we are not over running the display array */
|
||||
if ( oSettings._iDisplayStart + oSettings._iDisplayLength < oSettings.fnRecordsDisplay() )
|
||||
{
|
||||
oSettings._iDisplayStart += oSettings._iDisplayLength;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
}
|
||||
else if ( mAction == "last" )
|
||||
{
|
||||
if ( oSettings._iDisplayLength >= 0 )
|
||||
{
|
||||
var iPages = parseInt( (oSettings.fnRecordsDisplay()-1) / oSettings._iDisplayLength, 10 ) + 1;
|
||||
oSettings._iDisplayStart = (iPages-1) * oSettings._iDisplayLength;
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings._iDisplayStart = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_fnLog( oSettings, 0, "Unknown paging action: "+mAction );
|
||||
}
|
||||
$(oSettings.oInstance).trigger('page', oSettings);
|
||||
|
||||
return iOldStart != oSettings._iDisplayStart;
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Generate the node required for the processing node
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {node} Processing element
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlProcessing ( oSettings )
|
||||
{
|
||||
var nProcessing = document.createElement( 'div' );
|
||||
|
||||
if ( !oSettings.aanFeatures.r )
|
||||
{
|
||||
nProcessing.id = oSettings.sTableId+'_processing';
|
||||
}
|
||||
nProcessing.innerHTML = oSettings.oLanguage.sProcessing;
|
||||
nProcessing.className = oSettings.oClasses.sProcessing;
|
||||
oSettings.nTable.parentNode.insertBefore( nProcessing, oSettings.nTable );
|
||||
|
||||
return nProcessing;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display or hide the processing indicator
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {bool} bShow Show the processing indicator (true) or not (false)
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnProcessingDisplay ( oSettings, bShow )
|
||||
{
|
||||
if ( oSettings.oFeatures.bProcessing )
|
||||
{
|
||||
var an = oSettings.aanFeatures.r;
|
||||
for ( var i=0, iLen=an.length ; i<iLen ; i++ )
|
||||
{
|
||||
an[i].style.visibility = bShow ? "visible" : "hidden";
|
||||
}
|
||||
}
|
||||
|
||||
$(oSettings.oInstance).trigger('processing', [oSettings, bShow]);
|
||||
}
|
||||
|
||||
@@ -1,495 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Add any control elements for the table - specifically scrolling
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @returns {node} Node to add to the DOM
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnFeatureHtmlTable ( oSettings )
|
||||
{
|
||||
/* Check if scrolling is enabled or not - if not then leave the DOM unaltered */
|
||||
if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
|
||||
{
|
||||
return oSettings.nTable;
|
||||
}
|
||||
|
||||
/*
|
||||
* The HTML structure that we want to generate in this function is:
|
||||
* div - nScroller
|
||||
* div - nScrollHead
|
||||
* div - nScrollHeadInner
|
||||
* table - nScrollHeadTable
|
||||
* thead - nThead
|
||||
* div - nScrollBody
|
||||
* table - oSettings.nTable
|
||||
* thead - nTheadSize
|
||||
* tbody - nTbody
|
||||
* div - nScrollFoot
|
||||
* div - nScrollFootInner
|
||||
* table - nScrollFootTable
|
||||
* tfoot - nTfoot
|
||||
*/
|
||||
var
|
||||
nScroller = document.createElement('div'),
|
||||
nScrollHead = document.createElement('div'),
|
||||
nScrollHeadInner = document.createElement('div'),
|
||||
nScrollBody = document.createElement('div'),
|
||||
nScrollFoot = document.createElement('div'),
|
||||
nScrollFootInner = document.createElement('div'),
|
||||
nScrollHeadTable = oSettings.nTable.cloneNode(false),
|
||||
nScrollFootTable = oSettings.nTable.cloneNode(false),
|
||||
nThead = oSettings.nTable.getElementsByTagName('thead')[0],
|
||||
nTfoot = oSettings.nTable.getElementsByTagName('tfoot').length === 0 ? null :
|
||||
oSettings.nTable.getElementsByTagName('tfoot')[0],
|
||||
oClasses = oSettings.oClasses;
|
||||
|
||||
nScrollHead.appendChild( nScrollHeadInner );
|
||||
nScrollFoot.appendChild( nScrollFootInner );
|
||||
nScrollBody.appendChild( oSettings.nTable );
|
||||
nScroller.appendChild( nScrollHead );
|
||||
nScroller.appendChild( nScrollBody );
|
||||
nScrollHeadInner.appendChild( nScrollHeadTable );
|
||||
nScrollHeadTable.appendChild( nThead );
|
||||
if ( nTfoot !== null )
|
||||
{
|
||||
nScroller.appendChild( nScrollFoot );
|
||||
nScrollFootInner.appendChild( nScrollFootTable );
|
||||
nScrollFootTable.appendChild( nTfoot );
|
||||
}
|
||||
|
||||
nScroller.className = oClasses.sScrollWrapper;
|
||||
nScrollHead.className = oClasses.sScrollHead;
|
||||
nScrollHeadInner.className = oClasses.sScrollHeadInner;
|
||||
nScrollBody.className = oClasses.sScrollBody;
|
||||
nScrollFoot.className = oClasses.sScrollFoot;
|
||||
nScrollFootInner.className = oClasses.sScrollFootInner;
|
||||
|
||||
if ( oSettings.oScroll.bAutoCss )
|
||||
{
|
||||
nScrollHead.style.overflow = "hidden";
|
||||
nScrollHead.style.position = "relative";
|
||||
nScrollFoot.style.overflow = "hidden";
|
||||
nScrollBody.style.overflow = "auto";
|
||||
}
|
||||
|
||||
nScrollHead.style.border = "0";
|
||||
nScrollHead.style.width = "100%";
|
||||
nScrollFoot.style.border = "0";
|
||||
nScrollHeadInner.style.width = oSettings.oScroll.sXInner !== "" ?
|
||||
oSettings.oScroll.sXInner : "100%"; /* will be overwritten */
|
||||
|
||||
/* Modify attributes to respect the clones */
|
||||
nScrollHeadTable.removeAttribute('id');
|
||||
nScrollHeadTable.style.marginLeft = "0";
|
||||
oSettings.nTable.style.marginLeft = "0";
|
||||
if ( nTfoot !== null )
|
||||
{
|
||||
nScrollFootTable.removeAttribute('id');
|
||||
nScrollFootTable.style.marginLeft = "0";
|
||||
}
|
||||
|
||||
/* Move caption elements from the body to the header, footer or leave where it is
|
||||
* depending on the configuration. Note that the DTD says there can be only one caption */
|
||||
var nCaption = $(oSettings.nTable).children('caption');
|
||||
if ( nCaption.length > 0 )
|
||||
{
|
||||
nCaption = nCaption[0];
|
||||
if ( nCaption._captionSide === "top" )
|
||||
{
|
||||
nScrollHeadTable.appendChild( nCaption );
|
||||
}
|
||||
else if ( nCaption._captionSide === "bottom" && nTfoot )
|
||||
{
|
||||
nScrollFootTable.appendChild( nCaption );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sizing
|
||||
*/
|
||||
/* When x-scrolling add the width and a scroller to move the header with the body */
|
||||
if ( oSettings.oScroll.sX !== "" )
|
||||
{
|
||||
nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX );
|
||||
nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX );
|
||||
|
||||
if ( nTfoot !== null )
|
||||
{
|
||||
nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX );
|
||||
}
|
||||
|
||||
/* When the body is scrolled, then we also want to scroll the headers */
|
||||
$(nScrollBody).scroll( function (e) {
|
||||
nScrollHead.scrollLeft = this.scrollLeft;
|
||||
|
||||
if ( nTfoot !== null )
|
||||
{
|
||||
nScrollFoot.scrollLeft = this.scrollLeft;
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/* When yscrolling, add the height */
|
||||
if ( oSettings.oScroll.sY !== "" )
|
||||
{
|
||||
nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY );
|
||||
}
|
||||
|
||||
/* Redraw - align columns across the tables */
|
||||
oSettings.aoDrawCallback.push( {
|
||||
"fn": _fnScrollDraw,
|
||||
"sName": "scrolling"
|
||||
} );
|
||||
|
||||
/* Infinite scrolling event handlers */
|
||||
if ( oSettings.oScroll.bInfinite )
|
||||
{
|
||||
$(nScrollBody).scroll( function() {
|
||||
/* Use a blocker to stop scrolling from loading more data while other data is still loading */
|
||||
if ( !oSettings.bDrawing && $(this).scrollTop() !== 0 )
|
||||
{
|
||||
/* Check if we should load the next data set */
|
||||
if ( $(this).scrollTop() + $(this).height() >
|
||||
$(oSettings.nTable).height() - oSettings.oScroll.iLoadGap )
|
||||
{
|
||||
/* Only do the redraw if we have to - we might be at the end of the data */
|
||||
if ( oSettings.fnDisplayEnd() < oSettings.fnRecordsDisplay() )
|
||||
{
|
||||
_fnPageChange( oSettings, 'next' );
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
oSettings.nScrollHead = nScrollHead;
|
||||
oSettings.nScrollFoot = nScrollFoot;
|
||||
|
||||
return nScroller;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the various tables for resizing. It's a bit of a pig this function, but
|
||||
* basically the idea to:
|
||||
* 1. Re-create the table inside the scrolling div
|
||||
* 2. Take live measurements from the DOM
|
||||
* 3. Apply the measurements
|
||||
* 4. Clean up
|
||||
* @param {object} o dataTables settings object
|
||||
* @returns {node} Node to add to the DOM
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnScrollDraw ( o )
|
||||
{
|
||||
var
|
||||
nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
|
||||
nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],
|
||||
nScrollBody = o.nTable.parentNode,
|
||||
i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis,
|
||||
nTheadSize, nTfootSize,
|
||||
iWidth, aApplied=[], iSanityWidth,
|
||||
nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
|
||||
nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
|
||||
ie67 = o.oBrowser.bScrollOversize;
|
||||
|
||||
/*
|
||||
* 1. Re-create the table inside the scrolling div
|
||||
*/
|
||||
|
||||
/* Remove the old minimised thead and tfoot elements in the inner table */
|
||||
$(o.nTable).children('thead, tfoot').remove();
|
||||
|
||||
/* Clone the current header and footer elements and then place it into the inner table */
|
||||
nTheadSize = $(o.nTHead).clone()[0];
|
||||
o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
nTfootSize = $(o.nTFoot).clone()[0];
|
||||
o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
|
||||
}
|
||||
|
||||
/*
|
||||
* 2. Take live measurements from the DOM - do not alter the DOM itself!
|
||||
*/
|
||||
|
||||
/* Remove old sizing and apply the calculated column widths
|
||||
* Get the unique column headers in the newly created (cloned) header. We want to apply the
|
||||
* calculated sizes to this header
|
||||
*/
|
||||
if ( o.oScroll.sX === "" )
|
||||
{
|
||||
nScrollBody.style.width = '100%';
|
||||
nScrollHeadInner.parentNode.style.width = '100%';
|
||||
}
|
||||
|
||||
var nThs = _fnGetUniqueThs( o, nTheadSize );
|
||||
for ( i=0, iLen=nThs.length ; i<iLen ; i++ )
|
||||
{
|
||||
iVis = _fnVisibleToColumnIndex( o, i );
|
||||
nThs[i].style.width = o.aoColumns[iVis].sWidth;
|
||||
}
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
_fnApplyToChildren( function(n) {
|
||||
n.style.width = "";
|
||||
}, nTfootSize.getElementsByTagName('tr') );
|
||||
}
|
||||
|
||||
// If scroll collapse is enabled, when we put the headers back into the body for sizing, we
|
||||
// will end up forcing the scrollbar to appear, making our measurements wrong for when we
|
||||
// then hide it (end of this function), so add the header height to the body scroller.
|
||||
if ( o.oScroll.bCollapse && o.oScroll.sY !== "" )
|
||||
{
|
||||
nScrollBody.style.height = (nScrollBody.offsetHeight + o.nTHead.offsetHeight)+"px";
|
||||
}
|
||||
|
||||
/* Size the table as a whole */
|
||||
iSanityWidth = $(o.nTable).outerWidth();
|
||||
if ( o.oScroll.sX === "" )
|
||||
{
|
||||
/* No x scrolling */
|
||||
o.nTable.style.width = "100%";
|
||||
|
||||
/* I know this is rubbish - but IE7 will make the width of the table when 100% include
|
||||
* the scrollbar - which is shouldn't. When there is a scrollbar we need to take this
|
||||
* into account.
|
||||
*/
|
||||
if ( ie67 && ($('tbody', nScrollBody).height() > nScrollBody.offsetHeight ||
|
||||
$(nScrollBody).css('overflow-y') == "scroll") )
|
||||
{
|
||||
o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() - o.oScroll.iBarWidth);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( o.oScroll.sXInner !== "" )
|
||||
{
|
||||
/* x scroll inner has been given - use it */
|
||||
o.nTable.style.width = _fnStringToCss(o.oScroll.sXInner);
|
||||
}
|
||||
else if ( iSanityWidth == $(nScrollBody).width() &&
|
||||
$(nScrollBody).height() < $(o.nTable).height() )
|
||||
{
|
||||
/* There is y-scrolling - try to take account of the y scroll bar */
|
||||
o.nTable.style.width = _fnStringToCss( iSanityWidth-o.oScroll.iBarWidth );
|
||||
if ( $(o.nTable).outerWidth() > iSanityWidth-o.oScroll.iBarWidth )
|
||||
{
|
||||
/* Not possible to take account of it */
|
||||
o.nTable.style.width = _fnStringToCss( iSanityWidth );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* All else fails */
|
||||
o.nTable.style.width = _fnStringToCss( iSanityWidth );
|
||||
}
|
||||
}
|
||||
|
||||
/* Recalculate the sanity width - now that we've applied the required width, before it was
|
||||
* a temporary variable. This is required because the column width calculation is done
|
||||
* before this table DOM is created.
|
||||
*/
|
||||
iSanityWidth = $(o.nTable).outerWidth();
|
||||
|
||||
/* We want the hidden header to have zero height, so remove padding and borders. Then
|
||||
* set the width based on the real headers
|
||||
*/
|
||||
anHeadToSize = o.nTHead.getElementsByTagName('tr');
|
||||
anHeadSizers = nTheadSize.getElementsByTagName('tr');
|
||||
|
||||
_fnApplyToChildren( function(nSizer, nToSize) {
|
||||
oStyle = nSizer.style;
|
||||
oStyle.paddingTop = "0";
|
||||
oStyle.paddingBottom = "0";
|
||||
oStyle.borderTopWidth = "0";
|
||||
oStyle.borderBottomWidth = "0";
|
||||
oStyle.height = 0;
|
||||
|
||||
iWidth = $(nSizer).width();
|
||||
nToSize.style.width = _fnStringToCss( iWidth );
|
||||
aApplied.push( iWidth );
|
||||
}, anHeadSizers, anHeadToSize );
|
||||
$(anHeadSizers).height(0);
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
/* Clone the current footer and then place it into the body table as a "hidden header" */
|
||||
anFootSizers = nTfootSize.getElementsByTagName('tr');
|
||||
anFootToSize = o.nTFoot.getElementsByTagName('tr');
|
||||
|
||||
_fnApplyToChildren( function(nSizer, nToSize) {
|
||||
oStyle = nSizer.style;
|
||||
oStyle.paddingTop = "0";
|
||||
oStyle.paddingBottom = "0";
|
||||
oStyle.borderTopWidth = "0";
|
||||
oStyle.borderBottomWidth = "0";
|
||||
oStyle.height = 0;
|
||||
|
||||
iWidth = $(nSizer).width();
|
||||
nToSize.style.width = _fnStringToCss( iWidth );
|
||||
aApplied.push( iWidth );
|
||||
}, anFootSizers, anFootToSize );
|
||||
$(anFootSizers).height(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* 3. Apply the measurements
|
||||
*/
|
||||
|
||||
/* "Hide" the header and footer that we used for the sizing. We want to also fix their width
|
||||
* to what they currently are
|
||||
*/
|
||||
_fnApplyToChildren( function(nSizer) {
|
||||
nSizer.innerHTML = "";
|
||||
nSizer.style.width = _fnStringToCss( aApplied.shift() );
|
||||
}, anHeadSizers );
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
_fnApplyToChildren( function(nSizer) {
|
||||
nSizer.innerHTML = "";
|
||||
nSizer.style.width = _fnStringToCss( aApplied.shift() );
|
||||
}, anFootSizers );
|
||||
}
|
||||
|
||||
/* Sanity check that the table is of a sensible width. If not then we are going to get
|
||||
* misalignment - try to prevent this by not allowing the table to shrink below its min width
|
||||
*/
|
||||
if ( $(o.nTable).outerWidth() < iSanityWidth )
|
||||
{
|
||||
/* The min width depends upon if we have a vertical scrollbar visible or not */
|
||||
var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight ||
|
||||
$(nScrollBody).css('overflow-y') == "scroll")) ?
|
||||
iSanityWidth+o.oScroll.iBarWidth : iSanityWidth;
|
||||
|
||||
/* IE6/7 are a law unto themselves... */
|
||||
if ( ie67 && (nScrollBody.scrollHeight >
|
||||
nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") )
|
||||
{
|
||||
o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth );
|
||||
}
|
||||
|
||||
/* Apply the calculated minimum width to the table wrappers */
|
||||
nScrollBody.style.width = _fnStringToCss( iCorrection );
|
||||
nScrollHeadInner.parentNode.style.width = _fnStringToCss( iCorrection );
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
nScrollFootInner.parentNode.style.width = _fnStringToCss( iCorrection );
|
||||
}
|
||||
|
||||
/* And give the user a warning that we've stopped the table getting too small */
|
||||
if ( o.oScroll.sX === "" )
|
||||
{
|
||||
_fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
|
||||
" misalignment. The table has been drawn at its minimum possible width." );
|
||||
}
|
||||
else if ( o.oScroll.sXInner !== "" )
|
||||
{
|
||||
_fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
|
||||
" misalignment. Increase the sScrollXInner value or remove it to allow automatic"+
|
||||
" calculation" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nScrollBody.style.width = _fnStringToCss( '100%' );
|
||||
nScrollHeadInner.parentNode.style.width = _fnStringToCss( '100%' );
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
nScrollFootInner.parentNode.style.width = _fnStringToCss( '100%' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 4. Clean up
|
||||
*/
|
||||
if ( o.oScroll.sY === "" )
|
||||
{
|
||||
/* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
|
||||
* the scrollbar height from the visible display, rather than adding it on. We need to
|
||||
* set the height in order to sort this. Don't want to do it in any other browsers.
|
||||
*/
|
||||
if ( ie67 )
|
||||
{
|
||||
nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth );
|
||||
}
|
||||
}
|
||||
|
||||
if ( o.oScroll.sY !== "" && o.oScroll.bCollapse )
|
||||
{
|
||||
nScrollBody.style.height = _fnStringToCss( o.oScroll.sY );
|
||||
|
||||
var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ?
|
||||
o.oScroll.iBarWidth : 0;
|
||||
if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
|
||||
{
|
||||
nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+iExtra );
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally set the width's of the header and footer tables */
|
||||
var iOuterWidth = $(o.nTable).outerWidth();
|
||||
nScrollHeadTable.style.width = _fnStringToCss( iOuterWidth );
|
||||
nScrollHeadInner.style.width = _fnStringToCss( iOuterWidth );
|
||||
|
||||
// Figure out if there are scrollbar present - if so then we need a the header and footer to
|
||||
// provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
|
||||
var bScrolling = $(o.nTable).height() > nScrollBody.clientHeight || $(nScrollBody).css('overflow-y') == "scroll";
|
||||
nScrollHeadInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
|
||||
|
||||
if ( o.nTFoot !== null )
|
||||
{
|
||||
nScrollFootTable.style.width = _fnStringToCss( iOuterWidth );
|
||||
nScrollFootInner.style.width = _fnStringToCss( iOuterWidth );
|
||||
nScrollFootInner.style.paddingRight = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
|
||||
}
|
||||
|
||||
/* Adjust the position of the header in case we loose the y-scrollbar */
|
||||
$(nScrollBody).scroll();
|
||||
|
||||
/* If sorting or filtering has occurred, jump the scrolling back to the top */
|
||||
if ( o.bSorted || o.bFiltered )
|
||||
{
|
||||
nScrollBody.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Apply a given function to the display child nodes of an element array (typically
|
||||
* TD children of TR rows
|
||||
* @param {function} fn Method to apply to the objects
|
||||
* @param array {nodes} an1 List of elements to look through for display children
|
||||
* @param array {nodes} an2 Another list (identical structure to the first) - optional
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnApplyToChildren( fn, an1, an2 )
|
||||
{
|
||||
for ( var i=0, iLen=an1.length ; i<iLen ; i++ )
|
||||
{
|
||||
for ( var j=0, jLen=an1[i].childNodes.length ; j<jLen ; j++ )
|
||||
{
|
||||
if ( an1[i].childNodes[j].nodeType == 1 )
|
||||
{
|
||||
if ( an2 )
|
||||
{
|
||||
fn( an1[i].childNodes[j], an2[i].childNodes[j] );
|
||||
}
|
||||
else
|
||||
{
|
||||
fn( an1[i].childNodes[j] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,405 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Convert a CSS unit width to pixels (e.g. 2em)
|
||||
* @param {string} sWidth width to be converted
|
||||
* @param {node} nParent parent to get the with for (required for relative widths) - optional
|
||||
* @returns {int} iWidth width in pixels
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnConvertToWidth ( sWidth, nParent )
|
||||
{
|
||||
if ( !sWidth || sWidth === null || sWidth === '' )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( !nParent )
|
||||
{
|
||||
nParent = document.getElementsByTagName('body')[0];
|
||||
}
|
||||
|
||||
var iWidth;
|
||||
var nTmp = document.createElement( "div" );
|
||||
nTmp.style.width = _fnStringToCss( sWidth );
|
||||
|
||||
nParent.appendChild( nTmp );
|
||||
iWidth = nTmp.offsetWidth;
|
||||
nParent.removeChild( nTmp );
|
||||
|
||||
return ( iWidth );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculate the width of columns for the table
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnCalculateColumnWidths ( oSettings )
|
||||
{
|
||||
var iTableWidth = oSettings.nTable.offsetWidth;
|
||||
var iUserInputs = 0;
|
||||
var iTmpWidth;
|
||||
var iVisibleColumns = 0;
|
||||
var iColums = oSettings.aoColumns.length;
|
||||
var i, iIndex, iCorrector, iWidth;
|
||||
var oHeaders = $('th', oSettings.nTHead);
|
||||
var widthAttr = oSettings.nTable.getAttribute('width');
|
||||
|
||||
/* Convert any user input sizes into pixel sizes */
|
||||
for ( i=0 ; i<iColums ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bVisible )
|
||||
{
|
||||
iVisibleColumns++;
|
||||
|
||||
if ( oSettings.aoColumns[i].sWidth !== null )
|
||||
{
|
||||
iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig,
|
||||
oSettings.nTable.parentNode );
|
||||
if ( iTmpWidth !== null )
|
||||
{
|
||||
oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
|
||||
}
|
||||
|
||||
iUserInputs++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If the number of columns in the DOM equals the number that we have to process in
|
||||
* DataTables, then we can use the offsets that are created by the web-browser. No custom
|
||||
* sizes can be set in order for this to happen, nor scrolling used
|
||||
*/
|
||||
if ( iColums == oHeaders.length && iUserInputs === 0 && iVisibleColumns == iColums &&
|
||||
oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
|
||||
{
|
||||
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
|
||||
{
|
||||
iTmpWidth = $(oHeaders[i]).width();
|
||||
if ( iTmpWidth !== null )
|
||||
{
|
||||
oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise we are going to have to do some calculations to get the width of each column.
|
||||
* Construct a 1 row table with the widest node in the data, and any user defined widths,
|
||||
* then insert it into the DOM and allow the browser to do all the hard work of
|
||||
* calculating table widths.
|
||||
*/
|
||||
var
|
||||
nCalcTmp = oSettings.nTable.cloneNode( false ),
|
||||
nTheadClone = oSettings.nTHead.cloneNode(true),
|
||||
nBody = document.createElement( 'tbody' ),
|
||||
nTr = document.createElement( 'tr' ),
|
||||
nDivSizing;
|
||||
|
||||
nCalcTmp.removeAttribute( "id" );
|
||||
nCalcTmp.appendChild( nTheadClone );
|
||||
if ( oSettings.nTFoot !== null )
|
||||
{
|
||||
nCalcTmp.appendChild( oSettings.nTFoot.cloneNode(true) );
|
||||
_fnApplyToChildren( function(n) {
|
||||
n.style.width = "";
|
||||
}, nCalcTmp.getElementsByTagName('tr') );
|
||||
}
|
||||
|
||||
nCalcTmp.appendChild( nBody );
|
||||
nBody.appendChild( nTr );
|
||||
|
||||
/* Remove any sizing that was previously applied by the styles */
|
||||
var jqColSizing = $('thead th', nCalcTmp);
|
||||
if ( jqColSizing.length === 0 )
|
||||
{
|
||||
jqColSizing = $('tbody tr:eq(0)>td', nCalcTmp);
|
||||
}
|
||||
|
||||
/* Apply custom sizing to the cloned header */
|
||||
var nThs = _fnGetUniqueThs( oSettings, nTheadClone );
|
||||
iCorrector = 0;
|
||||
for ( i=0 ; i<iColums ; i++ )
|
||||
{
|
||||
var oColumn = oSettings.aoColumns[i];
|
||||
if ( oColumn.bVisible && oColumn.sWidthOrig !== null && oColumn.sWidthOrig !== "" )
|
||||
{
|
||||
nThs[i-iCorrector].style.width = _fnStringToCss( oColumn.sWidthOrig );
|
||||
}
|
||||
else if ( oColumn.bVisible )
|
||||
{
|
||||
nThs[i-iCorrector].style.width = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
iCorrector++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Find the biggest td for each column and put it into the table */
|
||||
for ( i=0 ; i<iColums ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bVisible )
|
||||
{
|
||||
var nTd = _fnGetWidestNode( oSettings, i );
|
||||
if ( nTd !== null )
|
||||
{
|
||||
nTd = nTd.cloneNode(true);
|
||||
if ( oSettings.aoColumns[i].sContentPadding !== "" )
|
||||
{
|
||||
nTd.innerHTML += oSettings.aoColumns[i].sContentPadding;
|
||||
}
|
||||
nTr.appendChild( nTd );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the table and 'display' it */
|
||||
var nWrapper = oSettings.nTable.parentNode;
|
||||
nWrapper.appendChild( nCalcTmp );
|
||||
|
||||
/* When scrolling (X or Y) we want to set the width of the table as appropriate. However,
|
||||
* when not scrolling leave the table width as it is. This results in slightly different,
|
||||
* but I think correct behaviour
|
||||
*/
|
||||
if ( oSettings.oScroll.sX !== "" && oSettings.oScroll.sXInner !== "" )
|
||||
{
|
||||
nCalcTmp.style.width = _fnStringToCss(oSettings.oScroll.sXInner);
|
||||
}
|
||||
else if ( oSettings.oScroll.sX !== "" )
|
||||
{
|
||||
nCalcTmp.style.width = "";
|
||||
if ( $(nCalcTmp).width() < nWrapper.offsetWidth )
|
||||
{
|
||||
nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
|
||||
}
|
||||
}
|
||||
else if ( oSettings.oScroll.sY !== "" )
|
||||
{
|
||||
nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
|
||||
}
|
||||
else if ( widthAttr )
|
||||
{
|
||||
nCalcTmp.style.width = _fnStringToCss( widthAttr );
|
||||
}
|
||||
nCalcTmp.style.visibility = "hidden";
|
||||
|
||||
/* Scrolling considerations */
|
||||
_fnScrollingWidthAdjust( oSettings, nCalcTmp );
|
||||
|
||||
/* Read the width's calculated by the browser and store them for use by the caller. We
|
||||
* first of all try to use the elements in the body, but it is possible that there are
|
||||
* no elements there, under which circumstances we use the header elements
|
||||
*/
|
||||
var oNodes = $("tbody tr:eq(0)", nCalcTmp).children();
|
||||
if ( oNodes.length === 0 )
|
||||
{
|
||||
oNodes = _fnGetUniqueThs( oSettings, $('thead', nCalcTmp)[0] );
|
||||
}
|
||||
|
||||
/* Browsers need a bit of a hand when a width is assigned to any columns when
|
||||
* x-scrolling as they tend to collapse the table to the min-width, even if
|
||||
* we sent the column widths. So we need to keep track of what the table width
|
||||
* should be by summing the user given values, and the automatic values
|
||||
*/
|
||||
if ( oSettings.oScroll.sX !== "" )
|
||||
{
|
||||
var iTotal = 0;
|
||||
iCorrector = 0;
|
||||
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bVisible )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].sWidthOrig === null )
|
||||
{
|
||||
iTotal += $(oNodes[iCorrector]).outerWidth();
|
||||
}
|
||||
else
|
||||
{
|
||||
iTotal += parseInt(oSettings.aoColumns[i].sWidth.replace('px',''), 10) +
|
||||
($(oNodes[iCorrector]).outerWidth() - $(oNodes[iCorrector]).width());
|
||||
}
|
||||
iCorrector++;
|
||||
}
|
||||
}
|
||||
|
||||
nCalcTmp.style.width = _fnStringToCss( iTotal );
|
||||
oSettings.nTable.style.width = _fnStringToCss( iTotal );
|
||||
}
|
||||
|
||||
iCorrector = 0;
|
||||
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bVisible )
|
||||
{
|
||||
iWidth = $(oNodes[iCorrector]).width();
|
||||
if ( iWidth !== null && iWidth > 0 )
|
||||
{
|
||||
oSettings.aoColumns[i].sWidth = _fnStringToCss( iWidth );
|
||||
}
|
||||
iCorrector++;
|
||||
}
|
||||
}
|
||||
|
||||
var cssWidth = $(nCalcTmp).css('width');
|
||||
oSettings.nTable.style.width = (cssWidth.indexOf('%') !== -1) ?
|
||||
cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() );
|
||||
nCalcTmp.parentNode.removeChild( nCalcTmp );
|
||||
}
|
||||
|
||||
if ( widthAttr )
|
||||
{
|
||||
oSettings.nTable.style.width = _fnStringToCss( widthAttr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adjust a table's width to take account of scrolling
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {node} n table node
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnScrollingWidthAdjust ( oSettings, n )
|
||||
{
|
||||
if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" )
|
||||
{
|
||||
/* When y-scrolling only, we want to remove the width of the scroll bar so the table
|
||||
* + scroll bar will fit into the area avaialble.
|
||||
*/
|
||||
var iOrigWidth = $(n).width();
|
||||
n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth );
|
||||
}
|
||||
else if ( oSettings.oScroll.sX !== "" )
|
||||
{
|
||||
/* When x-scrolling both ways, fix the table at it's current size, without adjusting */
|
||||
n.style.width = _fnStringToCss( $(n).outerWidth() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the widest node
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {int} iCol column of interest
|
||||
* @returns {string} max string length for each column
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnGetWidestNode( oSettings, iCol )
|
||||
{
|
||||
var iMaxIndex = _fnGetMaxLenString( oSettings, iCol );
|
||||
if ( iMaxIndex < 0 )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( oSettings.aoData[iMaxIndex].nTr === null )
|
||||
{
|
||||
var n = document.createElement('td');
|
||||
n.innerHTML = _fnGetCellData( oSettings, iMaxIndex, iCol, '' );
|
||||
return n;
|
||||
}
|
||||
return _fnGetTdNodes(oSettings, iMaxIndex)[iCol];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the maximum strlen for each data column
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {int} iCol column of interest
|
||||
* @returns {string} max string length for each column
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnGetMaxLenString( oSettings, iCol )
|
||||
{
|
||||
var iMax = -1;
|
||||
var iMaxIndex = -1;
|
||||
|
||||
for ( var i=0 ; i<oSettings.aoData.length ; i++ )
|
||||
{
|
||||
var s = _fnGetCellData( oSettings, i, iCol, 'display' )+"";
|
||||
s = s.replace( /<.*?>/g, "" );
|
||||
if ( s.length > iMax )
|
||||
{
|
||||
iMax = s.length;
|
||||
iMaxIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
return iMaxIndex;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append a CSS unit (only if required) to a string
|
||||
* @param {array} aArray1 first array
|
||||
* @param {array} aArray2 second array
|
||||
* @returns {int} 0 if match, 1 if length is different, 2 if no match
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnStringToCss( s )
|
||||
{
|
||||
if ( s === null )
|
||||
{
|
||||
return "0px";
|
||||
}
|
||||
|
||||
if ( typeof s == 'number' )
|
||||
{
|
||||
if ( s < 0 )
|
||||
{
|
||||
return "0px";
|
||||
}
|
||||
return s+"px";
|
||||
}
|
||||
|
||||
/* Check if the last character is not 0-9 */
|
||||
var c = s.charCodeAt( s.length-1 );
|
||||
if (c < 0x30 || c > 0x39)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
return s+"px";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the width of a scroll bar in this browser being used
|
||||
* @returns {int} width in pixels
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnScrollBarWidth ()
|
||||
{
|
||||
var inner = document.createElement('p');
|
||||
var style = inner.style;
|
||||
style.width = "100%";
|
||||
style.height = "200px";
|
||||
style.padding = "0px";
|
||||
|
||||
var outer = document.createElement('div');
|
||||
style = outer.style;
|
||||
style.position = "absolute";
|
||||
style.top = "0px";
|
||||
style.left = "0px";
|
||||
style.visibility = "hidden";
|
||||
style.width = "200px";
|
||||
style.height = "150px";
|
||||
style.padding = "0px";
|
||||
style.overflow = "hidden";
|
||||
outer.appendChild(inner);
|
||||
|
||||
document.body.appendChild(outer);
|
||||
var w1 = inner.offsetWidth;
|
||||
outer.style.overflow = 'scroll';
|
||||
var w2 = inner.offsetWidth;
|
||||
if ( w1 == w2 )
|
||||
{
|
||||
w2 = outer.clientWidth;
|
||||
}
|
||||
|
||||
document.body.removeChild(outer);
|
||||
return (w1 - w2);
|
||||
}
|
||||
|
||||
@@ -1,460 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Change the order of the table
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {bool} bApplyClasses optional - should we apply classes or not
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnSort ( oSettings, bApplyClasses )
|
||||
{
|
||||
var
|
||||
i, iLen, j, jLen, k, kLen,
|
||||
sDataType, nTh,
|
||||
aaSort = [],
|
||||
aiOrig = [],
|
||||
oSort = DataTable.ext.oSort,
|
||||
aoData = oSettings.aoData,
|
||||
aoColumns = oSettings.aoColumns,
|
||||
oAria = oSettings.oLanguage.oAria;
|
||||
|
||||
/* No sorting required if server-side or no sorting array */
|
||||
if ( !oSettings.oFeatures.bServerSide &&
|
||||
(oSettings.aaSorting.length !== 0 || oSettings.aaSortingFixed !== null) )
|
||||
{
|
||||
aaSort = ( oSettings.aaSortingFixed !== null ) ?
|
||||
oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
|
||||
oSettings.aaSorting.slice();
|
||||
|
||||
/* If there is a sorting data type, and a function belonging to it, then we need to
|
||||
* get the data from the developer's function and apply it for this column
|
||||
*/
|
||||
for ( i=0 ; i<aaSort.length ; i++ )
|
||||
{
|
||||
var iColumn = aaSort[i][0];
|
||||
var iVisColumn = _fnColumnIndexToVisible( oSettings, iColumn );
|
||||
sDataType = oSettings.aoColumns[ iColumn ].sSortDataType;
|
||||
if ( DataTable.ext.afnSortData[sDataType] )
|
||||
{
|
||||
var aData = DataTable.ext.afnSortData[sDataType].call(
|
||||
oSettings.oInstance, oSettings, iColumn, iVisColumn
|
||||
);
|
||||
if ( aData.length === aoData.length )
|
||||
{
|
||||
for ( j=0, jLen=aoData.length ; j<jLen ; j++ )
|
||||
{
|
||||
_fnSetCellData( oSettings, j, iColumn, aData[j] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_fnLog( oSettings, 0, "Returned data sort array (col "+iColumn+") is the wrong length" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a value - key array of the current row positions such that we can use their
|
||||
* current position during the sort, if values match, in order to perform stable sorting
|
||||
*/
|
||||
for ( i=0, iLen=oSettings.aiDisplayMaster.length ; i<iLen ; i++ )
|
||||
{
|
||||
aiOrig[ oSettings.aiDisplayMaster[i] ] = i;
|
||||
}
|
||||
|
||||
/* Build an internal data array which is specific to the sort, so we can get and prep
|
||||
* the data to be sorted only once, rather than needing to do it every time the sorting
|
||||
* function runs. This make the sorting function a very simple comparison
|
||||
*/
|
||||
var iSortLen = aaSort.length;
|
||||
var fnSortFormat, aDataSort;
|
||||
for ( i=0, iLen=aoData.length ; i<iLen ; i++ )
|
||||
{
|
||||
for ( j=0 ; j<iSortLen ; j++ )
|
||||
{
|
||||
aDataSort = aoColumns[ aaSort[j][0] ].aDataSort;
|
||||
|
||||
for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
|
||||
{
|
||||
sDataType = aoColumns[ aDataSort[k] ].sType;
|
||||
fnSortFormat = oSort[ (sDataType ? sDataType : 'string')+"-pre" ];
|
||||
|
||||
aoData[i]._aSortData[ aDataSort[k] ] = fnSortFormat ?
|
||||
fnSortFormat( _fnGetCellData( oSettings, i, aDataSort[k], 'sort' ) ) :
|
||||
_fnGetCellData( oSettings, i, aDataSort[k], 'sort' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do the sort - here we want multi-column sorting based on a given data source (column)
|
||||
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
|
||||
* follow on it's own, but this is what we want (example two column sorting):
|
||||
* fnLocalSorting = function(a,b){
|
||||
* var iTest;
|
||||
* iTest = oSort['string-asc']('data11', 'data12');
|
||||
* if (iTest !== 0)
|
||||
* return iTest;
|
||||
* iTest = oSort['numeric-desc']('data21', 'data22');
|
||||
* if (iTest !== 0)
|
||||
* return iTest;
|
||||
* return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
||||
* }
|
||||
* Basically we have a test for each sorting column, if the data in that column is equal,
|
||||
* test the next column. If all columns match, then we use a numeric sort on the row
|
||||
* positions in the original data array to provide a stable sort.
|
||||
*/
|
||||
oSettings.aiDisplayMaster.sort( function ( a, b ) {
|
||||
var k, l, lLen, iTest, aDataSort, sDataType;
|
||||
for ( k=0 ; k<iSortLen ; k++ )
|
||||
{
|
||||
aDataSort = aoColumns[ aaSort[k][0] ].aDataSort;
|
||||
|
||||
for ( l=0, lLen=aDataSort.length ; l<lLen ; l++ )
|
||||
{
|
||||
sDataType = aoColumns[ aDataSort[l] ].sType;
|
||||
|
||||
iTest = oSort[ (sDataType ? sDataType : 'string')+"-"+aaSort[k][1] ](
|
||||
aoData[a]._aSortData[ aDataSort[l] ],
|
||||
aoData[b]._aSortData[ aDataSort[l] ]
|
||||
);
|
||||
|
||||
if ( iTest !== 0 )
|
||||
{
|
||||
return iTest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
||||
} );
|
||||
}
|
||||
|
||||
/* Alter the sorting classes to take account of the changes */
|
||||
if ( (bApplyClasses === undefined || bApplyClasses) && !oSettings.oFeatures.bDeferRender )
|
||||
{
|
||||
_fnSortingClasses( oSettings );
|
||||
}
|
||||
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
var sTitle = aoColumns[i].sTitle.replace( /<.*?>/g, "" );
|
||||
nTh = aoColumns[i].nTh;
|
||||
nTh.removeAttribute('aria-sort');
|
||||
nTh.removeAttribute('aria-label');
|
||||
|
||||
/* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
|
||||
if ( aoColumns[i].bSortable )
|
||||
{
|
||||
if ( aaSort.length > 0 && aaSort[0][0] == i )
|
||||
{
|
||||
nTh.setAttribute('aria-sort', aaSort[0][1]=="asc" ? "ascending" : "descending" );
|
||||
|
||||
var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ?
|
||||
aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0];
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', sTitle);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tell the draw function that we have sorted the data */
|
||||
oSettings.bSorted = true;
|
||||
$(oSettings.oInstance).trigger('sort', oSettings);
|
||||
|
||||
/* Copy the master data into the draw array and re-draw */
|
||||
if ( oSettings.oFeatures.bFilter )
|
||||
{
|
||||
/* _fnFilter() will redraw the table for us */
|
||||
_fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||
oSettings._iDisplayStart = 0; /* reset display back to page 0 */
|
||||
_fnCalculateEnd( oSettings );
|
||||
_fnDraw( oSettings );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Attach a sort handler (click) to a node
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @param {node} nNode node to attach the handler to
|
||||
* @param {int} iDataIndex column sorting index
|
||||
* @param {function} [fnCallback] callback function
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
|
||||
{
|
||||
_fnBindAction( nNode, {}, function (e) {
|
||||
/* If the column is not sortable - don't to anything */
|
||||
if ( oSettings.aoColumns[iDataIndex].bSortable === false )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a little bit odd I admit... I declare a temporary function inside the scope of
|
||||
* _fnBuildHead and the click handler in order that the code presented here can be used
|
||||
* twice - once for when bProcessing is enabled, and another time for when it is
|
||||
* disabled, as we need to perform slightly different actions.
|
||||
* Basically the issue here is that the Javascript engine in modern browsers don't
|
||||
* appear to allow the rendering engine to update the display while it is still executing
|
||||
* it's thread (well - it does but only after long intervals). This means that the
|
||||
* 'processing' display doesn't appear for a table sort. To break the js thread up a bit
|
||||
* I force an execution break by using setTimeout - but this breaks the expected
|
||||
* thread continuation for the end-developer's point of view (their code would execute
|
||||
* too early), so we only do it when we absolutely have to.
|
||||
*/
|
||||
var fnInnerSorting = function () {
|
||||
var iColumn, iNextSort;
|
||||
|
||||
/* If the shift key is pressed then we are multiple column sorting */
|
||||
if ( e.shiftKey )
|
||||
{
|
||||
/* Are we already doing some kind of sort on this column? */
|
||||
var bFound = false;
|
||||
for ( var i=0 ; i<oSettings.aaSorting.length ; i++ )
|
||||
{
|
||||
if ( oSettings.aaSorting[i][0] == iDataIndex )
|
||||
{
|
||||
bFound = true;
|
||||
iColumn = oSettings.aaSorting[i][0];
|
||||
iNextSort = oSettings.aaSorting[i][2]+1;
|
||||
|
||||
if ( !oSettings.aoColumns[iColumn].asSorting[iNextSort] )
|
||||
{
|
||||
/* Reached the end of the sorting options, remove from multi-col sort */
|
||||
oSettings.aaSorting.splice( i, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Move onto next sorting direction */
|
||||
oSettings.aaSorting[i][1] = oSettings.aoColumns[iColumn].asSorting[iNextSort];
|
||||
oSettings.aaSorting[i][2] = iNextSort;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* No sort yet - add it in */
|
||||
if ( bFound === false )
|
||||
{
|
||||
oSettings.aaSorting.push( [ iDataIndex,
|
||||
oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If no shift key then single column sort */
|
||||
if ( oSettings.aaSorting.length == 1 && oSettings.aaSorting[0][0] == iDataIndex )
|
||||
{
|
||||
iColumn = oSettings.aaSorting[0][0];
|
||||
iNextSort = oSettings.aaSorting[0][2]+1;
|
||||
if ( !oSettings.aoColumns[iColumn].asSorting[iNextSort] )
|
||||
{
|
||||
iNextSort = 0;
|
||||
}
|
||||
oSettings.aaSorting[0][1] = oSettings.aoColumns[iColumn].asSorting[iNextSort];
|
||||
oSettings.aaSorting[0][2] = iNextSort;
|
||||
}
|
||||
else
|
||||
{
|
||||
oSettings.aaSorting.splice( 0, oSettings.aaSorting.length );
|
||||
oSettings.aaSorting.push( [ iDataIndex,
|
||||
oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Run the sort */
|
||||
_fnSort( oSettings );
|
||||
}; /* /fnInnerSorting */
|
||||
|
||||
if ( !oSettings.oFeatures.bProcessing )
|
||||
{
|
||||
fnInnerSorting();
|
||||
}
|
||||
else
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, true );
|
||||
setTimeout( function() {
|
||||
fnInnerSorting();
|
||||
if ( !oSettings.oFeatures.bServerSide )
|
||||
{
|
||||
_fnProcessingDisplay( oSettings, false );
|
||||
}
|
||||
}, 0 );
|
||||
}
|
||||
|
||||
/* Call the user specified callback function - used for async user interaction */
|
||||
if ( typeof fnCallback == 'function' )
|
||||
{
|
||||
fnCallback( oSettings );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the sorting classes on the header, Note: it is safe to call this function
|
||||
* when bSort and bSortClasses are false
|
||||
* @param {object} oSettings dataTables settings object
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnSortingClasses( oSettings )
|
||||
{
|
||||
var i, iLen, j, jLen, iFound;
|
||||
var aaSort, sClass;
|
||||
var iColumns = oSettings.aoColumns.length;
|
||||
var oClasses = oSettings.oClasses;
|
||||
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bSortable )
|
||||
{
|
||||
$(oSettings.aoColumns[i].nTh).removeClass( oClasses.sSortAsc +" "+ oClasses.sSortDesc +
|
||||
" "+ oSettings.aoColumns[i].sSortingClass );
|
||||
}
|
||||
}
|
||||
|
||||
if ( oSettings.aaSortingFixed !== null )
|
||||
{
|
||||
aaSort = oSettings.aaSortingFixed.concat( oSettings.aaSorting );
|
||||
}
|
||||
else
|
||||
{
|
||||
aaSort = oSettings.aaSorting.slice();
|
||||
}
|
||||
|
||||
/* Apply the required classes to the header */
|
||||
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
|
||||
{
|
||||
if ( oSettings.aoColumns[i].bSortable )
|
||||
{
|
||||
sClass = oSettings.aoColumns[i].sSortingClass;
|
||||
iFound = -1;
|
||||
for ( j=0 ; j<aaSort.length ; j++ )
|
||||
{
|
||||
if ( aaSort[j][0] == i )
|
||||
{
|
||||
sClass = ( aaSort[j][1] == "asc" ) ?
|
||||
oClasses.sSortAsc : oClasses.sSortDesc;
|
||||
iFound = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$(oSettings.aoColumns[i].nTh).addClass( sClass );
|
||||
|
||||
if ( oSettings.bJUI )
|
||||
{
|
||||
/* jQuery UI uses extra markup */
|
||||
var jqSpan = $("span."+oClasses.sSortIcon, oSettings.aoColumns[i].nTh);
|
||||
jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+
|
||||
oClasses.sSortJUI +" "+ oClasses.sSortJUIAscAllowed +" "+ oClasses.sSortJUIDescAllowed );
|
||||
|
||||
var sSpanClass;
|
||||
if ( iFound == -1 )
|
||||
{
|
||||
sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
|
||||
}
|
||||
else if ( aaSort[iFound][1] == "asc" )
|
||||
{
|
||||
sSpanClass = oClasses.sSortJUIAsc;
|
||||
}
|
||||
else
|
||||
{
|
||||
sSpanClass = oClasses.sSortJUIDesc;
|
||||
}
|
||||
|
||||
jqSpan.addClass( sSpanClass );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No sorting on this column, so add the base class. This will have been assigned by
|
||||
* _fnAddColumn
|
||||
*/
|
||||
$(oSettings.aoColumns[i].nTh).addClass( oSettings.aoColumns[i].sSortingClass );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Apply the required classes to the table body
|
||||
* Note that this is given as a feature switch since it can significantly slow down a sort
|
||||
* on large data sets (adding and removing of classes is always slow at the best of times..)
|
||||
* Further to this, note that this code is admittedly fairly ugly. It could be made a lot
|
||||
* simpler using jQuery selectors and add/removeClass, but that is significantly slower
|
||||
* (on the order of 5 times slower) - hence the direct DOM manipulation here.
|
||||
* Note that for deferred drawing we do use jQuery - the reason being that taking the first
|
||||
* row found to see if the whole column needs processed can miss classes since the first
|
||||
* column might be new.
|
||||
*/
|
||||
sClass = oClasses.sSortColumn;
|
||||
|
||||
if ( oSettings.oFeatures.bSort && oSettings.oFeatures.bSortClasses )
|
||||
{
|
||||
var nTds = _fnGetTdNodes( oSettings );
|
||||
|
||||
/* Remove the old classes */
|
||||
if ( oSettings.oFeatures.bDeferRender )
|
||||
{
|
||||
$(nTds).removeClass(sClass+'1 '+sClass+'2 '+sClass+'3');
|
||||
}
|
||||
else if ( nTds.length >= iColumns )
|
||||
{
|
||||
for ( i=0 ; i<iColumns ; i++ )
|
||||
{
|
||||
if ( nTds[i].className.indexOf(sClass+"1") != -1 )
|
||||
{
|
||||
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
|
||||
{
|
||||
nTds[(iColumns*j)+i].className =
|
||||
$.trim( nTds[(iColumns*j)+i].className.replace( sClass+"1", "" ) );
|
||||
}
|
||||
}
|
||||
else if ( nTds[i].className.indexOf(sClass+"2") != -1 )
|
||||
{
|
||||
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
|
||||
{
|
||||
nTds[(iColumns*j)+i].className =
|
||||
$.trim( nTds[(iColumns*j)+i].className.replace( sClass+"2", "" ) );
|
||||
}
|
||||
}
|
||||
else if ( nTds[i].className.indexOf(sClass+"3") != -1 )
|
||||
{
|
||||
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
|
||||
{
|
||||
nTds[(iColumns*j)+i].className =
|
||||
$.trim( nTds[(iColumns*j)+i].className.replace( " "+sClass+"3", "" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the new classes to the table */
|
||||
var iClass = 1, iTargetCol;
|
||||
for ( i=0 ; i<aaSort.length ; i++ )
|
||||
{
|
||||
iTargetCol = parseInt( aaSort[i][0], 10 );
|
||||
for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
|
||||
{
|
||||
nTds[(iColumns*j)+iTargetCol].className += " "+sClass+iClass;
|
||||
}
|
||||
|
||||
if ( iClass < 3 )
|
||||
{
|
||||
iClass++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||