$.extend(!0,$.fn.dataTable.defaults,{aaSorting:[],aoColumnDefs:[{bSortable: false,aTargets:[-1]}],sDom:"<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",dom:'T<"clear">lfrtip<"clear spacer">T',sPaginationType:"bootstrap",oLanguage:{sLengthMenu:"_MENU_ enrégistrement par page",oPaginate:{sFirst:"Prémier",sLast:"Dernier",sNext:"Suivant",sPrevious:"Précédent"},sEmptyTable:"Pas de donnée disponible dans la table",sInfo:"Affichage de _START_ à _END_ sur _TOTAL_ éléments",sInfoEmpty:"Affichage de 0 à 0 sur 0 éléments",sInfoFiltered:"(filtré à partir de _MAX_ total éléments)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Affichage de _MENU_ éléments",sLoadingRecords:"Chargement...",sProcessing:"Traitement...",sSearch:"Recherche:",sUrl:"",sZeroRecords:"Aucun enrégistrement trouvé",oAria:{sSortAscending:": Trier de A-Z",sSortDescending:": Trier de Z-A"},tableTools:{aButtons:["copy","print"]}}}),$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline"}),$.fn.dataTableExt.oApi.fnPagingInfo=function(t){return{iStart:t._iDisplayStart,iEnd:t.fnDisplayEnd(),iLength:t._iDisplayLength,iTotal:t.fnRecordsTotal(),iFilteredTotal:t.fnRecordsDisplay(),iPage:-1===t._iDisplayLength?0:Math.ceil(t._iDisplayStart/t._iDisplayLength),iTotalPages:-1===t._iDisplayLength?0:Math.ceil(t.fnRecordsDisplay()/t._iDisplayLength)}},$.extend($.fn.dataTableExt.oPagination,{bootstrap:{fnInit:function(t,e,s){var n=t.oLanguage.oPaginate,o=function(e){e.preventDefault(),t.oApi._fnPageChange(t,e.data.action)&&s(t)};$(e).append('
");var i=$("a",e);$(i[0]).bind("click.DT",{action:"previous"},o),$(i[1]).bind("click.DT",{action:"next"},o)},fnUpdate:function(t,e){var s,n,o,i,l,a,r=5,c=t.oInstance.fnPagingInfo(),d=t.aanFeatures.p,h=Math.floor(r/2);for(c.iTotalPagesCopie de "+t+" row"+(1==t?"":"s")+" dans le presse-papiers.
",1500)}}),pdf:t.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",sPdfMessage:"",fnClick:function(t,e,s){this.fnSetText(s,"title:"+this.fnGetTitle(e)+"\nmessage:"+e.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(e)+"\norientation:"+e.sPdfOrientation+"\nsize:"+e.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(e))}}),print:t.extend({},TableTools.buttonBase,{sInfo:"S'il vous plaît utiliser la fonction d'impression de votre navigateur pour imprimer ce tableau. Appuyez sur Echap lorsque vous avez terminé.",sMessage:null,bShowAll:!0,sToolTip:"Vue d'impression",sButtonClass:"DTTT_button_print",sButtonText:"Imprimer",fnClick:function(t,e){this.fnPrint(!0,e)}}),text:t.extend({},TableTools.buttonBase),select:t.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(e){0!==this.fnGetSelected().length?t(e).removeClass(this.classes.buttons.disabled):t(e).addClass(this.classes.buttons.disabled)},fnInit:function(e){t(e).addClass(this.classes.buttons.disabled)}}),select_single:t.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(e){1==this.fnGetSelected().length?t(e).removeClass(this.classes.buttons.disabled):t(e).addClass(this.classes.buttons.disabled)},fnInit:function(e){t(e).addClass(this.classes.buttons.disabled)}}),select_all:t.extend({},TableTools.buttonBase,{sButtonText:"Tous selectionnez",fnClick:function(){this.fnSelectAll()},fnSelect:function(e){this.fnGetSelected().length==this.s.dt.fnRecordsDisplay()?t(e).addClass(this.classes.buttons.disabled):t(e).removeClass(this.classes.buttons.disabled)}}),select_none:t.extend({},TableTools.buttonBase,{sButtonText:"Deselect all",fnClick:function(){this.fnSelectNone()},fnSelect:function(e){0!==this.fnGetSelected().length?t(e).removeClass(this.classes.buttons.disabled):t(e).addClass(this.classes.buttons.disabled)},fnInit:function(e){t(e).addClass(this.classes.buttons.disabled)}}),ajax:t.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php",sButtonText:"Ajax button",fnClick:function(e,s){var n=this.fnGetTableData(s);t.ajax({url:s.sAjaxUrl,async:!0,data:[{name:"tableData",value:n}],success:s.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:t.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:t.extend({},TableTools.buttonBase,{sAction:"collection",sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(t,e){this._fnCollectionShow(t,e)}})},TableTools.classes={container:"DTTT btn-group",buttons:{normal:"btn",disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"btn",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}},TableTools.classes_themeroller={container:"DTTT btn-group ui-buttonset ui-buttonset-multi",buttons:{normal:"btn ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}},TableTools.DEFAULTS={sSwfPath:"./swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}},TableTools.prototype.CLASS="TableTools",TableTools.VERSION="2.1.5",TableTools.prototype.VERSION=TableTools.VERSION,"function"==typeof t.fn.dataTable&&"function"==typeof t.fn.dataTableExt.fnVersionCheck&&t.fn.dataTableExt.fnVersionCheck("1.9.0")?t.fn.dataTableExt.aoFeatures.push({fnInit:function(t){return t=new TableTools(t.oInstance,"undefined"!=typeof t.oInit.oTableTools?t.oInit.oTableTools:{}),TableTools._aInstances.push(t),t.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download"),t.fn.DataTable.TableTools=TableTools}(jQuery,window,document),function(t){ColVis=function(t,e){return(!this.CLASS||"ColVis"!=this.CLASS)&&alert("Warning: ColVis must be initialised with the keyword 'new'"),"undefined"==typeof e&&(e={}),this.s={dt:null,oInit:e,fnStateChange:null,activate:"click",sAlign:"left",buttonText:"Colonnes ",hidden:!0,aiExclude:[],abOriginal:[],bShowAll:!0,sShowAll:"Tout afficher",bRestore:!1,sRestore:"Ré-initialiser",iOverlayFade:500,fnLabel:null,sSize:"auto",bCssPosition:!1},this.dom={wrapper:null,button:null,collection:null,background:null,catcher:null,buttons:[],restore:null},ColVis.aInstances.push(this),this.s.dt=t,this._fnConstruct(),this },ColVis.prototype={fnRebuild:function(){for(var t=this.dom.buttons.length-1;t>=0;t--)null!==this.dom.buttons[t]&&this.dom.collection.removeChild(this.dom.buttons[t]);this.dom.buttons.splice(0,this.dom.buttons.length),this.dom.restore&&this.dom.restore.parentNode(this.dom.restore),this._fnAddButtons(),this._fnDrawCallback()},_fnConstruct:function(){this._fnApplyCustomisation();var e,s,n=this;for(this.dom.wrapper=document.createElement("div"),this.dom.wrapper.className="ColVis TableTools",this.dom.button=this._fnDomBaseButton(this.s.buttonText),this.dom.button.className+=" ColVis_MasterButton",this.dom.wrapper.appendChild(this.dom.button),this.dom.catcher=this._fnDomCatcher(),this.dom.collection=this._fnDomCollection(),this.dom.background=this._fnDomBackground(),this._fnAddButtons(),e=0,s=this.s.dt.aoColumns.length;s>e;e++)this.s.abOriginal.push(this.s.dt.aoColumns[e].bVisible);this.s.dt.aoDrawCallback.push({fn:function(){n._fnDrawCallback.call(n)},sName:"ColVis"}),t(this.s.dt.oInstance).bind("column-reorder",function(t,o,i){for(e=0,s=n.s.aiExclude.length;s>e;e++)n.s.aiExclude[e]=i.aiInvertMapping[n.s.aiExclude[e]];t=n.s.abOriginal.splice(i.iFrom,1)[0],n.s.abOriginal.splice(i.iTo,0,t),n.fnRebuild()})},_fnApplyCustomisation:function(){var t=this.s.oInit;"undefined"!=typeof t.activate&&(this.s.activate=t.activate),"undefined"!=typeof t.buttonText&&(this.s.buttonText=t.buttonText),"undefined"!=typeof t.aiExclude&&(this.s.aiExclude=t.aiExclude),"undefined"!=typeof t.bRestore&&(this.s.bRestore=t.bRestore),"undefined"!=typeof t.sRestore&&(this.s.sRestore=t.sRestore),"undefined"!=typeof t.bShowAll&&(this.s.bShowAll=t.bShowAll),"undefined"!=typeof t.sShowAll&&(this.s.sShowAll=t.sShowAll),"undefined"!=typeof t.sAlign&&(this.s.sAlign=t.sAlign),"undefined"!=typeof t.fnStateChange&&(this.s.fnStateChange=t.fnStateChange),"undefined"!=typeof t.iOverlayFade&&(this.s.iOverlayFade=t.iOverlayFade),"undefined"!=typeof t.fnLabel&&(this.s.fnLabel=t.fnLabel),"undefined"!=typeof t.sSize&&(this.s.sSize=t.sSize),"undefined"!=typeof t.bCssPosition&&(this.s.bCssPosition=t.bCssPosition)},_fnDrawCallback:function(){for(var e=this.s.dt.aoColumns,s=0,n=e.length;n>s;s++)null!==this.dom.buttons[s]&&(e[s].bVisible?t("input",this.dom.buttons[s]).attr("checked","checked"):t("input",this.dom.buttons[s]).removeAttr("checked"))},_fnAddButtons:function(){for(var t,e=","+this.s.aiExclude.join(",")+",",s=0,n=this.s.dt.aoColumns.length;n>s;s++)-1==e.indexOf(","+s+",")?(t=this._fnDomColumnButton(s),this.dom.buttons.push(t),this.dom.collection.appendChild(t)):this.dom.buttons.push(null);this.s.bRestore&&(t=this._fnDomRestoreButton(),t.className+=" ColVis_Restore",this.dom.buttons.push(t),this.dom.collection.appendChild(t)),this.s.bShowAll&&(t=this._fnDomShowAllButton(),t.className+=" ColVis_ShowAll",this.dom.buttons.push(t),this.dom.collection.appendChild(t))},_fnDomRestoreButton:function(){var e=this,s=document.createElement("button"),n=document.createElement("span");return s.className=this.s.dt.bJUI?"ColVis_Button TableTools_Button ui-button ui-state-default":"ColVis_Button TableTools_Button",s.appendChild(n),t(n).html(''+this.s.sRestore+""),t(s).click(function(){for(var t=0,s=e.s.abOriginal.length;s>t;t++)e.s.dt.oInstance.fnSetColumnVis(t,e.s.abOriginal[t],!1);e._fnAdjustOpenRows(),e.s.dt.oInstance.fnAdjustColumnSizing(!1),e.s.dt.oInstance.fnDraw(!1)}),s},_fnDomShowAllButton:function(){var e=this,s=document.createElement("button"),n=document.createElement("span");return s.className=this.s.dt.bJUI?"ColVis_Button TableTools_Button ui-button ui-state-default":"ColVis_Button TableTools_Button",s.appendChild(n),t(n).html(''+this.s.sShowAll+""),t(s).click(function(){for(var t=0,s=e.s.abOriginal.length;s>t;t++)-1===e.s.aiExclude.indexOf(t)&&e.s.dt.oInstance.fnSetColumnVis(t,!0,!1);e._fnAdjustOpenRows(),e.s.dt.oInstance.fnAdjustColumnSizing(!1),e.s.dt.oInstance.fnDraw(!1)}),s},_fnDomColumnButton:function(e){var s=this,n=this.s.dt.aoColumns[e],o=document.createElement("button"),i=document.createElement("span"),l=this.s.dt;return o.className=l.bJUI?"ColVis_Button TableTools_Button ui-button ui-state-default":"ColVis_Button TableTools_Button",o.appendChild(i),n=null===this.s.fnLabel?n.sTitle:this.s.fnLabel(e,n.sTitle,n.nTh),t(i).html(''+n+""),t(o).click(function(n){var o=!t("input",this).is(":checked");"input"==n.target.nodeName.toLowerCase()&&(o=t("input",this).is(":checked")),n=t.fn.dataTableExt.iApiIndex,t.fn.dataTableExt.iApiIndex=s._fnDataTablesApiIndex.call(s),!l.oFeatures.bServerSide||""===l.oScroll.sX&&""===l.oScroll.sY?s.s.dt.oInstance.fnSetColumnVis(e,o):(s.s.dt.oInstance.fnSetColumnVis(e,o,!1),s.s.dt.oInstance.fnAdjustColumnSizing(!1),s.s.dt.oInstance.oApi._fnScrollDraw(s.s.dt),s._fnDrawCallback()),t.fn.dataTableExt.iApiIndex=n,null!==s.s.fnStateChange&&s.s.fnStateChange.call(s,e,o)}),o},_fnDataTablesApiIndex:function(){for(var t=0,e=this.s.dt.oInstance.length;e>t;t++)if(this.s.dt.oInstance[t]==this.s.dt.nTable)return t;return 0},_fnDomBaseButton:function(e){var s=this,n=document.createElement("button"),o=document.createElement("span"),i="mouseover"==this.s.activate?"mouseover":"click";return n.className=this.s.dt.bJUI?"ColVis_Button TableTools_Button ui-button ui-state-default":"ColVis_Button TableTools_Button",n.appendChild(o),o.innerHTML=e,t(n).bind(i,function(t){s._fnCollectionShow(),t.preventDefault()}),n},_fnDomCollection:function(){var e=document.createElement("div");return e.style.display="none",e.className=this.s.dt.bJUI?"ColVis_collection TableTools_collection ui-buttonset ui-buttonset-multi":"ColVis_collection TableTools_collection",this.s.bCssPosition||(e.style.position="absolute"),t(e).css("opacity",0),e},_fnDomCatcher:function(){var e=this,s=document.createElement("div");return s.className="ColVis_catcher TableTools_catcher",t(s).click(function(){e._fnCollectionHide.call(e,null,null)}),s},_fnDomBackground:function(){var e=this,s=document.createElement("div");return s.style.position="absolute",s.style.left="0px",s.style.top="0px",s.className="ColVis_collectionBackground TableTools_collectionBackground",t(s).css("opacity",0),t(s).click(function(){e._fnCollectionHide.call(e,null,null)}),"mouseover"==this.s.activate&&t(s).mouseover(function(){e.s.overcollection=!1,e._fnCollectionHide.call(e,null,null)}),s},_fnCollectionShow:function(){var e,s,n=this;e=t(this.dom.button).offset();var o=this.dom.collection,i=this.dom.background,l=parseInt(e.left,10),a=parseInt(e.top+t(this.dom.button).outerHeight(),10);this.s.bCssPosition||(o.style.top=a+"px",o.style.left=l+"px"),o.style.display="block",t(o).css("opacity",0),s=t(window).height();var r=t(document).height(),c=t(window).width(),a=t(document).width();if(i.style.height=(s>r?s:r)+"px",i.style.width=(a>c?c:a)+"px",s=this.dom.catcher.style,s.height=t(this.dom.button).outerHeight()+"px",s.width=t(this.dom.button).outerWidth()+"px",s.top=e.top+"px",s.left=l+"px",document.body.appendChild(i),document.body.appendChild(o),document.body.appendChild(this.dom.catcher),"auto"==this.s.sSize){for(r=[],this.dom.collection.style.width="auto",e=0,s=this.dom.buttons.length;s>e;e++)null!==this.dom.buttons[e]&&(this.dom.buttons[e].style.width="auto",r.push(t(this.dom.buttons[e]).outerWidth()));for(iMax=Math.max.apply(window,r),e=0,s=this.dom.buttons.length;s>e;e++)null!==this.dom.buttons[e]&&(this.dom.buttons[e].style.width=iMax+"px");this.dom.collection.style.width=iMax+"px"}this.s.bCssPosition||(o.style.left="left"==this.s.sAlign?l+"px":l-t(o).outerWidth()+t(this.dom.button).outerWidth()+"px",e=t(o).outerWidth(),t(o).outerHeight(),l+e>a&&(o.style.left=a-e+"px")),setTimeout(function(){t(o).animate({opacity:1},n.s.iOverlayFade),t(i).animate({opacity:.1},n.s.iOverlayFade,"linear",function(){jQuery.browser.msie&&"6.0"==jQuery.browser.version&&n._fnDrawCallback()})},10),this.s.hidden=!1},_fnCollectionHide:function(){var e=this;!this.s.hidden&&null!==this.dom.collection&&(this.s.hidden=!0,t(this.dom.collection).animate({opacity:0},e.s.iOverlayFade,function(){this.style.display="none"}),t(this.dom.background).animate({opacity:0},e.s.iOverlayFade,function(){document.body.removeChild(e.dom.background),document.body.removeChild(e.dom.catcher)}))},_fnAdjustOpenRows:function(){for(var t=this.s.dt.aoOpenRows,e=this.s.dt.oApi._fnVisbleColumns(this.s.dt),s=0,n=t.length;n>s;s++)t[s].nTr.getElementsByTagName("td")[0].colSpan=e}},ColVis.fnRebuild=function(t){var e=null;"undefined"!=typeof t&&(e=t.fnSettings().nTable);for(var s=0,n=ColVis.aInstances.length;n>s;s++)("undefined"==typeof t||e==ColVis.aInstances[s].s.dt.nTable)&&ColVis.aInstances[s].fnRebuild()},ColVis.aInstances=[],ColVis.prototype.CLASS="ColVis",ColVis.VERSION="1.0.8",ColVis.prototype.VERSION=ColVis.VERSION,"function"==typeof t.fn.dataTable&&"function"==typeof t.fn.dataTableExt.fnVersionCheck&&t.fn.dataTableExt.fnVersionCheck("1.7.0")?t.fn.dataTableExt.aoFeatures.push({fnInit:function(t){return new ColVis(t,"undefined"==typeof t.oInit.oColVis?{}:t.oInit.oColVis).dom.wrapper},cFeature:"C",sFeature:"ColVis"}):alert("Warning: ColVis requires DataTables 1.7 or greater - www.datatables.net/download")}(jQuery);