function runDataTables(specificTableID, destroyOption, extraProps) {
  if(typeof(destroyOption)==='undefined') destroyOption = true;
  if(typeof(extraProps)==='undefined') extraProps = {};
  
  var tableSelector = specificTableID || 'table';
  var props = null;
  
  props = {
    "bDestroy": destroyOption,
    "sPaginationType" : "bootstrap_full"
  };
  $.extend(props, extraProps);
  //try { $(tableSelector+'.datatable_basic').dataTable().fnClearTable(); } catch(err) { }
  $(tableSelector+'.datatable_basic').dataTable(props);

  /*
   * COL ORDER
   */
  props = {
    "bDestroy": destroyOption,
    "sPaginationType" : "bootstrap",
    "sDom" : "R<'dt-top-row'Clf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",
    "fnInitComplete" : function(oSettings, json) {
      $('.ColVis_Button').addClass('btn btn-default btn-sm').html(i18n.t("columns") + ' <i class="icon-arrow-down"></i>');
    }
  };
  $.extend(props, extraProps);
  //try { $(tableSelector+'.datatable_col_reorder').dataTable().fnClearTable(); } catch(err) { }
  $(tableSelector+'.datatable_col_reorder').dataTable(props);
  
  /* END COL ORDER */

  /* TABLE TOOLS */
 props = {
    "bDestroy": destroyOption,
    "sDom" : "<'dt-top-row'Tlf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",
    "oTableTools" : {
      "aButtons" : ["copy", {
        "sExtends" : "collection",
        "sButtonText" : i18n.t('save') + ' <span class="caret" />',
        "aButtons" : ["csv", "xls", "pdf"]
      }],
      "sSwfPath" : "assets/copy_csv_xls_pdf.swf"
    },
    "fnInitComplete" : function(oSettings, json) {
      $(this).closest('#dt_table_tools_wrapper').find('.DTTT.btn-group').addClass('table_tools_group').children('a.btn').each(function() {
        $(this).addClass('btn-sm btn-default');
      });
    }
  };
  $.extend(props, extraProps);
  //try { $(tableSelector+'.datatable_tabletools').dataTable().fnClearTable(); } catch(err) { }
  $(tableSelector+'.datatable_tabletools').dataTable(props);

  //activate tooltips
  $(tableSelector+' a[rel=tooltip]').tooltip();
  /* END TABLE TOOLS */
}
//THIS FUNCTION MOVED OVER FROM datatables.html, and changed the selectors to use classes (e.g. table.dt_basic) instead of IDs (#dt_basic)
THIS FUNCTION MOVED OVER FROM datatables.html, and changed the selectors to use classes  instead of IDs (#dt_basic)
THIS FUNCTION MOVED OVER FROM datatables . html and changed the selectors to use classes instead of IDs ( #dt_basic )
function runDataTables(specificTableID, destroyOption, extraProps) {
  if(typeof(destroyOption)==='undefined') destroyOption = true;
  if(typeof(extraProps)==='undefined') extraProps = {};
  var tableSelector = specificTableID || 'table';
  var props = null;
  props = {
    "bDestroy": destroyOption,
    "sPaginationType" : "bootstrap_full"
  };
  $.extend(props, extraProps);
  $(tableSelector+'.datatable_basic').dataTable(props);
  props = {
    "bDestroy": destroyOption,
    "sPaginationType" : "bootstrap",
    "sDom" : "R<'dt-top-row'Clf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",
    "fnInitComplete" : function(oSettings, json) {
      $('.ColVis_Button').addClass('btn btn-default btn-sm').html(i18n.t("columns") + ' <i class="icon-arrow-down"></i>');
    }
  };
  $.extend(props, extraProps);
  $(tableSelector+'.datatable_col_reorder').dataTable(props);
 props = {
    "bDestroy": destroyOption,
    "sDom" : "<'dt-top-row'Tlf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",
    "oTableTools" : {
      "aButtons" : ["copy", {
        "sExtends" : "collection",
        "sButtonText" : i18n.t('save') + ' <span class="caret" />',
        "aButtons" : ["csv", "xls", "pdf"]
      }],
      "sSwfPath" : "assets/copy_csv_xls_pdf.swf"
    },
    "fnInitComplete" : function(oSettings, json) {
      $(this).closest('#dt_table_tools_wrapper').find('.DTTT.btn-group').addClass('table_tools_group').children('a.btn').each(function() {
        $(this).addClass('btn-sm btn-default');
      });
    }
  };
  $.extend(props, extraProps);
  $(tableSelector+'.datatable_tabletools').dataTable(props);
  $(tableSelector+' a[rel=tooltip]').tooltip();
}
function runDataTables ( specificTableID , destroyOption , extraProps ) { if ( typeof ( destroyOption ) === 'undefined' ) destroyOption = true ; if ( typeof ( extraProps ) === 'undefined' ) extraProps = { } ; var tableSelector = specificTableID || 'table' ; var props = null ; props = { "bDestroy" : destroyOption , "sPaginationType" : "bootstrap_full" } ; $ . extend ( props , extraProps ) ; $ ( tableSelector + '.datatable_basic' ) . dataTable ( props ) ; props = { "bDestroy" : destroyOption , "sPaginationType" : "bootstrap" , "sDom" : "R<'dt-top-row'Clf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>" , "fnInitComplete" : function ( oSettings , json ) { $ ( '.ColVis_Button' ) . addClass ( 'btn btn-default btn-sm' ) . html ( i18n . t ( "columns" ) + ' <i class="icon-arrow-down"></i>' ) ; } } ; $ . extend ( props , extraProps ) ; $ ( tableSelector + '.datatable_col_reorder' ) . dataTable ( props ) ; props = { "bDestroy" : destroyOption , "sDom" : "<'dt-top-row'Tlf>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>" , "oTableTools" : { "aButtons" : [ "copy" , { "sExtends" : "collection" , "sButtonText" : i18n . t ( 'save' ) + ' <span class="caret" />' , "aButtons" : [ "csv" , "xls" , "pdf" ] } ] , "sSwfPath" : "assets/copy_csv_xls_pdf.swf" } , "fnInitComplete" : function ( oSettings , json ) { $ ( this ) . closest ( '#dt_table_tools_wrapper' ) . find ( '.DTTT.btn-group' ) . addClass ( 'table_tools_group' ) . children ( 'a.btn' ) . each ( function ( ) { $ ( this ) . addClass ( 'btn-sm btn-default' ) ; } ) ; } } ; $ . extend ( props , extraProps ) ; $ ( tableSelector + '.datatable_tabletools' ) . dataTable ( props ) ; $ ( tableSelector + ' a[rel=tooltip]' ) . tooltip ( ) ; }
THIS FUNCTION MOVED OVER FROM datatables.html, and changed the selectors to use classes (e.g.
THIS FUNCTION MOVED OVER FROM datatables . html and changed the selectors to use classes ( e . g .
//try { $(tableSelector+'.datatable_basic').dataTable().fnClearTable(); } catch(err) { } /*
   * COL ORDER
   */ //try { $(tableSelector+'.datatable_col_reorder').dataTable().fnClearTable(); } catch(err) { } /* END COL ORDER */ /* TABLE TOOLS */ //try { $(tableSelector+'.datatable_tabletools').dataTable().fnClearTable(); } catch(err) { } //activate tooltips /* END TABLE TOOLS */