{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\n", "Install the spreadsheet gem version ~>1.1.1 for using spreadsheet functions.\n", "\n", "Install the mechanize gem version ~>2.7.5 for using mechanize functions.\n" ] }, { "data": { "text/plain": [ "true" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "require 'daru/view'" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "\n", " /* BEGIN jquery.dataTables.js */\n", "\n", "/*! DataTables 1.10.16-dev\n", " * ©2008-2017 SpryMedia Ltd - datatables.net/license\n", " */\n", "\n", "/**\n", " * @summary DataTables\n", " * @description Paginate, search and order HTML tables\n", " * @version 1.10.16-dev\n", " * @file jquery.dataTables.js\n", " * @author SpryMedia Ltd\n", " * @contact www.datatables.net\n", " * @copyright Copyright 2008-2017 SpryMedia Ltd.\n", " *\n", " * This source file is free software, available under the following license:\n", " * MIT license - http://datatables.net/license\n", " *\n", " * This source file is distributed in the hope that it will be useful, but\n", " * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n", " * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.\n", " *\n", " * For details please refer to: http://www.datatables.net\n", " */\n", "\n", "/*jslint evil: true, undef: true, browser: true */\n", "/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/\n", "\n", "(function( factory ) {\n", "\t\"use strict\";\n", "\n", "\tif ( typeof define === 'function' && define.amd ) {\n", "\t\t// AMD\n", "\t\tdefine( ['jquery'], function ( $ ) {\n", "\t\t\treturn factory( $, window, document );\n", "\t\t} );\n", "\t}\n", "\telse if ( typeof exports === 'object' ) {\n", "\t\t// CommonJS\n", "\t\tmodule.exports = function (root, $) {\n", "\t\t\tif ( ! root ) {\n", "\t\t\t\t// CommonJS environments without a window global must pass a\n", "\t\t\t\t// root. This will give an error otherwise\n", "\t\t\t\troot = window;\n", "\t\t\t}\n", "\n", "\t\t\tif ( ! $ ) {\n", "\t\t\t\t$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window\n", "\t\t\t\t\trequire('jquery') :\n", "\t\t\t\t\trequire('jquery')( root );\n", "\t\t\t}\n", "\n", "\t\t\treturn factory( $, root, root.document );\n", "\t\t};\n", "\t}\n", "\telse {\n", "\t\t// Browser\n", "\t\tfactory( jQuery, window, document );\n", "\t}\n", "}\n", "(function( $, window, document, undefined ) {\n", "\t\"use strict\";\n", "\n", "\t/**\n", "\t * DataTables is a plug-in for the jQuery Javascript library. It is a highly\n", "\t * flexible tool, based upon the foundations of progressive enhancement,\n", "\t * which will add advanced interaction controls to any HTML table. For a\n", "\t * full list of features please refer to\n", "\t * [DataTables.net](href=\"http://datatables.net).\n", "\t *\n", "\t * Note that the `DataTable` object is not a global variable but is aliased\n", "\t * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may\n", "\t * be accessed.\n", "\t *\n", "\t * @class\n", "\t * @param {object} [init={}] Configuration object for DataTables. Options\n", "\t * are defined by {@link DataTable.defaults}\n", "\t * @requires jQuery 1.7+\n", "\t *\n", "\t * @example\n", "\t * // Basic initialisation\n", "\t * $(document).ready( function {\n", "\t * $('#example').dataTable();\n", "\t * } );\n", "\t *\n", "\t * @example\n", "\t * // Initialisation with configuration options - in this case, disable\n", "\t * // pagination and sorting.\n", "\t * $(document).ready( function {\n", "\t * $('#example').dataTable( {\n", "\t * \"paginate\": false,\n", "\t * \"sort\": false\n", "\t * } );\n", "\t * } );\n", "\t */\n", "\tvar DataTable = function ( options )\n", "\t{\n", "\t\t/**\n", "\t\t * Perform a jQuery selector action on the table's TR elements (from the tbody) and\n", "\t\t * return the resulting jQuery object.\n", "\t\t * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on\n", "\t\t * @param {object} [oOpts] Optional parameters for modifying the rows to be included\n", "\t\t * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter\n", "\t\t * criterion (\"applied\") or all TR elements (i.e. no filter).\n", "\t\t * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.\n", "\t\t * Can be either 'current', whereby the current sorting of the table is used, or\n", "\t\t * 'original' whereby the original order the data was read into the table is used.\n", "\t\t * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page\n", "\t\t * (\"current\") or not (\"all\"). If 'current' is given, then order is assumed to be\n", "\t\t * 'current' and filter is 'applied', regardless of what they might be given as.\n", "\t\t * @returns {object} jQuery object, filtered by the given selector.\n", "\t\t * @dtopt API\n", "\t\t * @deprecated Since v1.10\n", "\t\t *\n", "\t\t * @example\n", "\t\t * $(document).ready(function() {\n", "\t\t * var oTable = $('#example').dataTable();\n", "\t\t *\n", "\t\t * // Highlight every second row\n", "\t\t * oTable.$('tr:odd').css('backgroundColor', 'blue');\n", "\t\t * } );\n", "\t\t *\n", "\t\t * @example\n", "\t\t * $(document).ready(function() {\n", "\t\t * var oTable = $('#example').dataTable();\n", "\t\t *\n", "\t\t * // Filter to rows with 'Webkit' in them, add a background colour and then\n", "\t\t * // remove the filter, thus highlighting the 'Webkit' rows only.\n", "\t\t * oTable.fnFilter('Webkit');\n", "\t\t * oTable.$('tr', {\"search\": \"applied\"}).css('backgroundColor', 'blue');\n", "\t\t * oTable.fnFilter('');\n", "\t\t * } );\n", "\t\t */\n", "\t\tthis.$ = function ( sSelector, oOpts )\n", "\t\t{\n", "\t\t\treturn this.api(true).$( sSelector, oOpts );\n", "\t\t};\n", "\t\t\n", "\t\t\n", "\t\t/**\n", "\t\t * Almost identical to $ in operation, but in this case returns the data for the matched\n", "\t\t * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes\n", "\t\t * rather than any descendants, so the data can be obtained for the row/cell. If matching\n", "\t\t * rows are found, the data returned is the original data array/object that was used to\n", "\t\t * create the row (or a generated array if from a DOM source).\n", "\t\t *\n", "\t\t * This method is often useful in-combination with $ where both functions are given the\n", "\t\t * same parameters and the array indexes will match identically.\n", "\t\t * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on\n", "\t\t * @param {object} [oOpts] Optional parameters for modifying the rows to be included\n", "\t\t * @param {string} [oOpts.filter=none] Select elements that meet the current filter\n", "\t\t * criterion (\"applied\") or all elements (i.e. no filter).\n", "\t\t * @param {string} [oOpts.order=current] Order of the data in the processed array.\n", "\t\t * Can be either 'current', whereby the current sorting of the table is used, or\n", "\t\t * 'original' whereby the original order the data was read into the table is used.\n", "\t\t * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page\n", "\t\t * (\"current\") or not (\"all\"). If 'current' is given, then order is assumed to be\n", "\t\t * 'current' and filter is 'applied', regardless of what they might be given as.\n", "\t\t * @returns {array} Data for the matched elements. If any elements, as a result of the\n", "\t\t * selector, were not TR, TD or TH elements in the DataTable, they will have a null\n", "\t\t * entry in the array.\n", "\t\t * @dtopt API\n", "\t\t * @deprecated Since v1.10\n", "\t\t *\n", "\t\t * @example\n", "\t\t * $(document).ready(function() {\n", "\t\t * var oTable = $('#example').dataTable();\n", "\t\t *\n", "\t\t * // Get the data from the first row in the table\n", "\t\t * var data = oTable._('tr:first');\n", "\t\t *\n", "\t\t * // Do something useful with the data\n", "\t\t * alert( \"First cell is: \"+data[0] );\n", "\t\t * } );\n", "\t\t *\n", "\t\t * @example\n", "\t\t * $(document).ready(function() {\n", "\t\t * var oTable = $('#example').dataTable();\n", "\t\t *\n", "\t\t * // Filter to 'Webkit' and get all data for\n", "\t\t * oTable.fnFilter('Webkit');\n", "\t\t * var data = oTable._('tr', {\"search\": \"applied\"});\n", "\t\t *\n", "\t\t * // Do something with the data\n", "\t\t * alert( data.length+\" rows matched the search\" );\n", "\t\t * } );\n", "\t\t */\n", "\t\tthis._ = function ( sSelector, oOpts )\n", "\t\t{\n", "\t\t\treturn this.api(true).rows( sSelector, oOpts ).data();\n", "\t\t};\n", "\t\t\n", "\t\t\n", "\t\t/**\n", "\t\t * Create a DataTables Api instance, with the currently selected tables for\n", "\t\t * the Api's context.\n", "\t\t * @param {boolean} [traditional=false] Set the API instance's context to be\n", "\t\t * only the table referred to by the `DataTable.ext.iApiIndex` option, as was\n", "\t\t * used in the API presented by DataTables 1.9- (i.e. the traditional mode),\n", "\t\t * or if all tables captured in the jQuery object should be used.\n", "\t\t * @return {DataTables.Api}\n", "\t\t */\n", "\t\tthis.api = function ( traditional )\n", "\t\t{\n", "\t\t\treturn traditional ?\n", "\t\t\t\tnew _Api(\n", "\t\t\t\t\t_fnSettingsFromNode( this[ _ext.iApiIndex ] )\n", "\t\t\t\t) :\n", "\t\t\t\tnew _Api( this );\n", "\t\t};\n", "\t\t\n", "\t\t\n", "\t\t/**\n", "\t\t * Add a single new row or multiple rows of data to the table. Please note\n", "\t\t * that this is suitable for client-side processing only - if you are using\n", "\t\t * server-side processing (i.e. \"bServerSide\": true), then to add data, you\n", "\t\t * must add it to the data source, i.e. the server-side, through an Ajax call.\n", "\t\t * @param {array|object} data The data to be added to the table. This can be:\n", "\t\t *