Merge branch 'SAAS-317-datatables-reorder' into 2.4.x

This commit is contained in:
Naomi 2013-05-21 17:44:25 -04:00
commit 3ad7c868e2
7 changed files with 919 additions and 895 deletions

View File

@ -1,9 +1,16 @@
<?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">
<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>
</fieldset>
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
</table>

View File

@ -413,7 +413,7 @@ var AIRTIME = (function(AIRTIME) {
if (ele.bVisible) {
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>" +
"<div id='"+ele.mDataProp+"' class='controls "+inputClass+"'></div>" +
"</div>");
@ -447,14 +447,14 @@ var AIRTIME = (function(AIRTIME) {
function setFilterElement(iColumn, bVisible){
var actualId = colReorderMap[iColumn];
var selector = "div#advanced_search_col_"+actualId;
if (bVisible) {
$(selector).show();
} else {
$(selector).hide();
}
}
var $el = $(selector);
var currentColOrder = new Array();
if (bVisible) {
$el.show();
} else {
$el.hide();
}
}
oTable = $libTable.dataTable( {
@ -764,7 +764,8 @@ var AIRTIME = (function(AIRTIME) {
"sAlign": "right",
"aiExclude": [0, 1, 2],
"sSize": "css",
"fnStateChange": setFilterElement
"fnStateChange": setFilterElement,
"buttonText": $.i18n._("Show / hide columns")
},
"oColReorder": {

View File

@ -817,17 +817,18 @@ var AIRTIME = (function(AIRTIME){
mod.checkToolBarIcons();
},
// R = ColReorder, C = ColVis
"sDom": 'R<"dt-process-rel"r><"sb-padded"<"H"C>><"dataTables_scrolling sb-padded"t>',
"oColVis": {
"aiExclude": [ 0, 1 ]
"aiExclude": [ 0, 1 ],
"buttonText": $.i18n._("Show / hide columns"),
},
"oColReorder": {
"iFixedColumns": 2
},
// R = ColReorderResize, C = ColVis
"sDom": 'R<"dt-process-rel"r><"sb-padded"<"H"C>><"dataTables_scrolling sb-padded"t>',
"sAjaxDataProp": "schedule",
"oLanguage": datatables_dict,
"sAjaxSource": baseUrl+"showbuilder/builder-feed"

View File

@ -31,7 +31,3 @@ The new _fnDomBaseButton looks like this:
return nButton;
},
--------------------------------------------------------------------------------
* Line 96 has changed
- "buttonText": "Show / hide columns",
+ "buttonText": $.i18n._("Show / hide columns"),

View File

View File

@ -1,6 +1,6 @@
/*
* File: ColVis.js
* Version: 1.0.7
* Version: 1.0.8
* CVS: $Id$
* Description: Controls for column visiblity in DataTables
* Author: Allan Jardine (www.sprymedia.co.uk)
@ -95,7 +95,7 @@ ColVis = function( oDTSettings, oInit )
* @type String
* @default Show / hide columns
*/
"buttonText": $.i18n._("Show / hide columns"),
"buttonText": "Show / hide columns",
/**
* Flag to say if the collection is hidden
@ -313,6 +313,7 @@ ColVis.prototype = {
this._fnApplyCustomisation();
var that = this;
var i, iLen;
this.dom.wrapper = document.createElement('div');
this.dom.wrapper.className = "ColVis TableTools";
@ -327,7 +328,7 @@ ColVis.prototype = {
this._fnAddButtons();
/* 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 );
}
@ -339,6 +340,20 @@ ColVis.prototype = {
},
"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
* update the table's column visiblity and ColVis will still be accurate.
* On each table draw, check the visibility checkboxes as needed. This allows any process to
* update the table's column visibility and ColVis will still be accurate.
* @method _fnDrawCallback
* @returns void
* @private
@ -515,6 +530,7 @@ ColVis.prototype = {
that.s.dt.oInstance.fnSetColumnVis( i, that.s.abOriginal[i], false );
}
that._fnAdjustOpenRows();
that.s.dt.oInstance.fnAdjustColumnSizing( false );
that.s.dt.oInstance.fnDraw( false );
} );
@ -549,6 +565,7 @@ ColVis.prototype = {
}
}
that._fnAdjustOpenRows();
that.s.dt.oInstance.fnAdjustColumnSizing( false );
that.s.dt.oInstance.fnDraw( false );
} );
@ -574,6 +591,7 @@ ColVis.prototype = {
nButton.className = !dt.bJUI ? "ColVis_Button TableTools_Button" :
"ColVis_Button TableTools_Button ui-button ui-state-default";
nButton.appendChild( nSpan );
var sTitle = this.s.fnLabel===null ? oColumn.sTitle : this.s.fnLabel( i, oColumn.sTitle, oColumn.nTh );
$(nSpan).html(
@ -597,6 +615,7 @@ ColVis.prototype = {
if ( dt.oFeatures.bServerSide && (dt.oScroll.sX !== "" || dt.oScroll.sY !== "" ) )
{
that.s.dt.oInstance.fnSetColumnVis( i, showHide, false );
that.s.dt.oInstance.fnAdjustColumnSizing( false );
that.s.dt.oInstance.oApi._fnScrollDraw( that.s.dt );
that._fnDrawCallback();
}
@ -648,18 +667,18 @@ ColVis.prototype = {
var
that = this,
nButton = document.createElement('button'),
nCaret = document.createElement('span'),
nSpan = document.createElement('span'),
sEvent = this.s.activate=="mouseover" ? "mouseover" : "click";
//nButton.className = !this.s.dt.bJUI ? "ColVis_Button TableTools_Button" :
//"ColVis_Button TableTools_Button ui-button ui-state-default";
nButton.className = "btn-toolbar btn btn-small dropdown-toggle ColVis_MasterButton";
nButton.className = "btn-toolbar btn btn-small dropdown-toggle";
nCaret.className = "caret";
nButton.appendChild( nSpan );
$(nButton).append("<span class='caret'></span>");
nButton.appendChild( nCaret );
nSpan.innerHTML = text;
$(nButton).bind( 'click', function (e) {
$(nButton).bind( sEvent, function (e) {
that._fnCollectionShow();
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
* @default See code
*/
ColVis.VERSION = "1.0.7";
ColVis.VERSION = "1.0.8";
ColVis.prototype.VERSION = ColVis.VERSION;

2
debian/watch vendored
View File

@ -1,2 +1,2 @@
version=3
http://sf.net/airtime/airtime-([\d\.]+)\.tar\.gz
http://sf.net/airtime/airtime-([\d\.]+)-ga\.tar\.gz