From ee918334fc51890159fc0e82e150b2e8652d6fb9 Mon Sep 17 00:00:00 2001 From: Daniel Leong Date: Sat, 18 Jun 2016 17:24:23 +1200 Subject: [PATCH 01/13] - removing additional assets added into the app --- Gemfile | 3 - Gemfile.lock | 3 - .../2/jquery.dataTables.bootstrap.js | 148 - .../3/jquery.dataTables.bootstrap.js | 185 - .../dataTables/extras/dataTables.autoFill.js | 855 - .../extras/dataTables.colReorder.js | 1371 -- .../dataTables/extras/dataTables.colVis.js | 1107 -- .../extras/dataTables.fixedColumns.js | 1399 -- .../extras/dataTables.fixedHeader.js | 1028 -- .../dataTables/extras/dataTables.keyTable.js | 1175 -- .../extras/dataTables.responsive.js | 801 - .../dataTables/extras/dataTables.scroller.js | 1262 -- .../extras/dataTables.tableTools.js | 3165 ---- .../jquery.dataTables.api.fnFilterOnReturn.js | 17 - .../jquery.dataTables.api.fnGetColumnData.js | 54 - .../jquery.dataTables.api.fnReloadAjax.js | 44 - ...uery.dataTables.api.fnSetFilteringDelay.js | 32 - .../jquery.dataTables.foundation.js | 186 - .../dataTables/jquery.dataTables.js | 14771 ---------------- .../jquery.dataTables.sorting.numbersHtml.js | 15 - ...ry.dataTables.typeDetection.numbersHtml.js | 40 - .../2/jquery.dataTables.bootstrap.css.scss | 207 - .../3/jquery.dataTables.bootstrap.css.scss | 280 - .../extras/dataTables.autoFill.css.scss | 24 - .../extras/dataTables.colReorder.css.scss | 14 - .../extras/dataTables.colVis.css.scss | 185 - .../dataTables.colvis.jqueryui.css.scss | 23 - .../extras/dataTables.fixedColumns.css.scss | 24 - .../extras/dataTables.fixedHeader.css.scss | 7 - .../extras/dataTables.keyTable.css.scss | 7 - .../extras/dataTables.responsive.css.scss | 132 - .../extras/dataTables.scroller.css.scss | 44 - .../extras/dataTables.tableTools.css.scss | 337 - .../dataTables/jquery.dataTables.css | 476 - .../dataTables/jquery.dataTables.css.scss | 476 - .../jquery.dataTables.foundation.css.scss | 211 - .../stylesheets/dataTables/src/demo_page.css | 107 - .../stylesheets/dataTables/src/demo_table.css | 575 - .../dataTables/src/demo_table_jui.css | 530 - .../src/jquery.dataTables_themeroller.css | 330 - 40 files changed, 31650 deletions(-) delete mode 100755 app/assets/javascripts/dataTables/bootstrap/2/jquery.dataTables.bootstrap.js delete mode 100755 app/assets/javascripts/dataTables/bootstrap/3/jquery.dataTables.bootstrap.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.autoFill.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.colReorder.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.colVis.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.fixedColumns.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.fixedHeader.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.keyTable.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.responsive.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.scroller.js delete mode 100755 app/assets/javascripts/dataTables/extras/dataTables.tableTools.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.api.fnFilterOnReturn.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.api.fnGetColumnData.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.api.fnReloadAjax.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.api.fnSetFilteringDelay.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.foundation.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.sorting.numbersHtml.js delete mode 100755 app/assets/javascripts/dataTables/jquery.dataTables.typeDetection.numbersHtml.js delete mode 100755 app/assets/stylesheets/dataTables/bootstrap/2/jquery.dataTables.bootstrap.css.scss delete mode 100755 app/assets/stylesheets/dataTables/bootstrap/3/jquery.dataTables.bootstrap.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.autoFill.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.colReorder.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.colVis.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.colvis.jqueryui.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.fixedColumns.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.fixedHeader.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.keyTable.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.responsive.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.scroller.css.scss delete mode 100755 app/assets/stylesheets/dataTables/extras/dataTables.tableTools.css.scss delete mode 100755 app/assets/stylesheets/dataTables/jquery.dataTables.css delete mode 100755 app/assets/stylesheets/dataTables/jquery.dataTables.css.scss delete mode 100755 app/assets/stylesheets/dataTables/jquery.dataTables.foundation.css.scss delete mode 100755 app/assets/stylesheets/dataTables/src/demo_page.css delete mode 100755 app/assets/stylesheets/dataTables/src/demo_table.css delete mode 100755 app/assets/stylesheets/dataTables/src/demo_table_jui.css delete mode 100755 app/assets/stylesheets/dataTables/src/jquery.dataTables_themeroller.css diff --git a/Gemfile b/Gemfile index 3097739..d8e78d9 100644 --- a/Gemfile +++ b/Gemfile @@ -55,9 +55,6 @@ gem 'jquery-ui-rails' # processes and thread gem 'parallel' -# highchart javascript library -gem 'highcharts-rails' - # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index f69ce05..55d8da0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -106,8 +106,6 @@ GEM multi_json (~> 1.3) globalid (0.3.6) activesupport (>= 4.1.0) - highcharts-rails (4.1.5) - railties (>= 3.1) i18n (0.7.0) jbuilder (2.3.0) activesupport (>= 3.0.0, < 5) @@ -295,7 +293,6 @@ DEPENDENCIES faker foreman fuubar - highcharts-rails jbuilder jquery-datatables-rails jquery-rails diff --git a/app/assets/javascripts/dataTables/bootstrap/2/jquery.dataTables.bootstrap.js b/app/assets/javascripts/dataTables/bootstrap/2/jquery.dataTables.bootstrap.js deleted file mode 100755 index 7c552e0..0000000 --- a/app/assets/javascripts/dataTables/bootstrap/2/jquery.dataTables.bootstrap.js +++ /dev/null @@ -1,148 +0,0 @@ -/* Set the defaults for DataTables initialisation */ -$.extend( true, $.fn.dataTable.defaults, { - "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", - "sPaginationType": "bootstrap", - "oLanguage": { - "sLengthMenu": "_MENU_ records per page" - } -} ); - - -/* Default class modification */ -$.extend( $.fn.dataTableExt.oStdClasses, { - "sWrapper": "dataTables_wrapper form-inline" -} ); - - -/* API method to get paging information */ -$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) -{ - return { - "iStart": oSettings._iDisplayStart, - "iEnd": oSettings.fnDisplayEnd(), - "iLength": oSettings._iDisplayLength, - "iTotal": oSettings.fnRecordsTotal(), - "iFilteredTotal": oSettings.fnRecordsDisplay(), - "iPage": oSettings._iDisplayLength === -1 ? - 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), - "iTotalPages": oSettings._iDisplayLength === -1 ? - 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) - }; -}; - - -/* Bootstrap style pagination control */ -$.extend( $.fn.dataTableExt.oPagination, { - "bootstrap": { - "fnInit": function( oSettings, nPaging, fnDraw ) { - var oLang = oSettings.oLanguage.oPaginate; - var fnClickHandler = function ( e ) { - e.preventDefault(); - if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { - fnDraw( oSettings ); - } - }; - - $(nPaging).addClass('pagination').append( - '' - ); - var els = $('a', nPaging); - $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); - $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); - }, - - "fnUpdate": function ( oSettings, fnDraw ) { - var iListLength = 5; - var oPaging = oSettings.oInstance.fnPagingInfo(); - var an = oSettings.aanFeatures.p; - var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2); - - if ( oPaging.iTotalPages < iListLength) { - iStart = 1; - iEnd = oPaging.iTotalPages; - } - else if ( oPaging.iPage <= iHalf ) { - iStart = 1; - iEnd = iListLength; - } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) { - iStart = oPaging.iTotalPages - iListLength + 1; - iEnd = oPaging.iTotalPages; - } else { - iStart = oPaging.iPage - iHalf + 1; - iEnd = iStart + iListLength - 1; - } - - for ( i=0, ien=an.length ; i'+j+'') - .insertBefore( $('li:last', an[i])[0] ) - .bind('click', function (e) { - e.preventDefault(); - oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; - fnDraw( oSettings ); - } ); - } - - // Add / remove disabled classes from the static elements - if ( oPaging.iPage === 0 ) { - $('li:first', an[i]).addClass('disabled'); - } else { - $('li:first', an[i]).removeClass('disabled'); - } - - if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { - $('li:last', an[i]).addClass('disabled'); - } else { - $('li:last', an[i]).removeClass('disabled'); - } - } - } - } -} ); - - -/* - * TableTools Bootstrap compatibility - * Required TableTools 2.1+ - */ -if ( $.fn.DataTable.TableTools ) { - // Set the classes that TableTools uses to something suitable for Bootstrap - $.extend( true, $.fn.DataTable.TableTools.classes, { - "container": "DTTT btn-group", - "buttons": { - "normal": "btn", - "disabled": "disabled" - }, - "collection": { - "container": "DTTT_dropdown dropdown-menu", - "buttons": { - "normal": "", - "disabled": "disabled" - } - }, - "print": { - "info": "DTTT_print_info modal" - }, - "select": { - "row": "active" - } - } ); - - // Have the collection use a bootstrap compatible dropdown - $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { - "collection": { - "container": "ul", - "button": "li", - "liner": "a" - } - } ); -} - diff --git a/app/assets/javascripts/dataTables/bootstrap/3/jquery.dataTables.bootstrap.js b/app/assets/javascripts/dataTables/bootstrap/3/jquery.dataTables.bootstrap.js deleted file mode 100755 index 6e9e617..0000000 --- a/app/assets/javascripts/dataTables/bootstrap/3/jquery.dataTables.bootstrap.js +++ /dev/null @@ -1,185 +0,0 @@ -/*! DataTables Bootstrap integration - * ©2011-2014 SpryMedia Ltd - datatables.net/license - */ - -/** - * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and - * DataTables 1.10 or newer. - * - * This file sets the defaults and adds options to DataTables to style its - * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap - * for further information. - */ -(function(window, document, undefined){ - -var factory = function( $, DataTable ) { -"use strict"; - - -/* Set the defaults for DataTables initialisation */ -$.extend( true, DataTable.defaults, { - dom: - "<'row'<'col-xs-6'l><'col-xs-6'f>r>"+ - "t"+ - "<'row'<'col-xs-6'i><'col-xs-6'p>>", - renderer: 'bootstrap' -} ); - - -/* Default class modification */ -$.extend( DataTable.ext.classes, { - sWrapper: "dataTables_wrapper form-inline dt-bootstrap", - sFilterInput: "form-control input-sm", - sLengthSelect: "form-control input-sm" -} ); - - -/* Bootstrap paging button renderer */ -DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { - var api = new DataTable.Api( settings ); - var classes = settings.oClasses; - var lang = settings.oLanguage.oPaginate; - var btnDisplay, btnClass; - - var attach = function( container, buttons ) { - var i, ien, node, button; - var clickHandler = function ( e ) { - e.preventDefault(); - if ( e.data.action !== 'ellipsis' ) { - api.page( e.data.action ).draw( false ); - } - }; - - for ( i=0, ien=buttons.length ; i 0 ? - '' : ' disabled'); - break; - - case 'previous': - btnDisplay = lang.sPrevious; - btnClass = button + (page > 0 ? - '' : ' disabled'); - break; - - case 'next': - btnDisplay = lang.sNext; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - case 'last': - btnDisplay = lang.sLast; - btnClass = button + (page < pages-1 ? - '' : ' disabled'); - break; - - default: - btnDisplay = button + 1; - btnClass = page === button ? - 'active' : ''; - break; - } - - if ( btnDisplay ) { - node = $('
  • ', { - 'class': classes.sPageButton+' '+btnClass, - 'aria-controls': settings.sTableId, - 'tabindex': settings.iTabIndex, - 'id': idx === 0 && typeof button === 'string' ? - settings.sTableId +'_'+ button : - null - } ) - .append( $('', { - 'href': '#' - } ) - .html( btnDisplay ) - ) - .appendTo( container ); - - settings.oApi._fnBindAction( - node, {action: button}, clickHandler - ); - } - } - } - }; - - attach( - $(host).empty().html('