Merge branch 'SAAS-317-datatables-reorder' into 2.4.x
This commit is contained in:
commit
3ad7c868e2
|
@ -1,9 +1,16 @@
|
||||||
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
|
||||||
<div id="import_status" class="library_import" style="display:none"><? echo _("File import in progress..."); ?><img src=<?php echo $baseUrl . "css/images/file_import_loader.gif"?>></img></div>
|
<div id="import_status" class="library_import" style="display:none">
|
||||||
|
<?php echo _("File import in progress..."); ?>
|
||||||
|
<img src=<?php echo $baseUrl . "css/images/file_import_loader.gif"?>></img>
|
||||||
|
</div>
|
||||||
|
|
||||||
<fieldset class="toggle closed" id="filter_options">
|
<fieldset class="toggle closed" id="filter_options">
|
||||||
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span><? echo _("Advanced Search Options") ?></legend>
|
<legend style="cursor: pointer;">
|
||||||
|
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
|
||||||
|
<?php echo _("Advanced Search Options") ?>
|
||||||
|
</legend>
|
||||||
<div id="advanced_search" class="advanced_search form-horizontal"></div>
|
<div id="advanced_search" class="advanced_search form-horizontal"></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -413,7 +413,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
if (ele.bVisible) {
|
if (ele.bVisible) {
|
||||||
advanceSearchDiv.append(
|
advanceSearchDiv.append(
|
||||||
"<div id='advanced_search_col_"+currentColId+" class='control-group'>" +
|
"<div id='advanced_search_col_"+currentColId+"' class='control-group'>" +
|
||||||
"<label class='control-label'"+labelStyle+">"+ele.sTitle+" : </label>" +
|
"<label class='control-label'"+labelStyle+">"+ele.sTitle+" : </label>" +
|
||||||
"<div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div>" +
|
"<div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div>" +
|
||||||
"</div>");
|
"</div>");
|
||||||
|
@ -447,14 +447,14 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
function setFilterElement(iColumn, bVisible){
|
function setFilterElement(iColumn, bVisible){
|
||||||
var actualId = colReorderMap[iColumn];
|
var actualId = colReorderMap[iColumn];
|
||||||
var selector = "div#advanced_search_col_"+actualId;
|
var selector = "div#advanced_search_col_"+actualId;
|
||||||
if (bVisible) {
|
var $el = $(selector);
|
||||||
$(selector).show();
|
|
||||||
} else {
|
|
||||||
$(selector).hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var currentColOrder = new Array();
|
if (bVisible) {
|
||||||
|
$el.show();
|
||||||
|
} else {
|
||||||
|
$el.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
oTable = $libTable.dataTable( {
|
oTable = $libTable.dataTable( {
|
||||||
|
|
||||||
|
@ -764,7 +764,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"sAlign": "right",
|
"sAlign": "right",
|
||||||
"aiExclude": [0, 1, 2],
|
"aiExclude": [0, 1, 2],
|
||||||
"sSize": "css",
|
"sSize": "css",
|
||||||
"fnStateChange": setFilterElement
|
"fnStateChange": setFilterElement,
|
||||||
|
"buttonText": $.i18n._("Show / hide columns")
|
||||||
},
|
},
|
||||||
|
|
||||||
"oColReorder": {
|
"oColReorder": {
|
||||||
|
|
|
@ -817,17 +817,18 @@ var AIRTIME = (function(AIRTIME){
|
||||||
mod.checkToolBarIcons();
|
mod.checkToolBarIcons();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// R = ColReorder, C = ColVis
|
||||||
|
"sDom": 'R<"dt-process-rel"r><"sb-padded"<"H"C>><"dataTables_scrolling sb-padded"t>',
|
||||||
|
|
||||||
"oColVis": {
|
"oColVis": {
|
||||||
"aiExclude": [ 0, 1 ]
|
"aiExclude": [ 0, 1 ],
|
||||||
|
"buttonText": $.i18n._("Show / hide columns"),
|
||||||
},
|
},
|
||||||
|
|
||||||
"oColReorder": {
|
"oColReorder": {
|
||||||
"iFixedColumns": 2
|
"iFixedColumns": 2
|
||||||
},
|
},
|
||||||
|
|
||||||
// R = ColReorderResize, C = ColVis
|
|
||||||
"sDom": 'R<"dt-process-rel"r><"sb-padded"<"H"C>><"dataTables_scrolling sb-padded"t>',
|
|
||||||
|
|
||||||
"sAjaxDataProp": "schedule",
|
"sAjaxDataProp": "schedule",
|
||||||
"oLanguage": datatables_dict,
|
"oLanguage": datatables_dict,
|
||||||
"sAjaxSource": baseUrl+"showbuilder/builder-feed"
|
"sAjaxSource": baseUrl+"showbuilder/builder-feed"
|
||||||
|
|
|
@ -31,7 +31,3 @@ The new _fnDomBaseButton looks like this:
|
||||||
return nButton;
|
return nButton;
|
||||||
},
|
},
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
* Line 96 has changed
|
|
||||||
- "buttonText": "Show / hide columns",
|
|
||||||
+ "buttonText": $.i18n._("Show / hide columns"),
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* File: ColVis.js
|
* File: ColVis.js
|
||||||
* Version: 1.0.7
|
* Version: 1.0.8
|
||||||
* CVS: $Id$
|
* CVS: $Id$
|
||||||
* Description: Controls for column visiblity in DataTables
|
* Description: Controls for column visiblity in DataTables
|
||||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||||
|
@ -95,7 +95,7 @@ ColVis = function( oDTSettings, oInit )
|
||||||
* @type String
|
* @type String
|
||||||
* @default Show / hide columns
|
* @default Show / hide columns
|
||||||
*/
|
*/
|
||||||
"buttonText": $.i18n._("Show / hide columns"),
|
"buttonText": "Show / hide columns",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to say if the collection is hidden
|
* Flag to say if the collection is hidden
|
||||||
|
@ -313,6 +313,7 @@ ColVis.prototype = {
|
||||||
this._fnApplyCustomisation();
|
this._fnApplyCustomisation();
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
var i, iLen;
|
||||||
this.dom.wrapper = document.createElement('div');
|
this.dom.wrapper = document.createElement('div');
|
||||||
this.dom.wrapper.className = "ColVis TableTools";
|
this.dom.wrapper.className = "ColVis TableTools";
|
||||||
|
|
||||||
|
@ -327,7 +328,7 @@ ColVis.prototype = {
|
||||||
this._fnAddButtons();
|
this._fnAddButtons();
|
||||||
|
|
||||||
/* Store the original visbility information */
|
/* Store the original visbility information */
|
||||||
for ( var i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
|
for ( i=0, iLen=this.s.dt.aoColumns.length ; i<iLen ; i++ )
|
||||||
{
|
{
|
||||||
this.s.abOriginal.push( this.s.dt.aoColumns[i].bVisible );
|
this.s.abOriginal.push( this.s.dt.aoColumns[i].bVisible );
|
||||||
}
|
}
|
||||||
|
@ -339,6 +340,20 @@ ColVis.prototype = {
|
||||||
},
|
},
|
||||||
"sName": "ColVis"
|
"sName": "ColVis"
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
/* If columns are reordered, then we need to update our exclude list and
|
||||||
|
* rebuild the displayed list
|
||||||
|
*/
|
||||||
|
$(this.s.dt.oInstance).bind( 'column-reorder', function ( e, oSettings, oReorder ) {
|
||||||
|
for ( i=0, iLen=that.s.aiExclude.length ; i<iLen ; i++ ) {
|
||||||
|
that.s.aiExclude[i] = oReorder.aiInvertMapping[ that.s.aiExclude[i] ];
|
||||||
|
}
|
||||||
|
|
||||||
|
var mStore = that.s.abOriginal.splice( oReorder.iFrom, 1 )[0];
|
||||||
|
that.s.abOriginal.splice( oReorder.iTo, 0, mStore );
|
||||||
|
|
||||||
|
that.fnRebuild();
|
||||||
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -420,8 +435,8 @@ ColVis.prototype = {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On each table draw, check the visiblity checkboxes as needed. This allows any process to
|
* On each table draw, check the visibility checkboxes as needed. This allows any process to
|
||||||
* update the table's column visiblity and ColVis will still be accurate.
|
* update the table's column visibility and ColVis will still be accurate.
|
||||||
* @method _fnDrawCallback
|
* @method _fnDrawCallback
|
||||||
* @returns void
|
* @returns void
|
||||||
* @private
|
* @private
|
||||||
|
@ -515,6 +530,7 @@ ColVis.prototype = {
|
||||||
that.s.dt.oInstance.fnSetColumnVis( i, that.s.abOriginal[i], false );
|
that.s.dt.oInstance.fnSetColumnVis( i, that.s.abOriginal[i], false );
|
||||||
}
|
}
|
||||||
that._fnAdjustOpenRows();
|
that._fnAdjustOpenRows();
|
||||||
|
that.s.dt.oInstance.fnAdjustColumnSizing( false );
|
||||||
that.s.dt.oInstance.fnDraw( false );
|
that.s.dt.oInstance.fnDraw( false );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -549,6 +565,7 @@ ColVis.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that._fnAdjustOpenRows();
|
that._fnAdjustOpenRows();
|
||||||
|
that.s.dt.oInstance.fnAdjustColumnSizing( false );
|
||||||
that.s.dt.oInstance.fnDraw( false );
|
that.s.dt.oInstance.fnDraw( false );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -574,6 +591,7 @@ ColVis.prototype = {
|
||||||
|
|
||||||
nButton.className = !dt.bJUI ? "ColVis_Button TableTools_Button" :
|
nButton.className = !dt.bJUI ? "ColVis_Button TableTools_Button" :
|
||||||
"ColVis_Button TableTools_Button ui-button ui-state-default";
|
"ColVis_Button TableTools_Button ui-button ui-state-default";
|
||||||
|
|
||||||
nButton.appendChild( nSpan );
|
nButton.appendChild( nSpan );
|
||||||
var sTitle = this.s.fnLabel===null ? oColumn.sTitle : this.s.fnLabel( i, oColumn.sTitle, oColumn.nTh );
|
var sTitle = this.s.fnLabel===null ? oColumn.sTitle : this.s.fnLabel( i, oColumn.sTitle, oColumn.nTh );
|
||||||
$(nSpan).html(
|
$(nSpan).html(
|
||||||
|
@ -597,6 +615,7 @@ ColVis.prototype = {
|
||||||
if ( dt.oFeatures.bServerSide && (dt.oScroll.sX !== "" || dt.oScroll.sY !== "" ) )
|
if ( dt.oFeatures.bServerSide && (dt.oScroll.sX !== "" || dt.oScroll.sY !== "" ) )
|
||||||
{
|
{
|
||||||
that.s.dt.oInstance.fnSetColumnVis( i, showHide, false );
|
that.s.dt.oInstance.fnSetColumnVis( i, showHide, false );
|
||||||
|
that.s.dt.oInstance.fnAdjustColumnSizing( false );
|
||||||
that.s.dt.oInstance.oApi._fnScrollDraw( that.s.dt );
|
that.s.dt.oInstance.oApi._fnScrollDraw( that.s.dt );
|
||||||
that._fnDrawCallback();
|
that._fnDrawCallback();
|
||||||
}
|
}
|
||||||
|
@ -648,18 +667,18 @@ ColVis.prototype = {
|
||||||
var
|
var
|
||||||
that = this,
|
that = this,
|
||||||
nButton = document.createElement('button'),
|
nButton = document.createElement('button'),
|
||||||
|
nCaret = document.createElement('span'),
|
||||||
nSpan = document.createElement('span'),
|
nSpan = document.createElement('span'),
|
||||||
sEvent = this.s.activate=="mouseover" ? "mouseover" : "click";
|
sEvent = this.s.activate=="mouseover" ? "mouseover" : "click";
|
||||||
|
|
||||||
//nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
|
nButton.className = "btn-toolbar btn btn-small dropdown-toggle";
|
||||||
//"ColVis_Button TableTools_Button ui-button ui-state-default";
|
nCaret.className = "caret";
|
||||||
nButton.className = "btn-toolbar btn btn-small dropdown-toggle ColVis_MasterButton";
|
|
||||||
|
|
||||||
nButton.appendChild( nSpan );
|
nButton.appendChild( nSpan );
|
||||||
$(nButton).append("<span class='caret'></span>");
|
nButton.appendChild( nCaret );
|
||||||
nSpan.innerHTML = text;
|
nSpan.innerHTML = text;
|
||||||
|
|
||||||
$(nButton).bind( 'click', function (e) {
|
$(nButton).bind( sEvent, function (e) {
|
||||||
that._fnCollectionShow();
|
that._fnCollectionShow();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} );
|
} );
|
||||||
|
@ -926,7 +945,7 @@ ColVis.fnRebuild = function ( oTable )
|
||||||
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
* Static object propterties
|
* Static object properties
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -961,7 +980,7 @@ ColVis.prototype.CLASS = "ColVis";
|
||||||
* @type String
|
* @type String
|
||||||
* @default See code
|
* @default See code
|
||||||
*/
|
*/
|
||||||
ColVis.VERSION = "1.0.7";
|
ColVis.VERSION = "1.0.8";
|
||||||
ColVis.prototype.VERSION = ColVis.VERSION;
|
ColVis.prototype.VERSION = ColVis.VERSION;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
version=3
|
version=3
|
||||||
http://sf.net/airtime/airtime-([\d\.]+)\.tar\.gz
|
http://sf.net/airtime/airtime-([\d\.]+)-ga\.tar\.gz
|
||||||
|
|
Loading…
Reference in New Issue