Skip to content

Commit 8ff1659

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4fc97bb + cbd8491 commit 8ff1659

36 files changed

+269
-101
lines changed

build/examples.php

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,19 @@
240240
// Styling libraries
241241
// When updating these files, make sure you also update the `karma.config` tests
242242
// file to match versions.
243-
DT_Example::$lookup_libraries['js' ]['jquery'] = '//code.jquery.com/jquery-1.12.3.js';
243+
DT_Example::$lookup_libraries['js' ]['jquery'] = '//code.jquery.com/jquery-1.12.4.js';
244244
DT_Example::$lookup_libraries['js' ]['jqueryui'] = '//code.jquery.com/ui/1.11.4/jquery-ui.js';
245245
DT_Example::$lookup_libraries['css']['jqueryui'] = '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css';
246-
DT_Example::$lookup_libraries['js' ]['bootstrap'] = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js';
247-
DT_Example::$lookup_libraries['css']['bootstrap'] = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css';
248-
DT_Example::$lookup_libraries['js']['bootstrap4'] = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/js/bootstrap.min.js';
249-
DT_Example::$lookup_libraries['css' ]['bootstrap4'] = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.css';
250-
DT_Example::$lookup_libraries['js' ]['semanticui'] = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.1/semantic.min.js';
251-
DT_Example::$lookup_libraries['css']['semanticui'] = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.1/semantic.min.css';
246+
DT_Example::$lookup_libraries['js' ]['bootstrap'] = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js';
247+
DT_Example::$lookup_libraries['css']['bootstrap'] = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css';
248+
DT_Example::$lookup_libraries['js']['bootstrap4'] = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js';
249+
DT_Example::$lookup_libraries['css' ]['bootstrap4'] = '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.css';
250+
DT_Example::$lookup_libraries['js' ]['semanticui'] = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.js';
251+
DT_Example::$lookup_libraries['css']['semanticui'] = '//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.css';
252252
DT_Example::$lookup_libraries['js' ]['material'] = '//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.js';
253253
DT_Example::$lookup_libraries['css']['material'] = '//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.css';
254-
DT_Example::$lookup_libraries['js' ]['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/6.1.1/foundation.min.js';
255-
DT_Example::$lookup_libraries['css']['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/6.1.1/foundation.min.css';
254+
DT_Example::$lookup_libraries['js' ]['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/6.2.4/foundation.min.js';
255+
DT_Example::$lookup_libraries['css']['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/6.2.4/foundation.min.css';
256256
DT_Example::$lookup_libraries['js' ]['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/foundation.min.js';
257257
DT_Example::$lookup_libraries['css']['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css';
258258
DT_Example::$lookup_libraries['js' ]['uikit'] = '//cdnjs.cloudflare.com/ajax/libs/uikit/2.24.3/js/uikit.min.js';
@@ -654,6 +654,66 @@ function sql_files ( $out_dir )
654654
SET IDENTITY_INSERT datatables_demo OFF;
655655
EOD;
656656
file_put_contents( $out_dir.'/sqlserver.sql', $str );
657+
658+
// Oracle style
659+
$str = <<<EOD
660+
--
661+
-- DataTables Ajax and server-side processing database (SQL Server)
662+
--
663+
BEGIN
664+
EditorDelObject('datatables_demo', 'TABLE');
665+
EditorDelObject('datatables_demo_seq', 'SEQUENCE');
666+
END;
667+
668+
CREATE TABLE datatables_demo (
669+
id INT PRIMARY KEY NOT NULL,
670+
first_name VARCHAR(250),
671+
last_name VARCHAR(250),
672+
position VARCHAR(250),
673+
email VARCHAR(250),
674+
office VARCHAR(250),
675+
start_date DATE,
676+
age INT,
677+
salary INT,
678+
seq INT,
679+
extn VARCHAR(8)
680+
);
681+
682+
CREATE SEQUENCE datatables_demo_seq;
683+
684+
CREATE OR REPLACE TRIGGER datatables_demo_on_insert
685+
BEFORE INSERT ON datatables_demo
686+
FOR EACH ROW
687+
BEGIN
688+
SELECT datatables_demo_seq.nextval
689+
INTO :new.id
690+
FROM dual;
691+
END;
692+
693+
EOD;
694+
695+
for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) {
696+
$str .= "INSERT INTO datatables_demo ".
697+
"( first_name, last_name, age, position, salary, start_date, extn, email, office, seq ) ".
698+
"VALUES ";
699+
700+
$str .= "( ".
701+
"'".$json[$i]['first_name']."', ".
702+
"'".$json[$i]['last_name']."', ".
703+
$json[$i]['age'].", ".
704+
"'".$json[$i]['position']."', ".
705+
$json[$i]['salary'].", ".
706+
"'".date('d-M-Y', strtotime($json[$i]['start_date']))."', ".
707+
$json[$i]['extn'].", ".
708+
"'".$json[$i]['email']."', ".
709+
"'".$json[$i]['office']."', ".
710+
$json[$i]['sequence']." ".
711+
");\n";
712+
}
713+
714+
$str .= "\nCOMMIT;\n";
715+
716+
file_put_contents( $out_dir.'/oracle.sql', $str );
657717
}
658718

659719

build/lib/DT_Example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private function _htmlTidy( $html )
204204
$tidy->parseString( $html, array(
205205
'indent' => 2,
206206
'indent-spaces' => 4,
207-
'new-blocklevel-tags' => 'section',
207+
'new-blocklevel-tags' => 'section,editor-field',
208208
'new-pre-tags' => 'script',
209209
'new-empty-tags' => 'tbody',
210210
'output-html' => 1,

build/make.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function build_extension {
282282
# If there is a make file, then leave it to the extension to do its own
283283
# build and copy files into place
284284
echo_msg "Running $EXTENSION build script"
285-
sh ${BASE_DIR}/extensions/${EXTENSION}/make.sh \
285+
bash ${BASE_DIR}/extensions/${EXTENSION}/make.sh \
286286
${BUILD_DIR}/DataTables/extensions/${EXTENSION} $DEBUG
287287
else
288288
# Otherwise, just copy the whole lot over
@@ -314,10 +314,11 @@ function usage {
314314
315315
test - Build the unit tests
316316
317+
all [debug] - Build DataTables core and all extensions
318+
317319
extension <ext> [debug] - Extension to build where <ext> is one of:
318320
- AutoFill
319321
- Buttons
320-
- ColVis
321322
- ColReorder
322323
- FixedColumns
323324
- FixedHeader
@@ -326,7 +327,6 @@ function usage {
326327
- Responsive
327328
- Scroller
328329
- Select
329-
- TableTools
330330
331331
and the optional [debug] parameter can be used to disable JS and CSS
332332
compression for faster development build times."
@@ -357,6 +357,22 @@ case "$1" in
357357
build_repo
358358
;;
359359

360+
"all")
361+
build_repo
362+
build_extension AutoFill
363+
build_extension Buttons
364+
build_extension ColReorder
365+
build_extension FixedColumns
366+
build_extension FixedHeader
367+
build_extension KeyTable
368+
build_extension Responsive
369+
build_extension Scroller
370+
build_extension Select
371+
if [ -d ../extensions/Editor ]; then
372+
build_extension Editor
373+
fi
374+
;;
375+
360376
"examples")
361377
build_examples
362378
;;

build/templates/example.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ <h1>{software} example <span>{title}</span></h1>
2424
{info}
2525
</div>
2626

27-
{demo-html}
27+
<div class="demo-html">
28+
{demo-html}
29+
</div>
2830
{table}
2931

3032
<ul class="tabs">

css/dataTables.bootstrap.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ table.dataTable {
99
td,
1010
th {
1111
-webkit-box-sizing: content-box;
12-
-moz-box-sizing: content-box;
1312
box-sizing: content-box;
1413

1514
&.dataTables_empty {
@@ -147,27 +146,27 @@ div.dataTables_scrollHead table.dataTable {
147146
}
148147

149148
div.dataTables_scrollBody {
150-
table {
149+
> table {
151150
border-top: none;
152151
margin-top: 0 !important;
153152
margin-bottom: 0 !important;
154153

155-
thead { // Hide sort icons
154+
> thead { // Hide sort icons
156155
.sorting:after,
157156
.sorting_asc:after,
158157
.sorting_desc:after {
159158
display: none;
160159
}
161160
}
162161

163-
tbody tr:first-child th,
164-
tbody tr:first-child td {
162+
> tbody > tr:first-child > th,
163+
> tbody > tr:first-child > td {
165164
border-top: none;
166165
}
167166
}
168167
}
169168

170-
div.dataTables_scrollFoot table {
169+
div.dataTables_scrollFoot > table {
171170
margin-top: 0 !important;
172171
border-top: none;
173172
}

css/dataTables.bootstrap4.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ div.dataTables_wrapper {
7272
ul.pagination {
7373
margin: 2px 0;
7474
white-space: nowrap;
75+
justify-content: flex-end;
7576
}
7677
}
7778

css/dataTables.semanticui.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ table.dataTable.table {
4343
td,
4444
th {
4545
-webkit-box-sizing: content-box;
46-
-moz-box-sizing: content-box;
4746
box-sizing: content-box;
4847

4948
&.dataTables_empty {

css/jquery.dataTables.scss

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -530,19 +530,21 @@ table.dataTable td {
530530
*margin-top: -1px;
531531
-webkit-overflow-scrolling: touch;
532532

533-
th, td {
534-
// Setting v-align baseline can cause the headers to be visible
535-
vertical-align: middle;
536-
}
537-
538-
th > div.dataTables_sizing,
539-
td > div.dataTables_sizing {
540-
// Hide the element used to wrap the content in the header for
541-
// the body scrolling table
542-
height: 0;
543-
overflow: hidden;
544-
margin: 0 !important;
545-
padding: 0 !important;
533+
> table > thead > tr, > table > tbody > tr {
534+
> th, > td {
535+
// Setting v-align baseline can cause the headers to be visible
536+
vertical-align: middle;
537+
}
538+
539+
> th > div.dataTables_sizing,
540+
> td > div.dataTables_sizing {
541+
// Hide the element used to wrap the content in the header for
542+
// the body scrolling table
543+
height: 0;
544+
overflow: hidden;
545+
margin: 0 !important;
546+
padding: 0 !important;
547+
}
546548
}
547549
}
548550
}
@@ -552,8 +554,8 @@ table.dataTable td {
552554
border-bottom: $table-header-border;
553555
}
554556

555-
div.dataTables_scrollHead table,
556-
div.dataTables_scrollBody table {
557+
div.dataTables_scrollHead > table,
558+
div.dataTables_scrollBody > table {
557559
border-bottom: none;
558560
}
559561
}

docs/option/columns.orderData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
</default>
1616

1717
<description>
18-
Allows a column's sorting to take multiple columns into account when doing a order.
18+
Allows a column's sorting to take either the data from a different (often hidden) column as the data to sort, or data from multiple columns.
1919

20-
For example with first name / last name columns next to each other, it is intuitive that they would be linked together to multi-column sort.
20+
A common example of this is a table which contains first and last name columns next to each other, it is intuitive that they would be linked together to multi-column sort. Another example, with a single column, is the case where the data shown to the end user is not directly sortable itself (a column with images in it), but there is some meta data than can be sorted (e.g. file name) - note that [orthogonal data](/manual/data/orthogonal) is an alternative method that can be used for this.
2121
</description>
2222

2323
<example title="Using `orderData` to define multi-column sorting with `dt-init columnDefs`"><![CDATA[

docs/option/language.infoEmpty.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<dt-option group="i18n">
33
<name>language.infoEmpty</name>
4-
<summary>Table summary information string used when the table is empty or records</summary>
4+
<summary>Table summary information string used when the table is empty of records</summary>
55
<since>1.10</since>
66

77
<type type="string" />

docs/option/pagingType.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
<![CDATA[
1212
The pagination option of DataTables will display a pagination control below the table (by default, its position can be changed using `dt-init dom` and CSS) with buttons that the end user can use to navigate the pages of the table. Which buttons are shown in the pagination control are defined by the option given here.
1313
14-
DataTables has four built-in paging button arrangements:
14+
DataTables has six built-in paging button arrangements:
1515
1616
* `string numbers` - Page number buttons only (<span class="since">1.10.8</span>)
1717
* `string simple` - 'Previous' and 'Next' buttons only
1818
* `string simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
1919
* `string full` - 'First', 'Previous', 'Next' and 'Last' buttons
2020
* `string full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
21+
* `string first_last_numbers` - 'First' and 'Last' buttons, plus page numbers
2122
2223
Further methods can be added using plug-ins.
2324
]]>

docs/option/rowCallback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<description>
2222
This callback allows you to 'post process' each row after it have been generated for each table draw, but _before_ it is rendered into the document. This means that the contents of the row might not have dimensions (`$().width()` for example) if it is not already in the document.
2323

24-
This function might be used for setting the row class name or otherwise manipulating the row's `tag TR` element (although note that `dt-init createdRow can often be more efficient).
24+
This function might be used for setting the row class name or otherwise manipulating the row's `-tag tr` element (although note that `dt-init createdRow` can often be more efficient).
2525
</description>
2626

2727
<example title="Highlight cells based on their content (object data source)"><![CDATA[

examples/basic_init/alt_pagination.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ $(document).ready(function() {
1818
1919
The default page control presented by DataTables (forward and backward buttons with up to 7 page numbers in-between) is fine for most situations, but there are cases where you may wish to customise the options presented to the end user. This is done through DataTables' extensible pagination mechanism, the `dt-init pagingType` option.
2020
21-
There are four built-in options for which pagination controls DataTables should show:
21+
There are six built-in options for which pagination controls DataTables should show:
2222
2323
* `string numbers` - Page number buttons only
2424
* `string simple` - 'Previous' and 'Next' buttons only
2525
* `string simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
2626
* `string full` - 'First', 'Previous', 'Next' and 'Last' buttons
2727
* `string full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
28+
* `string first_last_numbers` - 'First' and 'Last' buttons, plus page numbers
2829
2930
The language strings of 'First', 'Previous' etc can be optionally through the internationalisation options of DataTables; `dt-init language.paginate.first`, `dt-init language.paginate.previous` etc.
3031

examples/resources/demo.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ if ( window.$ ) {
2828

2929
// init html
3030
var table = $('<p/>').append( $('table').clone() ).html();
31+
var demoHtml = $.trim( $('div.demo-html').html() );
32+
33+
if ( demoHtml ) {
34+
demoHtml = demoHtml+'\n\n';
35+
}
36+
3137
$('div.tabs div.table').append(
3238
'<code class="multiline language-html">\t\t\t'+
33-
escapeHtml( table )+
39+
escapeHtml( demoHtml + table )+
3440
'</code>'
3541
);
3642
//SyntaxHighlighter.highlight({}, $('#display-init-html')[0]);

examples/styling/bootstrap4.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<dt-example table-type="html" order="12" framework="bootstrap4">
2+
<dt-example table-type="html" order="13" framework="bootstrap4">
33

44
<css lib="datatables" />
55
<js lib="jquery datatables" />

examples/styling/jqueryUI.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<dt-example table-type="html" order="11" framework="jqueryui">
2+
<dt-example table-type="html" order="12" framework="jqueryui">
33

44
<css lib="datatables" />
55
<js lib="jquery datatables" />

examples/styling/semanticui.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<dt-example table-type="html" order="13" framework="semanticui">
2+
<dt-example table-type="html" order="11" framework="semanticui">
33

44
<css lib="datatables" />
55
<js lib="jquery datatables semanticui" />
66

7-
<title>Semantic UI (Tech. preview)</title>
7+
<title>Semantic UI</title>
88
<js><![CDATA[
99
$(document).ready(function() {
1010
$('#example').DataTable();
@@ -15,8 +15,6 @@ $(document).ready(function() {
1515
1616
This example shows DataTables integrated with [Semantic UI](http://semantic-ui.com/). Semantic UI is a comprehensive framework that uses CSS class names like words to create natural language styling library.
1717
18-
The DataTables integration with Semantic UI is still in development and not all elements might work correctly yet. Only once all of DataTables extensions fully support Semantic UI will the integration be complete and available via the DataTables download builder.
19-
2018
]]></info>
2119

2220
</dt-example>

0 commit comments

Comments
 (0)