From 424206b9a9e34010db839bb489646b0036492e68 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 17 Jan 2012 11:18:17 +0100 Subject: [PATCH] CC-3174 : Show Builder data tables column resizing, starting separating out events. --- .../controllers/LibraryController.php | 4 +- .../controllers/ShowbuilderController.php | 11 + airtime_mvc/application/models/StoredFile.php | 60 +- .../library/events/library_playlistbuilder.js | 20 + .../library/events/library_showbuilder.js | 14 + .../public/js/airtime/library/library.js | 87 +- .../public/js/airtime/showbuilder/builder.js | 17 +- .../plugin/dataTables.ColReorderResize.js | 1020 +++++++++++++++++ 8 files changed, 1156 insertions(+), 77 deletions(-) create mode 100644 airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js create mode 100644 airtime_mvc/public/js/airtime/library/events/library_showbuilder.js create mode 100644 airtime_mvc/public/js/datatables/plugin/dataTables.ColReorderResize.js diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index d2dbf730b..0d499c9d6 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -27,6 +27,8 @@ class LibraryController extends Zend_Controller_Action $this->_helper->layout->setLayout('library'); + $this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_playlistbuilder.js'),'text/javascript'); + $this->_helper->actionStack('library', 'library'); $this->_helper->actionStack('index', 'playlist'); } @@ -41,7 +43,7 @@ class LibraryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js','text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js','text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorderResize.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js','text/javascript'); diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index 6a5e719a1..674ea827d 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -29,6 +29,8 @@ class ShowbuilderController extends Zend_Controller_Action if ($user->isAdmin() || $user->isHost($show_instance->getShowId())) { $this->_helper->layout->setLayout('builder'); + $this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js'),'text/javascript'); + $this->_helper->actionStack('library', 'library'); $this->_helper->actionStack('builder', 'showbuilder'); } @@ -56,5 +58,14 @@ class ShowbuilderController extends Zend_Controller_Action public function scheduleAction() { + $request = $this->getRequest(); + + $show_instance_id = $request->getParam("sid", 0); + $scheduled_item_id = $request->getParam("time", 0); + $scheduled_start = $request->getParam("start", 0); + + //snap to previous/next default. + $scheduled_type = $request->getParam("type", 0); + } } \ No newline at end of file diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index d371d083f..3e42e4e41 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -90,7 +90,7 @@ class Application_Model_StoredFile { } $this->setDbColMetadata($dbMd); } - + $this->_file->setDbMtime(new DateTime("now"), new DateTimeZone("UTC")); $this->_file->save(); } @@ -316,7 +316,7 @@ class Application_Model_StoredFile { // don't delete from the playslist. We might want to put a flag //Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId()); - + // set file_exists falg to false $this->_file->setDbFileExists(false); $this->_file->save(); @@ -418,10 +418,10 @@ class Application_Model_StoredFile { * @return string */ public function getFilePath() - { + { $music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory()); $directory = $music_dir->getDirectory(); - + $filepath = $this->_file->getDbFilepath(); return $directory.$filepath; @@ -435,7 +435,7 @@ class Application_Model_StoredFile { public function setFilePath($p_filepath) { $path_info = Application_Model_MusicDir::splitFilePath($p_filepath); - + if (is_null($path_info)) { return -1; } @@ -505,7 +505,7 @@ class Application_Model_StoredFile { $storedFile->_file = $file; if(isset($md['MDATA_KEY_FILEPATH'])) { - // removed "//" in the path. Always use '/' for path separator + // removed "//" in the path. Always use '/' for path separator $filepath = str_replace("//", "/", $md['MDATA_KEY_FILEPATH']); $res = $storedFile->setFilePath($filepath); if ($res === -1) { @@ -684,8 +684,23 @@ class Application_Model_StoredFile { LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id)) UNION (".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exists = 'TRUE')) AS RESULTS"; - + $results = Application_Model_StoredFile::searchFiles($fromTable, $datatables); + + /* + type = aData["ftype"].substring(0,2); + id = aData["id"]; + + if(type == "au") { + $('td.library_type', nRow).html( '' ); + } else if(type == "pl") { + $('td.library_type', nRow).html( '' ); + } + + + $(nRow).attr("id", type+'_'+id); + */ + foreach($results['aaData'] as &$row){ // add checkbox row $row['checkbox'] = ""; @@ -694,7 +709,22 @@ class Application_Model_StoredFile { // split it and grab only the year info $yearSplit = explode('-', $row['year']); $row['year'] = $yearSplit[0]; + + $type = substr($row['ftype'], 0, 2); + + $row['id'] = "{$type}_{$row['id']}"; + + //TODO url like this to work on both playlist/showbuilder screens. + //datatable stuff really needs to be pulled out and generalized within the project + //access to zend view methods to access url helpers is needed. + if($type == "au") { + $row['ftype'] = ''; + } + else { + $row['ftype'] = ''; + } } + return $results; } @@ -773,9 +803,9 @@ class Application_Model_StoredFile { else { $sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby." OFFSET ".$data["iDisplayStart"]." LIMIT ".$data["iDisplayLength"]; } - + $results = $CC_DBC->getAll($sql); - + if(!isset($totalDisplayRows)) { $totalDisplayRows = $totalRows; } @@ -904,10 +934,10 @@ class Application_Model_StoredFile { $audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName; Logging::log("copyFileToStor: moving file $audio_file to $audio_stor"); - + //Martin K.: changed to rename: Much less load + quicker since this is an atomic operation $r = @rename($audio_file, $audio_stor); - + //$r = @copy($audio_file, $audio_stor); //$r = @unlink($audio_file); } @@ -920,14 +950,14 @@ class Application_Model_StoredFile { } /** - * + * * Enter description here ... * @param $dir_id - if this is not provided, it returns all files with full path constructed. * @param $propelObj - if this is true, it returns array of proepl obj */ public static function listAllFiles($dir_id=null, $propelObj=false){ global $CC_DBC; - + if($propelObj){ $sql = "SELECT m.directory || f.filepath as fp" ." FROM CC_MUSIC_DIRS m" @@ -989,12 +1019,12 @@ class Application_Model_StoredFile { public function getSoundCloudErrorMsg(){ return $this->_file->getDbSoundCloudErrorMsg(); } - + public function setFileExistsFlag($flag){ $this->_file->setDbFileExists($flag) ->save(); } - + public function getFileExistsFlag(){ return $this->_file->getDbFileExists(); } diff --git a/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js new file mode 100644 index 000000000..3935d8c23 --- /dev/null +++ b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js @@ -0,0 +1,20 @@ +function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { + + $(nRow).attr("id", aData["id"]); + + return nRow; +} + +function dtDrawCallback() { + addLibraryItemEvents(); + addMetadataQtip(); + //saveNumEntriesSetting(); + setupGroupActions(); +} + +function setupLibraryToolbar() { + $("div.library_toolbar").html('Reset Order' + + 'Delete' + + 'Add'); +} + diff --git a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js new file mode 100644 index 000000000..f5a1c6d18 --- /dev/null +++ b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js @@ -0,0 +1,14 @@ +function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { + + $(nRow).attr("id", aData["id"]); + + $(nRow).data("show_builder", {"id": aData["id"], "length": aData["length"]}); + + return nRow; +} + +function dtDrawCallback() { + addLibraryItemEvents(); + //addMetadataQtip(); + //setupGroupActions(); +} \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index aa8a6bb88..65dc7c54b 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -120,33 +120,6 @@ function addLibraryItemEvents() { } -function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var id, type, once; - - type = aData["ftype"].substring(0,2); - id = aData["id"]; - - if(type == "au") { - $('td.library_type', nRow).html( '' ); - } else if(type == "pl") { - $('td.library_type', nRow).html( '' ); - } - - $(nRow).attr("id", type+'_'+id); - - // insert id on lenth field - $('td.library_length', nRow).attr("id", "length"); - - return nRow; -} - -function dtDrawCallback() { - addLibraryItemEvents(); - addMetadataQtip(); - saveNumEntriesSetting(); - setupGroupActions(); -} - function addProgressIcon(id) { if($("#au_"+id).find("td.library_title").find("span").length > 0){ $("#au_"+id).find("td.library_title").find("span").removeClass(); @@ -513,47 +486,43 @@ function createDataTable(data) { "fnRowCallback": dtRowCallback, "fnDrawCallback": dtDrawCallback, "aoColumns": [ - /* Checkbox */ {"sTitle": "", "bSortable": false, "bSearchable": false, "mDataProp": "checkbox", "sWidth": "25px", "sClass": "library_checkbox"}, - /* Id */ {"sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id", "sClass": "library_id"}, - /* Title */ {"sTitle": "Title", "sName": "track_title", "mDataProp": "track_title", "sClass": "library_title"}, - /* Creator */ {"sTitle": "Creator", "sName": "artist_name", "mDataProp": "artist_name", "sClass": "library_creator"}, - /* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"}, - /* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sWidth": "10%", "sClass": "library_genre"}, - /* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sWidth": "8%", "sClass": "library_year"}, - /* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "10%", "sClass": "library_length"}, - /* Type */ {"sTitle": "Type", "sName": "ftype", "bSearchable": false, "mDataProp": "ftype", "sWidth": "9%", "sClass": "library_type"}, - /* Upload Time */ {"sTitle": "Upload Time", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"}, - /* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"}, - ], + /* Checkbox */ {"sTitle": "", "bSortable": false, "bSearchable": false, "mDataProp": "checkbox", "sWidth": "25px", "sClass": "library_checkbox"}, + /* Id */ {"sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id", "sClass": "library_id"}, + /* Title */ {"sTitle": "Title", "sName": "track_title", "mDataProp": "track_title", "sClass": "library_title"}, + /* Creator */ {"sTitle": "Creator", "sName": "artist_name", "mDataProp": "artist_name", "sClass": "library_creator"}, + /* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"}, + /* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sWidth": "10%", "sClass": "library_genre"}, + /* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sWidth": "8%", "sClass": "library_year"}, + /* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "10%", "sClass": "library_length"}, + /* Type */ {"sTitle": "Type", "sName": "ftype", "bSearchable": false, "mDataProp": "ftype", "sWidth": "9%", "sClass": "library_type"}, + /* Upload Time */ {"sTitle": "Upload Time", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"}, + /* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"}, + ], "aaSorting": [[2,'asc']], "sPaginationType": "full_numbers", "bJQueryUI": true, "bAutoWidth": false, - "oLanguage": { - "sSearch": "" - }, - "iDisplayLength": getNumEntriesPreference(data), - "bStateSave": true, - // R = ColReorder, C = ColVis, see datatables doc for others - "sDom": 'Rlfr<"H"C<"library_toolbar">>t<"F"ip>', - "oColVis": { - "buttonText": "Show/Hide Columns", - "sAlign": "right", - "aiExclude": [0, 1, 2], - "sSize": "css", - "bShowAll": true + "oLanguage": { + "sSearch": "" + }, + "iDisplayLength": getNumEntriesPreference(data), + "bStateSave": true, + // R = ColReorder, C = ColVis, see datatables doc for others + "sDom": 'Rlfr<"H"C<"library_toolbar">>t<"F"ip>', + "oColVis": { + "buttonText": "Show/Hide Columns", + "sAlign": "right", + "aiExclude": [0, 1, 2], + "sSize": "css", + "bShowAll": true }, - "oColReorder": { - "aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] /* code this */, - "iFixedColumns": 3 + "oColReorder": { + "aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], /* code this */ + "iFixedColumns": 3 } }); dTable.fnSetFilteringDelay(350); - $("div.library_toolbar").html('Reset Order' + - 'Delete' + - 'Add'); - $('#library_order_reset').click(function() { ColReorder.fnReset( dTable ); return false; diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index aadcd90c7..0038d4a40 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -26,7 +26,7 @@ $(document).ready(function() { events: getFullCalendarEvents, - axisFormat: 'H:mm:ss', + axisFormat: 'H:mm', slotMinutes: 1, timeFormat: { agenda: 'H:mm:ss{ - H:mm:ss}' @@ -44,6 +44,18 @@ $(document).ready(function() { // we need to copy it, so that multiple events don't have a reference to the same object //var copiedEventObject = $.extend({}, originalEventObject); var copiedEventObject = {}; + var data = $(this).data("show_builder"); + + $.ajax({url: "/showbuilder/schedule", + data:{format: "json", sid:"", schedule_start: date}, + dataType:"json", + success:function(json){ + var x; + }, + error:function(jqXHR, textStatus, errorThrown){ + var x; + } + }); // assign it the date that was reported copiedEventObject.title = "test title"; @@ -56,8 +68,9 @@ $(document).ready(function() { // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) - $('#show_builder').fullCalendar('renderEvent', copiedEventObject, true); + //$('#show_builder').fullCalendar('renderEvent', copiedEventObject, true); + $("#schedule_calendar").fullCalendar( 'refetchEvents' ); } }); }); diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorderResize.js b/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorderResize.js new file mode 100644 index 000000000..c1336ffac --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.ColReorderResize.js @@ -0,0 +1,1020 @@ +/* + * File: ColReorderWithResize.js + * Version: 1.0.3 + * CVS: $Id$ + * Description: Controls for column visiblity in DataTables + col resizing + * Author: Allan Jardine (www.sprymedia.co.uk) + * Created: Wed Sep 15 18:23:29 BST 2010 + * Modified: July 2011 by Christophe Battarel - christophe.battarel@altairis.fr (resizing) + * Language: Javascript + * License: GPL v2 or BSD 3 point style + * Project: DataTables + * Contact: www.sprymedia.co.uk/contact + * + * Copyright 2010-2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + */ + + +(function($, window, document) { + + +/** + * 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 ) + { + 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.aoStateSave.push( { + "fn": function (oS, sVal) { + return that._fnStateSave.call( that, sVal ); + }, + "sName": "ColReorder_State" + } ); + + /* An initial column order has been specified */ + var aiOrder = null; + if ( typeof this.s.init.aiOrder != 'undefined' ) + { + 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 ); + } + } + }, + + + /** + * 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( oDTSettings, 1, "ColReorder - array reorder does not "+ + "match known number of columns. Skipping." ); + return; + } + + for ( var i=0, iLen=a.length ; i 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tbody')[0] ); + } + while ( this.dom.drag.getElementsByTagName('tfoot').length > 0 ) + { + this.dom.drag.removeChild( this.dom.drag.getElementsByTagName('tfoot')[0] ); + } + + $('thead tr:eq(0)', this.dom.drag).each( function () { + $('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove(); + } ); + $('tr', this.dom.drag).height( $('tr:eq(0)', that.s.dt.nTHead).height() ); + + $('thead tr:gt(0)', this.dom.drag).remove(); + + $('thead th:eq(0)', this.dom.drag).each( function (i) { + this.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).width()+"px"; + } ); + + this.dom.drag.style.position = "absolute"; + this.dom.drag.style.zIndex = 1200; + this.dom.drag.style.top = "0px"; + this.dom.drag.style.left = "0px"; + this.dom.drag.style.width = $('th:eq('+that.s.mouse.targetIndex+')', that.s.dt.nTHead).outerWidth()+"px"; + + + this.dom.pointer = document.createElement( 'div' ); + this.dom.pointer.className = "DTCR_pointer"; + this.dom.pointer.style.position = "absolute"; + + if ( this.s.dt.oScroll.sX === "" && this.s.dt.oScroll.sY === "" ) + { + this.dom.pointer.style.top = $(this.s.dt.nTable).offset().top+"px"; + this.dom.pointer.style.height = $(this.s.dt.nTable).height()+"px"; + } + else + { + this.dom.pointer.style.top = $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top+"px"; + this.dom.pointer.style.height = $('div.dataTables_scroll', this.s.dt.nTableWrapper).height()+"px"; + } + + document.body.appendChild( this.dom.pointer ); + document.body.appendChild( this.dom.drag ); + } +}; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static parameters + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Array of all ColReorder instances for later reference + * @property ColReorder.aoInstances + * @type array + * @default [] + * @static + */ +ColReorder.aoInstances = []; + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static functions + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** + * Reset the column ordering for a DataTables instance + * @method ColReorder.fnReset + * @param object oTable DataTables instance to consider + * @returns void + * @static + */ +ColReorder.fnReset = function ( oTable ) +{ + for ( var i=0, iLen=ColReorder.aoInstances.length ; i