|
240 | 240 | // Styling libraries |
241 | 241 | // When updating these files, make sure you also update the `karma.config` tests |
242 | 242 | // 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'; |
244 | 244 | DT_Example::$lookup_libraries['js' ]['jqueryui'] = '//code.jquery.com/ui/1.11.4/jquery-ui.js'; |
245 | 245 | 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'; |
252 | 252 | DT_Example::$lookup_libraries['js' ]['material'] = '//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.js'; |
253 | 253 | 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'; |
256 | 256 | DT_Example::$lookup_libraries['js' ]['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/foundation.min.js'; |
257 | 257 | DT_Example::$lookup_libraries['css']['foundation'] = '//cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css'; |
258 | 258 | 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 ) |
654 | 654 | SET IDENTITY_INSERT datatables_demo OFF; |
655 | 655 | EOD; |
656 | 656 | 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 ); |
657 | 717 | } |
658 | 718 |
|
659 | 719 |
|
|
0 commit comments