From 798b7924b5ea22c0dc3a9af22b4d97cffca5e656 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 20 Jul 2015 08:30:50 +0200 Subject: [PATCH 1/4] Fix test_arrays --- htdocs/public/test/test_arrays.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 77d92e5d8eb..68140b80c4d 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -31,7 +31,7 @@ if (empty($usedolheader)) Test page - + @@ -39,7 +39,7 @@ if (empty($usedolheader)) - + @@ -53,8 +53,8 @@ if (empty($usedolheader)) } else { - $arraycss=array('/includes/jquery/plugins/datatables/css/jquery.dataTables.css'); - $arrayjs=array('/includes/jquery/plugins/datatables/js/jquery.dataTables.js'); + $arraycss=array('/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css'); + $arrayjs=array('/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js'); llxHeader('','','','',0,0,$arrayjs,$arraycss); } @@ -218,11 +218,11 @@ $(document).ready(function(){ }, "aaSorting": [[0,'desc']], "sDom": 'T<"clear">lfrtip', -/* To get flash tools +//To get flash tools "oTableTools": { - "sSwfPath": "" - } -*/ + "sSwfPath": "" + }, + /* To use in ajax mode "bProcessing": true, // Show "processing message" "bServerSide": true, From 7ce5424f9a19b4280b8b2edf5dd61ad2e60500f4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 20 Jul 2015 08:41:18 +0200 Subject: [PATCH 2/4] NEW : upgrade jQuery Component Datable (and extras) to 1.10.7 --- htdocs/contrat/class/contrat.class.php | 6 +- .../jquery/plugins/datatables/Contributing.md | 18 + .../jquery/plugins/datatables/Readme.md | 53 + .../jquery/plugins/datatables/Readme.txt | 11 - .../datatables/css/jquery.dataTables.css | 221 - .../datatables/css/jquery.dataTables_jui.css | 501 - .../datatables/extensions/AutoFill/Readme.txt | 38 + .../AutoFill/css/dataTables.autoFill.css | 24 + .../AutoFill/css/dataTables.autoFill.min.css | 1 + .../extensions/AutoFill/images/filler.png | Bin 0 -> 1040 bytes .../AutoFill/js/dataTables.autoFill.js | 855 + .../AutoFill/js/dataTables.autoFill.min.js | 22 + .../extensions/ColReorder/License.txt | 20 + .../extensions/ColReorder/Readme.md | 39 + .../ColReorder/css/dataTables.colReorder.css} | 9 +- .../css/dataTables.colReorder.min.css | 1 + .../ColReorder/images/insert.png | Bin .../ColReorder/js/dataTables.colReorder.js | 1372 ++ .../js/dataTables.colReorder.min.js | 26 + .../datatables/extensions/ColVis/License.txt | 20 + .../datatables/extensions/ColVis/Readme.md | 38 + .../ColVis/css/dataTables.colVis.css | 185 + .../ColVis/css/dataTables.colVis.min.css | 1 + .../ColVis/css/dataTables.colvis.jqueryui.css | 41 + .../extensions/ColVis/js/dataTables.colVis.js | 1123 ++ .../ColVis/js/dataTables.colVis.min.js | 24 + .../extensions/FixedColumns/License.txt | 20 + .../extensions/FixedColumns/Readme.md | 42 + .../css/dataTables.fixedColumns.css | 25 + .../css/dataTables.fixedColumns.min.css | 1 + .../js/dataTables.fixedColumns.js | 1423 ++ .../js/dataTables.fixedColumns.min.js | 30 + .../extensions/FixedHeader/Readme.txt | 36 + .../css/dataTables.fixedHeader.css | 7 + .../css/dataTables.fixedHeader.min.css | 1 + .../FixedHeader/js/dataTables.fixedHeader.js | 1028 ++ .../js/dataTables.fixedHeader.min.js | 30 + .../datatables/extensions/KeyTable/Readme.txt | 36 + .../KeyTable/css/dataTables.keyTable.css | 7 + .../KeyTable/css/dataTables.keyTable.min.css | 1 + .../KeyTable/js/dataTables.keyTable.js | 1175 ++ .../KeyTable/js/dataTables.keyTable.min.js | 18 + .../extensions/Responsive/License.txt | 20 + .../extensions/Responsive/Readme.md | 0 .../Responsive/css/dataTables.responsive.css | 106 + .../Responsive/css/dataTables.responsive.scss | 149 + .../Responsive/js/dataTables.responsive.js | 873 + .../js/dataTables.responsive.min.js | 19 + .../datatables/extensions/Scroller/Readme.txt | 43 + .../Scroller/css/dataTables.scroller.css | 44 + .../Scroller/css/dataTables.scroller.min.css | 1 + .../Scroller/images/loading-background.png | Bin 0 -> 1013 bytes .../Scroller/js/dataTables.scroller.js | 1262 ++ .../Scroller/js/dataTables.scroller.min.js | 25 + .../extensions/TableTools/Readme.md | 41 + .../TableTools/css/dataTables.tableTools.css} | 94 +- .../css/dataTables.tableTools.min.css | 1 + .../TableTools/images/collection.png | Bin .../TableTools/images/collection_hover.png | Bin .../TableTools/images/copy.png | Bin .../TableTools/images/copy_hover.png | Bin .../TableTools/images/csv.png | Bin .../TableTools/images/csv_hover.png | Bin .../TableTools/images/pdf.png | Bin .../TableTools/images/pdf_hover.png | Bin .../TableTools/images/print.png | Bin .../TableTools/images/print_hover.png | Bin .../TableTools/images/psd/collection.psd | Bin 0 -> 25792 bytes .../TableTools/images/psd/copy document.psd | Bin 0 -> 104729 bytes .../TableTools/images/psd/file_types.psd | Bin 0 -> 1090645 bytes .../TableTools/images/psd/printer.psd | Bin 0 -> 119952 bytes .../TableTools/images/xls.png | Bin .../TableTools/images/xls_hover.png | Bin .../TableTools/js/dataTables.tableTools.js} | 1487 +- .../js/dataTables.tableTools.min.js | 70 + .../TableTools/swf/copy_csv_xls.swf | Bin 0 -> 2232 bytes .../TableTools/swf/copy_csv_xls_pdf.swf | Bin 0 -> 58846 bytes .../extras/Bootstrap/css/DT_bootstrap.css | 47 - .../extras/Bootstrap/js/DT_bootstrap.js | 106 - .../extras/ColReorder/js/ColReorder.js | 982 - .../extras/ColReorder/js/ColReorder.min.js | 33 - .../datatables/extras/ColVis/css/ColVis.css | 76 - .../extras/ColVis/css/ColVisAlt.css | 104 - .../extras/ColVis/images/button.png | Bin 1161 -> 0 bytes .../datatables/extras/ColVis/js/ColVis.js | 1013 -- .../datatables/extras/ColVis/js/ColVis.min.js | 34 - .../extras/TableTools/css/TableTools_JUI.css | 185 - .../extras/TableTools/images/background.png | Bin 944 -> 0 bytes .../extras/TableTools/js/TableTools.min.js | 76 - .../extras/TableTools/js/ZeroClipboard.js | 367 - .../extras/TableTools/swf/copy_csv_xls.swf | Bin 2142 -> 0 bytes .../TableTools/swf/copy_csv_xls_pdf.swf | Bin 58814 -> 0 bytes .../datatables/js/jquery.dataTables.js | 12099 ------------- .../datatables/js/jquery.dataTables.min.js | 155 - .../jquery/plugins/datatables/license-bsd.txt | 10 - .../plugins/datatables/license-gpl2.txt | 339 - .../jquery/plugins/datatables/license.txt | 20 + .../media/css/jquery.dataTables.css | 455 + .../media/css/jquery.dataTables.min.css | 1 + .../css/jquery.dataTables_themeroller.css | 416 + .../datatables/media/images/Sorting icons.psd | Bin 0 -> 27490 bytes .../datatables/media/images/favicon.ico | Bin 0 -> 894 bytes .../datatables/media/images/sort_asc.png | Bin 0 -> 160 bytes .../media/images/sort_asc_disabled.png | Bin 0 -> 148 bytes .../datatables/media/images/sort_both.png | Bin 0 -> 201 bytes .../datatables/media/images/sort_desc.png | Bin 0 -> 158 bytes .../media/images/sort_desc_disabled.png | Bin 0 -> 146 bytes .../datatables/media/js/jquery.dataTables.js | 14951 ++++++++++++++++ .../media/js/jquery.dataTables.min.js | 160 + .../plugins/datatables/media/js/jquery.js | 5 + htdocs/main.inc.php | 17 +- 111 files changed, 27642 insertions(+), 16773 deletions(-) create mode 100644 htdocs/includes/jquery/plugins/datatables/Contributing.md create mode 100644 htdocs/includes/jquery/plugins/datatables/Readme.md delete mode 100644 htdocs/includes/jquery/plugins/datatables/Readme.txt delete mode 100644 htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables.css delete mode 100644 htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/Readme.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/images/filler.png create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/js/dataTables.autoFill.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/js/dataTables.autoFill.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/Readme.md rename htdocs/includes/jquery/plugins/datatables/{extras/ColReorder/css/ColReorder.css => extensions/ColReorder/css/dataTables.colReorder.css} (50%) create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.min.css rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/ColReorder/images/insert.png (100%) create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/License.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/Readme.md create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/css/dataTables.colVis.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/css/dataTables.colVis.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/css/dataTables.colvis.jqueryui.css create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/js/dataTables.colVis.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/ColVis/js/dataTables.colVis.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/License.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/Readme.md create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/css/dataTables.fixedColumns.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/css/dataTables.fixedColumns.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/js/dataTables.fixedColumns.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/js/dataTables.fixedColumns.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedHeader/Readme.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedHeader/css/dataTables.fixedHeader.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedHeader/css/dataTables.fixedHeader.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedHeader/js/dataTables.fixedHeader.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/FixedHeader/js/dataTables.fixedHeader.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/KeyTable/Readme.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/KeyTable/css/dataTables.keyTable.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/KeyTable/css/dataTables.keyTable.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/KeyTable/js/dataTables.keyTable.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/KeyTable/js/dataTables.keyTable.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/License.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/Readme.md create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/css/dataTables.responsive.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/css/dataTables.responsive.scss create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/js/dataTables.responsive.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Responsive/js/dataTables.responsive.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/Readme.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/css/dataTables.scroller.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/css/dataTables.scroller.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/images/loading-background.png create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/js/dataTables.scroller.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/Scroller/js/dataTables.scroller.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/Readme.md rename htdocs/includes/jquery/plugins/datatables/{extras/TableTools/css/TableTools.css => extensions/TableTools/css/dataTables.tableTools.css} (75%) mode change 100644 => 100755 create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/css/dataTables.tableTools.min.css rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/collection.png (100%) rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/collection_hover.png (100%) rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/copy.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/copy_hover.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/csv.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/csv_hover.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/pdf.png (100%) rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/pdf_hover.png (100%) rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/print.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/print_hover.png (100%) mode change 100644 => 100755 create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/images/psd/collection.psd create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/images/psd/copy document.psd create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/images/psd/file_types.psd create mode 100755 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/images/psd/printer.psd rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/xls.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras => extensions}/TableTools/images/xls_hover.png (100%) mode change 100644 => 100755 rename htdocs/includes/jquery/plugins/datatables/{extras/TableTools/js/TableTools.js => extensions/TableTools/js/dataTables.tableTools.js} (69%) mode change 100644 => 100755 create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf/copy_csv_xls.swf create mode 100644 htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/Bootstrap/css/DT_bootstrap.css delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/Bootstrap/js/DT_bootstrap.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColReorder/js/ColReorder.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColReorder/js/ColReorder.min.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColVis/css/ColVis.css delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColVis/images/button.png delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools_JUI.css delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/images/background.png delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/js/ZeroClipboard.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf/copy_csv_xls.swf delete mode 100644 htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf delete mode 100644 htdocs/includes/jquery/plugins/datatables/js/jquery.dataTables.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/js/jquery.dataTables.min.js delete mode 100644 htdocs/includes/jquery/plugins/datatables/license-bsd.txt delete mode 100644 htdocs/includes/jquery/plugins/datatables/license-gpl2.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/license.txt create mode 100644 htdocs/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css create mode 100644 htdocs/includes/jquery/plugins/datatables/media/css/jquery.dataTables.min.css create mode 100644 htdocs/includes/jquery/plugins/datatables/media/css/jquery.dataTables_themeroller.css create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/Sorting icons.psd create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/favicon.ico create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/sort_asc.png create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/sort_asc_disabled.png create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/sort_both.png create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/sort_desc.png create mode 100644 htdocs/includes/jquery/plugins/datatables/media/images/sort_desc_disabled.png create mode 100644 htdocs/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js create mode 100644 htdocs/includes/jquery/plugins/datatables/media/js/jquery.dataTables.min.js create mode 100644 htdocs/includes/jquery/plugins/datatables/media/js/jquery.js diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index fb0038b509f..9d21b143a2d 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -905,8 +905,7 @@ class Contrat extends CommonObject $modCodeContract = new $module(); } - //Commerce Efficace - Debut : Modification r�f�rence Contrat - /*if (!empty($modCodeContract->code_auto)) { + if (!empty($modCodeContract->code_auto)) { // Mise a jour ref $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; if ($this->db->query($sql)) @@ -916,8 +915,7 @@ class Contrat extends CommonObject $this->ref="(PROV".$this->id.")"; } } - }*/ - //Commerce Efficace - Fin : Modification r�f�rence Contrat + } // Insert contacts commerciaux ('SALESREPSIGN','contrat') $result=$this->add_contact($this->commercial_signature_id,'SALESREPSIGN','internal'); diff --git a/htdocs/includes/jquery/plugins/datatables/Contributing.md b/htdocs/includes/jquery/plugins/datatables/Contributing.md new file mode 100644 index 00000000000..17a8f1f10b1 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/Contributing.md @@ -0,0 +1,18 @@ +# Support requests + +Please direct support requests to the [DataTables forums](https://datatables.net/forums), ensuring that you provide a link to a test page that shows the problem and a full description of the issue. If you require urgent help, [priority support](https://datatables.net/support) is available. + + +# Contributing code + +If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. In order to keep thing manageable, there are a number of guidelines that should be followed in order to ensure that your modification is included in DataTables as quickly as possible: + +1. Make contributions in the DataTables/DataTablesSrc repo. Changes to the built files in the built repo (DataTables/DataTables) will not be accepted since they would be overwritten by the next build! + +2. Follow the style of the code in the existing files. They might not be to everyone's tastes, but consistency is key for a mature project like DataTables. DataTables doesn't have a coding standards document, but simple common sense of following the same style as in the existing files is ideal. For example use tabs not spaces (as you will see all source files use tabs). + +3. Link to a test page showing the bug you are fixing or the feature you are adding. This allows to me to quickly identify what is being changed and why. Don't worry about being verbose in pull requests - its much better to know exactly what is changing and why! + +4. DataTables is a large and complex project and it isn't always possible or suitable to pull in every suggested change. Please don't be offended if a pull request is not merged in, it will explained why not if this is the case. Also it isn't always possible to fully check and test pull requests as quickly as I would like due to other commitments. Again this is no reflection on your pull request, just the busy life that we all lead! If you have any questions about your potential contribution and its place in the DataTables project structure, please ask ahead of time in the [DataTables forums](//datatables.net/forums). + +5. Pull requests will only be accepted if you acknowledge that your contribution is offered under and will be made available under the project's existing license (MIT). If your initial pull request doesn't explicitly acknowledge this I'll ask before it is pulled in. \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/datatables/Readme.md b/htdocs/includes/jquery/plugins/datatables/Readme.md new file mode 100644 index 00000000000..dd952d84ce8 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/Readme.md @@ -0,0 +1,53 @@ +# DataTables plug-in for jQuery + +DataTables is a table enhancing plug-in for the [jQuery](//jquery.com) Javascript library, adding sorting, paging and filtering abilities to plain HTML tables with minimal effort. The stated goal of DataTables is: + +> To enhance the accessibility of data in HTML tables. + +To meet this goal, DataTables is developed with two distinct groups of users in mind: + +* You the developers using DataTables. For developers DataTables provides a wide array of options for how data should be obtained, displayed and acted upon, along with an extensive API for accessing and manipulating the table. + +* End users. For those using the interface DataTables presents, actions to get the most from the information contained in tables, such as sorting and filtering, along with paging and scrolling of the data in table, are easy to use, intuitive and fast. + + +## Installation + +In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page. See the [DataTables manual](http://datatables.net/manual/installation#Including-Javascript-/-CSS) for details on how to do this using the latest version of DataTables. + + +## Usage + +In its simplest case, DataTables can be initialised with a single line of Javascript: + +```js +$('table').dataTable(); +``` + +where the jQuery selector is used to obtain a reference to the table you want to enhance with DataTables. Optional configuration parameters can be passed in to DataTables to have it perform certain actions by using a configuration object as the parameter passed in to the DataTables constructor. For example: + +```js +$('table').dataTable( { + paginate: false, + scrollY: 300 +} ); +``` + +will disable paging and enable scrolling. + +A full list of the options available for DataTables are available in the [documentation](//datatables.net). + + +## Documentation + +Full documentation of the DataTables options, API and pug-in interface are available on the [DataTables web-site](//datatables.net). The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further. + + +## Support + +Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available. + + +## License + +DataTables is release under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with `/*!`. diff --git a/htdocs/includes/jquery/plugins/datatables/Readme.txt b/htdocs/includes/jquery/plugins/datatables/Readme.txt deleted file mode 100644 index 96a47cbde67..00000000000 --- a/htdocs/includes/jquery/plugins/datatables/Readme.txt +++ /dev/null @@ -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 \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables.css b/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables.css deleted file mode 100644 index b257b33bee5..00000000000 --- a/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables.css +++ /dev/null @@ -1,221 +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; - /* DOL_LDR CHANGE 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 thead th:active, -table.dataTable thead td:active { - outline: none; -} - - -/* - * Scrolling - */ -.dataTables_scroll { - clear: both; -} - -.dataTables_scrollBody { - *margin-top: -1px; - -webkit-overflow-scrolling: touch; -} - diff --git a/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css b/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css deleted file mode 100644 index a210af51ae9..00000000000 --- a/htdocs/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/Readme.txt b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/Readme.txt new file mode 100644 index 00000000000..017d1d0d5f1 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/Readme.txt @@ -0,0 +1,38 @@ +# AutoFill + +AutoFill gives an Excel like option to a DataTable to click and drag over multiple cells, filling in information over the selected cells and incrementing numbers as needed. Key features include: + +* Click and drag cell content insertion +* Automatic incrementing of numeric information +* Enable and disable on any column +* Detailed callback functions for customisation +* Support for both DataTables and browser window scrolling + + +# Installation + +To use AutoFill, first download DataTables ( http://datatables.net/download ) and place the unzipped AutoFill package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser. + + +# Basic usage + +AutoFill is initialised using the `$.fn.dataTable.AutoFill` constructor. For example: + +```js +$(document).ready( function () { + var table = $('#example').dataTable(); + new $.fn.dataTable.AutoFill( table ); +} ); +``` + + +# Documentation / support + +* Documentation: http://datatables.net/extensions/autofill/ +* DataTables support forums: http://datatables.net/forums + + +# GitHub + +If you fancy getting involved with the development of AutoFill and help make it better, please refer to its GitHub repo: https://github.com/DataTables/AutoFill + diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.css b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.css new file mode 100644 index 00000000000..cab59b3a059 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.css @@ -0,0 +1,24 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * AutoFill styles + */ + +div.AutoFill_filler { + display: none; + position: absolute; + height: 14px; + width: 14px; + background: url(../images/filler.png) no-repeat center center; + z-index: 1002; +} + +div.AutoFill_border { + display: none; + position: absolute; + background-color: #0063dc; + z-index: 1001; + + box-shadow: 0px 0px 5px #76b4ff; + -moz-box-shadow: 0px 0px 5px #76b4ff; + -webkit-box-shadow: 0px 0px 5px #76b4ff; +} + diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.min.css b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.min.css new file mode 100644 index 00000000000..b485f2163fc --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.min.css @@ -0,0 +1 @@ +div.AutoFill_filler{display:none;position:absolute;height:14px;width:14px;background:url(../images/filler.png) no-repeat center center;z-index:1002}div.AutoFill_border{display:none;position:absolute;background-color:#0063dc;z-index:1001;box-shadow:0px 0px 5px #76b4ff;-moz-box-shadow:0px 0px 5px #76b4ff;-webkit-box-shadow:0px 0px 5px #76b4ff} diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/images/filler.png b/htdocs/includes/jquery/plugins/datatables/extensions/AutoFill/images/filler.png new file mode 100644 index 0000000000000000000000000000000000000000..f2af65d8c38a5b752894dffc224021da92b182c2 GIT binary patch literal 1040 zcmaJ=&ui0A9M66@w!&Z+!70ikJBe%ZlKu{>-PSCwvdq#I>|w&vYiQvJ*5b8_Ub{?#`r0{k+Lq*2zHAYueQ6G zuVR9|Dt172AqG@UH|-#9;#F13*&fks9p&USOBFcNG^F?pgo&gOn--L~AjnEm7NL?z zMw6*X9Lg!7&6TmfW+9ujxyCU!-jy4yg5}W6GIGszWGF7SK(l1Y?CvGfRj(P&hdK>+K$ z<(~eLG5Kqz6arhHFQ57{oj=S>GJC1~', { + 'class': 'AutoFill_filler' + } ) + .appendTo( 'body' ); + this.dom.filler = filler[0]; + + // Get the height / width of the click element + this.s.filler.height = filler.height(); + this.s.filler.width = filler.width(); + filler[0].style.display = "none"; + + /* Border display - one div for each side. We can't just use a single + * one with a border, as we want the events to effectively pass through + * the transparent bit of the box + */ + var border; + var appender = document.body; + if ( that.s.dt.oScroll.sY !== "" ) { + that.s.dt.nTable.parentNode.style.position = "relative"; + appender = that.s.dt.nTable.parentNode; + } + + border = $('
', { + "class": "AutoFill_border" + } ); + this.dom.borderTop = border.clone().appendTo( appender )[0]; + this.dom.borderRight = border.clone().appendTo( appender )[0]; + this.dom.borderBottom = border.clone().appendTo( appender )[0]; + this.dom.borderLeft = border.clone().appendTo( appender )[0]; + + /* Events */ + filler.on( 'mousedown.DTAF', function (e) { + this.onselectstart = function() { return false; }; + that._fnFillerDragStart.call( that, e ); + return false; + } ); + + $('tbody', this.dom.table).on( + 'mouseover.DTAF mouseout.DTAF', + '>tr>td, >tr>th', + function (e) { + that._fnFillerDisplay.call( that, e ); + } + ); + + $(this.dom.table).on( 'destroy.dt.DTAF', function () { + filler.off( 'mousedown.DTAF' ).remove(); + $('tbody', this.dom.table).off( 'mouseover.DTAF mouseout.DTAF' ); + } ); + }, + + + _initColumns: function ( ) + { + var that = this; + var i, ien; + var dt = this.s.dt; + var config = this.s.init; + + for ( i=0, ien=dt.aoColumns.length ; i offsetEnd.left) { + x1 = offsetEnd.left - border; + x2 = offsetStart.left + $(nStart).outerWidth(); + width = offsetStart.left + $(nStart).outerWidth() - offsetEnd.left + (2*border); + } + + if ( this.s.dt.oScroll.sY !== "" ) + { + /* The border elements are inside the DT scroller - so position relative to that */ + var + offsetScroll = $(this.s.dt.nTable.parentNode).offset(), + scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(), + scrollLeft = $(this.s.dt.nTable.parentNode).scrollLeft(); + + x1 -= offsetScroll.left - scrollLeft; + x2 -= offsetScroll.left - scrollLeft; + y1 -= offsetScroll.top - scrollTop; + y2 -= offsetScroll.top - scrollTop; + } + + /* Top */ + oStyle = this.dom.borderTop.style; + oStyle.top = y1+"px"; + oStyle.left = x1+"px"; + oStyle.height = this.s.border.width+"px"; + oStyle.width = width+"px"; + + /* Bottom */ + oStyle = this.dom.borderBottom.style; + oStyle.top = y2+"px"; + oStyle.left = x1+"px"; + oStyle.height = this.s.border.width+"px"; + oStyle.width = width+"px"; + + /* Left */ + oStyle = this.dom.borderLeft.style; + oStyle.top = y1+"px"; + oStyle.left = x1+"px"; + oStyle.height = height+"px"; + oStyle.width = this.s.border.width+"px"; + + /* Right */ + oStyle = this.dom.borderRight.style; + oStyle.top = y1+"px"; + oStyle.left = x2+"px"; + oStyle.height = height+"px"; + oStyle.width = this.s.border.width+"px"; + }, + + + /** + * Mouse down event handler for starting a drag + * @method _fnFillerDragStart + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDragStart": function (e) + { + var that = this; + var startingTd = this.dom.currentTarget; + + this.s.drag.dragging = true; + + that.dom.borderTop.style.display = "block"; + that.dom.borderRight.style.display = "block"; + that.dom.borderBottom.style.display = "block"; + that.dom.borderLeft.style.display = "block"; + + var coords = this._fnTargetCoords( startingTd ); + this.s.drag.startX = coords.x; + this.s.drag.startY = coords.y; + + this.s.drag.startTd = startingTd; + this.s.drag.endTd = startingTd; + + this._fnUpdateBorder( startingTd, startingTd ); + + $(document).bind('mousemove.AutoFill', function (e) { + that._fnFillerDragMove.call( that, e ); + } ); + + $(document).bind('mouseup.AutoFill', function (e) { + that._fnFillerFinish.call( that, e ); + } ); + + /* Scrolling information cache */ + this.s.screen.y = e.pageY; + this.s.screen.height = $(window).height(); + this.s.screen.scrollTop = $(document).scrollTop(); + + if ( this.s.dt.oScroll.sY !== "" ) + { + this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top; + this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height(); + } + + /* Scrolling handler - we set an interval (which is cancelled on mouse up) which will fire + * regularly and see if we need to do any scrolling + */ + this.s.screen.interval = setInterval( function () { + var iScrollTop = $(document).scrollTop(); + var iScrollDelta = iScrollTop - that.s.screen.scrollTop; + that.s.screen.y += iScrollDelta; + + if ( that.s.screen.height - that.s.screen.y + iScrollTop < 50 ) + { + $('html, body').animate( { + "scrollTop": iScrollTop + 50 + }, 240, 'linear' ); + } + else if ( that.s.screen.y - iScrollTop < 50 ) + { + $('html, body').animate( { + "scrollTop": iScrollTop - 50 + }, 240, 'linear' ); + } + + if ( that.s.dt.oScroll.sY !== "" ) + { + if ( that.s.screen.y > that.s.scroller.bottom - 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() + 50 + }, 240, 'linear' ); + } + else if ( that.s.screen.y < that.s.scroller.top + 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() - 50 + }, 240, 'linear' ); + } + } + }, 250 ); + }, + + + /** + * Mouse move event handler for during a move. See if we want to update the display based on the + * new cursor position + * @method _fnFillerDragMove + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDragMove": function (e) + { + if ( e.target && e.target.nodeName.toUpperCase() == "TD" && + e.target != this.s.drag.endTd ) + { + var coords = this._fnTargetCoords( e.target ); + + if ( this.c.mode == "y" && coords.x != this.s.drag.startX ) + { + e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0]; + } + if ( this.c.mode == "x" && coords.y != this.s.drag.startY ) + { + e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0]; + } + + if ( this.c.mode == "either") + { + if(coords.x != this.s.drag.startX ) + { + e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0]; + } + else if ( coords.y != this.s.drag.startY ) { + e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0]; + } + } + + // update coords + if ( this.c.mode !== "both" ) { + coords = this._fnTargetCoords( e.target ); + } + + var drag = this.s.drag; + drag.endTd = e.target; + + if ( coords.y >= this.s.drag.startY ) { + this._fnUpdateBorder( drag.startTd, drag.endTd ); + } + else { + this._fnUpdateBorder( drag.endTd, drag.startTd ); + } + this._fnFillerPosition( e.target ); + } + + /* Update the screen information so we can perform scrolling */ + this.s.screen.y = e.pageY; + this.s.screen.scrollTop = $(document).scrollTop(); + + if ( this.s.dt.oScroll.sY !== "" ) + { + this.s.scroller.scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(); + this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top; + this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height(); + } + }, + + + /** + * Mouse release handler - end the drag and take action to update the cells with the needed values + * @method _fnFillerFinish + * @param {Object} e Event object + * @returns void + */ + "_fnFillerFinish": function (e) + { + var that = this, i, iLen, j; + + $(document).unbind('mousemove.AutoFill mouseup.AutoFill'); + + this.dom.borderTop.style.display = "none"; + this.dom.borderRight.style.display = "none"; + this.dom.borderBottom.style.display = "none"; + this.dom.borderLeft.style.display = "none"; + + this.s.drag.dragging = false; + + clearInterval( this.s.screen.interval ); + + var cells = []; + var table = this.dom.table; + var coordsStart = this._fnTargetCoords( this.s.drag.startTd ); + var coordsEnd = this._fnTargetCoords( this.s.drag.endTd ); + var columnIndex = function ( visIdx ) { + return that.s.dt.oApi._fnVisibleToColumnIndex( that.s.dt, visIdx ); + }; + + // xxx - urgh - there must be a way of reducing this... + if ( coordsStart.y <= coordsEnd.y ) { + for ( i=coordsStart.y ; i<=coordsEnd.y ; i++ ) { + if ( coordsStart.x <= coordsEnd.x ) { + for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + else { + for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + } + } + else { + for ( i=coordsStart.y ; i>=coordsEnd.y ; i-- ) { + if ( coordsStart.x <= coordsEnd.x ) { + for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + else { + for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: coordsStart.x - j, + y: coordsStart.y - i, + colIdx: columnIndex( j ) + } ); + } + } + } + } + + // An auto-fill requires 2 or more cells + if ( cells.length <= 1 ) { + return; + } + + var edited = []; + var previous; + + for ( i=0, iLen=cells.length ; i",{"class":"AutoFill_filler"}).appendTo("body");this.dom.filler=e[0];this.s.filler.height=e.height();this.s.filler.width=e.width();e[0].style.display= +"none";var g,f=j.body;""!==a.s.dt.oScroll.sY&&(a.s.dt.nTable.parentNode.style.position="relative",f=a.s.dt.nTable.parentNode);g=c("
",{"class":"AutoFill_border"});this.dom.borderTop=g.clone().appendTo(f)[0];this.dom.borderRight=g.clone().appendTo(f)[0];this.dom.borderBottom=g.clone().appendTo(f)[0];this.dom.borderLeft=g.clone().appendTo(f)[0];e.on("mousedown.DTAF",function(b){this.onselectstart=function(){return false};a._fnFillerDragStart.call(a,b);return false});c("tbody",this.dom.table).on("mouseover.DTAF mouseout.DTAF", +">tr>td, >tr>th",function(b){a._fnFillerDisplay.call(a,b)});c(this.dom.table).on("destroy.dt.DTAF",function(){e.off("mousedown.DTAF").remove();c("tbody",this.dom.table).off("mouseover.DTAF mouseout.DTAF")})},_initColumns:function(){var d=this,b,a,e=this.s.dt,g=this.s.init;b=0;for(a=e.aoColumns.length;bg.left&&(f=g.left-a,i=e.left+c(d).outerWidth(),j=e.left+c(d).outerWidth()-g.left+2*a);""!==this.s.dt.oScroll.sY&&(a=c(this.s.dt.nTable.parentNode).offset(),e=c(this.s.dt.nTable.parentNode).scrollTop(), +g=c(this.s.dt.nTable.parentNode).scrollLeft(),f-=a.left-g,i-=a.left-g,n-=a.top-e,h-=a.top-e);a=this.dom.borderTop.style;a.top=n+"px";a.left=f+"px";a.height=this.s.border.width+"px";a.width=j+"px";a=this.dom.borderBottom.style;a.top=h+"px";a.left=f+"px";a.height=this.s.border.width+"px";a.width=j+"px";a=this.dom.borderLeft.style;a.top=n+"px";a.left=f+"px";a.height=k+"px";a.width=this.s.border.width+"px";a=this.dom.borderRight.style;a.top=n+"px";a.left=i+"px";a.height=k+"px";a.width=this.s.border.width+ +"px"},_fnFillerDragStart:function(d){var b=this,a=this.dom.currentTarget;this.s.drag.dragging=!0;b.dom.borderTop.style.display="block";b.dom.borderRight.style.display="block";b.dom.borderBottom.style.display="block";b.dom.borderLeft.style.display="block";var e=this._fnTargetCoords(a);this.s.drag.startX=e.x;this.s.drag.startY=e.y;this.s.drag.startTd=a;this.s.drag.endTd=a;this._fnUpdateBorder(a,a);c(j).bind("mousemove.AutoFill",function(a){b._fnFillerDragMove.call(b,a)});c(j).bind("mouseup.AutoFill", +function(a){b._fnFillerFinish.call(b,a)});this.s.screen.y=d.pageY;this.s.screen.height=c(o).height();this.s.screen.scrollTop=c(j).scrollTop();""!==this.s.dt.oScroll.sY&&(this.s.scroller.top=c(this.s.dt.nTable.parentNode).offset().top,this.s.scroller.bottom=this.s.scroller.top+c(this.s.dt.nTable.parentNode).height());this.s.screen.interval=setInterval(function(){var a=c(j).scrollTop();b.s.screen.y=b.s.screen.y+(a-b.s.screen.scrollTop);b.s.screen.height-b.s.screen.y+a<50?c("html, body").animate({scrollTop:a+ +50},240,"linear"):b.s.screen.y-a<50&&c("html, body").animate({scrollTop:a-50},240,"linear");b.s.dt.oScroll.sY!==""&&(b.s.screen.y>b.s.scroller.bottom-50?c(b.s.dt.nTable.parentNode).animate({scrollTop:c(b.s.dt.nTable.parentNode).scrollTop()+50},240,"linear"):b.s.screen.ytr:eq("+b.y+")>td:eq("+this.s.drag.startX+")",this.dom.table)[0]);"x"==this.c.mode&&b.y!=this.s.drag.startY&&(d.target=c("tbody>tr:eq("+this.s.drag.startY+")>td:eq("+b.x+")",this.dom.table)[0]);"either"==this.c.mode&&(b.x!=this.s.drag.startX?d.target=c("tbody>tr:eq("+this.s.drag.startY+")>td:eq("+b.x+")",this.dom.table)[0]:b.y!=this.s.drag.startY&&(d.target=c("tbody>tr:eq("+b.y+")>td:eq("+this.s.drag.startX+ +")",this.dom.table)[0]));"both"!==this.c.mode&&(b=this._fnTargetCoords(d.target));var a=this.s.drag;a.endTd=d.target;b.y>=this.s.drag.startY?this._fnUpdateBorder(a.startTd,a.endTd):this._fnUpdateBorder(a.endTd,a.startTd);this._fnFillerPosition(d.target)}this.s.screen.y=d.pageY;this.s.screen.scrollTop=c(j).scrollTop();""!==this.s.dt.oScroll.sY&&(this.s.scroller.scrollTop=c(this.s.dt.nTable.parentNode).scrollTop(),this.s.scroller.top=c(this.s.dt.nTable.parentNode).offset().top,this.s.scroller.bottom= +this.s.scroller.top+c(this.s.dt.nTable.parentNode).height())},_fnFillerFinish:function(){var d=this,b,a;c(j).unbind("mousemove.AutoFill mouseup.AutoFill");this.dom.borderTop.style.display="none";this.dom.borderRight.style.display="none";this.dom.borderBottom.style.display="none";this.dom.borderLeft.style.display="none";this.s.drag.dragging=!1;clearInterval(this.s.screen.interval);var e=[],g=this.dom.table,f=this._fnTargetCoords(this.s.drag.startTd),i=this._fnTargetCoords(this.s.drag.endTd),h=function(a){return d.s.dt.oApi._fnVisibleToColumnIndex(d.s.dt, +a)};if(f.y<=i.y)for(b=f.y;b<=i.y;b++)if(f.x<=i.x)for(a=f.x;a<=i.x;a++)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(a=f.x;a>=i.x;a--)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(b=f.y;b>=i.y;b--)if(f.x<=i.x)for(a=f.x;a<=i.x;a++)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(a=f.x;a>=i.x;a--)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:f.x-a,y:f.y- +b,colIdx:h(a)});if(!(1>=e.length)){var g=[],m;b=0;for(a=e.length;bg||0>f?-1:1)):a===m?b:a}}};return h};"function"===typeof define&&define.amd? +define(["jquery","datatables"],l):"object"===typeof exports?l(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.AutoFill&&l(jQuery,jQuery.fn.dataTable)})(window,document); diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt new file mode 100644 index 00000000000..9ade2f1b640 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt @@ -0,0 +1,20 @@ +Copyright (c) 2010-2015 SpryMedia Limited +http://datatables.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/Readme.md b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/Readme.md new file mode 100644 index 00000000000..217dd60e2c8 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/Readme.md @@ -0,0 +1,39 @@ +# ColReorder + +ColReorder adds the ability for the end user to click and drag column headers to reorder a table as they see fit, to DataTables. Key features include: + +* Very easy integration with DataTables +* Tight integration with all other DataTables plug-ins +* The ability to exclude the first (or more) column from being movable +* Predefine a column order +* Save staving integration with DataTables + + +# Installation + +To use ColReorder, first download DataTables ( http://datatables.net/download ) and place the unzipped ColReorder package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser. + + +# Basic usage + +ColReorder is initialised using the `$.fn.dataTable.ColReorder` constructor. For example: + +```js +$(document).ready( function () { + $('#example').DataTable(); + + new $.fn.dataTable.ColReorder( table ); +} ); +``` + + +# Documentation / support + +* Documentation: http://datatables.net/extensions/colreorder/ +* DataTables support forums: http://datatables.net/forums + + +# GitHub + +If you fancy getting involved with the development of ColReorder and help make it better, please refer to its GitHub repo: https://github.com/DataTables/ColReorder + diff --git a/htdocs/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.css similarity index 50% rename from htdocs/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css rename to htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.css index 9c597e34871..bdd6aa0b9ad 100644 --- a/htdocs/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css +++ b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.css @@ -3,7 +3,7 @@ */ table.DTCR_clonedTable { - background-color: white; + background-color: rgba(255, 255, 255, 0.7); z-index: 202; } @@ -11,11 +11,4 @@ div.DTCR_pointer { width: 1px; background-color: #0259C4; z-index: 201; -} - -body.alt div.DTCR_pointer { - margin-top: -15px; - margin-left: -9px; - width: 18px; - background: url('../images/insert.png') no-repeat top left; } \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.min.css b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.min.css new file mode 100644 index 00000000000..77b230e0136 --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/css/dataTables.colReorder.min.css @@ -0,0 +1 @@ +table.DTCR_clonedTable{background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0259C4;z-index:201} diff --git a/htdocs/includes/jquery/plugins/datatables/extras/ColReorder/images/insert.png b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/images/insert.png similarity index 100% rename from htdocs/includes/jquery/plugins/datatables/extras/ColReorder/images/insert.png rename to htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/images/insert.png diff --git a/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.js b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.js new file mode 100755 index 00000000000..c3b2f1e2adc --- /dev/null +++ b/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.js @@ -0,0 +1,1372 @@ +/*! ColReorder 1.1.3 + * ©2010-2014 SpryMedia Ltd - datatables.net/license + */ + +/** + * @summary ColReorder + * @description Provide the ability to reorder columns in a DataTable + * @version 1.1.3 + * @file dataTables.colReorder.js + * @author SpryMedia Ltd (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * @copyright Copyright 2010-2014 SpryMedia Ltd. + * + * This source file is free software, available under the following license: + * MIT license - http://datatables.net/license/mit + * + * 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 + */ + +(function(window, document, undefined) { + + +/** + * Switch the key value pairing of an index array to be value key (i.e. the old value is now the + * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ]. + * @method fnInvertKeyValues + * @param array aIn Array to switch around + * @returns array + */ +function fnInvertKeyValues( aIn ) +{ + var aRet=[]; + for ( var i=0, iLen=aIn.length ; i= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'from' index is out of bounds: "+iFrom ); + return; + } + + if ( iTo < 0 || iTo >= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'to' index is out of bounds: "+iTo ); + return; + } + + /* + * Calculate the new column array index, so we have a mapping between the old and new + */ + var aiMapping = []; + for ( i=0, iLen=iCols ; i this.s.fixed-1 && i < iLen - this.s.fixedRight ) + { + this._fnMouseListener( i, this.s.dt.aoColumns[i].nTh ); + } + + /* Mark the original column order for later reference */ + this.s.dt.aoColumns[i]._ColReorder_iOrigCol = i; + } + + /* State saving */ + this.s.dt.oApi._fnCallbackReg( this.s.dt, 'aoStateSaveParams', function (oS, oData) { + that._fnStateSave.call( that, oData ); + }, "ColReorder_State" ); + + /* An initial column order has been specified */ + var aiOrder = null; + if ( this.s.init.aiOrder ) + { + aiOrder = this.s.init.aiOrder.slice(); + } + + /* State loading, overrides the column order given */ + if ( this.s.dt.oLoadedState && typeof this.s.dt.oLoadedState.ColReorder != 'undefined' && + this.s.dt.oLoadedState.ColReorder.length == this.s.dt.aoColumns.length ) + { + aiOrder = this.s.dt.oLoadedState.ColReorder; + } + + /* If we have an order to apply - do so */ + if ( aiOrder ) + { + /* We might be called during or after the DataTables initialisation. If before, then we need + * to wait until the draw is done, if after, then do what we need to do right away + */ + if ( !that.s.dt._bInitComplete ) + { + var bDone = false; + this.s.dt.aoDrawCallback.push( { + "fn": function () { + if ( !that.s.dt._bInitComplete && !bDone ) + { + bDone = true; + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + }, + "sName": "ColReorder_Pre" + } ); + } + else + { + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + } + else { + this._fnSetColumnIndexes(); + } + }, + + + /** + * Set the column order from an array + * @method _fnOrderColumns + * @param array a An array of integers which dictate the column order that should be applied + * @returns void + * @private + */ + "_fnOrderColumns": function ( a ) + { + if ( a.length != this.s.dt.aoColumns.length ) + { + this.s.dt.oInstance.oApi._fnLog( this.s.dt, 1, "ColReorder - array reorder does not "+ + "match known number of columns. Skipping." ); + return; + } + + for ( var i=0, iLen=a.length ; i
') + .addClass( 'DTCR_pointer' ) + .css( { + position: 'absolute', + top: scrolling ? + $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top : + $(this.s.dt.nTable).offset().top, + height : scrolling ? + $('div.dataTables_scroll', this.s.dt.nTableWrapper).height() : + $(this.s.dt.nTable).height() + } ) + .appendTo( 'body' ); + }, + + /** + * Clean up ColReorder memory references and event handlers + * @method _fnDestroy + * @returns void + * @private + */ + "_fnDestroy": function () + { + var i, iLen; + + for ( i=0, iLen=this.s.dt.aoDrawCallback.length ; ib||b>=n)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+b);else if(0>e||e>=n)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+e);else{f=[];c=0;for(g=n;cthis.s.fixed-1&&eMath.pow(Math.pow(a.pageX-this.s.mouse.startX,2)+Math.pow(a.pageY-this.s.mouse.startY,2),0.5))return;this._fnCreateDragNode()}this.dom.drag.css({left:a.pageX-this.s.mouse.offsetX,top:a.pageY-this.s.mouse.offsetY});for(var b=!1,e=this.s.mouse.toIndex,d=1,c=this.s.aoTargets.length;d
").addClass("DTCR_pointer").css({position:"absolute",top:a?d("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:d(this.s.dt.nTable).offset().top,height:a?d("div.dataTables_scroll",this.s.dt.nTableWrapper).height(): +d(this.s.dt.nTable).height()}).appendTo("body")},_fnDestroy:function(){var a,b;a=0;for(b=this.s.dt.aoDrawCallback.length;a