diff --git a/app/assets/javascripts/samples/sample_datatable.js b/app/assets/javascripts/samples/sample_datatable.js index e441bf38a..c2fcdcd17 100644 --- a/app/assets/javascripts/samples/sample_datatable.js +++ b/app/assets/javascripts/samples/sample_datatable.js @@ -9,9 +9,8 @@ var selectedSample; table = $("#samples").DataTable({ order: [[2, "desc"]], - dom: "RB<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>>tpi", + dom: "R<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>>tpi", stateSave: true, - buttons: [{}], processing: true, serverSide: true, ajax: { @@ -107,8 +106,6 @@ table = $("#samples").DataTable({ } }); -table.buttons().container().appendTo('#datatables-buttons'); - // Enables noSearchHidden plugin $.fn.dataTable.defaults.noSearchHidden = true @@ -759,31 +756,24 @@ function changeToEditMode() { (function(table) { 'use strict'; - var dropdownBtn = $('#samples-columns-dropdown'); var dropdownList = $('#samples-columns-list'); - // removes button created by dataTables - function removeDefaultButton() { - $('#datatables-buttons') - .find('.dt-buttons') - .remove(); - } // loads the columns names in the dropdown list function loadColumnsNames() { - _.each(table.columns().header() , function(el, index) { + _.each(table.columns().header(), function(el, index) { if( index > 1 ) { var colIndex = $(el).attr('data-column-index'); var visible = table.column(colIndex).visible(); - var visClass= (visible) ? 'glyphicon-eye-open' : 'glyphicon-eye-close'; + var visClass = (visible) ? 'glyphicon-eye-open' : 'glyphicon-eye-close'; var visLi = (visible) ? '' : 'col-invisible'; var html = '
  • ' + el.innerText + ' ' + - ' '+ + ' ' + ' ' + '' + '
  • '; - dropdownList.append(html) + dropdownList.append(html); } }); @@ -829,9 +819,7 @@ function changeToEditMode() { // initialze dropdown after the table is loaded function initDropdown() { table.on('draw.dt', function() { - removeDefaultButton(); loadColumnsNames(); - removeDefaultButton(); toggleColumnVisibility(); }); } diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index bf763b6d7..9dc3eb7cd 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1592,7 +1592,7 @@ textarea.textarea-sm { li { border: 1px solid $color-alto; padding: 10px 10px 10px 0; - vertical-align:middle; + vertical-align: middle; } .vis {