From 9ed3c1e6ed99c56d77fd5d90ff42f9acfe7ace68 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 17 Jun 2016 06:15:59 +0000 Subject: Removed trailing spaces in .py and .js files --- wqflask/base/mrna_assay_tissue_data.py | 42 +- wqflask/base/species.py | 38 +- wqflask/base/trait.py | 44 +- wqflask/base/webqtlCaseData.py | 6 +- wqflask/base/webqtlConfig.py | 2 +- wqflask/basicStatistics/corestats.py | 64 +- wqflask/maintenance/gen_select_dataset.py | 34 +- .../maintenance/generate_probesetfreeze_file.py | 2 +- wqflask/maintenance/get_group_samplelists.py | 8 +- wqflask/maintenance/print_benchmark.py | 16 +- wqflask/utility/Plot.py | 8 +- wqflask/utility/benchmark.py | 8 +- wqflask/utility/chunks.py | 10 +- wqflask/utility/corr_result_helpers.py | 18 +- wqflask/utility/genofile_parser.py | 4 +- wqflask/utility/temp_data.py | 6 +- wqflask/utility/tools.py | 4 +- wqflask/utility/webqtlUtil.py | 8 +- wqflask/wqflask/collect.py | 38 +- wqflask/wqflask/correlation/corr_scatter_plot.py | 18 +- .../wqflask/correlation/correlation_functions.py | 12 +- wqflask/wqflask/correlation/show_corr_results.py | 180 +- .../wqflask/correlation_matrix/show_corr_matrix.py | 36 +- wqflask/wqflask/database.py | 2 +- wqflask/wqflask/do_search.py | 24 +- wqflask/wqflask/gsearch.py | 20 +- wqflask/wqflask/heatmap/heatmap.py | 106 +- wqflask/wqflask/interval_analyst/GeneUtil.py | 28 +- .../interval_analyst/IntervalAnalystPage.py | 2 +- .../marker_regression/MarkerRegressionPage.py | 2 +- wqflask/wqflask/marker_regression/gemma_mapping.py | 12 +- .../wqflask/marker_regression/marker_regression.py | 280 +-- .../marker_regression/marker_regression_gn1.py | 92 +- wqflask/wqflask/model.py | 4 +- wqflask/wqflask/news.py | 4 +- wqflask/wqflask/parser.py | 12 +- wqflask/wqflask/search_results.py | 14 +- wqflask/wqflask/show_trait/SampleList.py | 24 +- wqflask/wqflask/show_trait/export_trait_data.py | 6 +- wqflask/wqflask/show_trait/show_trait.py | 18 +- wqflask/wqflask/show_trait/show_trait_page.py | 6 +- .../wqflask/static/new/javascript/chr_lod_chart.js | 2 +- wqflask/wqflask/static/new/javascript/panelutil.js | 2 +- .../static/new/javascript/scatter-matrix.js | 10 +- .../static/new/javascript/search_results.js | 6 +- .../wqflask/static/new/javascript/show_trait.js | 4 +- .../new/javascript/show_trait_mapping_tools.js | 2 +- wqflask/wqflask/static/new/js_external/chroma.js | 56 +- .../wqflask/static/new/js_external/shapiro-wilk.js | 2 +- .../DataTables/extensions/dataTables.colResize.js | 6 +- .../DataTables/js/dataTables.naturalSort.js | 8 +- .../packages/DataTables/js/jquery.dataTables.js | 44 +- .../new/packages/DataTables/src/DataTables.js | 34 +- .../packages/DataTables/src/api/api.internal.js | 2 +- .../new/packages/DataTables/src/api/api.methods.js | 108 +- .../new/packages/DataTables/src/api/api.static.js | 2 +- .../packages/DataTables/src/core/core.columns.js | 4 +- .../DataTables/src/core/core.constructor.js | 6 +- .../new/packages/DataTables/src/core/core.data.js | 8 +- .../new/packages/DataTables/src/core/core.draw.js | 20 +- .../packages/DataTables/src/core/core.filter.js | 12 +- .../new/packages/DataTables/src/core/core.info.js | 2 +- .../packages/DataTables/src/core/core.length.js | 2 +- .../new/packages/DataTables/src/core/core.page.js | 4 +- .../packages/DataTables/src/core/core.scrolling.js | 22 +- .../packages/DataTables/src/core/core.sizing.js | 12 +- .../new/packages/DataTables/src/core/core.sort.js | 30 +- .../new/packages/DataTables/src/core/core.state.js | 4 +- .../packages/DataTables/src/core/core.support.js | 4 +- .../new/packages/DataTables/src/ext/ext.paging.js | 8 +- .../new/packages/DataTables/src/ext/ext.types.js | 10 +- .../packages/DataTables/src/model/model.column.js | 30 +- .../DataTables/src/model/model.defaults.columns.js | 144 +- .../DataTables/src/model/model.defaults.js | 290 +-- .../new/packages/DataTables/src/model/model.ext.js | 86 +- .../new/packages/DataTables/src/model/model.row.js | 8 +- .../DataTables/src/model/model.settings.js | 56 +- .../packages/DataTables/unit_testing/controller.js | 6 +- .../unit_testing/tests/1_dom/_zero_config.js | 92 +- .../tests_onhold/1_dom/-complex_header.js | 14 +- .../unit_testing/tests_onhold/1_dom/-iDraw.js | 10 +- .../unit_testing/tests_onhold/1_dom/2512.js | 2 +- .../unit_testing/tests_onhold/1_dom/2530-2.js | 2 +- .../unit_testing/tests_onhold/1_dom/2530.js | 2 +- .../unit_testing/tests_onhold/1_dom/2569.js | 8 +- .../unit_testing/tests_onhold/1_dom/2600.js | 12 +- .../unit_testing/tests_onhold/1_dom/2608.js | 8 +- .../unit_testing/tests_onhold/1_dom/2635.js | 6 +- .../tests_onhold/1_dom/2746-stable-sort.js | 24 +- .../unit_testing/tests_onhold/1_dom/2799.js | 2 +- .../tests_onhold/1_dom/2840-restore-table-width.js | 2 +- .../tests_onhold/1_dom/2914-state-save-sort.js | 6 +- .../tests_onhold/1_dom/5396-fnUpdate-arrays.js | 10 +- .../1_dom/5508-xscroll-zero-content.js | 4 +- .../1_dom/6776-scrolling-table-grows.js | 16 +- .../tests_onhold/1_dom/_zero_config.js | 92 +- .../unit_testing/tests_onhold/1_dom/aaSorting.js | 32 +- .../tests_onhold/1_dom/aaSortingFixed.js | 10 +- .../tests_onhold/1_dom/aoColumns.bSearchable.js | 10 +- .../tests_onhold/1_dom/aoColumns.bSortable.js | 20 +- .../tests_onhold/1_dom/aoColumns.bUseRendered.js | 18 +- .../tests_onhold/1_dom/aoColumns.bVisible.js | 30 +- .../tests_onhold/1_dom/aoColumns.bVisible2.js | 10 +- .../tests_onhold/1_dom/aoColumns.fnRender.js | 16 +- .../tests_onhold/1_dom/aoColumns.iDataSort.js | 18 +- .../tests_onhold/1_dom/aoColumns.sClass.js | 26 +- .../tests_onhold/1_dom/aoColumns.sName.js | 2 +- .../tests_onhold/1_dom/aoColumns.sTitle.js | 12 +- .../tests_onhold/1_dom/aoColumns.sWidth.js | 8 +- .../tests_onhold/1_dom/aoSearchCols.js | 14 +- .../tests_onhold/1_dom/asStripClasses.js | 14 +- .../unit_testing/tests_onhold/1_dom/bAutoWidth.js | 18 +- .../unit_testing/tests_onhold/1_dom/bFilter.js | 6 +- .../tests_onhold/1_dom/bInfiniteScroll.js | 40 +- .../unit_testing/tests_onhold/1_dom/bInfo.js | 6 +- .../unit_testing/tests_onhold/1_dom/bJQueryUI.js | 6 +- .../tests_onhold/1_dom/bLengthChange.js | 10 +- .../unit_testing/tests_onhold/1_dom/bPaginate.js | 10 +- .../unit_testing/tests_onhold/1_dom/bProcessing.js | 22 +- .../unit_testing/tests_onhold/1_dom/bServerSide.js | 2 +- .../unit_testing/tests_onhold/1_dom/bSort.js | 16 +- .../tests_onhold/1_dom/bSortCellsTop.js | 20 +- .../tests_onhold/1_dom/bSortClasses.js | 36 +- .../tests_onhold/1_dom/fnCookieCallback.js | 12 +- .../tests_onhold/1_dom/fnCreatedCell.js | 16 +- .../tests_onhold/1_dom/fnCreatedRow.js | 14 +- .../unit_testing/tests_onhold/1_dom/fnDeleteRow.js | 6 +- .../tests_onhold/1_dom/fnDrawCallback.js | 10 +- .../unit_testing/tests_onhold/1_dom/fnFilter.js | 2 +- .../tests_onhold/1_dom/fnFooterCallback.js | 26 +- .../tests_onhold/1_dom/fnHeaderCallback.js | 26 +- .../tests_onhold/1_dom/fnInfoCallback.js | 18 +- .../tests_onhold/1_dom/fnInitComplete.js | 12 +- .../tests_onhold/1_dom/fnRowCallback.js | 12 +- .../tests_onhold/1_dom/fnSetColumnVis.js | 30 +- .../tests_onhold/1_dom/fnSetColumnVis2.js | 10 +- .../tests_onhold/1_dom/html-autodetect-sort.js | 8 +- .../tests_onhold/1_dom/iDisplayLength.js | 16 +- .../tests_onhold/1_dom/oLanguage.oPaginate.js | 16 +- .../tests_onhold/1_dom/oLanguage.sInfo.js | 18 +- .../tests_onhold/1_dom/oLanguage.sInfoEmpty.js | 16 +- .../tests_onhold/1_dom/oLanguage.sInfoPostFix.js | 12 +- .../tests_onhold/1_dom/oLanguage.sLengthMenu.js | 10 +- .../tests_onhold/1_dom/oLanguage.sProcessing.js | 8 +- .../tests_onhold/1_dom/oLanguage.sSearch.js | 10 +- .../tests_onhold/1_dom/oLanguage.sUrl.js | 6 +- .../tests_onhold/1_dom/oLanguage.sZeroRecords.js | 4 +- .../unit_testing/tests_onhold/1_dom/oSearch.js | 16 +- .../unit_testing/tests_onhold/1_dom/sAjaxSource.js | 2 +- .../unit_testing/tests_onhold/1_dom/sDom.js | 42 +- .../tests_onhold/1_dom/sPaginationType.js | 26 +- .../unit_testing/tests_onhold/1_dom/sScrollXY.js | 14 +- .../unit_testing/tests_onhold/1_dom/th_in_body.js | 92 +- .../2_js/6872-default-content-missing-props.js | 18 +- .../2_js/8549--string-sorting-nonstrings.js | 6 +- .../unit_testing/tests_onhold/2_js/_zero_config.js | 92 +- .../unit_testing/tests_onhold/2_js/aaSorting.js | 32 +- .../tests_onhold/2_js/aaSortingFixed.js | 10 +- .../tests_onhold/2_js/aoColumns.bSearchable.js | 10 +- .../tests_onhold/2_js/aoColumns.bSortable.js | 20 +- .../tests_onhold/2_js/aoColumns.bUseRendered.js | 18 +- .../tests_onhold/2_js/aoColumns.bVisible.js | 22 +- .../tests_onhold/2_js/aoColumns.fnRender.js | 14 +- .../tests_onhold/2_js/aoColumns.iDataSort.js | 18 +- .../tests_onhold/2_js/aoColumns.sClass.js | 26 +- .../tests_onhold/2_js/aoColumns.sName.js | 2 +- .../tests_onhold/2_js/aoColumns.sTitle.js | 12 +- .../tests_onhold/2_js/aoColumns.sWidth.js | 8 +- .../unit_testing/tests_onhold/2_js/aoSearchCols.js | 14 +- .../tests_onhold/2_js/asStripClasses.js | 12 +- .../unit_testing/tests_onhold/2_js/bAutoWidth.js | 18 +- .../unit_testing/tests_onhold/2_js/bFilter.js | 6 +- .../unit_testing/tests_onhold/2_js/bInfo.js | 6 +- .../tests_onhold/2_js/bLengthChange.js | 10 +- .../unit_testing/tests_onhold/2_js/bPaginate.js | 10 +- .../unit_testing/tests_onhold/2_js/bProcessing.js | 22 +- .../unit_testing/tests_onhold/2_js/bServerSide.js | 2 +- .../unit_testing/tests_onhold/2_js/bSort.js | 16 +- .../unit_testing/tests_onhold/2_js/bSortClasses.js | 36 +- .../tests_onhold/2_js/fnCreatedCell.js | 16 +- .../unit_testing/tests_onhold/2_js/fnCreatedRow.js | 14 +- .../tests_onhold/2_js/fnDrawCallback.js | 10 +- .../tests_onhold/2_js/fnFooterCallback.js | 26 +- .../tests_onhold/2_js/fnHeaderCallback.js | 26 +- .../tests_onhold/2_js/fnInitComplete.js | 10 +- .../tests_onhold/2_js/fnRowCallback.js | 12 +- .../tests_onhold/2_js/iDisplayLength.js | 16 +- .../tests_onhold/2_js/js_data_mixed_types.js | 80 +- .../tests_onhold/2_js/oLanguage.oPaginate.js | 16 +- .../tests_onhold/2_js/oLanguage.sInfo.js | 18 +- .../tests_onhold/2_js/oLanguage.sInfoEmpty.js | 16 +- .../tests_onhold/2_js/oLanguage.sInfoPostFix.js | 12 +- .../tests_onhold/2_js/oLanguage.sLengthMenu.js | 10 +- .../tests_onhold/2_js/oLanguage.sProcessing.js | 8 +- .../tests_onhold/2_js/oLanguage.sSearch.js | 10 +- .../tests_onhold/2_js/oLanguage.sUrl.js | 6 +- .../tests_onhold/2_js/oLanguage.sZeroRecords.js | 4 +- .../unit_testing/tests_onhold/2_js/oSearch.js | 16 +- .../unit_testing/tests_onhold/2_js/sAjaxSource.js | 2 +- .../unit_testing/tests_onhold/2_js/sDom.js | 32 +- .../tests_onhold/2_js/sPaginationType.js | 26 +- .../tests_onhold/3_ajax/_zero_config.js | 92 +- .../unit_testing/tests_onhold/3_ajax/aaSorting.js | 32 +- .../tests_onhold/3_ajax/aaSortingFixed.js | 10 +- .../tests_onhold/3_ajax/aoColumns.bSearchable.js | 10 +- .../tests_onhold/3_ajax/aoColumns.bSortable.js | 20 +- .../tests_onhold/3_ajax/aoColumns.bUseRendered.js | 18 +- .../tests_onhold/3_ajax/aoColumns.bVisible.js | 26 +- .../tests_onhold/3_ajax/aoColumns.fnRender.js | 14 +- .../tests_onhold/3_ajax/aoColumns.iDataSort.js | 18 +- .../tests_onhold/3_ajax/aoColumns.sClass.js | 26 +- .../tests_onhold/3_ajax/aoColumns.sName.js | 2 +- .../tests_onhold/3_ajax/aoColumns.sTitle.js | 12 +- .../tests_onhold/3_ajax/aoColumns.sWidth.js | 8 +- .../tests_onhold/3_ajax/aoSearchCols.js | 14 +- .../tests_onhold/3_ajax/asStripClasses.js | 12 +- .../unit_testing/tests_onhold/3_ajax/bAutoWidth.js | 18 +- .../unit_testing/tests_onhold/3_ajax/bFilter.js | 6 +- .../unit_testing/tests_onhold/3_ajax/bInfo.js | 6 +- .../tests_onhold/3_ajax/bLengthChange.js | 10 +- .../unit_testing/tests_onhold/3_ajax/bPaginate.js | 10 +- .../tests_onhold/3_ajax/bProcessing.js | 22 +- .../tests_onhold/3_ajax/bServerSide.js | 2 +- .../unit_testing/tests_onhold/3_ajax/bSort.js | 16 +- .../tests_onhold/3_ajax/bSortClasses.js | 36 +- .../tests_onhold/3_ajax/fnCreatedCell.js | 16 +- .../tests_onhold/3_ajax/fnCreatedRow.js | 14 +- .../tests_onhold/3_ajax/fnDrawCallback.js | 10 +- .../tests_onhold/3_ajax/fnHeaderCallback.js | 20 +- .../tests_onhold/3_ajax/fnInitComplete.js | 12 +- .../tests_onhold/3_ajax/fnRowCallback.js | 12 +- .../tests_onhold/3_ajax/fnServerData.js | 8 +- .../tests_onhold/3_ajax/iDisplayLength.js | 16 +- .../tests_onhold/3_ajax/oLanguage.oPaginate.js | 16 +- .../tests_onhold/3_ajax/oLanguage.sInfo.js | 18 +- .../tests_onhold/3_ajax/oLanguage.sInfoEmpty.js | 16 +- .../tests_onhold/3_ajax/oLanguage.sInfoPostFix.js | 12 +- .../tests_onhold/3_ajax/oLanguage.sLengthMenu.js | 10 +- .../3_ajax/oLanguage.sLoadingRecords.js | 2 +- .../tests_onhold/3_ajax/oLanguage.sProcessing.js | 8 +- .../tests_onhold/3_ajax/oLanguage.sSearch.js | 10 +- .../tests_onhold/3_ajax/oLanguage.sUrl.js | 6 +- .../tests_onhold/3_ajax/oLanguage.sZeroRecords.js | 4 +- .../unit_testing/tests_onhold/3_ajax/oSearch.js | 16 +- .../tests_onhold/3_ajax/sAjaxDataProp.js | 40 +- .../tests_onhold/3_ajax/sAjaxDataProp2.js | 40 +- .../tests_onhold/3_ajax/sAjaxSource.js | 4 +- .../unit_testing/tests_onhold/3_ajax/sDom.js | 32 +- .../tests_onhold/3_ajax/sPaginationType.js | 26 +- .../tests_onhold/4_server-side/-iDraw.js | 10 +- .../tests_onhold/4_server-side/2440.js | 4 +- .../tests_onhold/4_server-side/2569.js | 8 +- .../tests_onhold/4_server-side/2600.js | 12 +- .../tests_onhold/4_server-side/_zero_config.js | 90 +- .../tests_onhold/4_server-side/aaSorting.js | 32 +- .../tests_onhold/4_server-side/aaSortingFixed.js | 10 +- .../4_server-side/aoColumns.bSearchable.js | 2 +- .../4_server-side/aoColumns.bSortable.js | 20 +- .../4_server-side/aoColumns.bUseRendered.js | 2 +- .../4_server-side/aoColumns.bVisible.js | 26 +- .../4_server-side/aoColumns.fnRender.js | 14 +- .../tests_onhold/4_server-side/aoColumns.sClass.js | 26 +- .../tests_onhold/4_server-side/aoColumns.sName.js | 2 +- .../tests_onhold/4_server-side/aoColumns.sTitle.js | 12 +- .../tests_onhold/4_server-side/aoColumns.sWidth.js | 8 +- .../tests_onhold/4_server-side/aoSearchCols.js | 8 +- .../tests_onhold/4_server-side/asStripClasses.js | 12 +- .../tests_onhold/4_server-side/bAutoWidth.js | 18 +- .../tests_onhold/4_server-side/bFilter.js | 6 +- .../tests_onhold/4_server-side/bInfiniteScroll.js | 50 +- .../tests_onhold/4_server-side/bInfo.js | 6 +- .../tests_onhold/4_server-side/bLengthChange.js | 10 +- .../tests_onhold/4_server-side/bPaginate.js | 10 +- .../tests_onhold/4_server-side/bProcessing.js | 22 +- .../tests_onhold/4_server-side/bServerSide.js | 2 +- .../tests_onhold/4_server-side/bSort.js | 16 +- .../tests_onhold/4_server-side/bSortClasses.js | 36 +- .../tests_onhold/4_server-side/fnCreatedCell.js | 16 +- .../tests_onhold/4_server-side/fnCreatedRow.js | 14 +- .../tests_onhold/4_server-side/fnDrawCallback.js | 10 +- .../tests_onhold/4_server-side/fnHeaderCallback.js | 20 +- .../tests_onhold/4_server-side/fnInitComplete.js | 10 +- .../tests_onhold/4_server-side/fnRowCallback.js | 12 +- .../tests_onhold/4_server-side/iDeferLoading.js | 18 +- .../tests_onhold/4_server-side/iDisplayLength.js | 16 +- .../4_server-side/oLanguage.oPaginate.js | 16 +- .../tests_onhold/4_server-side/oLanguage.sInfo.js | 18 +- .../4_server-side/oLanguage.sInfoEmpty.js | 16 +- .../4_server-side/oLanguage.sInfoPostFix.js | 12 +- .../4_server-side/oLanguage.sLengthMenu.js | 10 +- .../4_server-side/oLanguage.sProcessing.js | 8 +- .../4_server-side/oLanguage.sSearch.js | 10 +- .../tests_onhold/4_server-side/oLanguage.sUrl.js | 6 +- .../4_server-side/oLanguage.sZeroRecords.js | 4 +- .../tests_onhold/4_server-side/oSearch.js | 14 +- .../tests_onhold/4_server-side/sAjaxDataProp.js | 44 +- .../tests_onhold/4_server-side/sAjaxSource.js | 4 +- .../tests_onhold/4_server-side/sDom.js | 32 +- .../tests_onhold/4_server-side/sPaginationType.js | 26 +- .../tests_onhold/5_ajax_objects/_zero_config.js | 92 +- .../_zero_config_arrays_subobjects.js | 92 +- .../5_ajax_objects/_zero_config_deep.js | 92 +- .../5_ajax_objects/_zero_config_null_source.js | 96 +- .../5_ajax_objects/_zero_config_objects.js | 92 +- .../_zero_config_objects_subarrays.js | 92 +- .../tests_onhold/5_ajax_objects/aaSorting.js | 32 +- .../tests_onhold/5_ajax_objects/aaSortingFixed.js | 10 +- .../5_ajax_objects/aoColumns.bSearchable.js | 10 +- .../5_ajax_objects/aoColumns.bSortable.js | 20 +- .../5_ajax_objects/aoColumns.bUseRendered.js | 18 +- .../5_ajax_objects/aoColumns.bVisible.js | 26 +- .../5_ajax_objects/aoColumns.fnRender.js | 20 +- .../5_ajax_objects/aoColumns.iDataSort.js | 18 +- .../5_ajax_objects/aoColumns.sClass.js | 26 +- .../tests_onhold/5_ajax_objects/aoColumns.sName.js | 2 +- .../5_ajax_objects/aoColumns.sTitle.js | 12 +- .../5_ajax_objects/aoColumns.sWidth.js | 8 +- .../tests_onhold/5_ajax_objects/aoSearchCols.js | 14 +- .../tests_onhold/5_ajax_objects/asStripClasses.js | 12 +- .../tests_onhold/5_ajax_objects/bAutoWidth.js | 18 +- .../tests_onhold/5_ajax_objects/bFilter.js | 6 +- .../tests_onhold/5_ajax_objects/bInfo.js | 6 +- .../tests_onhold/5_ajax_objects/bLengthChange.js | 10 +- .../tests_onhold/5_ajax_objects/bPaginate.js | 10 +- .../tests_onhold/5_ajax_objects/bProcessing.js | 22 +- .../tests_onhold/5_ajax_objects/bServerSide.js | 2 +- .../tests_onhold/5_ajax_objects/bSort.js | 16 +- .../tests_onhold/5_ajax_objects/bSortClasses.js | 36 +- .../tests_onhold/5_ajax_objects/fnDrawCallback.js | 10 +- .../5_ajax_objects/fnHeaderCallback.js | 20 +- .../tests_onhold/5_ajax_objects/fnInitComplete.js | 12 +- .../tests_onhold/5_ajax_objects/fnRowCallback.js | 12 +- .../tests_onhold/5_ajax_objects/fnServerData.js | 8 +- .../tests_onhold/5_ajax_objects/iDisplayLength.js | 16 +- .../5_ajax_objects/oLanguage.oPaginate.js | 16 +- .../tests_onhold/5_ajax_objects/oLanguage.sInfo.js | 18 +- .../5_ajax_objects/oLanguage.sInfoEmpty.js | 16 +- .../5_ajax_objects/oLanguage.sInfoPostFix.js | 12 +- .../5_ajax_objects/oLanguage.sLengthMenu.js | 10 +- .../5_ajax_objects/oLanguage.sProcessing.js | 8 +- .../5_ajax_objects/oLanguage.sSearch.js | 10 +- .../tests_onhold/5_ajax_objects/oLanguage.sUrl.js | 6 +- .../5_ajax_objects/oLanguage.sZeroRecords.js | 4 +- .../tests_onhold/5_ajax_objects/oSearch.js | 16 +- .../tests_onhold/5_ajax_objects/sAjaxSource.js | 4 +- .../tests_onhold/5_ajax_objects/sDom.js | 32 +- .../tests_onhold/5_ajax_objects/sPaginationType.js | 26 +- .../6_delayed_rendering/_zero_config.js | 84 +- .../tests_onhold/6_delayed_rendering/aaSorting.js | 32 +- .../6_delayed_rendering/aaSortingFixed.js | 10 +- .../6_delayed_rendering/aoColumns.bSearchable.js | 10 +- .../6_delayed_rendering/aoColumns.bSortable.js | 20 +- .../6_delayed_rendering/aoColumns.bUseRendered.js | 18 +- .../6_delayed_rendering/aoColumns.bVisible.js | 26 +- .../6_delayed_rendering/aoColumns.fnRender.js | 16 +- .../6_delayed_rendering/aoColumns.iDataSort.js | 18 +- .../6_delayed_rendering/aoColumns.sClass.js | 26 +- .../6_delayed_rendering/aoColumns.sName.js | 2 +- .../6_delayed_rendering/aoColumns.sTitle.js | 12 +- .../6_delayed_rendering/aoColumns.sWidth.js | 8 +- .../6_delayed_rendering/aoSearchCols.js | 14 +- .../6_delayed_rendering/asStripClasses.js | 12 +- .../tests_onhold/6_delayed_rendering/bAutoWidth.js | 18 +- .../tests_onhold/6_delayed_rendering/bFilter.js | 6 +- .../tests_onhold/6_delayed_rendering/bInfo.js | 6 +- .../6_delayed_rendering/bLengthChange.js | 10 +- .../tests_onhold/6_delayed_rendering/bPaginate.js | 10 +- .../6_delayed_rendering/bProcessing.js | 22 +- .../6_delayed_rendering/bServerSide.js | 2 +- .../tests_onhold/6_delayed_rendering/bSort.js | 16 +- .../6_delayed_rendering/bSortClasses.js | 36 +- .../6_delayed_rendering/fnDrawCallback.js | 10 +- .../6_delayed_rendering/fnHeaderCallback.js | 20 +- .../6_delayed_rendering/fnInitComplete.js | 12 +- .../6_delayed_rendering/fnRowCallback.js | 12 +- .../6_delayed_rendering/fnServerData.js | 8 +- .../6_delayed_rendering/iDisplayLength.js | 16 +- .../6_delayed_rendering/oLanguage.oPaginate.js | 16 +- .../6_delayed_rendering/oLanguage.sInfo.js | 18 +- .../6_delayed_rendering/oLanguage.sInfoEmpty.js | 16 +- .../6_delayed_rendering/oLanguage.sInfoPostFix.js | 12 +- .../6_delayed_rendering/oLanguage.sLengthMenu.js | 10 +- .../6_delayed_rendering/oLanguage.sProcessing.js | 8 +- .../6_delayed_rendering/oLanguage.sSearch.js | 10 +- .../6_delayed_rendering/oLanguage.sUrl.js | 6 +- .../6_delayed_rendering/oLanguage.sZeroRecords.js | 4 +- .../tests_onhold/6_delayed_rendering/oSearch.js | 16 +- .../6_delayed_rendering/sAjaxDataProp.js | 40 +- .../6_delayed_rendering/sAjaxDataProp2.js | 40 +- .../6_delayed_rendering/sAjaxSource.js | 4 +- .../tests_onhold/6_delayed_rendering/sDom.js | 32 +- .../6_delayed_rendering/sPaginationType.js | 26 +- .../packages/DataTables/unit_testing/unit_test.js | 16 +- wqflask/wqflask/static/new/packages/nvd3/nv.d3.js | 30 +- .../packages/TableTools/media/js/TableTools.js | 110 +- .../packages/TableTools/media/js/TableTools.min.js | 8 +- .../packages/TableTools/media/js/ZeroClipboard.js | 10 +- wqflask/wqflask/static/packages/jqplot/excanvas.js | 2 +- .../wqflask/static/packages/jqplot/excanvas.min.js | 28 +- .../static/packages/jqplot/jquery.jqplot.js | 1936 ++++++++++---------- .../static/packages/jqplot/jquery.jqplot.min.js | 28 +- wqflask/wqflask/static/packages/jqplot/jquery.js | 24 +- .../wqflask/static/packages/jqplot/jquery.min.js | 2 +- .../jqplot/plugins/jqplot.BezierCurveRenderer.js | 126 +- .../plugins/jqplot.BezierCurveRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.barRenderer.js | 156 +- .../jqplot/plugins/jqplot.barRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.blockRenderer.js | 61 +- .../jqplot/plugins/jqplot.blockRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.bubbleRenderer.js | 189 +- .../jqplot/plugins/jqplot.bubbleRenderer.min.js | 28 +- .../plugins/jqplot.canvasAxisLabelRenderer.js | 62 +- .../plugins/jqplot.canvasAxisLabelRenderer.min.js | 28 +- .../plugins/jqplot.canvasAxisTickRenderer.js | 60 +- .../plugins/jqplot.canvasAxisTickRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.canvasOverlay.js | 74 +- .../jqplot/plugins/jqplot.canvasOverlay.min.js | 28 +- .../jqplot/plugins/jqplot.canvasTextRenderer.js | 74 +- .../plugins/jqplot.canvasTextRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.categoryAxisRenderer.js | 134 +- .../plugins/jqplot.categoryAxisRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.ciParser.js | 38 +- .../packages/jqplot/plugins/jqplot.ciParser.min.js | 28 +- .../packages/jqplot/plugins/jqplot.cursor.js | 170 +- .../packages/jqplot/plugins/jqplot.cursor.min.js | 28 +- .../jqplot/plugins/jqplot.dateAxisRenderer.js | 126 +- .../jqplot/plugins/jqplot.dateAxisRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.donutRenderer.js | 179 +- .../jqplot/plugins/jqplot.donutRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.dragable.js | 50 +- .../packages/jqplot/plugins/jqplot.dragable.min.js | 28 +- .../plugins/jqplot.enhancedLegendRenderer.js | 50 +- .../plugins/jqplot.enhancedLegendRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.funnelRenderer.js | 227 ++- .../jqplot/plugins/jqplot.funnelRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.highlighter.js | 84 +- .../jqplot/plugins/jqplot.highlighter.min.js | 28 +- .../static/packages/jqplot/plugins/jqplot.json2.js | 10 +- .../packages/jqplot/plugins/jqplot.json2.min.js | 28 +- .../jqplot/plugins/jqplot.logAxisRenderer.js | 76 +- .../jqplot/plugins/jqplot.logAxisRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.mekkoAxisRenderer.js | 108 +- .../jqplot/plugins/jqplot.mekkoAxisRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.mekkoRenderer.js | 92 +- .../jqplot/plugins/jqplot.mekkoRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.meterGaugeRenderer.js | 243 ++- .../plugins/jqplot.meterGaugeRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.mobile.min.js | 28 +- .../packages/jqplot/plugins/jqplot.ohlcRenderer.js | 100 +- .../jqplot/plugins/jqplot.ohlcRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.pieRenderer.js | 207 ++- .../jqplot/plugins/jqplot.pieRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.pointLabels.js | 90 +- .../jqplot/plugins/jqplot.pointLabels.min.js | 28 +- .../jqplot/plugins/jqplot.pyramidAxisRenderer.js | 98 +- .../plugins/jqplot.pyramidAxisRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.pyramidGridRenderer.js | 36 +- .../plugins/jqplot.pyramidGridRenderer.min.js | 28 +- .../jqplot/plugins/jqplot.pyramidRenderer.js | 86 +- .../jqplot/plugins/jqplot.pyramidRenderer.min.js | 28 +- .../packages/jqplot/plugins/jqplot.trendline.js | 38 +- .../jqplot/plugins/jqplot.trendline.min.js | 28 +- .../test/lib/jasmine.js | 10 +- .../test/lib/jquery.js | 24 +- wqflask/wqflask/tracer.py | 12 +- wqflask/wqflask/update_search_results.py | 60 +- wqflask/wqflask/user_manager.py | 10 +- wqflask/wqflask/views.py | 32 +- 468 files changed, 7096 insertions(+), 7102 deletions(-) (limited to 'wqflask') diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py index ba82057a..039f5d1f 100755 --- a/wqflask/base/mrna_assay_tissue_data.py +++ b/wqflask/base/mrna_assay_tissue_data.py @@ -12,30 +12,30 @@ from MySQLdb import escape_string as escape from pprint import pformat as pf class MrnaAssayTissueData(object): - + def __init__(self, gene_symbols=None): self.gene_symbols = gene_symbols self.have_data = False if self.gene_symbols == None: self.gene_symbols = [] - + #print("self.gene_symbols:", self.gene_symbols) - + self.data = collections.defaultdict(Bunch) - + #self.gene_id_dict ={} #self.data_id_dict = {} #self.chr_dict = {} #self.mb_dict = {} #self.desc_dict = {} #self.probe_target_desc_dict = {} - + query = '''select t.Symbol, t.GeneId, t.DataId, t.Chr, t.Mb, t.description, t.Probe_Target_Description from ( select Symbol, max(Mean) as maxmean from TissueProbeSetXRef where TissueProbeSetFreezeId=1 and ''' - + # Note that inner join is necessary in this query to get distinct record in one symbol group # with highest mean value # Due to the limit size of TissueProbeSetFreezeId table in DB, @@ -43,11 +43,11 @@ class MrnaAssayTissueData(object): if len(gene_symbols) == 0: query += '''Symbol!='' and Symbol Is Not Null group by Symbol) as x inner join TissueProbeSetXRef as t on t.Symbol = x.Symbol - and t.Mean = x.maxmean; + and t.Mean = x.maxmean; ''' else: in_clause = db_tools.create_in_clause(gene_symbols) - + #ZS: This was in the query, not sure why: http://docs.python.org/2/library/string.html?highlight=lower#string.lower query += ''' Symbol in {} group by Symbol) @@ -56,7 +56,7 @@ class MrnaAssayTissueData(object): '''.format(in_clause) results = g.db.execute(query).fetchall() - + lower_symbols = [] for gene_symbol in gene_symbols: if gene_symbol != None: @@ -68,7 +68,7 @@ class MrnaAssayTissueData(object): if symbol.lower() in lower_symbols: #gene_symbols.append(symbol) symbol = symbol.lower() - + self.data[symbol].gene_id = result.GeneId self.data[symbol].data_id = result.DataId self.data[symbol].chr = result.Chr @@ -85,21 +85,21 @@ class MrnaAssayTissueData(object): #function: get one dictionary whose key is gene symbol and value is tissue expression data (list type). #Attention! All keys are lower case! ########################################################################### - + def get_symbol_values_pairs(self): id_list = [self.data[symbol].data_id for symbol in self.data] print("id_list:", id_list) symbol_values_dict = {} - + query = """SELECT TissueProbeSetXRef.Symbol, TissueProbeSetData.value FROM TissueProbeSetXRef, TissueProbeSetData WHERE TissueProbeSetData.Id IN {} and TissueProbeSetXRef.DataId = TissueProbeSetData.Id""".format(db_tools.create_in_clause(id_list)) - + print("TISSUE QUERY:", query) - + results = g.db.execute(query).fetchall() for result in results: if result.Symbol.lower() not in symbol_values_dict: @@ -110,11 +110,11 @@ class MrnaAssayTissueData(object): #for symbol in self.data: # data_id = self.data[symbol].data_id # symbol_values_dict[symbol] = self.get_tissue_values(data_id) - - + + return symbol_values_dict - - + + #def get_tissue_values(self, data_id): # """Gets the tissue values for a particular gene""" # @@ -133,7 +133,7 @@ class MrnaAssayTissueData(object): # # symbol_values_pairs[symbol] = None # # return tissue_values - + ######################################################################################################## #input: cursor, symbolList (list), dataIdDict(Dict): key is symbol #output: SymbolValuePairDict(dictionary):one dictionary of Symbol and Value Pair. @@ -154,7 +154,7 @@ class MrnaAssayTissueData(object): # #descDict, # #pTargetDescDict = getTissueProbeSetXRefInfo( # # GeneNameLst=GeneNameLst,TissueProbeSetFreezeId=TissueProbeSetFreezeId) -# +# # if len(tissue_data.gene_symbols): # return get_symbol_values_pairs(tissue_data) - + diff --git a/wqflask/base/species.py b/wqflask/base/species.py index 52bd8297..79d867c8 100755 --- a/wqflask/base/species.py +++ b/wqflask/base/species.py @@ -24,21 +24,21 @@ class TheSpecies(object): # for counter, genotype in enumerate(self.dataset.group.genotype): # if len(genotype) > 1: # chromosomes.append((genotype.name, counter)) - # - # print("chromosomes is: ", pf(chromosomes)) - # + # + # print("chromosomes is: ", pf(chromosomes)) + # # return chromosomes class IndChromosome(object): def __init__(self, name, length): self.name = name self.length = length - + @property def mb_length(self): """Chromosome length in megabases""" return self.length / 1000000 - + def set_cm_length(self, genofile_chr): self.cm_length = genofile_chr[-1].cM - genofile_chr[0].cM @@ -61,19 +61,19 @@ class Chromosomes(object): for item in results: self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length) - + self.set_mb_graph_interval() #self.get_cm_length_list() def set_mb_graph_interval(self): """Empirical megabase interval""" - + if self.chromosomes: self.mb_graph_interval = self.get_genome_mb_length()/(len(self.chromosomes)*12) else: self.mb_graph_interval = 1 - + #if self.chromosomes: #assert self.chromosomes, "Have to add some code back in apparently to set it to 1" #self.mb_graph_interval = self.get_genome_mb_length()/(len(self.chromosomes)*12) @@ -94,30 +94,30 @@ class Chromosomes(object): def get_cm_length_list(self): """Chromosome length in centimorgans - + Calculates the length in centimorgans by subtracting the centimorgan position of the last marker in a chromosome by the position of the first marker - + """ - + self.dataset.group.read_genotype_file() - + self.cm_length_list = [] - + for chromosome in self.dataset.group.genotype: self.cm_length_list.append(chromosome[-1].cM - chromosome[0].cM) - + print("self.cm_length_list:", pf(self.cm_length_list)) - + assert len(self.cm_length_list) == len(self.chromosomes), "Uh-oh lengths should be equal!" for counter, chromosome in enumerate(self.chromosomes.values()): chromosome.cm_length = self.cm_length_list[counter] #self.chromosomes[counter].cm_length = item - + for key, value in self.chromosomes.items(): print("bread - %s: %s" % (key, pf(vars(value)))) - -# Testing -#if __name__ == '__main__': + +# Testing +#if __name__ == '__main__': # foo = dict(bar=dict(length)) \ No newline at end of file diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index a71d8157..b51b8c72 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -69,11 +69,11 @@ class GeneralTrait(object): self.retrieve_info(get_qtl_info=get_qtl_info) if get_sample_info != False: self.retrieve_sample_data() - - + + def jsonable(self): """Return a dict suitable for using as json - + Actual turning into json doesn't happen here though""" return dict(name=self.name, dataset=self.dataset.name, @@ -258,10 +258,10 @@ class GeneralTrait(object): PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND PublishFreeze.Id = %s """ % (self.name, self.dataset.id) - + trait_info = g.db.execute(query).fetchone() - - + + #XZ, 05/08/2009: Xiaodong add this block to use ProbeSet.Id to find the probeset instead of just using ProbeSet.Name #XZ, 05/08/2009: to avoid the problem of same probeset name from different platforms. elif self.dataset.type == 'ProbeSet': @@ -310,27 +310,27 @@ class GeneralTrait(object): if isinstance(trait_info[i], basestring): holder = unicode(trait_info[i], "utf8", "ignore") setattr(self, field, holder) - + if self.dataset.type == 'Publish': self.confidential = 0 if self.pre_publication_description and not self.pubmed_id: self.confidential = 1 - + description = self.post_publication_description - + #If the dataset is confidential and the user has access to confidential #phenotype traits, then display the pre-publication description instead #of the post-publication description if self.confidential: self.description_display = "" - + #if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait( # privilege=self.dataset.privilege, # userName=self.dataset.userName, # authorized_users=self.authorized_users): - # + # # description = self.pre_publication_description - + if description: self.description_display = description.strip() else: @@ -343,8 +343,8 @@ class GeneralTrait(object): if self.pubmed_id: self.pubmed_link = webqtlConfig.PUBMEDLINK_URL % self.pubmed_id - - + + self.homologeneid = None if self.dataset.type == 'ProbeSet' and self.dataset.group: if self.geneid: @@ -374,7 +374,7 @@ class GeneralTrait(object): if result: self.homologeneid = result[0] - + description_string = unicode(str(self.description).strip(codecs.BOM_UTF8), 'utf-8') target_string = unicode(str(self.probe_target_description).strip(codecs.BOM_UTF8), 'utf-8') @@ -410,7 +410,7 @@ class GeneralTrait(object): #ZS: Put this in function currently called "convert_location_to_value" self.location_repr = 'Chr%s: %.6f' % (self.chr, float(self.mb)) self.location_value = trait_location_value - + if get_qtl_info: #LRS and its location @@ -481,7 +481,7 @@ class GeneralTrait(object): self.locus = self.locus_chr = self.locus_mb = self.additive = "" else: self.locus = self.lrs = self.additive = "" - + if (self.dataset.type == 'Publish' or self.dataset.type == "ProbeSet") and self.locus_chr != "" and self.locus_mb != "": #XZ: LRS_location_value is used for sorting try: @@ -493,7 +493,7 @@ class GeneralTrait(object): LRS_location_value = ord(str(self.locus_chr).upper()[0])*1000 + float(self.locus_mb) self.LRS_location_repr = LRS_location_repr = 'Chr%s: %.6f' % (self.locus_chr, float(self.locus_mb)) - if self.lrs != "": + if self.lrs != "": self.LRS_score_repr = LRS_score_repr = '%3.1f' % self.lrs self.LRS_score_value = LRS_score_value = self.lrs else: @@ -712,7 +712,7 @@ def convert_location_to_value(chromosome, mb): else: location_value = (ord(str(chromosome).upper()[0])*1000 + float(mb)) - + return location_value @app.route("/trait/get_sample_data") @@ -720,11 +720,11 @@ def get_sample_data(): params = request.args trait = params['trait'] dataset = params['dataset'] - + trait_ob = GeneralTrait(name=trait, dataset_name=dataset) - + return json.dumps([trait, {key: value.value for key, value in trait_ob.data.iteritems() }]) - + #jsonable_sample_data = {} #for sample in trait_ob.data.iteritems(): # jsonable_sample_data[sample] = trait_ob.data[sample].value diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py index 99a34866..411b0d24 100755 --- a/wqflask/base/webqtlCaseData.py +++ b/wqflask/base/webqtlCaseData.py @@ -48,7 +48,7 @@ class webqtlCaseData(object): if self.num_cases != None: str += " ndata=%d" % self.num_cases return str - + @property def class_outlier(self): """Template helper""" @@ -56,14 +56,14 @@ class webqtlCaseData(object): return "outlier" else: return "" - + @property def display_value(self): if self.value: return "%2.3f" % self.value else: return "x" - + @property def display_variance(self): if self.variance: diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py index f6140ac3..f76d8140 100644 --- a/wqflask/base/webqtlConfig.py +++ b/wqflask/base/webqtlConfig.py @@ -5,7 +5,7 @@ # scripts. But rather than migrating everything in one go, we'll # take it a step at a time. First the hard coded paths get replaced # with those in utility/tools.py -# +# ######################################### from utility.tools import valid_path, mk_dir, assert_dir, flat_files, TEMPDIR diff --git a/wqflask/basicStatistics/corestats.py b/wqflask/basicStatistics/corestats.py index 4f2d122f..eba84c52 100755 --- a/wqflask/basicStatistics/corestats.py +++ b/wqflask/basicStatistics/corestats.py @@ -1,8 +1,8 @@ #!/usr/bin/env python -# corestats.py (COREy STATS) +# corestats.py (COREy STATS) # Copyright (c) 2006-2007, Corey Goldberg (corey@goldb.org) -# +# # statistical calculation class # for processing numeric sequences # @@ -19,65 +19,65 @@ import sys class Stats: - + def __init__(self, sequence): # sequence of numbers we will process - # convert all items to floats for numerical processing + # convert all items to floats for numerical processing self.sequence = [float(item) for item in sequence] - + def sum(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None else: return sum(self.sequence) - - + + def count(self): return len(self.sequence) - + def min(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None else: return min(self.sequence) - - + + def max(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None else: return max(self.sequence) - + def avg(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None - else: - return sum(self.sequence) / len(self.sequence) - - + else: + return sum(self.sequence) / len(self.sequence) + + def median(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None else: self.sequence.sort() return self.sequence[len(self.sequence) // 2] - - + + def stdev(self): - if len(self.sequence) < 1: + if len(self.sequence) < 1: return None else: avg = self.avg() sdsq = sum([(i - avg) ** 2 for i in self.sequence]) stdev = (sdsq / (len(self.sequence) - 1)) ** .5 return stdev - - + + def percentile(self, percentile): - if len(self.sequence) < 1: + if len(self.sequence) < 1: value = None elif (percentile >= 100): sys.stderr.write('ERROR: percentile must be < 100. you supplied: %s\n'% percentile) @@ -87,17 +87,17 @@ class Stats: self.sequence.sort() value = self.sequence[element_idx] return value - - - + + + # Sample script using this class: -# ------------------------------------------- +# ------------------------------------------- # #!/usr/bin/env python # import corestats -# +# # sequence = [1, 2.5, 7, 13.4, 8.0] # stats = corestats.Stats(sequence) # print stats.avg() # print stats.percentile(90) -# ------------------------------------------- +# ------------------------------------------- diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index 489d291f..b1459bf3 100755 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -21,7 +21,7 @@ It needs to be run manually when database has been changed. # (sourceforge.net/projects/genenetwork/). # # Contact Drs. Robert W. Williams -# at rwilliams@uthsc.edu +# at rwilliams@uthsc.edu # # # @@ -60,15 +60,15 @@ from pprint import pformat as pf def parse_db_uri(db_uri): """Converts a database URI to the db name, host name, user name, and password""" - + parsed_uri = urlparse.urlparse(zach_settings.DB_URI) - + db_conn_info = dict( db = parsed_uri.path[1:], host = parsed_uri.hostname, user = parsed_uri.username, passwd = parsed_uri.password) - + return db_conn_info @@ -149,12 +149,12 @@ def genotypes_exist(group_name): def build_types(species, group): """Fetches tissues - + Gets the tissues with data for this species/group (all types except phenotype/genotype are tissues) - + """ - + Cursor.execute("""select distinct Tissue.Name from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species where Species.Name = %s and Species.Id = InbredSet.SpeciesId and @@ -164,14 +164,14 @@ def build_types(species, group): ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and ProbeSetFreeze.public > 0 order by Tissue.Name""", (species, group)) - + results = [] for result in Cursor.fetchall(): if len(result): these_datasets = build_datasets(species, group, result[0]) if len(these_datasets) > 0: results.append((result[0], result[0])) - + return results def get_datasets(types): @@ -196,10 +196,10 @@ def build_datasets(species, group, type_name): if type_name == "Phenotypes": print("GROUP:", group) Cursor.execute("""select InfoFiles.GN_AccesionId from InfoFiles, PublishFreeze, InbredSet where - InbredSet.Name = %s and + InbredSet.Name = %s and PublishFreeze.InbredSetId = InbredSet.Id and InfoFiles.InfoPageName = PublishFreeze.Name and - PublishFreeze.public > 0 and + PublishFreeze.public > 0 and PublishFreeze.confidentiality < 1 order by PublishFreeze.CreateTime desc""", (group)) @@ -216,10 +216,10 @@ def build_datasets(species, group, type_name): elif type_name == "Genotypes": Cursor.execute("""select InfoFiles.GN_AccesionId from InfoFiles, GenoFreeze, InbredSet where - InbredSet.Name = %s and + InbredSet.Name = %s and GenoFreeze.InbredSetId = InbredSet.Id and InfoFiles.InfoPageName = GenoFreeze.ShortName and - GenoFreeze.public > 0 and + GenoFreeze.public > 0 and GenoFreeze.confidentiality < 1 order by GenoFreeze.CreateTime desc""", (group)) @@ -238,11 +238,11 @@ def build_datasets(species, group, type_name): ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where Species.Name = %s and Species.Id = InbredSet.SpeciesId and InbredSet.Name = %s and - ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.Name = %s and - ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId = InbredSet.Id and + ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.Name = %s and + ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId = InbredSet.Id and ProbeSetFreeze.confidentiality < 1 and ProbeSetFreeze.public > 0 order by ProbeSetFreeze.CreateTime desc""", (species, group, type_name)) - + dataset_results = Cursor.fetchall() datasets = [] for dataset_info in dataset_results: @@ -295,7 +295,7 @@ def _test_it(): datasets = build_datasets("Mouse", "BXD", "Hippocampus") #print("build_datasets:", pf(datasets)) -if __name__ == '__main__': +if __name__ == '__main__': Conn = MySQLdb.Connect(**parse_db_uri(zach_settings.DB_URI)) Cursor = Conn.cursor() main() diff --git a/wqflask/maintenance/generate_probesetfreeze_file.py b/wqflask/maintenance/generate_probesetfreeze_file.py index 91a2b8a1..84319a21 100755 --- a/wqflask/maintenance/generate_probesetfreeze_file.py +++ b/wqflask/maintenance/generate_probesetfreeze_file.py @@ -107,7 +107,7 @@ def write_data_matrix_file(strains, probeset_vals, filename): def main(): filename = os.path.expanduser("~/gene/wqflask/maintenance/" + - "ProbeSetFreezeId_210_FullName_Eye_AXBXA_Illumina_V6.2" + + "ProbeSetFreezeId_210_FullName_Eye_AXBXA_Illumina_V6.2" + "(Oct08)_RankInv_Beta.txt") dataset_name = "Eye_AXBXA_1008_RankInv" diff --git a/wqflask/maintenance/get_group_samplelists.py b/wqflask/maintenance/get_group_samplelists.py index a9059fad..2d48ce78 100755 --- a/wqflask/maintenance/get_group_samplelists.py +++ b/wqflask/maintenance/get_group_samplelists.py @@ -28,7 +28,7 @@ def get_samplelist_from_geno(genofilename): genofile = gzip.open(genofilename) else: genofile = open(genofilename) - + for line in genofile: line = line.strip() if not line: @@ -36,9 +36,9 @@ def get_samplelist_from_geno(genofilename): if line.startswith(("#", "@")): continue break - + headers = line.split() - + if headers[3] == "Mb": samplelist = headers[4:] else: @@ -47,7 +47,7 @@ def get_samplelist_from_geno(genofilename): def get_samplelist_from_plink(genofilename): genofile = open(genofilename) - + samplelist = [] for line in genofile: line = line.split(" ") diff --git a/wqflask/maintenance/print_benchmark.py b/wqflask/maintenance/print_benchmark.py index 540e0904..ae327cf3 100755 --- a/wqflask/maintenance/print_benchmark.py +++ b/wqflask/maintenance/print_benchmark.py @@ -9,34 +9,34 @@ from pprint import pformat as pf class TheCounter(object): Counters = {} - + def __init__(self): start_time = time.time() for counter in range(170000): self.print_it(counter) self.time_took = time.time() - start_time - TheCounter.Counters[self.__class__.__name__] = self.time_took + TheCounter.Counters[self.__class__.__name__] = self.time_took -class PrintAll(TheCounter): +class PrintAll(TheCounter): def print_it(self, counter): print(counter) - + class PrintSome(TheCounter): def print_it(self, counter): if counter % 1000 == 0: print(counter) - + class PrintNone(TheCounter): def print_it(self, counter): pass - - + + def new_main(): print("Running new_main") tests = [PrintAll, PrintSome, PrintNone] for test in tests: test() - + print(pf(TheCounter.Counters)) if __name__ == '__main__': diff --git a/wqflask/utility/Plot.py b/wqflask/utility/Plot.py index 444c71c9..063de387 100644 --- a/wqflask/utility/Plot.py +++ b/wqflask/utility/Plot.py @@ -282,11 +282,11 @@ def gpercentile(lst2, np): def find_outliers(vals): """Calculates the upper and lower bounds of a set of sample/case values - - + + >>> find_outliers([3.504, 5.234, 6.123, 7.234, 3.542, 5.341, 7.852, 4.555, 12.537]) (11.252500000000001, 0.5364999999999993) - + >>> >>> find_outliers([9,12,15,17,31,50,7,5,6,8]) (32.0, -8.0) @@ -294,7 +294,7 @@ def find_outliers(vals): which code that calls it will have to deal with. >>> find_outliers([]) (None, None) - + """ print("xerxes vals is:", pf(vals)) diff --git a/wqflask/utility/benchmark.py b/wqflask/utility/benchmark.py index 182187ae..d5b32703 100755 --- a/wqflask/utility/benchmark.py +++ b/wqflask/utility/benchmark.py @@ -7,7 +7,7 @@ import time class Bench(object): entries = collections.OrderedDict() - + def __init__(self, name=None): self.name = name @@ -26,10 +26,10 @@ class Bench(object): time_taken = time.time() - self.start_time print(" %s took: %f seconds" % (name, (time_taken))) - + if self.name: Bench.entries[self.name] = Bench.entries.get(self.name, 0) + time_taken - + @classmethod def report(cls): @@ -39,7 +39,7 @@ class Bench(object): percent = int(round((time_taken/total_time) * 100)) print("[{}%] {}: {}".format(percent, name, time_taken)) print() - + def reset(cls): """Reset the entries""" cls.entries = collections.OrderedDict() \ No newline at end of file diff --git a/wqflask/utility/chunks.py b/wqflask/utility/chunks.py index 9565fb96..b0e33c08 100644 --- a/wqflask/utility/chunks.py +++ b/wqflask/utility/chunks.py @@ -6,21 +6,21 @@ import time def divide_into_chunks(the_list, number_chunks): """Divides a list into approximately number_chunks smaller lists - + >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 3) [[1, 2, 7], [3, 22, 8], [5, 22, 333]] - >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 4) + >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 4) [[1, 2, 7], [3, 22, 8], [5, 22, 333]] - >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 5) + >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 5) [[1, 2], [7, 3], [22, 8], [5, 22], [333]] >>> - + """ length = len(the_list) if length == 0: return [[]] - + if length <= number_chunks: number_chunks = length diff --git a/wqflask/utility/corr_result_helpers.py b/wqflask/utility/corr_result_helpers.py index a253026c..ef644d85 100755 --- a/wqflask/utility/corr_result_helpers.py +++ b/wqflask/utility/corr_result_helpers.py @@ -1,16 +1,16 @@ def normalize_values(a_values, b_values): """ Trim two lists of values to contain only the values they both share - + Given two lists of sample values, trim each list so that it contains only the samples that contain a value in both lists. Also returns the number of such samples. - + >>> normalize_values([2.3, None, None, 3.2, 4.1, 5], [3.4, 7.2, 1.3, None, 6.2, 4.1]) ([2.3, 4.1, 5], [3.4, 6.2, 4.1], 3) - + """ - + min_length = min(len(a_values), len(b_values)) a_new = [] b_new = [] @@ -18,10 +18,10 @@ def normalize_values(a_values, b_values): if a_values[counter] and b_values[counter]: a_new.append(a_values[counter]) b_new.append(b_values[counter]) - + num_overlap = len(a_new) assert num_overlap == len(b_new), "Lengths should be the same" - + return a_new, b_new, num_overlap @@ -37,16 +37,16 @@ def common_keys(a_samples, b_samples): def normalize_values_with_samples(a_samples, b_samples): common_samples = common_keys(a_samples, b_samples) - + a_new = {} b_new = {} for sample in common_samples: a_new[sample] = a_samples[sample] b_new[sample] = b_samples[sample] - + num_overlap = len(a_new) assert num_overlap == len(b_new), "Lengths should be the same" - + return a_new, b_new, num_overlap diff --git a/wqflask/utility/genofile_parser.py b/wqflask/utility/genofile_parser.py index 67b84dc9..7149e560 100644 --- a/wqflask/utility/genofile_parser.py +++ b/wqflask/utility/genofile_parser.py @@ -28,10 +28,10 @@ class ConvertGenoFile(object): self.mb_exists = False self.cm_exists = False self.markers = [] - + self.latest_row_pos = None self.latest_col_pos = None - + self.latest_row_value = None self.latest_col_value = None self.input_fh = open(input_file) diff --git a/wqflask/utility/temp_data.py b/wqflask/utility/temp_data.py index 004d45c6..5bf700c9 100755 --- a/wqflask/utility/temp_data.py +++ b/wqflask/utility/temp_data.py @@ -4,16 +4,16 @@ from redis import Redis import simplejson as json class TempData(object): - + def __init__(self, temp_uuid): self.temp_uuid = temp_uuid self.redis = Redis() self.key = "tempdata:{}".format(self.temp_uuid) - + def store(self, field, value): self.redis.hset(self.key, field, value) self.redis.expire(self.key, 60*15) # Expire in 15 minutes - + def get_all(self): return self.redis.hgetall(self.key) diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index dd8c4a1e..11441d7a 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -35,7 +35,7 @@ def get_setting(command_id,guess=None): return command else: return None - + # ---- Check whether environment exists sys.stderr.write("Looking for "+command_id+"\n") command = value(os.environ.get(command_id)) @@ -128,7 +128,7 @@ def locate_ignore_error(name, subdir=None): def tempdir(): return valid_path(get_setting("TEMPDIR","/tmp")) - + # Cached values PYLMM_COMMAND = pylmm_command() GEMMA_COMMAND = gemma_command() diff --git a/wqflask/utility/webqtlUtil.py b/wqflask/utility/webqtlUtil.py index 1108614b..4fc978f5 100755 --- a/wqflask/utility/webqtlUtil.py +++ b/wqflask/utility/webqtlUtil.py @@ -129,7 +129,7 @@ def inverseCumul(p): return None if p>0 and p < 1: - e = 0.5 * erfcc(-x/sqrt(2)) - p + e = 0.5 * erfcc(-x/sqrt(2)) - p u = e * sqrt(2*pi) * exp(x*x/2) x = x - u/(1 + x*u/2) return x @@ -318,10 +318,10 @@ def FloatList2String(lst): def ListNotNull(lst): '''Obsolete - Use built in function any (or all or whatever) - - + + Determine if the elements in a list are all null - + ''' for item in lst: if item is not None: diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 9227d641..958a1e43 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -57,7 +57,7 @@ class AnonCollection(object): def __init__(self): self.anon_user = user_manager.AnonUser() self.key = "anon_collection:v5:{}".format(self.anon_user.anon_id) - + def add_traits(self, params, collection_name): assert collection_name == "Default", "Unexpected collection name for anonymous user" print("params[traits]:", params['traits']) @@ -70,7 +70,7 @@ class AnonCollection(object): print("currently in redis:", Redis.smembers(self.key)) len_now = len(Redis.smembers(self.key)) report_change(len_before, len_now) - + def remove_traits(self, params): traits_to_remove = params.getlist('traits[]') print("traits_to_remove:", process_traits(traits_to_remove)) @@ -82,15 +82,15 @@ class AnonCollection(object): # We need to return something so we'll return this...maybe in the future # we can use it to check the results return str(len_now) - + def get_traits(self): traits = Redis.smembers(self.key) print("traits:", traits) return traits - + class UserCollection(object): """User is logged in""" - + def add_traits(self, params, collection_name): print("---> params are:", params.keys()) print(" type(params):", type(params)) @@ -103,25 +103,25 @@ class UserCollection(object): uc = model.UserCollection.query.get(params['existing_collection']) members = uc.members_as_set() #set(json.loads(uc.members)) len_before = len(members) - + traits = process_traits(params['traits']) - + members_now = list(members | traits) len_now = len(members_now) uc.members = json.dumps(members_now) - + uc.changed_timestamp = datetime.datetime.utcnow() - + db_session.commit() - + print("added to existing, now set is:" + str(uc.members)) report_change(len_before, len_now) - + # Probably have to change that return redirect(url_for('view_collection', uc_id=uc.id)) - + def remove_traits(self, params): - + #params = request.form print("params are:", params) uc_id = params['uc_id'] @@ -138,11 +138,11 @@ class UserCollection(object): uc.members = json.dumps(list(members_now)) uc.changed_timestamp = datetime.datetime.utcnow() db_session.commit() - + # We need to return something so we'll return this...maybe in the future # we can use it to check the results return str(len(members_now)) - + def report_change(len_before, len_now): new_length = len_now - len_before if new_length: @@ -268,7 +268,7 @@ def remove_traits(): db_session.commit() else: members_now = AnonCollection().remove_traits(params) - + # We need to return something so we'll return this...maybe in the future # we can use it to check the results @@ -296,7 +296,7 @@ def delete_collection(): def view_collection(): params = request.args print("PARAMS in view collection:", params) - + if "uc_id" in params: uc_id = params['uc_id'] uc = model.UserCollection.query.get(uc_id) @@ -328,10 +328,10 @@ def view_collection(): # lrs_location=trait_ob.LRS_location_repr)) # dis=trait_ob.description)) #json_version.append(trait_ob.__dict__th) - + print("trait_obs:", trait_obs) - if "uc_id" in params: + if "uc_id" in params: collection_info = dict(trait_obs=trait_obs, uc = uc) else: diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py index 702ff723..96afef1e 100755 --- a/wqflask/wqflask/correlation/corr_scatter_plot.py +++ b/wqflask/wqflask/correlation/corr_scatter_plot.py @@ -14,45 +14,45 @@ class CorrScatterPlot(object): self.data_set_2 = data_set.create_dataset(params['dataset_2']) self.trait_1 = GeneralTrait(name=params['trait_1'], dataset=self.data_set_1) self.trait_2 = GeneralTrait(name=params['trait_2'], dataset=self.data_set_2) - + try: width = int(params['width']) except: width = 800 self.width = width - + try: height = int(params['height']) except: height = 600 self.height = height - + try: circle_color = params['circle_color'] except: circle_color = '#3D85C6' self.circle_color = circle_color - + try: circle_radius = int(params['circle_radius']) except: circle_radius = 5 self.circle_radius = circle_radius - + try: line_color = params['line_color'] except: line_color = '#FF0000' self.line_color = line_color - + try: line_width = int(params['line_width']) except: line_width = 1 self.line_width = line_width - + samples_1, samples_2, num_overlap = corr_result_helpers.normalize_values_with_samples(self.trait_1.data, self.trait_2.data) - + self.data = [] self.indIDs = samples_1.keys() vals_1 = [] @@ -67,7 +67,7 @@ class CorrScatterPlot(object): x = np.array(vals_1) y = np.array(vals_2) slope, intercept, r_value, p_value, std_err = stats.linregress(x, y) - + self.js_data = dict( data = self.data, indIDs = self.indIDs, diff --git a/wqflask/wqflask/correlation/correlation_functions.py b/wqflask/wqflask/correlation/correlation_functions.py index da5c3197..b25005d3 100755 --- a/wqflask/wqflask/correlation/correlation_functions.py +++ b/wqflask/wqflask/correlation/correlation_functions.py @@ -757,7 +757,7 @@ def getTissueProbeSetXRefInfo(GeneNameLst=[],TissueProbeSetFreezeId=0): #Attention! All keys are lower case! ########################################################################### def get_symbol_value_pairs(tissue_data): - + id_list = [tissue_data[symbol.lower()].data_id for item in tissue_data] symbol_value_pairs = {} @@ -809,7 +809,7 @@ def get_trait_symbol_and_tissue_values(symbol_list=None): if len(tissue_data.gene_symbols): return tissue_data.get_symbol_values_pairs() - + #symbolList, #geneIdDict, #dataIdDict, @@ -818,7 +818,7 @@ def get_trait_symbol_and_tissue_values(symbol_list=None): #descDict, #pTargetDescDict = getTissueProbeSetXRefInfo( # GeneNameLst=GeneNameLst,TissueProbeSetFreezeId=TissueProbeSetFreezeId) - + #limit_num=1000 #count = len(symbol_list) # @@ -858,14 +858,14 @@ def get_trait_symbol_and_tissue_values(symbol_list=None): #def get_trait_symbol_and_tissue_values(cursor=None,GeneNameLst=[],TissueProbeSetFreezeId=0): # SymbolValuePairDict={} -# +# # symbolList,geneIdDict,dataIdDict,ChrDict,MbDict,descDict,pTargetDescDict = getTissueProbeSetXRefInfo( # cursor=cursor,GeneNameLst=GeneNameLst,TissueProbeSetFreezeId=TissueProbeSetFreezeId) -# +# # if symbolList: # SymbolValuePairDict = get_gene_symbol_and_tissue_values(symbolList=symbolList, # dataIdDict=dataIdDict) -# +# # return SymbolValuePairDict ######################################################################################################## diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index c1ad1c84..f2bba985 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -71,7 +71,7 @@ TISSUE_MOUSE_DB = 1 def print_mem(stage=""): mem = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss #print("{}: {}".format(stage, mem/1024)) - + class AuthException(Exception): pass @@ -92,12 +92,12 @@ class CorrelationResults(object): def __init__(self, start_vars): # get trait list from db (database name) # calculate correlation with Base vector and targets - + print("TESTING...") - + with Bench("Doing correlations"): helper_functions.get_species_dataset_trait(self, start_vars) - + self.dataset.group.read_genotype_file() corr_samples_group = start_vars['corr_samples_group'] @@ -113,8 +113,8 @@ class CorrelationResults(object): self.p_range_lower = float(start_vars['p_range_lower']) self.p_range_upper = float(start_vars['p_range_upper']) - if ('loc_chr' in start_vars and - 'min_loc_mb' in start_vars and + if ('loc_chr' in start_vars and + 'min_loc_mb' in start_vars and 'max_loc_mb' in start_vars): self.location_chr = start_vars['loc_chr'] @@ -162,28 +162,28 @@ class CorrelationResults(object): db_filename = self.getFileName(target_db_name = self.target_dataset.name) cache_available = db_filename in os.listdir(webqtlConfig.GENERATED_TEXT_DIR) - + if self.corr_type == "tissue": self.trait_symbol_dict = self.dataset.retrieve_genes("Symbol") - + tissue_corr_data = self.do_tissue_correlation_for_all_traits() for trait in tissue_corr_data.keys()[:self.return_number]: self.get_sample_r_and_p_values(trait, self.target_dataset.trait_data[trait]) - + elif self.corr_type == "lit": self.trait_geneid_dict = self.dataset.retrieve_genes("GeneId") lit_corr_data = self.do_lit_correlation_for_all_traits() - + for trait in lit_corr_data.keys()[:self.return_number]: self.get_sample_r_and_p_values(trait, self.target_dataset.trait_data[trait]) - + elif self.corr_type == "sample": if self.dataset.type == "ProbeSet" and cache_available: dataset_file = open(webqtlConfig.GENERATED_TEXT_DIR+db_filename,'r') #XZ, 01/08/2009: read the first line line = dataset_file.readline() - dataset_strains = webqtlUtil.readLineCSV(line)[1:] + dataset_strains = webqtlUtil.readLineCSV(line)[1:] self.this_trait_vals = [] for item in dataset_strains: @@ -192,12 +192,12 @@ class CorrelationResults(object): else: self.this_trait_vals.append("None") num_overlap = len(self.this_trait_vals) - + self.do_parallel_correlation(db_filename, num_overlap) else: for trait, values in self.target_dataset.trait_data.iteritems(): self.get_sample_r_and_p_values(trait, values) - + self.correlation_data = collections.OrderedDict(sorted(self.correlation_data.items(), key=lambda t: -abs(t[1][0]))) @@ -211,12 +211,12 @@ class CorrelationResults(object): for _trait_counter, trait in enumerate(self.correlation_data.keys()[:self.return_number]): trait_object = GeneralTrait(dataset=self.target_dataset, name=trait, get_qtl_info=True, get_sample_info=False) - + if self.dataset.type == "ProbeSet" or self.dataset.type == "Geno": #ZS: Convert trait chromosome to an int for the location range option chr_as_int = 0 for order_id, chr_info in self.dataset.species.chromosomes.chromosomes.iteritems(): - if chr_info.name == trait_object.chr: + if chr_info.name == trait_object.chr: chr_as_int = order_id if (float(self.correlation_data[trait][0]) >= self.p_range_lower and @@ -236,10 +236,10 @@ class CorrelationResults(object): (trait_object.sample_r, trait_object.sample_p, trait_object.num_overlap) = self.correlation_data[trait] - + #Get symbol for trait and call function that gets each tissue value from the database (tables TissueProbeSetXRef, #TissueProbeSetData, etc) and calculates the correlation (cal_zero_order_corr_for_tissue in correlation_functions) - + # Set some sane defaults trait_object.tissue_corr = 0 trait_object.tissue_pvalue = 0 @@ -247,17 +247,17 @@ class CorrelationResults(object): if self.corr_type == "tissue": trait_object.tissue_corr = tissue_corr_data[trait][1] trait_object.tissue_pvalue = tissue_corr_data[trait][2] - elif self.corr_type == "lit": + elif self.corr_type == "lit": trait_object.lit_corr = lit_corr_data[trait][1] self.correlation_results.append(trait_object) else: (trait_object.sample_r, trait_object.sample_p, trait_object.num_overlap) = self.correlation_data[trait] - + #Get symbol for trait and call function that gets each tissue value from the database (tables TissueProbeSetXRef, #TissueProbeSetData, etc) and calculates the correlation (cal_zero_order_corr_for_tissue in correlation_functions) - + # Set some sane defaults trait_object.tissue_corr = 0 trait_object.tissue_pvalue = 0 @@ -265,7 +265,7 @@ class CorrelationResults(object): if self.corr_type == "tissue": trait_object.tissue_corr = tissue_corr_data[trait][1] trait_object.tissue_pvalue = tissue_corr_data[trait][2] - elif self.corr_type == "lit": + elif self.corr_type == "lit": trait_object.lit_corr = lit_corr_data[trait][1] self.correlation_results.append(trait_object) @@ -273,12 +273,12 @@ class CorrelationResults(object): if self.corr_type != "lit" and self.dataset.type == "ProbeSet" and self.target_dataset.type == "ProbeSet": self.do_lit_correlation_for_trait_list() - + if self.corr_type != "tissue" and self.dataset.type == "ProbeSet" and self.target_dataset.type == "ProbeSet": self.do_tissue_correlation_for_trait_list() - + #print("self.correlation_results: ", pf(self.correlation_results)) - + #XZ, 09/18/2008: get all information about the user selected database. #target_db_name = fd.corr_dataset @@ -340,7 +340,7 @@ class CorrelationResults(object): self.formatted_corr_type += "Tissue Correlation " elif self.corr_type == "sample": self.formatted_corr_type += "Genetic Correlation " - + if self.corr_method == "pearson": self.formatted_corr_type += "(Pearson's r)" elif self.corr_method == "spearman": @@ -355,13 +355,13 @@ class CorrelationResults(object): if self.this_trait.symbol.lower() in primary_trait_tissue_vals_dict: primary_trait_tissue_values = primary_trait_tissue_vals_dict[self.this_trait.symbol.lower()] - + #gene_symbol_list = [] # #for trait in self.correlation_results: # if hasattr(trait, 'symbol'): # gene_symbol_list.append(trait.symbol) - + gene_symbol_list = [trait.symbol for trait in self.correlation_results if trait.symbol] corr_result_tissue_vals_dict= correlation_functions.get_trait_symbol_and_tissue_values( @@ -370,13 +370,13 @@ class CorrelationResults(object): for trait in self.correlation_results: if trait.symbol and trait.symbol.lower() in corr_result_tissue_vals_dict: this_trait_tissue_values = corr_result_tissue_vals_dict[trait.symbol.lower()] - + result = correlation_functions.cal_zero_order_corr_for_tiss(primary_trait_tissue_values, this_trait_tissue_values, self.corr_method) - + trait.tissue_corr = result[0] - trait.tissue_pvalue = result[2] + trait.tissue_pvalue = result[2] # else: # trait.tissue_corr = None @@ -402,31 +402,31 @@ class CorrelationResults(object): symbol_list=self.trait_symbol_dict.values()) #print("corr_result_tissue_vals: ", pf(corr_result_tissue_vals_dict)) - + #print("trait_gene_symbols: ", pf(trait_gene_symbols)) - + tissue_corr_data = {} for trait, symbol in self.trait_symbol_dict.iteritems(): if symbol and symbol.lower() in corr_result_tissue_vals_dict: this_trait_tissue_values = corr_result_tissue_vals_dict[symbol.lower()] #print("this_trait_tissue_values: ", pf(this_trait_tissue_values)) - + result = correlation_functions.cal_zero_order_corr_for_tiss(primary_trait_tissue_values, this_trait_tissue_values, self.corr_method) - + tissue_corr_data[trait] = [symbol, result[0], result[2]] - + tissue_corr_data = collections.OrderedDict(sorted(tissue_corr_data.items(), key=lambda t: -abs(t[1][1]))) - + return tissue_corr_data def do_lit_correlation_for_trait_list(self): input_trait_mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), self.this_trait.geneid) - + for trait in self.correlation_results: if trait.geneid: @@ -449,19 +449,19 @@ class CorrelationResults(object): GeneId1='%s' """ % (escape(str(trait.mouse_gene_id)), escape(str(input_trait_mouse_gene_id))) ).fetchone() - + if result: - lit_corr = result.value + lit_corr = result.value trait.lit_corr = lit_corr else: trait.lit_corr = 0 else: trait.lit_corr = 0 - - + + def do_lit_correlation_for_all_traits(self): input_trait_mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), self.this_trait.geneid) - + lit_corr_data = {} for trait, gene_id in self.trait_geneid_dict.iteritems(): mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), gene_id) @@ -490,59 +490,59 @@ class CorrelationResults(object): lit_corr_data[trait] = [gene_id, 0] else: lit_corr_data[trait] = [gene_id, 0] - + lit_corr_data = collections.OrderedDict(sorted(lit_corr_data.items(), key=lambda t: -abs(t[1][1]))) - + return lit_corr_data - + def convert_to_mouse_gene_id(self, species=None, gene_id=None): """If the species is rat or human, translate the gene_id to the mouse geneid - + If there is no input gene_id or there's no corresponding mouse gene_id, return None - + """ if not gene_id: return None - + mouse_gene_id = None - + if species == 'mouse': mouse_gene_id = gene_id - + elif species == 'rat': - + query = """SELECT mouse FROM GeneIDXRef WHERE rat='%s'""" % escape(gene_id) - + result = g.db.execute(query).fetchone() if result != None: mouse_gene_id = result.mouse - + elif species == 'human': - + query = """SELECT mouse FROM GeneIDXRef WHERE human='%s'""" % escape(gene_id) - + result = g.db.execute(query).fetchone() if result != None: mouse_gene_id = result.mouse - - return mouse_gene_id - + + return mouse_gene_id + def get_sample_r_and_p_values(self, trait, target_samples): """Calculates the sample r (or rho) and p-value - + Given a primary trait and a target trait's sample values, calculates either the pearson r or spearman rho and the p-value using the corresponding scipy functions. - + """ - + self.this_trait_vals = [] - target_vals = [] + target_vals = [] for index, sample in enumerate(self.target_dataset.samplelist): if sample in self.sample_data: sample_value = self.sample_data[sample] @@ -550,9 +550,9 @@ class CorrelationResults(object): self.this_trait_vals.append(sample_value) target_vals.append(target_sample_value) - self.this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(self.this_trait_vals, target_vals) + self.this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(self.this_trait_vals, target_vals) - #ZS: 2015 could add biweight correlation, see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465711/ + #ZS: 2015 could add biweight correlation, see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465711/ if self.corr_method == 'pearson': sample_r, sample_p = scipy.stats.pearsonr(self.this_trait_vals, target_vals) else: @@ -664,17 +664,17 @@ class CorrelationResults(object): def do_tissue_corr_for_all_traits_2(self): """Comments Possibly Out of Date!!!!! - + Uses get_temp_tissue_corr_table to generate table of tissue correlations - + This function then gathers that data and pairs it with the TraitID string. Takes as its arguments a formdata instance, and a dataset instance. Returns a dictionary of 'TraitID':(tissueCorr, tissuePValue) for the requested correlation - + Used when the user selects the tissue correlation method; i.e. not for the column that is appended to all probeset trait correlation tables - + """ # table name string @@ -707,7 +707,7 @@ class CorrelationResults(object): #descDict, #pTargetDescDict = getTissueProbeSetXRefInfo( # GeneNameLst=GeneNameLst,TissueProbeSetFreezeId=TissueProbeSetFreezeId) - + g.db.execute('DROP TEMPORARY TABLE {}'.format(escape(temp_table))) return tissue_corr_dict @@ -719,7 +719,7 @@ class CorrelationResults(object): tissue_probesetfreeze_id=0, method="", return_number=0): - + def cmp_tisscorr_absolute_value(A, B): try: @@ -792,7 +792,7 @@ class CorrelationResults(object): def process_samples(self, start_vars, sample_names, excluded_samples=None): if not excluded_samples: excluded_samples = () - + for sample in sample_names: if sample not in excluded_samples: # print("Looking for",sample,"in",start_vars) @@ -1124,21 +1124,21 @@ class CorrelationResults(object): dataset_id = str(self.target_dataset.id) dataset_fullname = self.target_dataset.fullname.replace(' ','_') dataset_fullname = dataset_fullname.replace('/','_') - + FileName = 'ProbeSetFreezeId_' + dataset_id + '_FullName_' + dataset_fullname + '.txt' return FileName - + def do_parallel_correlation(self, db_filename, num_overlap): #XZ, 01/14/2009: This method is for parallel computing only. #XZ: It is supposed to be called when "Genetic Correlation, Pearson's r" (method 1) #XZ: or "Genetic Correlation, Spearman's rho" (method 2) is selected def compute_corr(input_nnCorr, input_trait, input_list, corr_method): - + import math import reaper - + def calCorrelation(dbdata,userdata,N): X = [] Y = [] @@ -1165,7 +1165,7 @@ class CorrelationResults(object): except: corr = 0 return (corr,NN) - + def calCorrelationRank(xVals,yVals,N): """ Calculated Spearman Ranked Correlation. The algorithm works @@ -1261,9 +1261,9 @@ class CorrelationResults(object): fac = (1.0 -sx/(NN*NN*NN-NN))*(1.0-sy/(NN*NN*NN-NN)) return ((1-(6.0/(NN*NN*NN-NN))*(D+(sx+sy)/12.0))/math.sqrt(fac),NN) - + # allcorrelations = [] - + correlation_data = {} for i, line in enumerate(input_list): if i == 0: @@ -1276,18 +1276,18 @@ class CorrelationResults(object): database_trait = tokens[1:] #print("database_trait:", database_trait) - - #ZS: 2015 could add biweight correlation, see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465711/ + + #ZS: 2015 could add biweight correlation, see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3465711/ # if corr_method == 'pearson': # sample_r, sample_p = scipy.stats.pearsonr(input_trait, database_trait) # else: # sample_r, sample_p = scipy.stats.spearmanr(input_trait, database_trait) - + if corr_method == "pearson": #XZ: Pearson's r sample_r, nOverlap = calCorrelation(input_trait, database_trait, input_nnCorr) else: #XZ: Spearman's rho sample_r, nOverlap = calCorrelationRank(input_trait, database_trait, input_nnCorr) - + #XZ: calculate corrPValue if nOverlap < 3: sample_p = 1.0 @@ -1297,19 +1297,19 @@ class CorrelationResults(object): else: z_value = 0.5*math.log((1.0+sample_r)/(1.0-sample_r)) z_value = z_value*math.sqrt(nOverlap-3) - sample_p = 2.0*(1.0 - reaper.normp(abs(z_value))) - + sample_p = 2.0*(1.0 - reaper.normp(abs(z_value))) + correlation_data[traitdataName] = [sample_r, sample_p, nOverlap] - + # traitinfo = [traitdataName, sample_r, nOverlap] # allcorrelations.append(traitinfo) return correlation_data # return allcorrelations - + datasetFile = open(webqtlConfig.GENERATED_TEXT_DIR+db_filename,'r') - + print("Invoking parallel computing") input_line_list = datasetFile.readlines() print("Read lines from the file") @@ -1319,7 +1319,7 @@ class CorrelationResults(object): job_number = math.ceil( float(all_line_number)/step ) print("JOB NUMBER", job_number) - + job_input_lists = [] print("Configuring jobs") @@ -1358,7 +1358,7 @@ class CorrelationResults(object): # results.append( one_result ) #print("CORRELATION DATA:", self.correlation_data) - + # print("Acquiring results") # for one_result in results: diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index f74e655d..5c3354f1 100755 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -61,10 +61,10 @@ from flask import Flask, g class CorrelationMatrix(object): - + def __init__(self, start_vars): trait_db_list = [trait.strip() for trait in start_vars['trait_list'].split(',')] - + helper_functions.get_trait_db_obs(self, trait_db_list) self.all_sample_list = [] @@ -73,7 +73,7 @@ class CorrelationMatrix(object): this_trait = trait_db[0] self.traits.append(this_trait) this_sample_data = this_trait.data - + for sample in this_sample_data: if sample not in self.all_sample_list: self.all_sample_list.append(sample) @@ -82,7 +82,7 @@ class CorrelationMatrix(object): for trait_db in self.trait_list: this_trait = trait_db[0] this_sample_data = this_trait.data - + #self.sample_data[this_trait.name] = [] this_trait_vals = [] for sample in self.all_sample_list: @@ -101,10 +101,10 @@ class CorrelationMatrix(object): for trait_db in self.trait_list: this_trait = trait_db[0] this_db = trait_db[1] - + this_db_samples = this_db.group.samplelist this_sample_data = this_trait.data - + corr_result_row = [] pca_corr_result_row = [] is_spearman = False #ZS: To determine if it's above or below the diagonal @@ -115,17 +115,17 @@ class CorrelationMatrix(object): target_sample_data = target_trait.data print("target_samples", len(target_samples)) - + this_trait_vals = [] target_vals = [] for index, sample in enumerate(target_samples): - + if (sample in this_sample_data) and (sample in target_sample_data): sample_value = this_sample_data[sample].value target_sample_value = target_sample_data[sample].value this_trait_vals.append(sample_value) target_vals.append(target_sample_value) - + this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(this_trait_vals, target_vals) if num_overlap < self.lowest_overlap: @@ -144,7 +144,7 @@ class CorrelationMatrix(object): corr_result_row.append([target_trait, sample_r, num_overlap]) pca_corr_result_row.append(pearson_r) - + self.corr_results.append(corr_result_row) self.pca_corr_results.append(pca_corr_result_row) @@ -174,11 +174,11 @@ class CorrelationMatrix(object): # samples = self.all_sample_list, # sample_data = self.sample_data, # corr_results = self.corr_results,) - - - + + + def get_trait_db_obs(self, trait_db_list): - + self.trait_list = [] for i, trait_db in enumerate(trait_db_list): if i == (len(trait_db_list) - 1): @@ -190,13 +190,13 @@ class CorrelationMatrix(object): name=trait_name, cellid=None) self.trait_list.append((trait_ob, dataset_ob)) - + #print("trait_list:", self.trait_list) - - def calculate_pca(self, corr_results, cols): + + def calculate_pca(self, corr_results, cols): base = importr('base') - stats = importr('stats') + stats = importr('stats') print("checking:", pf(stats.rnorm(100))) corr_results_to_list = robjects.FloatVector([item for sublist in corr_results for item in sublist]) diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py index 2f544d44..22c96a49 100755 --- a/wqflask/wqflask/database.py +++ b/wqflask/wqflask/database.py @@ -28,5 +28,5 @@ def init_db(): Base.metadata.create_all(bind=engine) print("database.py: Done creating all model metadata...") print("Point your browser at http://localhost:5003/") - + init_db() diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 0e2dd27a..d89facfe 100755 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -45,7 +45,7 @@ class DoSearch(object): def handle_wildcard(self, str): keyword = str.strip() keyword.replace("*",".*") - keyword.replace("?",".") + keyword.replace("?",".") return keyword @@ -73,7 +73,7 @@ class DoSearch(object): search_type_string += '_' + search_type['key'] print("search_type_string is:", search_type_string) - + if search_type_string in cls.search_types: return cls.search_types[search_type_string] else: @@ -154,7 +154,7 @@ class MrnaAssaySearch(DoSearch): else: match_clause = "" - where_clause = (match_clause + + where_clause = (match_clause + """ProbeSet.Id = ProbeSetXRef.ProbeSetId and ProbeSetXRef.ProbeSetFreezeId = %s """ % (escape(str(self.dataset.id)))) @@ -315,7 +315,7 @@ class PhenotypeSearch(DoSearch): print("final query is:", pf(query)) - + return self.execute(query) def run(self): @@ -485,7 +485,7 @@ class WikiSearch(MrnaAssaySearch): and (GeneRIF.comment REGEXP '%s' or GeneRIF.initial = '%s') """ % (self.dataset.type, "[[:<:]]"+str(self.search_term[0])+"[[:>:]]", - str(self.search_term[0])) + str(self.search_term[0])) return where_clause def run(self): @@ -590,7 +590,7 @@ class LrsSearch(DoSearch): where_clause = """ %sXRef.LRS %s %s """ % self.mescape(self.dataset.type, self.search_operator, self.search_term[0]) - + return where_clause @@ -604,7 +604,7 @@ class LrsSearch(DoSearch): return self.execute(self.query) class MrnaLrsSearch(LrsSearch, MrnaAssaySearch): - + DoSearch.search_types['ProbeSet_LRS'] = 'MrnaLrsSearch' def run(self): @@ -617,7 +617,7 @@ class MrnaLrsSearch(LrsSearch, MrnaAssaySearch): return self.execute(self.query) class PhenotypeLrsSearch(LrsSearch, PhenotypeSearch): - + DoSearch.search_types['Publish_LRS'] = 'PhenotypeLrsSearch' def run(self): @@ -699,7 +699,7 @@ class CisTransLrsSearch(DoSearch): ) return where_clause - + class CisLrsSearch(CisTransLrsSearch, MrnaAssaySearch): """ Searches for genes on a particular chromosome with a cis-eQTL within the given LRS values @@ -781,7 +781,7 @@ class MeanSearch(MrnaAssaySearch): # Deal with >, <, >=, and <= where_clause = """ %sXRef.mean %s %s """ % self.mescape(self.dataset.type, self.search_operator, - self.search_term[0]) + self.search_term[0]) return where_clause @@ -790,7 +790,7 @@ class MeanSearch(MrnaAssaySearch): print("where_clause is:", pf(self.where_clause)) self.query = self.compile_final_query(where_clause = self.where_clause) - + return self.query def run(self): @@ -862,7 +862,7 @@ class PositionSearch(DoSearch): def get_chr(self): try: self.chr = int(self.chr) - except: + except: if 'chr' in self.chr: self.chr = int(self.chr.replace('chr', '')) else: diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index 4cd3874c..23b7f869 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -69,17 +69,17 @@ class GSearch(object): WHERE PublishXRef.`InbredSetId`=InbredSet.`Id` AND PublishFreeze.`InbredSetId`=InbredSet.`Id` AND InbredSet.`SpeciesId`=Species.`Id` - AND PublishXRef.`PhenotypeId`=Phenotype.`Id` + AND PublishXRef.`PhenotypeId`=Phenotype.`Id` AND PublishXRef.`PublicationId`=Publication.`Id` - AND (Phenotype.Post_publication_description REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Pre_publication_description REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Lab_code REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.PubMed_ID REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Abstract REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Title REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Authors REGEXP "[[:<:]]%s[[:>:]]" + AND (Phenotype.Post_publication_description REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Pre_publication_description REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Lab_code REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.PubMed_ID REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Abstract REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Title REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Authors REGEXP "[[:<:]]%s[[:>:]]" OR PublishXRef.Id REGEXP "[[:<:]]%s[[:>:]]") ORDER BY Species.`Name`, InbredSet.`Name`, PublishXRef.`Id` LIMIT 6000 diff --git a/wqflask/wqflask/heatmap/heatmap.py b/wqflask/wqflask/heatmap/heatmap.py index 19c330eb..c766d677 100644 --- a/wqflask/wqflask/heatmap/heatmap.py +++ b/wqflask/wqflask/heatmap/heatmap.py @@ -48,40 +48,40 @@ from flask import Flask, g class Heatmap(object): def __init__(self, start_vars, temp_uuid): - + trait_db_list = [trait.strip() for trait in start_vars['trait_list'].split(',')] - + helper_functions.get_trait_db_obs(self, trait_db_list) - + self.temp_uuid = temp_uuid self.num_permutations = 5000 self.dataset = self.trait_list[0][1] - + self.json_data = {} #The dictionary that will be used to create the json object that contains all the data needed to create the figure - + self.all_sample_list = [] self.traits = [] - + chrnames = [] self.species = species.TheSpecies(dataset=self.trait_list[0][1]) for key in self.species.chromosomes.chromosomes.keys(): chrnames.append([self.species.chromosomes.chromosomes[key].name, self.species.chromosomes.chromosomes[key].mb_length]) - + for trait_db in self.trait_list: - + this_trait = trait_db[0] self.traits.append(this_trait.name) this_sample_data = this_trait.data - + for sample in this_sample_data: if sample not in self.all_sample_list: self.all_sample_list.append(sample) - + self.sample_data = [] for trait_db in self.trait_list: this_trait = trait_db[0] this_sample_data = this_trait.data - + #self.sample_data[this_trait.name] = [] this_trait_vals = [] for sample in self.all_sample_list: @@ -95,16 +95,16 @@ class Heatmap(object): self.gen_reaper_results() #self.gen_pylmm_results() - + #chrnames = [] lodnames = [] chr_pos = [] pos = [] markernames = [] - + for trait in self.trait_results.keys(): lodnames.append(trait) - + for marker in self.dataset.group.markers.markers: #if marker['chr'] not in chrnames: # chr_ob = [marker['chr'], "filler"] @@ -112,23 +112,23 @@ class Heatmap(object): chr_pos.append(marker['chr']) pos.append(marker['Mb']) markernames.append(marker['name']) - + self.json_data['chrnames'] = chrnames self.json_data['lodnames'] = lodnames self.json_data['chr'] = chr_pos self.json_data['pos'] = pos self.json_data['markernames'] = markernames - + for trait in self.trait_results: self.json_data[trait] = self.trait_results[trait] - + self.js_data = dict( json_data = self.json_data ) - + print("self.js_data:", self.js_data) - - + + def gen_reaper_results(self): self.trait_results = {} for trait_db in self.trait_list: @@ -144,9 +144,9 @@ class Heatmap(object): if samples[i] in self.dataset.group.samplelist: trimmed_samples.append(samples[i]) trimmed_values.append(values[i]) - + self.lrs_array = genotype.permutation(strains = trimmed_samples, - trait = trimmed_values, + trait = trimmed_values, nperm= self.num_permutations) #self.suggestive = self.lrs_array[int(self.num_permutations*0.37-1)] @@ -159,7 +159,7 @@ class Heatmap(object): lrs_values = [float(qtl.lrs) for qtl in reaper_results] print("lrs_values:", lrs_values) #self.dataset.group.markers.add_pvalues(p_values) - + self.trait_results[this_trait.name] = [] for qtl in reaper_results: if qtl.additive > 0: @@ -167,10 +167,10 @@ class Heatmap(object): else: self.trait_results[this_trait.name].append(float(qtl.lrs)) #for lrs in lrs_values: - # if + # if # self.trait_results[this_trait.name].append(lrs) - - + + #this_db_samples = self.dataset.group.samplelist #this_sample_data = this_trait.data ##print("this_sample_data", this_sample_data) @@ -181,28 +181,28 @@ class Heatmap(object): # this_trait_vals.append(sample_value) # else: # this_trait_vals.append("x") - + #pheno_vector = np.array([val == "x" and np.nan or float(val) for val in this_trait_vals]) - + #key = "pylmm:input:" + str(self.temp_uuid) #print("key is:", pf(key)) - + #genotype_data = [marker['genotypes'] for marker in self.dataset.group.markers.markers] - + #no_val_samples = self.identify_empty_samples(this_trait_vals) #trimmed_genotype_data = self.trim_genotypes(genotype_data, no_val_samples) - + #genotype_matrix = np.array(trimmed_genotype_data).T - + #print("genotype_matrix:", str(genotype_matrix.tolist())) #print("pheno_vector:", str(pheno_vector.tolist())) - + #params = dict(pheno_vector = pheno_vector.tolist(), # genotype_matrix = genotype_matrix.tolist(), # restricted_max_likelihood = True, # refit = False, # temp_uuid = str(self.temp_uuid), - # + # # # meta data # timestamp = datetime.datetime.now().isoformat(), # ) @@ -221,15 +221,15 @@ class Heatmap(object): #os.system(command) # #json_results = Redis.blpop("pylmm:results:" + str(self.temp_uuid), 45*60) - - def gen_pylmm_results(self): + + def gen_pylmm_results(self): # This function is NOT used. If it is, we should use a shared function with marker_regression.py self.trait_results = {} for trait_db in self.trait_list: this_trait = trait_db[0] #this_db = trait_db[1] self.dataset.group.get_markers() - + this_db_samples = self.dataset.group.samplelist this_sample_data = this_trait.data #print("this_sample_data", this_sample_data) @@ -240,55 +240,55 @@ class Heatmap(object): this_trait_vals.append(sample_value) else: this_trait_vals.append("x") - + pheno_vector = np.array([val == "x" and np.nan or float(val) for val in this_trait_vals]) - + key = "pylmm:input:" + str(self.temp_uuid) #print("key is:", pf(key)) - + genotype_data = [marker['genotypes'] for marker in self.dataset.group.markers.markers] - + no_val_samples = self.identify_empty_samples(this_trait_vals) trimmed_genotype_data = self.trim_genotypes(genotype_data, no_val_samples) - + genotype_matrix = np.array(trimmed_genotype_data).T - + #print("genotype_matrix:", str(genotype_matrix.tolist())) #print("pheno_vector:", str(pheno_vector.tolist())) - + params = dict(pheno_vector = pheno_vector.tolist(), genotype_matrix = genotype_matrix.tolist(), restricted_max_likelihood = True, refit = False, temp_uuid = str(self.temp_uuid), - + # meta data timestamp = datetime.datetime.now().isoformat(), ) - + json_params = json.dumps(params) #print("json_params:", json_params) Redis.set(key, json_params) Redis.expire(key, 60*60) print("before printing command") - + command = PYLMM_COMMAND+' --key {} --species {}'.format(key, "other") print("command is:", command) print("after printing command") os.system(command) - + json_results = Redis.blpop("pylmm:results:" + str(self.temp_uuid), 45*60) results = json.loads(json_results[1]) p_values = [float(result) for result in results['p_values']] #print("p_values:", p_values) self.dataset.group.markers.add_pvalues(p_values) - + self.trait_results[this_trait.name] = [] for marker in self.dataset.group.markers.markers: self.trait_results[this_trait.name].append(marker['lod_score']) - + def identify_empty_samples(self, values): no_val_samples = [] @@ -296,7 +296,7 @@ class Heatmap(object): if val == "x": no_val_samples.append(sample_count) return no_val_samples - + def trim_genotypes(self, genotype_data, no_value_samples): trimmed_genotype_data = [] for marker in genotype_data: @@ -312,5 +312,5 @@ class Heatmap(object): new_genotypes.append(genotype) trimmed_genotype_data.append(new_genotypes) return trimmed_genotype_data - - + + diff --git a/wqflask/wqflask/interval_analyst/GeneUtil.py b/wqflask/wqflask/interval_analyst/GeneUtil.py index a8a48786..fda7773f 100644 --- a/wqflask/wqflask/interval_analyst/GeneUtil.py +++ b/wqflask/wqflask/interval_analyst/GeneUtil.py @@ -7,8 +7,8 @@ from flask import Flask, g #Just return a list of dictionaries #each dictionary contains sub-dictionary def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse'): - fetchFields = ['SpeciesId', 'Id', 'GeneSymbol', 'GeneDescription', 'Chromosome', 'TxStart', 'TxEnd', - 'Strand', 'GeneID', 'NM_ID', 'kgID', 'GenBankID', 'UnigenID', 'ProteinID', 'AlignID', + fetchFields = ['SpeciesId', 'Id', 'GeneSymbol', 'GeneDescription', 'Chromosome', 'TxStart', 'TxEnd', + 'Strand', 'GeneID', 'NM_ID', 'kgID', 'GenBankID', 'UnigenID', 'ProteinID', 'AlignID', 'exonCount', 'exonStarts', 'exonEnds', 'cdsStart', 'cdsEnd'] ##List All Species in the Gene Table @@ -16,7 +16,7 @@ def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse') results = g.db.execute(""" SELECT Species.Name, GeneList.SpeciesId FROM Species, GeneList - WHERE GeneList.SpeciesId = Species.Id + WHERE GeneList.SpeciesId = Species.Id GROUP BY GeneList.SpeciesId""").fetchall() for item in results: @@ -28,14 +28,14 @@ def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse') otherSpecies.remove([species, speciesId]) results = g.db.execute(""" - SELECT %s FROM GeneList - WHERE SpeciesId = %d AND + SELECT %s FROM GeneList + WHERE SpeciesId = %d AND Chromosome = '%s' AND ((TxStart > %f and TxStart <= %f) OR (TxEnd > %f and TxEnd <= %f)) ORDER BY txStart - """ % (string.join(fetchFields, ", "), - speciesId, chrName, - startMb, endMb, + """ % (string.join(fetchFields, ", "), + speciesId, chrName, + startMb, endMb, startMb, endMb)).fetchall() GeneList = [] @@ -48,9 +48,9 @@ def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse') #count SNPs if possible if diffCol and species=='mouse': newdict["snpCount"] = g.db.execute(""" - SELECT count(*) + SELECT count(*) FROM BXDSnpPosition - WHERE Chr = '%s' AND + WHERE Chr = '%s' AND Mb >= %2.6f AND Mb < %2.6f AND StrainId1 = %d AND StrainId2 = %d """ % (chrName, newdict["TxStart"], newdict["TxEnd"], diffCol[0], diffCol[1])).fetchone()[0] @@ -68,8 +68,8 @@ def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse') othSpec, othSpecId = item newdict2 = {} - resultsOther = g.db.execute("SELECT %s FROM GeneList WHERE SpeciesId = %d AND geneSymbol= '%s' LIMIT 1" % (string.join(fetchFields, ", "), - othSpecId, + resultsOther = g.db.execute("SELECT %s FROM GeneList WHERE SpeciesId = %d AND geneSymbol= '%s' LIMIT 1" % (string.join(fetchFields, ", "), + othSpecId, newdict["GeneSymbol"])).fetchone() if resultsOther: @@ -79,9 +79,9 @@ def loadGenes(chrName, diffCol, startMb, endMb, webqtlDb =None, species='mouse') #count SNPs if possible, could be a separate function if diffCol and othSpec == 'mouse': newdict2["snpCount"] = g.db.execute(""" - SELECT count(*) + SELECT count(*) FROM BXDSnpPosition - WHERE Chr = '%s' AND + WHERE Chr = '%s' AND Mb >= %2.6f AND Mb < %2.6f AND StrainId1 = %d AND StrainId2 = %d """ % (chrName, newdict["TxStart"], newdict["TxEnd"], diffCol[0], diffCol[1])).fetchone()[0] diff --git a/wqflask/wqflask/interval_analyst/IntervalAnalystPage.py b/wqflask/wqflask/interval_analyst/IntervalAnalystPage.py index f45ec0c4..c5cf9e7f 100755 --- a/wqflask/wqflask/interval_analyst/IntervalAnalystPage.py +++ b/wqflask/wqflask/interval_analyst/IntervalAnalystPage.py @@ -219,7 +219,7 @@ class IntervalAnalystPage(templatePage): keyValue = "" return HT.TD(keyValue, Class="fs12 fwn b1", width=300) elif fieldName in ("GeneSymbol"): - webqtlLink = HT.Href("./%s?cmd=sch&gene=%s&alias=1&species=%s" % (webqtlConfig.SCRIPTFILE, keyValue, Species), + webqtlLink = HT.Href("./%s?cmd=sch&gene=%s&alias=1&species=%s" % (webqtlConfig.SCRIPTFILE, keyValue, Species), HT.Image("/images/webqtl_search.gif", border=0, valign="top"), target="_blank") if theGO['GeneID']: geneSymbolLink = HT.Href(webqtlConfig.NCBI_LOCUSID % theGO['GeneID'], keyValue, Class="normalsize", target="_blank") diff --git a/wqflask/wqflask/marker_regression/MarkerRegressionPage.py b/wqflask/wqflask/marker_regression/MarkerRegressionPage.py index 4c3391e5..a9e0328c 100755 --- a/wqflask/wqflask/marker_regression/MarkerRegressionPage.py +++ b/wqflask/wqflask/marker_regression/MarkerRegressionPage.py @@ -460,7 +460,7 @@ class MarkerRegressionPage(templatePage): filename= webqtlUtil.genRandStr("Reg_") myCanvas.save(webqtlConfig.GENERATED_IMAGE_DIR+filename, format='gif') img=HT.Image('/image/'+filename+'.gif',border=0,alt='Histogram of Permutation Test') - + if fd.suggestive == None: fd.suggestive = LRSArray[int(fd.nperm*0.37-1)] else: diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py index caea5802..a56362ec 100644 --- a/wqflask/wqflask/marker_regression/gemma_mapping.py +++ b/wqflask/wqflask/marker_regression/gemma_mapping.py @@ -3,9 +3,9 @@ import os from base import webqtlConfig from utility.tools import GEMMA_COMMAND -def run_gemma(this_dataset, samples, vals): +def run_gemma(this_dataset, samples, vals): """Generates p-values for each marker using GEMMA""" - + print("INSIDE GEMMA_MAPPING") gen_pheno_txt_file(this_dataset, samples, vals) @@ -14,23 +14,23 @@ def run_gemma(this_dataset, samples, vals): # os.chdir("{}gemma".format(webqtlConfig.GENODIR)) # use GEMMA_RUN in the next one, create a unique temp file - + gemma_command = GEMMA_COMMAND + ' -bfile %s/%s -k %s/output/%s.cXX.txt -lmm 1 -o %s_output' % (GEMMA_PATH, this_dataset.group.name, GEMMA_PATH, this_dataset.group.name, this_dataset.group.name) print("gemma_command:" + gemma_command) - + os.system(gemma_command) - + included_markers, p_values = parse_gemma_output(this_dataset) return included_markers, p_values def gen_pheno_txt_file(this_dataset, samples, vals): """Generates phenotype file for GEMMA""" - + with open("{}/{}.fam".format(GEMMA_PATH, this_dataset.group.name), "w") as outfile: for i, sample in enumerate(samples): outfile.write(str(sample) + " " + str(sample) + " 0 0 0 " + str(vals[i]) + "\n") diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index 26da95b9..510b26af 100644 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -48,18 +48,18 @@ class MarkerRegression(object): helper_functions.get_species_dataset_trait(self, start_vars) #tempdata = temp_data.TempData(temp_uuid) - + self.temp_uuid = temp_uuid #needed to pass temp_uuid to gn1 mapping code (marker_regression_gn1.py) self.json_data = {} self.json_data['lodnames'] = ['lod.hk'] - + self.samples = [] # Want only ones with values self.vals = [] - + #for sample in self.this_trait.data.keys(): for sample in self.dataset.group.samplelist: - in_trait_data = False + in_trait_data = False for item in self.this_trait.data: if self.this_trait.data[item].name2 == sample: value = start_vars['value:' + self.this_trait.data[item].name] @@ -71,7 +71,7 @@ class MarkerRegression(object): value = start_vars['value:' + sample] self.samples.append(sample) self.vals.append(value) - + self.mapping_method = start_vars['method'] if start_vars['manhattan_plot'] == "True": self.manhattan_plot = True @@ -87,7 +87,7 @@ class MarkerRegression(object): self.num_perm = 0 self.perm_output = [] self.bootstrap_results = [] - + #ZS: This is passed to GN1 code for single chr mapping self.selected_chr = -1 if "selected_chr" in start_vars: @@ -111,19 +111,19 @@ class MarkerRegression(object): else: self.permCheck = False self.num_perm = int(start_vars['num_perm']) - + self.LRSCheck = start_vars['LRSCheck'] - + if "showSNP" in start_vars: self.showSNP = start_vars['showSNP'] else: - self.showSNP = False - + self.showSNP = False + if "showGenes" in start_vars: self.showGenes = start_vars['showGenes'] else: - self.showGenes = False - + self.showGenes = False + if "viewLegend" in start_vars: self.viewLegend = start_vars['viewLegend'] else: @@ -134,7 +134,7 @@ class MarkerRegression(object): self.num_perm = int(start_vars['num_perm']) except: self.num_perm = 0 - + self.LRSCheck = self.score_type if self.num_perm > 0: self.permCheck = "ON" @@ -143,7 +143,7 @@ class MarkerRegression(object): self.showSNP = "ON" self.showGenes = "ON" self.viewLegend = "ON" - + self.dataset.group.get_markers() if self.mapping_method == "gemma": self.score_type = "LOD" @@ -165,13 +165,13 @@ class MarkerRegression(object): if start_vars['pair_scan'] == "true": self.pair_scan = True results = self.run_rqtl_geno() - elif self.mapping_method == "reaper": + elif self.mapping_method == "reaper": if "startMb" in start_vars: #ZS: Check if first time page loaded, so it can default to ON if "additiveCheck" in start_vars: self.additiveCheck = start_vars['additiveCheck'] else: - self.additiveCheck = False - + self.additiveCheck = False + if "bootCheck" in start_vars: self.bootCheck = "ON" else: @@ -185,11 +185,11 @@ class MarkerRegression(object): self.num_bootstrap = int(start_vars['num_bootstrap']) else: self.bootCheck = False - self.num_bootstrap = 0 - except: + self.num_bootstrap = 0 + except: self.bootCheck = False self.num_bootstrap = 0 - + self.control_marker = start_vars['control_marker'] self.do_control = start_vars['do_control'] results = self.gen_reaper_results() @@ -202,8 +202,8 @@ class MarkerRegression(object): results = self.gen_data(str(temp_uuid)) else: print("RUNNING NOTHING") - - if self.pair_scan == True: + + if self.pair_scan == True: self.qtl_results = [] highest_chr = 1 #This is needed in order to convert the highest chr to X/Y for marker in results: @@ -213,9 +213,9 @@ class MarkerRegression(object): if 'lod_score' in marker.keys(): self.qtl_results.append(marker) - - self.trimmed_markers = results - + + self.trimmed_markers = results + for qtl in enumerate(self.qtl_results): self.json_data['chr1'].append(str(qtl['chr1'])) self.json_data['chr2'].append(str(qtl['chr2'])) @@ -233,7 +233,7 @@ class MarkerRegression(object): ) else: - self.cutoff = 2 + self.cutoff = 2 self.qtl_results = [] highest_chr = 1 #This is needed in order to convert the highest chr to X/Y for marker in results: @@ -275,9 +275,9 @@ class MarkerRegression(object): for key in self.species.chromosomes.chromosomes.keys(): self.json_data['chrnames'].append([self.species.chromosomes.chromosomes[key].name, self.species.chromosomes.chromosomes[key].mb_length]) chromosome_mb_lengths[key] = self.species.chromosomes.chromosomes[key].mb_length - + # print("json_data:", self.json_data) - + self.js_data = dict( result_score_type = self.score_type, @@ -292,11 +292,11 @@ class MarkerRegression(object): num_perm = self.num_perm, perm_results = self.perm_output, ) - + def run_gemma(self): """Generates p-values for each marker using GEMMA""" - + self.gen_pheno_txt_file() #os.chdir("/home/zas1024/gene/web/gemma") @@ -306,11 +306,11 @@ class MarkerRegression(object): self.dataset.group.name, self.dataset.group.name) #print("gemma_command:" + gemma_command) - + os.system(gemma_command) - + included_markers, p_values = self.parse_gemma_output() - + self.dataset.group.get_specified_markers(markers = included_markers) self.dataset.group.markers.add_pvalues(p_values) return self.dataset.group.markers.markers @@ -335,18 +335,18 @@ class MarkerRegression(object): with open(webqtlConfig.GENERATED_TEXT_DIR+"{}.fam".format(self.dataset.group.name), "w") as outfile: for i, sample in enumerate(self.samples): outfile.write(str(sample) + " " + str(sample) + " 0 0 0 " + str(self.vals[i]) + "\n") - + def run_rqtl_plink(self): # os.chdir("") never do this inside a webserver!! - + output_filename = webqtlUtil.genRandStr("%s_%s_"%(self.dataset.group.name, self.this_trait.name)) - + self.gen_pheno_txt_file_plink(pheno_filename = output_filename) - + rqtl_command = './plink --noweb --ped %s.ped --no-fid --no-parents --no-sex --no-pheno --map %s.map --pheno %s/%s.txt --pheno-name %s --maf %s --missing-phenotype -9999 --out %s%s --assoc ' % (self.dataset.group.name, self.dataset.group.name, TMPDIR, plink_output_filename, self.this_trait.name, self.maf, TMPDIR, plink_output_filename) - + os.system(rqtl_command) - + count, p_values = self.parse_rqtl_output(plink_output_filename) def geno_to_rqtl_function(self): # TODO: Need to figure out why some genofiles have the wrong format and don't convert properly @@ -362,8 +362,8 @@ class MarkerRegression(object): GENOtoCSVR <- function(genotypes = '%s', out = 'cross.csvr', phenotype = NULL, sex = NULL, verbose = FALSE){ header = readLines(genotypes, 40) # Assume a geno header is not longer than 40 lines toskip = which(unlist(lapply(header, function(x){ length(grep("Chr\t", x)) })) == 1)-1 # Major hack to skip the geno headers - - genocodes <- c(getGenoCode(header, 'mat'), getGenoCode(header, 'het'), getGenoCode(header, 'pat')) # Get the genotype codes + + genocodes <- c(getGenoCode(header, 'mat'), getGenoCode(header, 'het'), getGenoCode(header, 'pat')) # Get the genotype codes type <- getGenoCode(header, 'type') genodata <- read.csv(genotypes, sep='\t', skip=toskip, header=TRUE, na.strings=getGenoCode(header,'unk'), colClasses='character', comment.char = '#') cat('Genodata:', toskip, " ", dim(genodata), genocodes, '\n') @@ -374,12 +374,12 @@ class MarkerRegression(object): cbind(genodata[,c('Locus','Chr', 'cM')], genodata[, 5:ncol(genodata)])) # Genotypes write.table(outCSVR, file = out, row.names=FALSE, col.names=FALSE,quote=FALSE, sep=',') # Save it to a file require(qtl) - cross = read.cross(file=out, 'csvr', genotypes=genocodes) # Load the created cross file using R/qtl read.cross + cross = read.cross(file=out, 'csvr', genotypes=genocodes) # Load the created cross file using R/qtl read.cross if(type == 'riset') cross <- convert2riself(cross) # If its a RIL, convert to a RIL in R/qtl return(cross) } """ % (self.dataset.group.name + ".geno")) - + def run_rqtl_geno(self): self.geno_to_rqtl_function() @@ -427,14 +427,14 @@ class MarkerRegression(object): print("Using covariate"); result_data_frame = scantwo(cross_object, pheno = "the_pheno", addcovar = covar, model=self.model, method=self.method, n_cluster = 16) else: print("No covariates"); result_data_frame = scantwo(cross_object, pheno = "the_pheno", model=self.model, method=self.method, n_cluster = 16) - + #print("Pair scan results:", result_data_frame) self.pair_scan_filename = webqtlUtil.genRandStr("scantwo_") + ".png" png(file=TEMPDIR+self.pair_scan_filename) plot(result_data_frame) dev_off() - + return self.process_pair_scan_results(result_data_frame) else: @@ -538,37 +538,37 @@ class MarkerRegression(object): def run_plink(self): plink_output_filename = webqtlUtil.genRandStr("%s_%s_"%(self.dataset.group.name, self.this_trait.name)) - + self.gen_pheno_txt_file_plink(pheno_filename = plink_output_filename) - + plink_command = PLINK_COMMAND + ' --noweb --ped %s/%s.ped --no-fid --no-parents --no-sex --no-pheno --map %s/%s.map --pheno %s%s.txt --pheno-name %s --maf %s --missing-phenotype -9999 --out %s%s --assoc ' % (PLINK_PATH, self.dataset.group.name, PLINK_PATH, self.dataset.group.name, TMPDIR, plink_output_filename, self.this_trait.name, self.maf, TMPDIR, plink_output_filename) - print("plink_command:", plink_command) + print("plink_command:", plink_command) os.system(plink_command) count, p_values = self.parse_plink_output(plink_output_filename) - + #for marker in self.dataset.group.markers.markers: # if marker['name'] not in included_markers: # print("marker:", marker) # self.dataset.group.markers.markers.remove(marker) # #del self.dataset.group.markers.markers[marker] - + print("p_values:", pf(p_values)) - + self.dataset.group.markers.add_pvalues(p_values) return self.dataset.group.markers.markers - + def gen_pheno_txt_file_plink(self, pheno_filename = ''): ped_sample_list = self.get_samples_from_ped_file() output_file = open("%s%s.txt" % (TMPDIR, pheno_filename), "wb") header = 'FID\tIID\t%s\n' % self.this_trait.name output_file.write(header) - + new_value_list = [] - + #if valueDict does not include some strain, value will be set to -9999 as missing value for i, sample in enumerate(ped_sample_list): try: @@ -577,33 +577,33 @@ class MarkerRegression(object): value = value.strip() except: value = -9999 - + new_value_list.append(value) - - + + new_line = '' for i, sample in enumerate(ped_sample_list): j = i+1 value = new_value_list[i] new_line += '%s\t%s\t%s\n'%(sample, sample, value) - + if j%1000 == 0: output_file.write(newLine) new_line = '' - + if new_line: output_file.write(new_line) - + output_file.close() - + def gen_pheno_txt_file_rqtl(self, pheno_filename = ''): ped_sample_list = self.get_samples_from_ped_file() output_file = open("%s%s.txt" % (TMPDIR, pheno_filename), "wb") header = 'FID\tIID\t%s\n' % self.this_trait.name output_file.write(header) - + new_value_list = [] - + #if valueDict does not include some strain, value will be set to -9999 as missing value for i, sample in enumerate(ped_sample_list): try: @@ -612,50 +612,50 @@ class MarkerRegression(object): value = value.strip() except: value = -9999 - + new_value_list.append(value) - - + + new_line = '' for i, sample in enumerate(ped_sample_list): j = i+1 value = new_value_list[i] new_line += '%s\t%s\t%s\n'%(sample, sample, value) - + if j%1000 == 0: output_file.write(newLine) new_line = '' - + if new_line: output_file.write(new_line) - + output_file.close() - + # get strain name from ped file in order def get_samples_from_ped_file(self): ped_file= open("{}/{}.ped".format(PLINK_PATH, self.dataset.group.name),"r") line = ped_file.readline() sample_list=[] - + while line: lineList = string.split(string.strip(line), '\t') lineList = map(string.strip, lineList) - + sample_name = lineList[0] sample_list.append(sample_name) - + line = ped_file.readline() - + return sample_list - + def gen_reaper_results(self): genotype = self.dataset.group.read_genotype_file() if self.manhattan_plot != True: genotype = genotype.addinterval() - + samples, values, variances, sample_aliases = self.this_trait.export_informative() - + trimmed_samples = [] trimmed_values = [] for i in range(0, len(samples)): @@ -664,7 +664,7 @@ class MarkerRegression(object): trimmed_values.append(values[i]) #print("THE SAMPLES:", trimmed_samples) - + if self.num_perm < 100: self.suggestive = 0 self.significant = 0 @@ -673,7 +673,7 @@ class MarkerRegression(object): self.suggestive = self.perm_output[int(self.num_perm*0.37-1)] self.significant = self.perm_output[int(self.num_perm*0.95-1)] self.highly_significant = self.perm_output[int(self.num_perm*0.99-1)] - + self.json_data['suggestive'] = self.suggestive self.json_data['significant'] = self.significant @@ -698,7 +698,7 @@ class MarkerRegression(object): for _strain in trimmed_samples: _idx = _prgy.index(_strain) control_geno.append(control_geno2[_idx]) - + self.bootstrap_results = genotype.bootstrap(strains = trimmed_samples, trait = trimmed_values, control = control_geno, @@ -706,7 +706,7 @@ class MarkerRegression(object): else: reaper_results = genotype.regression(strains = trimmed_samples, trait = trimmed_values) - + if self.bootCheck: self.bootstrap_results = genotype.bootstrap(strains = trimmed_samples, trait = trimmed_values, @@ -743,25 +743,25 @@ class MarkerRegression(object): def parse_plink_output(self, output_filename): plink_results={} - + threshold_p_value = 0.01 - + result_fp = open("%s%s.qassoc"% (TMPDIR, output_filename), "rb") - + header_line = result_fp.readline()# read header line line = result_fp.readline() - + value_list = [] # initialize value list, this list will include snp, bp and pvalue info p_value_dict = {} count = 0 - + while line: #convert line from str to list line_list = self.build_line_list(line=line) - + # only keep the records whose chromosome name is in db if self.species.chromosomes.chromosomes.has_key(int(line_list[0])) and line_list[-1] and line_list[-1].strip()!='NA': - + chr_name = self.species.chromosomes.chromosomes[int(line_list[0])] snp = line_list[1] BP = line_list[2] @@ -769,16 +769,16 @@ class MarkerRegression(object): if threshold_p_value >= 0 and threshold_p_value <= 1: if p_value < threshold_p_value: p_value_dict[snp] = float(p_value) - + if plink_results.has_key(chr_name): value_list = plink_results[chr_name] - + # pvalue range is [0,1] if threshold_p_value >=0 and threshold_p_value <= 1: if p_value < threshold_p_value: value_list.append((snp, BP, p_value)) count += 1 - + plink_results[chr_name] = value_list value_list = [] else: @@ -800,23 +800,23 @@ class MarkerRegression(object): # min_p_value = min(p_value_list) #else: # min_p_value = 0 - + return count, p_value_dict - + ###################################################### # input: line: str,one line read from file - # function: convert line from str to list; + # function: convert line from str to list; # output: lineList list ####################################################### def build_line_list(self, line=None): - + line_list = string.split(string.strip(line),' ')# irregular number of whitespaces between columns line_list = [item for item in line_list if item <>''] line_list = map(string.strip, line_list) - + return line_list - - + + def run_permutations(self, temp_uuid): """Runs permutations and gets significant and suggestive LOD scores""" @@ -830,44 +830,44 @@ class MarkerRegression(object): np.random.shuffle(pheno_vector) key = "pylmm:input:" + temp_uuid - + if self.dataset.group.species == "human": p_values, t_stats = self.gen_human_results(pheno_vector, key, temp_uuid) else: genotype_data = [marker['genotypes'] for marker in self.dataset.group.markers.markers] - + no_val_samples = self.identify_empty_samples() trimmed_genotype_data = self.trim_genotypes(genotype_data, no_val_samples) - + genotype_matrix = np.array(trimmed_genotype_data).T - + params = dict(pheno_vector = pheno_vector.tolist(), genotype_matrix = genotype_matrix.tolist(), restricted_max_likelihood = True, refit = False, temp_uuid = temp_uuid, - + # meta data timestamp = datetime.datetime.now().isoformat(), ) - + json_params = json.dumps(params) Redis.set(key, json_params) Redis.expire(key, 60*60) - + command = PYLMM_COMMAND+' --key {} --species {}'.format(key,"other") shell(command) - + json_results = Redis.blpop("pylmm:results:" + temp_uuid, 45*60) results = json.loads(json_results[1]) p_values = [float(result) for result in results['p_values']] - + lowest_p_value = 1 for p_value in p_values: if p_value < lowest_p_value: lowest_p_value = p_value - - #print("lowest_p_value:", lowest_p_value) + + #print("lowest_p_value:", lowest_p_value) top_lod_scores.append(-math.log10(lowest_p_value)) #print("top_lod_scores:", top_lod_scores) @@ -892,14 +892,14 @@ class MarkerRegression(object): if self.dataset.group.species == "human": p_values, t_stats = self.gen_human_results(pheno_vector, key, temp_uuid) #p_values = self.trim_results(p_values) - + else: print("NOW CWD IS:", os.getcwd()) genotype_data = [marker['genotypes'] for marker in self.dataset.group.markers.markers] - + no_val_samples = self.identify_empty_samples() trimmed_genotype_data = self.trim_genotypes(genotype_data, no_val_samples) - + genotype_matrix = np.array(genotype_data).T #print("pheno_vector: ", pf(pheno_vector)) @@ -911,20 +911,20 @@ class MarkerRegression(object): # "restricted_max_likelihood": True, # "refit": False, # "temp_data": tempdata} - + # print("genotype_matrix:", str(genotype_matrix.tolist())) # print("pheno_vector:", str(pheno_vector.tolist())) - + params = dict(pheno_vector = pheno_vector.tolist(), genotype_matrix = genotype_matrix.tolist(), restricted_max_likelihood = True, refit = False, temp_uuid = temp_uuid, - + # meta data timestamp = datetime.datetime.now().isoformat(), ) - + json_params = json.dumps(params) #print("json_params:", json_params) Redis.set(key, json_params) @@ -939,14 +939,14 @@ class MarkerRegression(object): #t_stats, p_values = lmm.run(key) #lmm.run(key) - + json_results = Redis.blpop("pylmm:results:" + temp_uuid, 45*60) results = json.loads(json_results[1]) p_values = [float(result) for result in results['p_values']] #print("p_values:", p_values[:10]) #p_values = self.trim_results(p_values) t_stats = results['t_stats'] - + #t_stats, p_values = lmm.run( # pheno_vector, # genotype_matrix, @@ -957,9 +957,9 @@ class MarkerRegression(object): #print("p_values:", p_values) self.dataset.group.markers.add_pvalues(p_values) - + #self.get_lod_score_cutoff() - + return self.dataset.group.markers.markers def trim_results(self, p_values): @@ -967,7 +967,7 @@ class MarkerRegression(object): if len(p_values) > 500: p_values.sort(reverse=True) trimmed_values = p_values[:500] - + return trimmed_values #def gen_human_results(self, pheno_vector, tempdata): @@ -990,13 +990,13 @@ class MarkerRegression(object): kinship_matrix = kinship_matrix.tolist(), refit = False, temp_uuid = temp_uuid, - + # meta data timestamp = datetime.datetime.now().isoformat(), ) - + print("After creating params") - + json_params = json.dumps(params) Redis.set(key, json_params) Redis.expire(key, 60*60) @@ -1005,16 +1005,16 @@ class MarkerRegression(object): command = PYLMM_COMMAND+' --key {} --species {}'.format(key, "human") - + print("command is:", command) - + os.system(command) - + json_results = Redis.blpop("pylmm:results:" + temp_uuid, 45*60) results = json.loads(json_results[1]) t_stats = results['t_stats'] p_values = results['p_values'] - + #p_values, t_stats = lmm.run_human(key) @@ -1046,7 +1046,7 @@ class MarkerRegression(object): if val == "x": no_val_samples.append(sample_count) return no_val_samples - + def trim_genotypes(self, genotype_data, no_value_samples): trimmed_genotype_data = [] for marker in genotype_data: @@ -1062,26 +1062,26 @@ class MarkerRegression(object): new_genotypes.append(genotype) trimmed_genotype_data.append(new_genotypes) return trimmed_genotype_data - + def create_snp_iterator_file(group): - """ + """ This function is only called by main below """ raise Exception("Paths are undefined here") plink_file_base = os.path.join(TMPDIR, group) plink_input = input.plink(plink_file_base, type='b') - + data = dict(plink_input = list(plink_input), numSNPs = plink_input.numSNPs) - + #input_dict = {} # #input_dict['plink_input'] = list(plink_input) #input_dict['numSNPs'] = plink_input.numSNPs # - + snp_file_base = os.path.join(webqtlConfig.SNP_PATH, group + ".snps.gz") - + with gzip.open(snp_file_base, "wb") as fh: pickle.dump(data, fh, pickle.HIGHEST_PROTOCOL) @@ -1092,10 +1092,10 @@ def trim_markers_for_table(markers): sorted_markers = sorted(markers, key=lambda k: k['lod_score'], reverse=True) else: sorted_markers = sorted(markers, key=lambda k: k['lrs_value'], reverse=True) - + #ZS: So we end up with a list of just 200 markers if len(sorted_markers) >= 200: - trimming_factor = 200 / len(sorted_markers) + trimming_factor = 200 / len(sorted_markers) trimmed_sorted_markers = sorted_markers[:int(len(sorted_markers) * trimming_factor)] return trimmed_sorted_markers else: @@ -1106,8 +1106,8 @@ def get_markers_from_csv(included_markers, p_values, group_name): marker_data_fh = open(os.path.join(webqtlConfig.PYLMM_PATH + group_name + '_markers.csv')) markers = [] for marker_name, p_value in itertools.izip(included_markers, p_values): - if not p_value or len(included_markers) < 1: - continue + if not p_value or len(included_markers) < 1: + continue for line in marker_data_fh: splat = line.strip().split() if splat[0] == marker_name: @@ -1126,6 +1126,6 @@ def get_markers_from_csv(included_markers, p_values, group_name): break return markers - + if __name__ == '__main__': import cPickle as pickle diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py index 4460c06d..9573a9de 100644 --- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py +++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py @@ -2057,7 +2057,7 @@ class MarkerRegression(object): if self.plotScale == "physic": this_chr = str(self.ChrList[self.selectedChr][0]) else: - this_chr = str(self.ChrList[self.selectedChr][1]+1) + this_chr = str(self.ChrList[self.selectedChr][1]+1) if self.selectedChr == -1 or str(qtlresult['chr']) == this_chr: #AdditiveCoordXY = [] #DominanceCoordXY = [] @@ -2646,12 +2646,12 @@ class MarkerRegression(object): self.gene_table_body = None #gene_table = "" - #return gene_table + #return gene_table def getGeneTableHeader(self, refGene=None): gene_tblobj_header = [] - + gene_table_header_list = [] col_class = "fs14 fwb ffl b1 cw cbrb" @@ -2659,20 +2659,20 @@ class MarkerRegression(object): if self.dataset.group.species == "mouse": if refGene: - gene_table_header_list = ["Index", - "Symbol", - "Mb Start", - "Length (Kb)", - "SNP Count", - "SNP Density", - "Avg Expr", - "Human Chr", - "Mb Start (hg19)", + gene_table_header_list = ["Index", + "Symbol", + "Mb Start", + "Length (Kb)", + "SNP Count", + "SNP Density", + "Avg Expr", + "Human Chr", + "Mb Start (hg19)", "Literature Correlation", - "Gene Description", - "PolymiRTS Database" + HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank").__str__(), + "Gene Description", + "PolymiRTS Database" + HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank").__str__(), "Gene Weaver Info Content" + HT.Href(url='http://geneweaver.org/', text='>>', target="_blank").__str__()] - + # gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0), # THCell(HT.TD('Symbol', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="symbol", idx=1), # THCell(HT.TD('Mb Start',HT.BR(),'(mm9)', align='left', width=100, Class=col_class), text="mb_start_mm9", idx=2), @@ -2691,17 +2691,17 @@ class MarkerRegression(object): # ]] else: gene_table_header_list = ["", - "Index", - "Symbol", - "Mb Start", - "Length (Kb)", - "SNP Count", - "SNP Density", - "Avg Expr", - "Human Chr", - "Mb Start (hg19)", - "Gene Description", - "PolymiRTS Database" + HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank").__str__(), + "Index", + "Symbol", + "Mb Start", + "Length (Kb)", + "SNP Count", + "SNP Density", + "Avg Expr", + "Human Chr", + "Mb Start (hg19)", + "Gene Description", + "PolymiRTS Database" + HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank").__str__(), "Gene Weaver Info Content" + HT.Href(url='http://geneweaver.org/', text='>>', target="_blank").__str__()] # gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0), @@ -2723,17 +2723,17 @@ class MarkerRegression(object): elif self.dataset.group.species == "rat": gene_table_header_list = ["", - "Index", - "Symbol", - "Mb Start", - "Length (Kb)", - "Avg Expr", - "Mouse Chr", - "Mb Start (mm9)", - "Human Chr", - "Mb Start (hg19)", + "Index", + "Symbol", + "Mb Start", + "Length (Kb)", + "Avg Expr", + "Mouse Chr", + "Mb Start (mm9)", + "Human Chr", + "Mb Start (hg19)", "Gene Description"] - + # gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0), # THCell(HT.TD('Symbol', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="symbol", idx=1), # THCell(HT.TD('Mb Start',HT.BR(),'(rn3)', align='left', width=100, Class=col_class), text="mb_start_rn3", idx=2), @@ -2755,7 +2755,7 @@ class MarkerRegression(object): tblobj_body = [] #contains table rows className = "fs13 b1 c222" - + gene_table_body = [] tableIterationsCnt = 0 @@ -2877,7 +2877,7 @@ class MarkerRegression(object): geneDescription, polymiRTS, ""] - + # this_row.append(TDCell(HT.TD(tableIterationsCnt, selectCheck, width=30, align='right', Class=className), tableIterationsCnt, tableIterationsCnt)) # this_row.append(TDCell(HT.TD(HT.Href(geneIdString, theGO["GeneSymbol"], target="_blank"), " ", probeSetSearch, align='right', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"])) # this_row.append(TDCell(HT.TD(HT.Href(mouseStartString, "%0.6f" % txStart, target="_blank"), align='right', Class=className), str(mouseStartValue), mouseStartValue)) @@ -2893,7 +2893,7 @@ class MarkerRegression(object): # this_row.append(TDCell(HT.TD("", align='right', Class=className), "", "")) else: - + this_row = [selectCheck.__str__(), str(tableIterationsCnt), HT.Href(geneIdString, theGO["GeneSymbol"], target="_blank").__str__() + " " + probeSetSearch.__str__(), @@ -2907,8 +2907,8 @@ class MarkerRegression(object): geneDescription, polymiRTS, ""] - - + + # this_row.append(TDCell(HT.TD(tableIterationsCnt, selectCheck, width=30, align='right', Class=className), tableIterationsCnt, tableIterationsCnt)) # this_row.append(TDCell(HT.TD(HT.Href(geneIdString, theGO["GeneSymbol"], target="_blank"), " ", probeSetSearch, align='right', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"])) # this_row.append(TDCell(HT.TD(HT.Href(mouseStartString, "%0.6f" % txStart, target="_blank"), align='right', Class=className), str(mouseStartValue), mouseStartValue)) @@ -2922,7 +2922,7 @@ class MarkerRegression(object): # this_row.append(TDCell(HT.TD(polymiRTS, align='right', Class=className), "", "")) # this_row.append(TDCell(HT.TD("", align='right', Class=className), "", "")) - gene_table_body.append(this_row) + gene_table_body.append(this_row) #tblobj_body.append(this_row) elif self.dataset.group.species == 'rat': @@ -2984,8 +2984,8 @@ class MarkerRegression(object): humanChr, humanTxStart, geneDesc] - - + + #this_row.append(TDCell(HT.TD(gIndex + 1, selectCheck, align='left', Class=className), str(gIndex+1), gIndex+1)) #this_row.append(TDCell(HT.TD(webqtlSearch, geneSymbolNCBI, align='left', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"])) #this_row.append(TDCell(HT.TD(theGO["TxStart"], align='left', Class=className), theGO["TxStart"], theGO["TxStart"])) @@ -3004,8 +3004,8 @@ class MarkerRegression(object): pass return gene_table_body - #return tblobj_body - + #return tblobj_body + def getLiteratureCorrelation(cursor,geneId1=None,geneId2=None): if not geneId1 or not geneId2: return None diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py index 5ea32e1f..3b480e0c 100644 --- a/wqflask/wqflask/model.py +++ b/wqflask/wqflask/model.py @@ -176,7 +176,7 @@ class UserCollection(Base): return len(json.loads(self.members)) except: return 0 - + #@property #def display_num_members(self): @@ -197,4 +197,4 @@ def display_collapsible(number): def user_uuid(): """Unique cookie for a user""" user_uuid = request.cookies.get('user_uuid') - + diff --git a/wqflask/wqflask/news.py b/wqflask/wqflask/news.py index 62dc1bbb..8bc6b889 100755 --- a/wqflask/wqflask/news.py +++ b/wqflask/wqflask/news.py @@ -1,6 +1,6 @@ from __future__ import absolute_import, print_function, division -import sys -reload(sys) +import sys +reload(sys) sys.setdefaultencoding('utf8') from flask import g diff --git a/wqflask/wqflask/parser.py b/wqflask/wqflask/parser.py index 5c89bc01..35070b8c 100755 --- a/wqflask/wqflask/parser.py +++ b/wqflask/wqflask/parser.py @@ -25,7 +25,7 @@ from pprint import pformat as pf def parse(pstring): """ - + returned item search_term is always a list, even if only one element """ pstring = re.split(r"""(?:(\w+\s*=\s*[\('"\[][^)'"]*[\)\]'"]) | # LRS=(1 2 3), cisLRS=[4 5 6], etc @@ -39,11 +39,11 @@ def parse(pstring): separators = [re.escape(x) for x in ("<=", ">=", ":", "=", "<", ">")] separators = '(%s)' % ("|".join(separators)) - + print("separators:", separators) - - + + for item in pstring: splat = re.split(separators, item) print("splat is:", splat) @@ -59,10 +59,10 @@ def parse(pstring): value = [value.strip() for value in values if value.strip()] else: value = [value] - # : is a synonym for = + # : is a synonym for = if separator == ":": separator = "=" - + term = dict(key=key, separator=separator, search_term=value) diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index 8a0485b3..4c4e1ef2 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -95,16 +95,16 @@ class SearchResultPage(object): """ self.trait_list = [] - + species = webqtlDatabaseFunction.retrieve_species(self.dataset.group.name) - - # result_set represents the results for each search term; a search of + + # result_set represents the results for each search term; a search of # "shh grin2b" would have two sets of results, one for each term print("self.results is:", pf(self.results)) for result in self.results: if not result: continue - + #### Excel file needs to be generated #### #print("foo locals are:", locals()) @@ -113,7 +113,7 @@ class SearchResultPage(object): self.trait_list.append(this_trait) self.dataset.get_trait_info(self.trait_list, species) - + #def get_group_species_tree(self): # self.species_groups = collections.default_dict(list) # for key in self.results: @@ -128,7 +128,7 @@ class SearchResultPage(object): if len(self.search_terms) > 1: combined_from_clause = "" - combined_where_clause = "" + combined_where_clause = "" previous_from_clauses = [] #The same table can't be referenced twice in the from clause for i, a_search in enumerate(self.search_terms): the_search = self.get_search_ob(a_search) @@ -177,7 +177,7 @@ class SearchResultPage(object): search_type = {} search_type['dataset_type'] = self.dataset.type if a_search['key']: - search_type['key'] = a_search['key'].upper() + search_type['key'] = a_search['key'].upper() print("search_type is:", pf(search_type)) search_ob = do_search.DoSearch.get_search(search_type) diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py index 367bd2dd..363b1efe 100755 --- a/wqflask/wqflask/show_trait/SampleList.py +++ b/wqflask/wqflask/show_trait/SampleList.py @@ -43,14 +43,14 @@ class SampleList(object): except KeyError: print("No sample %s, let's create it now" % sample_name) sample = webqtlCaseData.webqtlCaseData(sample_name) - + #sampleNameAdd = '' #if fd.RISet == 'AXBXA' and sampleName in ('AXB18/19/20','AXB13/14','BXA8/17'): # sampleNameAdd = HT.Href(url='/mouseCross.html#AXB/BXA', text=HT.Sup('#'), Class='fs12', target="_blank") sample.extra_info = {} - if self.dataset.group.name == 'AXBXA' and sample_name in ('AXB18/19/20','AXB13/14','BXA8/17'): + if self.dataset.group.name == 'AXBXA' and sample_name in ('AXB18/19/20','AXB13/14','BXA8/17'): sample.extra_info['url'] = "/mouseCross.html#AXB/BXA" - sample.extra_info['css_class'] = "fs12" + sample.extra_info['css_class'] = "fs12" print(" type of sample:", type(sample)) @@ -63,7 +63,7 @@ class SampleList(object): if self.sample_attribute_values: sample.extra_attributes = self.sample_attribute_values.get(sample_name, {}) print("sample.extra_attributes is", pf(sample.extra_attributes)) - + self.sample_list.append(sample) print("self.attributes is", pf(self.attributes)) @@ -81,7 +81,7 @@ class SampleList(object): def do_outliers(self): values = [sample.value for sample in self.sample_list if sample.value != None] upper_bound, lower_bound = Plot.find_outliers(values) - + for sample in self.sample_list: if sample.value: if upper_bound and sample.value > upper_bound: @@ -90,7 +90,7 @@ class SampleList(object): sample.outlier = True else: sample.outlier = False - + def get_attributes(self): """Finds which extra attributes apply to this dataset""" @@ -141,21 +141,21 @@ class SampleList(object): def se_exists(self): """Returns true if SE values exist for any samples, otherwise false""" - + return any(sample.variance for sample in self.sample_list) #def z_score(vals): # vals_array = np.array(vals) # mean = np.mean(vals_array) # stdv = np.std(vals_array) -# +# # z_scores = [] # for val in vals_array: # z_score = (val - mean)/stdv # z_scores.append(z_score) -# -# -# +# +# +# # return z_scores @@ -177,7 +177,7 @@ class SampleList(object): def natural_sort_key(x): """Get expected results when using as a key for sort - ints or strings are sorted properly""" - + try: x = int(x) except ValueError: diff --git a/wqflask/wqflask/show_trait/export_trait_data.py b/wqflask/wqflask/show_trait/export_trait_data.py index f5d02e73..ac3cd366 100755 --- a/wqflask/wqflask/show_trait/export_trait_data.py +++ b/wqflask/wqflask/show_trait/export_trait_data.py @@ -16,14 +16,14 @@ def export_sample_table(targs): sorted_row = dict_to_sorted_list(row) print("sorted_row is:", pf(sorted_row)) final_sample_data.append(sorted_row) - + return final_sample_data - + def dict_to_sorted_list(dictionary): sorted_list = [item for item in dictionary.iteritems()] sorted_list = sorted(sorted_list, cmp=cmp_samples) sorted_values = [item[1] for item in sorted_list] - return sorted_values + return sorted_values def cmp_samples(a, b): if b[0] == 'name': diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index f7a33d4f..73acde22 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -37,7 +37,7 @@ class ShowTrait(object): def __init__(self, kw): print("in ShowTrait, kw are:", kw) - + if kw['trait_id'] != None: self.temp_trait = False self.trait_id = kw['trait_id'] @@ -129,10 +129,10 @@ class ShowTrait(object): hddn['maf'] = 0.01 hddn['compare_traits'] = [] hddn['export_data'] = "" - + # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self self.hddn = hddn - + self.temp_uuid = uuid.uuid4() self.sample_group_types = OrderedDict() @@ -144,7 +144,7 @@ class ShowTrait(object): self.sample_group_types['samples_primary'] = self.dataset.group.name sample_lists = [group.sample_list for group in self.sample_groups] print("sample_lists is:", pf(sample_lists)) - + self.get_mapping_methods() self.trait_table_width = get_trait_table_width(self.sample_groups) @@ -254,7 +254,7 @@ class ShowTrait(object): self.allTraitData[_sample] = webqtlCaseData( _sample, values[i], variances[i], nsamples[i]) print("allTraitData is:", pf(self.allTraitData)) - + def dispTraitInformation(self, args, title1Body, hddn, this_trait): @@ -512,7 +512,7 @@ class ShowTrait(object): txst = int(txst*1000000) txen = int(txen*1000000) ## NEEDED FOR UCSC GENOME BROWSER LINK - + #XZ, 7/16/2009: The url for SymAtlas (renamed as BioGPS) has changed. We don't need this any more #tSpan.append(HT.Span(HT.Href(text= 'SymAtlas',target="mainFrame",\ # url="http://symatlas.gnf.org/SymAtlas/bioentry?querytext=%s&query=14&species=%s&type=Expression" \ @@ -1184,7 +1184,7 @@ class ShowTrait(object): all_samples_ordered = self.dataset.group.all_samples_ordered() primary_sample_names = list(all_samples_ordered) - + other_sample_names = [] for sample in this_trait.data.keys(): if (this_trait.data[sample].name2 in primary_sample_names) and (this_trait.data[sample].name not in primary_sample_names): @@ -1267,5 +1267,5 @@ def get_trait_table_width(sample_groups): table_width += len(sample_groups[0].attributes)*10 return table_width - - + + diff --git a/wqflask/wqflask/show_trait/show_trait_page.py b/wqflask/wqflask/show_trait/show_trait_page.py index cf056d35..de818a64 100755 --- a/wqflask/wqflask/show_trait/show_trait_page.py +++ b/wqflask/wqflask/show_trait/show_trait_page.py @@ -55,10 +55,10 @@ class ShowTraitPage(DataEditingPage): ProbeSetID = fd['ProbeSetID'] CellID = fd.get('CellID') - + thisTrait = webqtlTrait(db=database, name=ProbeSetID, cellid=CellID, cursor=self.cursor) - + if thisTrait.db.type == "ProbeSet": self.cursor.execute('''SELECT Id, Name, FullName, confidentiality, AuthorisedUsers @@ -105,7 +105,7 @@ class ShowTraitPage(DataEditingPage): try it again tomorrow.' % webqtlConfig.DAILYMAXIMUM] self.error(heading=heading,detail=detail) return - + if thisTrait.db.type != 'ProbeSet' and thisTrait.cellid: heading = "Retrieve Data" diff --git a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js index c6fb52d8..c6cbd01b 100644 --- a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js +++ b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js @@ -104,7 +104,7 @@ Chr_Lod_Chart = (function() { this.y_coords.push(result.lod_score); } else { - console.log("LRS VALUE:", result['lrs_value']) + console.log("LRS VALUE:", result['lrs_value']) this.y_coords.push(result['lrs_value']); } results.push(this.marker_names.push(result.name)); diff --git a/wqflask/wqflask/static/new/javascript/panelutil.js b/wqflask/wqflask/static/new/javascript/panelutil.js index 4c8e77ba..3c715c81 100644 --- a/wqflask/wqflask/static/new/javascript/panelutil.js +++ b/wqflask/wqflask/static/new/javascript/panelutil.js @@ -81,7 +81,7 @@ reorgLodData = function(data, lodvarname) { if ('additive' in data){ addval = data['additive'][j] - data.additiveByChr[chr[0]].push(addval); + data.additiveByChr[chr[0]].push(addval); } } diff --git a/wqflask/wqflask/static/new/javascript/scatter-matrix.js b/wqflask/wqflask/static/new/javascript/scatter-matrix.js index 15385b00..278a93bc 100644 --- a/wqflask/wqflask/static/new/javascript/scatter-matrix.js +++ b/wqflask/wqflask/static/new/javascript/scatter-matrix.js @@ -135,7 +135,7 @@ ScatterMatrix.prototype.render = function () { var new_selected_colors = []; for (var j in selected_colors) { var v = selected_colors[j]; - if (v !== d || this.checked) { new_selected_colors.push(v); } + if (v !== d || this.checked) { new_selected_colors.push(v); } } if (this.checked) { new_selected_colors.push(d); } selected_colors = new_selected_colors; @@ -194,7 +194,7 @@ ScatterMatrix.prototype.render = function () { var new_to_include = []; for (var j in to_include) { var v = to_include[j]; - if (v !== d || this.checked) { new_to_include.push(v); } + if (v !== d || this.checked) { new_to_include.push(v); } } if (this.checked) { new_to_include.push(d); } to_include = new_to_include; @@ -203,7 +203,7 @@ ScatterMatrix.prototype.render = function () { variable_li.append('label') .html(function(d) { return d; }); - drill_li = + drill_li = drill_control .append('p').text('Drill and Expand: ') .append('ul') @@ -217,7 +217,7 @@ ScatterMatrix.prototype.render = function () { var new_drill_variables = []; for (var j in drill_variables) { var v = drill_variables[j]; - if (v !== d || this.checked) { new_drill_variables.push(v); } + if (v !== d || this.checked) { new_drill_variables.push(v); } } if (this.checked) { new_drill_variables.push(d); } drill_variables = new_drill_variables; @@ -545,7 +545,7 @@ ScatterMatrix.prototype.__draw = for (i = -1; ++i < n;) for (j = -1; ++j < m;) c.push({x: a[i], i: i, y: b[j], j: j}); return c; } - }); + }); }; diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js index 25381996..4218fdbb 100755 --- a/wqflask/wqflask/static/new/javascript/search_results.js +++ b/wqflask/wqflask/static/new/javascript/search_results.js @@ -70,7 +70,7 @@ $(function() { }); } change_buttons(); - }); + }); $('.trait_checkbox:checkbox').change(function() { console.log("CHANGED") @@ -85,8 +85,8 @@ $(function() { if ($(this).closest('tr').hasClass('selected')) { $(this).closest('tr').removeClass('selected') } - } - + } + }); add = function() { diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 589b1074..419aa7a2 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -521,10 +521,10 @@ $('#reset').click(edit_data_change); return console.log("end"); }); - + Number.prototype.countDecimals = function () { if(Math.floor(this.valueOf()) === this.valueOf()) return 0; - return this.toString().split(".")[1].length || 0; + return this.toString().split(".")[1].length || 0; } }).call(this); diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js index 3b1a1205..474109a3 100755 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js @@ -136,7 +136,7 @@ outlier_text = "One or more outliers exist in this data set. Please review values before mapping. Including outliers when mapping may lead to misleading results. We recommend winsorising the outliers or simply deleting them."; runtime_warning_text = "This function could take as long as 10-20 minutes to run, so please do not close your browser window until it finishes." - + showalert = function(message, alerttype) { return $('#alert_placeholder').append('
' + message + '
'); }; diff --git a/wqflask/wqflask/static/new/js_external/chroma.js b/wqflask/wqflask/static/new/js_external/chroma.js index 0976056b..575e752f 100644 --- a/wqflask/wqflask/static/new/js_external/chroma.js +++ b/wqflask/wqflask/static/new/js_external/chroma.js @@ -2,23 +2,23 @@ * @license * * chroma.js - JavaScript library for color conversions - * + * * Copyright (c) 2011-2015, Gregor Aisch * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * + * * 3. The name Gregor Aisch may not be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -143,23 +143,23 @@ /** chroma.js - + Copyright (c) 2011-2013, Gregor Aisch All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + * The name Gregor Aisch may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -170,7 +170,7 @@ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + @source: https://github.com/gka/chroma.js */ @@ -244,20 +244,20 @@ /** ColorBrewer colors for chroma.js - - Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The + + Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State University. - - Licensed under the Apache License, Version 2.0 (the "License"); + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - + @preserve */ @@ -302,7 +302,7 @@ /** X11 color names - + http://www.w3.org/TR/css3-color/#svg-color */ @@ -653,23 +653,23 @@ /* chroma.js - + Copyright (c) 2011-2013, Gregor Aisch All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + * The name Gregor Aisch may not be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -680,7 +680,7 @@ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + @source: https://github.com/gka/chroma.js */ @@ -1260,7 +1260,7 @@ Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel. These formulas were invented by David Dalrymple to obtain maximum contrast without going out of gamut if the parameters are in the range 0-1. - + A saturation multiplier was added by Gregor Aisch */ var c, h, l, ref; diff --git a/wqflask/wqflask/static/new/js_external/shapiro-wilk.js b/wqflask/wqflask/static/new/js_external/shapiro-wilk.js index 1084b9f5..ddc62b72 100644 --- a/wqflask/wqflask/static/new/js_external/shapiro-wilk.js +++ b/wqflask/wqflask/static/new/js_external/shapiro-wilk.js @@ -168,7 +168,7 @@ function ShapiroWilkW(x) /* Calculate significance level for W */ if (n == 3) {/* exact P value : */ - var pi6 = 1.90985931710274; /* = 6/pi */ + var pi6 = 1.90985931710274; /* = 6/pi */ var stqr = 1.04719755119660; /* = asin(sqrt(3/4)) */ pw = pi6 * (Math.asin(Math.sqrt(w)) - stqr); if (pw < 0.) diff --git a/wqflask/wqflask/static/new/packages/DataTables/extensions/dataTables.colResize.js b/wqflask/wqflask/static/new/packages/DataTables/extensions/dataTables.colResize.js index 2712750a..08bd7333 100644 --- a/wqflask/wqflask/static/new/packages/DataTables/extensions/dataTables.colResize.js +++ b/wqflask/wqflask/static/new/packages/DataTables/extensions/dataTables.colResize.js @@ -433,7 +433,7 @@ //Store the indexes of the columns the mouse is down on var idx = that.dom.resizeCol[0].cellIndex; - + // the last column has no 'right-side' neighbour // with fixed this can make the table smaller if (that.dom.resizeColNeighbour[0] === undefined){ @@ -441,8 +441,8 @@ } else { var idxNeighbour = that.dom.resizeColNeighbour[0].cellIndex; } - - + + if (idx === undefined) { return; diff --git a/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js b/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js index 8b7fa8fd..e96c0af3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js @@ -1,5 +1,5 @@ (function() { - + /* * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license * Author: Jim Palmer (based on chunking idea from Dave Koelle) @@ -45,7 +45,7 @@ function naturalSort (a, b) { return 0; } - + jQuery.extend( jQuery.fn.dataTableExt.oSort, { "natural-asc": function ( a, b ) { // first check if null or n/a @@ -55,7 +55,7 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { return naturalSort(a,b); } }, - + "natural-desc": function ( a, b ) { if (a == "N/A" || a == "NA" || a == "" || a == "--") return 1; else if (b == "N/A" || b == "NA" || b == "" || b == "--") return -1; @@ -64,5 +64,5 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { } } } ); - + }()); \ No newline at end of file diff --git a/wqflask/wqflask/static/new/packages/DataTables/js/jquery.dataTables.js b/wqflask/wqflask/static/new/packages/DataTables/js/jquery.dataTables.js index 1364bafc..7bf65d02 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/js/jquery.dataTables.js +++ b/wqflask/wqflask/static/new/packages/DataTables/js/jquery.dataTables.js @@ -860,7 +860,7 @@ var i, ien, j, jen, k, ken; var col, cell, detectedType, cache; - // For each column, spin over the + // For each column, spin over the for ( i=0, ien=columns.length ; i0 if the first parameter should be sorted height than the second * parameter. - * + * * @type object * @default {} * @@ -14367,7 +14367,7 @@ // Filter formatting functions. See model.ext.ofnSearch for information about // what is required from these methods. - // + // // Note that additional search methods are added for the html numbers and // html formatted numbers by `_addNumericSort()` when we know what the decimal // place is diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/DataTables.js b/wqflask/wqflask/static/new/packages/DataTables/src/DataTables.js index 111e7db8..461a6e3d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/DataTables.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/DataTables.js @@ -12,11 +12,11 @@ * BSD style license, available at: * http://datatables.net/license_gpl2 * http://datatables.net/license_bsd - * - * This source file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. - * + * * For details please refer to: http://www.datatables.net */ @@ -43,35 +43,35 @@ } (/** @lends */function( $ ) { "use strict"; - /** - * DataTables is a plug-in for the jQuery Javascript library. It is a - * highly flexible tool, based upon the foundations of progressive - * enhancement, which will add advanced interaction controls to any + /** + * DataTables is a plug-in for the jQuery Javascript library. It is a + * highly flexible tool, based upon the foundations of progressive + * enhancement, which will add advanced interaction controls to any * HTML table. For a full list of features please refer to * DataTables.net. * * Note that the DataTable object is not a global variable but is - * aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which + * aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which * it may be accessed. * * @class * @param {object} [oInit={}] Configuration object for DataTables. Options * are defined by {@link DataTable.defaults} * @requires jQuery 1.3+ - * + * * @example * // Basic initialisation * $(document).ready( function { * $('#example').dataTable(); * } ); - * + * * @example * // Initialisation with configuration options - in this case, disable * // pagination and sorting. * $(document).ready( function { * $('#example').dataTable( { * "bPaginate": false, - * "bSort": false + * "bSort": false * } ); * } ); */ @@ -119,8 +119,8 @@ /** * Private data store, containing all of the settings objects that are created for the * tables on a given page. - * - * Note that the DataTable.settings object is aliased to jQuery.fn.dataTableExt + * + * Note that the DataTable.settings object is aliased to jQuery.fn.dataTableExt * through which it may be accessed and manipulated, or jQuery.fn.dataTable.settings. * @member * @type array @@ -131,7 +131,7 @@ /** * Object models container, for the various models that DataTables has available - * to it. These models define the objects that are used to hold the active state + * to it. These models define the objects that are used to hold the active state * and configuration of the table. * @namespace */ @@ -146,7 +146,7 @@ /** * Extension object for DataTables that is used to provide all extension options. - * + * * Note that the DataTable.ext object is available through * jQuery.fn.dataTable.ext where it may be accessed and manipulated. It is * also aliased to jQuery.fn.dataTableExt for historic reasons. @@ -258,7 +258,7 @@ */ /** - * Ajax (XHR) event, fired whenever an Ajax request is completed from a request to + * Ajax (XHR) event, fired whenever an Ajax request is completed from a request to * made to the server for new data (note that this trigger is called in fnServerData, * if you override fnServerData and which to use this event, you need to trigger it in * you success function). diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.internal.js b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.internal.js index 04a176db..f83605e9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.internal.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.internal.js @@ -14,7 +14,7 @@ function _fnExternApiFunc (sFunc) { return function() { - var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat( + var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat( Array.prototype.slice.call(arguments) ); return DataTable.ext.oApi[sFunc].apply( this, aArgs ); }; diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.methods.js b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.methods.js index 55cd85e3..e37cfdb8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.methods.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.methods.js @@ -9,7 +9,7 @@ * Can be either 'current', whereby the current sorting of the table is used, or * 'original' whereby the original order the data was read into the table is used. * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page - * ("current") or not ("all"). If 'current' is given, then order is assumed to be + * ("current") or not ("all"). If 'current' is given, then order is assumed to be * 'current' and filter is 'applied', regardless of what they might be given as. * @returns {object} jQuery object, filtered by the given selector. * @dtopt API @@ -130,7 +130,7 @@ this.$ = function ( sSelector, oOpts ) * Almost identical to $ in operation, but in this case returns the data for the matched * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes * rather than any descendants, so the data can be obtained for the row/cell. If matching - * rows are found, the data returned is the original data array/object that was used to + * rows are found, the data returned is the original data array/object that was used to * create the row (or a generated array if from a DOM source). * * This method is often useful in-combination with $ where both functions are given the @@ -143,10 +143,10 @@ this.$ = function ( sSelector, oOpts ) * Can be either 'current', whereby the current sorting of the table is used, or * 'original' whereby the original order the data was read into the table is used. * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page - * ("current") or not ("all"). If 'current' is given, then order is assumed to be + * ("current") or not ("all"). If 'current' is given, then order is assumed to be * 'current' and filter is 'applied', regardless of what they might be given as. * @returns {array} Data for the matched elements. If any elements, as a result of the - * selector, were not TR, TD or TH elements in the DataTable, they will have a null + * selector, were not TR, TD or TH elements in the DataTable, they will have a null * entry in the array. * @dtopt API * @@ -165,10 +165,10 @@ this.$ = function ( sSelector, oOpts ) * $(document).ready(function() { * var oTable = $('#example').dataTable(); * - * // Filter to 'Webkit' and get all data for + * // Filter to 'Webkit' and get all data for * oTable.fnFilter('Webkit'); * var data = oTable._('tr', {"filter": "applied"}); - * + * * // Do something with the data * alert( data.length+" rows matched the filter" ); * } ); @@ -190,7 +190,7 @@ this._ = function ( sSelector, oOpts ) /** * Add a single new row or multiple rows of data to the table. Please note - * that this is suitable for client-side processing only - if you are using + * that this is suitable for client-side processing only - if you are using * server-side processing (i.e. "bServerSide": true), then to add data, you * must add it to the data source, i.e. the server-side, through an Ajax call. * @param {array|object} mData The data to be added to the table. This can be: @@ -201,19 +201,19 @@ this._ = function ( sSelector, oOpts ) *
  • array of objects - multiple data objects when using mData
  • * * @param {bool} [bRedraw=true] redraw the table or not - * @returns {array} An array of integers, representing the list of indexes in - * aoData ({@link DataTable.models.oSettings}) that have been added to + * @returns {array} An array of integers, representing the list of indexes in + * aoData ({@link DataTable.models.oSettings}) that have been added to * the table. * @dtopt API * * @example * // Global var for counter * var giCount = 2; - * + * * $(document).ready(function() { * $('#example').dataTable(); * } ); - * + * * function fnClickAddRow() { * $('#example').dataTable().fnAddData( [ * giCount+".1", @@ -221,7 +221,7 @@ this._ = function ( sSelector, oOpts ) * giCount+".3", * giCount+".4" ] * ); - * + * * giCount++; * } */ @@ -272,9 +272,9 @@ this.fnAddData = function( mData, bRedraw ) /** - * This function will make DataTables recalculate the column sizes, based on the data - * contained in the table and the sizes applied to the columns (in the DOM, CSS or - * through the sWidth parameter). This can be useful when the width of the table's + * This function will make DataTables recalculate the column sizes, based on the data + * contained in the table and the sizes applied to the columns (in the DOM, CSS or + * through the sWidth parameter). This can be useful when the width of the table's * parent element changes (for example a window resize). * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to * @dtopt API @@ -285,7 +285,7 @@ this.fnAddData = function( mData, bRedraw ) * "sScrollY": "200px", * "bPaginate": false * } ); - * + * * $(window).bind('resize', function () { * oTable.fnAdjustColumnSizing(); * } ); @@ -316,7 +316,7 @@ this.fnAdjustColumnSizing = function ( bRedraw ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...) * oTable.fnClearTable(); * } ); @@ -335,7 +335,7 @@ this.fnClearTable = function( bRedraw ) /** - * The exact opposite of 'opening' a row, this function will close any rows which + * The exact opposite of 'opening' a row, this function will close any rows which * are currently 'open'. * @param {node} nTr the table row to 'close' * @returns {int} 0 on success, or 1 if failed (can't find the row) @@ -344,7 +344,7 @@ this.fnClearTable = function( bRedraw ) * @example * $(document).ready(function() { * var oTable; - * + * * // 'open' an information row when a row is clicked on * $('#example tbody tr').click( function () { * if ( oTable.fnIsOpen(this) ) { @@ -353,7 +353,7 @@ this.fnClearTable = function( bRedraw ) * oTable.fnOpen( this, "Temporary row opened", "info_row" ); * } * } ); - * + * * oTable = $('#example').dataTable(); * } ); */ @@ -392,7 +392,7 @@ this.fnClose = function( nTr ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Immediately remove the first row * oTable.fnDeleteRow( 0 ); * } ); @@ -403,7 +403,7 @@ this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw ) var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); var i, iLen, iAODataIndex; - iAODataIndex = (typeof mTarget === 'object') ? + iAODataIndex = (typeof mTarget === 'object') ? _fnNodeToDataIndex(oSettings, mTarget) : mTarget; /* Return the data array from this row */ @@ -453,7 +453,7 @@ this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw ) /** - * Restore the table to it's original state in the DOM by removing all of DataTables + * Restore the table to it's original state in the DOM by removing all of DataTables * enhancements, alterations to the DOM structure of the table and event listeners. * @param {boolean} [bRemove=false] Completely remove the table from the DOM * @dtopt API @@ -601,7 +601,7 @@ this.fnDestroy = function ( bRemove ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Re-draw the table - you wouldn't want to do it here, but it's an example :-) * oTable.fnDraw(); * } ); @@ -634,7 +634,7 @@ this.fnDraw = function( bComplete ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Sometime later - filter... * oTable.fnFilter( 'test string' ); * } ); @@ -712,7 +712,7 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns /** - * Get the data for the whole table, an individual row or an individual cell based on the + * Get the data for the whole table, an individual row or an individual cell based on the * provided parameters. * @param {int|node} [mRow] A TR row node, TD/TH cell node or an integer. If given as * a TR node then the data source for the whole row will be returned. If given as a @@ -780,8 +780,8 @@ this.fnGetData = function( mRow, iCol ) /** - * Get an array of the TR nodes that are used in the table's body. Note that you will - * typically want to use the '$' API method in preference to this as it is more + * Get an array of the TR nodes that are used in the table's body. Note that you will + * typically want to use the '$' API method in preference to this as it is more * flexible. * @param {int} [iRow] Optional row index for the TR element you want * @returns {array|node} If iRow is undefined, returns an array of all TR elements @@ -791,7 +791,7 @@ this.fnGetData = function( mRow, iCol ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Get the nodes from the table * var nNodes = oTable.fnGetNodes( ); * } ); @@ -813,7 +813,7 @@ this.fnGetNodes = function( iRow ) * and column index including hidden columns * @param {node} nNode this can either be a TR, TD or TH in the table's body * @returns {int} If nNode is given as a TR, then a single index is returned, or - * if given as a cell, an array of [row index, column index (visible), + * if given as a cell, an array of [row index, column index (visible), * column index (all)] is given. * @dtopt API * @@ -822,15 +822,15 @@ this.fnGetNodes = function( iRow ) * $('#example tbody td').click( function () { * // Get the position of the current data from the node * var aPos = oTable.fnGetPosition( this ); - * + * * // Get the data array for this row * var aData = oTable.fnGetData( aPos[0] ); - * + * * // Update the data array and return the value * aData[ aPos[1] ] = 'clicked'; * this.innerHTML = 'clicked'; * } ); - * + * * // Init DataTables * oTable = $('#example').dataTable(); * } ); @@ -863,7 +863,7 @@ this.fnGetPosition = function( nNode ) * @example * $(document).ready(function() { * var oTable; - * + * * // 'open' an information row when a row is clicked on * $('#example tbody tr').click( function () { * if ( oTable.fnIsOpen(this) ) { @@ -872,7 +872,7 @@ this.fnGetPosition = function( nNode ) * oTable.fnOpen( this, "Temporary row opened", "info_row" ); * } * } ); - * + * * oTable = $('#example').dataTable(); * } ); */ @@ -893,9 +893,9 @@ this.fnIsOpen = function( nTr ) /** - * This function will place a new row directly after a row which is currently - * on display on the page, with the HTML contents that is passed into the - * function. This can be used, for example, to ask for confirmation that a + * This function will place a new row directly after a row which is currently + * on display on the page, with the HTML contents that is passed into the + * function. This can be used, for example, to ask for confirmation that a * particular record should be deleted. * @param {node} nTr The table row to 'open' * @param {string|node|jQuery} mHtml The HTML to put into the row @@ -908,7 +908,7 @@ this.fnIsOpen = function( nTr ) * @example * $(document).ready(function() { * var oTable; - * + * * // 'open' an information row when a row is clicked on * $('#example tbody tr').click( function () { * if ( oTable.fnIsOpen(this) ) { @@ -917,7 +917,7 @@ this.fnIsOpen = function( nTr ) * oTable.fnOpen( this, "Temporary row opened", "info_row" ); * } * } ); - * + * * oTable = $('#example').dataTable(); * } ); */ @@ -968,8 +968,8 @@ this.fnOpen = function( nTr, mHtml, sClass ) /** - * Change the pagination - provides the internal logic for pagination in a simple API - * function. With this function you can have a DataTables table go to the next, + * Change the pagination - provides the internal logic for pagination in a simple API + * function. With this function you can have a DataTables table go to the next, * previous, first or last pages. * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last" * or page number to jump to (integer), note that page 0 is the first page. @@ -1005,7 +1005,7 @@ this.fnPageChange = function ( mAction, bRedraw ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Hide the second column after initialisation * oTable.fnSetColumnVis( 1, false ); * } ); @@ -1058,14 +1058,14 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) { if ( bAppend ) { - aoData[i].nTr.appendChild( + aoData[i].nTr.appendChild( aoData[i]._anHidden[iCol] ); } else { aoData[i].nTr.insertBefore( - aoData[i]._anHidden[iCol], + aoData[i]._anHidden[iCol], _fnGetTdNodes( oSettings, i )[iBefore] ); } } @@ -1101,8 +1101,8 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) oSettings.aoOpenRows[i].nTr.colSpan = _fnVisbleColumns( oSettings ); } - /* Do a redraw incase anything depending on the table columns needs it - * (built-in: scrolling) + /* Do a redraw incase anything depending on the table columns needs it + * (built-in: scrolling) */ if ( bRedraw === undefined || bRedraw ) { @@ -1116,7 +1116,7 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) /** * Get the settings for a particular table for external manipulation - * @returns {object} DataTables settings object. See + * @returns {object} DataTables settings object. See * {@link DataTable.models.oSettings} * @dtopt API * @@ -1124,7 +1124,7 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) * $(document).ready(function() { * var oTable = $('#example').dataTable(); * var oSettings = oTable.fnSettings(); - * + * * // Show an example parameter from the settings * alert( oSettings._iDisplayStart ); * } ); @@ -1137,14 +1137,14 @@ this.fnSettings = function() /** * Sort the table by a particular column - * @param {int} iCol the data index to sort on. Note that this will not match the + * @param {int} iCol the data index to sort on. Note that this will not match the * 'display index' if you have hidden data entries * @dtopt API * * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Sort immediately with columns 0 and 1 * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] ); * } ); @@ -1167,7 +1167,7 @@ this.fnSort = function( aaSort ) * @example * $(document).ready(function() { * var oTable = $('#example').dataTable(); - * + * * // Sort on column 1, when 'sorter' is clicked on * oTable.fnSortListener( document.getElementById('sorter'), 1 ); * } ); @@ -1203,7 +1203,7 @@ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction ) { var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] ); var i, iLen, sDisplay; - var iRow = (typeof mRow === 'object') ? + var iRow = (typeof mRow === 'object') ? _fnNodeToDataIndex(oSettings, mRow) : mRow; if ( $.isArray(mData) && iColumn === undefined ) @@ -1255,7 +1255,7 @@ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction ) */ var iDisplayIndex = $.inArray( iRow, oSettings.aiDisplay ); oSettings.asDataSearch[iDisplayIndex] = _fnBuildSearchRow( - oSettings, + oSettings, _fnGetRowData( oSettings, iRow, 'filter', _fnGetColumns( oSettings, 'bSearchable' ) ) ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.static.js b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.static.js index 5000dce4..d344ed7e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/api/api.static.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/api/api.static.js @@ -70,7 +70,7 @@ DataTable.fnIsDataTable = function ( nTable ) /** * Get all DataTable tables that have been initialised - optionally you can select to * get only currently visible tables. - * @param {boolean} [bVisible=false] Flag to indicate if you want all (default) or + * @param {boolean} [bVisible=false] Flag to indicate if you want all (default) or * visible tables only. * @returns {array} Array of TABLE nodes (not DataTable instances) which are DataTables * @static diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.columns.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.columns.js index b39e6198..8fe3e712 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.columns.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.columns.js @@ -137,7 +137,7 @@ function _fnColumnOptions( oSettings, iCol, oOptions ) /** - * Adjust the table column widths for new data. Note: you would probably want to + * Adjust the table column widths for new data. Note: you would probably want to * do a redraw after calling this function! * @param {object} oSettings dataTables settings object * @memberof DataTable#oApi @@ -208,7 +208,7 @@ function _fnVisbleColumns( oSettings ) /** * Get an array of column indexes that match a given property * @param {object} oSettings dataTables settings object - * @param {string} sParam Parameter in aoColumns to look for - typically + * @param {string} sParam Parameter in aoColumns to look for - typically * bVisible or bSearchable * @returns {array} Array of indexes with matched properties * @memberof DataTable#oApi diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.constructor.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.constructor.js index 8af48d54..7abc5289 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.constructor.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.constructor.js @@ -155,8 +155,8 @@ else if ( oSettings.oFeatures.bDeferRender ) if ( oInit.bJQueryUI ) { - /* Use the JUI classes object for display. You could clone the oStdClasses object if - * you want to have multiple tables with multiple independent classes + /* Use the JUI classes object for display. You could clone the oStdClasses object if + * you want to have multiple tables with multiple independent classes */ $.extend( oSettings.oClasses, DataTable.ext.oJUIClasses ); @@ -210,7 +210,7 @@ if ( oInit.aaData !== null ) if ( oInit.oLanguage.sUrl !== "" ) { /* Get the language definitions from a file - because this Ajax call makes the language - * get async to the remainder of this function we use bInitHandedOff to indicate that + * get async to the remainder of this function we use bInitHandedOff to indicate that * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor */ oSettings.oLanguage.sUrl = oInit.oLanguage.sUrl; diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.data.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.data.js index 7fce2383..14b87d9f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.data.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.data.js @@ -1,5 +1,5 @@ /** - * Add a data array to the table, creating DOM node etc. This is the parallel to + * Add a data array to the table, creating DOM node etc. This is the parallel to * _fnGatherData, but for adding rows from a Javascript source, rather than a * DOM source. * @param {object} oSettings dataTables settings object @@ -177,7 +177,7 @@ function _fnGatherData( oSettings ) { oCol.sType = sThisType; } - else if ( oCol.sType != sThisType && + else if ( oCol.sType != sThisType && oCol.sType != "html" ) { /* String is always the 'fallback' option */ @@ -396,7 +396,7 @@ function _fnGetObjectDataFn( mSource ) } else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 || mSource.indexOf('[') !== -1) ) { - /* If there is a . in the source string then the data source is in a + /* If there is a . in the source string then the data source is in a * nested object so we loop over the data for each level to get the next * level down. On each loop we test for undefined, and if found immediately * return. This allows entire objects to be missing and sDefaultContent to @@ -582,7 +582,7 @@ function _fnClearTable( oSettings ) /** - * Take an array of integers (index array) and remove a target integer (value - not + * Take an array of integers (index array) and remove a target integer (value - not * the key!) * @param {array} a Index array to target * @param {int} iTarget value to find diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.draw.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.draw.js index 04ee2a5d..47cc0ce3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.draw.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.draw.js @@ -196,13 +196,13 @@ function _fnBuildHead( oSettings ) * Draw the header (or footer) element based on the column visibility states. The * methodology here is to use the layout array from _fnDetectHeader, modified for * the instantaneous column visibility, to construct the new layout. The grid is - * traversed over cell at a time in a rows x columns grid fashion, although each + * traversed over cell at a time in a rows x columns grid fashion, although each * cell insert can cover multiple elements in the grid - which is tracks using the * aApplied array. Cell inserts in the grid will only occur where there isn't * already a cell in that position. * @param {object} oSettings dataTables settings object * @param array {objects} aoSource Layout array from _fnDetectHeader - * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc, + * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc, * @memberof DataTable#oApi */ function _fnDrawHead( oSettings, aoSource, bIncludeHidden ) @@ -379,7 +379,7 @@ function _fnDraw( oSettings ) } /* Row callback functions - might want to manipulate the row */ - _fnCallbackFire( oSettings, 'aoRowCallback', null, + _fnCallbackFire( oSettings, 'aoRowCallback', null, [nRow, oSettings.aoData[ oSettings.aiDisplay[j] ]._aData, iRowCount, j] ); anRows.push( nRow ); @@ -430,15 +430,15 @@ function _fnDraw( oSettings ) } /* Header and footer callbacks */ - _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0], + _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0], _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(), oSettings.aiDisplay ] ); - _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0], + _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0], _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(), oSettings.aiDisplay ] ); - /* + /* * Need to remove any old row from the display - note we can't just empty the tbody using - * $().html('') since this will unbind the jQuery event handlers (even although the node + * $().html('') since this will unbind the jQuery event handlers (even although the node * still exists!) - equally we can't use innerHTML, since IE throws an exception. */ var @@ -534,7 +534,7 @@ function _fnAddOptionsHtml ( oSettings ) var nHolding = $('
    ')[0]; oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable ); - /* + /* * All DataTables are wrapped in a div */ oSettings.nTableWrapper = $('
    ')[0]; @@ -727,7 +727,7 @@ function _fnDetectHeader ( aLayout, nThead ) iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan; iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan; - /* There might be colspan cells already in this row, so shift our target + /* There might be colspan cells already in this row, so shift our target * accordingly */ iColShifted = fnShiftCol( aLayout, i, iColumn ); @@ -779,7 +779,7 @@ function _fnGetUniqueThs ( oSettings, nHeader, aLayout ) { for ( var j=0, jLen=aLayout[i].length ; j + if ( $(this).scrollTop() + $(this).height() > $(oSettings.nTable).height() - oSettings.oScroll.iLoadGap ) { /* Only do the redraw if we have to - we might be at the end of the data */ @@ -270,7 +270,7 @@ function _fnScrollDraw ( o ) * the scrollbar - which is shouldn't. When there is a scrollbar we need to take this * into account. */ - if ( ie67 && ($('tbody', nScrollBody).height() > nScrollBody.offsetHeight || + if ( ie67 && ($('tbody', nScrollBody).height() > nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") ) { o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() - o.oScroll.iBarWidth); @@ -311,16 +311,16 @@ function _fnScrollDraw ( o ) * set the width based on the real headers */ - // Apply all styles in one pass. Invalidates layout only once because we don't read any + // Apply all styles in one pass. Invalidates layout only once because we don't read any // DOM properties. _fnApplyToChildren( zeroOut, anHeadSizers ); - - // Read all widths in next pass. Forces layout only once because we do not change + + // Read all widths in next pass. Forces layout only once because we do not change // any DOM properties. _fnApplyToChildren( function(nSizer) { aApplied.push( _fnStringToCss( $(nSizer).width() ) ); }, anHeadSizers ); - + // Apply all widths in final pass. Invalidates layout only once because we do not // read any DOM properties. _fnApplyToChildren( function(nToSize, i) { @@ -333,11 +333,11 @@ function _fnScrollDraw ( o ) if ( o.nTFoot !== null ) { _fnApplyToChildren( zeroOut, anFootSizers ); - + _fnApplyToChildren( function(nSizer) { aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) ); }, anFootSizers ); - + _fnApplyToChildren( function(nToSize, i) { nToSize.style.width = aAppliedFooter[i]; }, anFootToSize ); @@ -371,12 +371,12 @@ function _fnScrollDraw ( o ) if ( $(o.nTable).outerWidth() < iSanityWidth ) { /* The min width depends upon if we have a vertical scrollbar visible or not */ - var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight || + var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll")) ? iSanityWidth+o.oScroll.iBarWidth : iSanityWidth; /* IE6/7 are a law unto themselves... */ - if ( ie67 && (nScrollBody.scrollHeight > + if ( ie67 && (nScrollBody.scrollHeight > nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") ) { o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sizing.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sizing.js index 9632ca26..86e5f492 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sizing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sizing.js @@ -55,7 +55,7 @@ function _fnCalculateColumnWidths ( oSettings ) if ( oSettings.aoColumns[i].sWidth !== null ) { - iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig, + iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig, nWrapper ); if ( iTmpWidth !== null ) { @@ -67,8 +67,8 @@ function _fnCalculateColumnWidths ( oSettings ) } } - /* If the number of columns in the DOM equals the number that we have to process in - * DataTables, then we can use the offsets that are created by the web-browser. No custom + /* If the number of columns in the DOM equals the number that we have to process in + * DataTables, then we can use the offsets that are created by the web-browser. No custom * sizes can be set in order for this to happen, nor scrolling used */ if ( iColums == oHeaders.length && iUserInputs === 0 && iVisibleColumns == iColums && @@ -197,7 +197,7 @@ function _fnCalculateColumnWidths ( oSettings ) oNodes = _fnGetUniqueThs( oSettings, $('thead', nCalcTmp)[0] ); } - /* Browsers need a bit of a hand when a width is assigned to any columns when + /* Browsers need a bit of a hand when a width is assigned to any columns when * x-scrolling as they tend to collapse the table to the min-width, even if * we sent the column widths. So we need to keep track of what the table width * should be by summing the user given values, and the automatic values @@ -369,7 +369,7 @@ function _fnStringToCss( s ) * @memberof DataTable#oApi */ function _fnScrollBarWidth () -{ +{ var inner = document.createElement('p'); var style = inner.style; style.width = "100%"; @@ -398,6 +398,6 @@ function _fnScrollBarWidth () } document.body.removeChild(outer); - return (w1 - w2); + return (w1 - w2); } diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sort.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sort.js index c1102a4e..5d168a5e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.sort.js @@ -17,7 +17,7 @@ function _fnSort ( oSettings, bApplyClasses ) oAria = oSettings.oLanguage.oAria; /* No sorting required if server-side or no sorting array */ - if ( !oSettings.oFeatures.bServerSide && + if ( !oSettings.oFeatures.bServerSide && (oSettings.aaSorting.length !== 0 || oSettings.aaSortingFixed !== null) ) { aaSort = ( oSettings.aaSortingFixed !== null ) ? @@ -34,7 +34,7 @@ function _fnSort ( oSettings, bApplyClasses ) sDataType = oSettings.aoColumns[ iColumn ].sSortDataType; if ( DataTable.ext.afnSortData[sDataType] ) { - var aData = DataTable.ext.afnSortData[sDataType].call( + var aData = DataTable.ext.afnSortData[sDataType].call( oSettings.oInstance, oSettings, iColumn, iVisColumn ); if ( aData.length === aoData.length ) @@ -97,7 +97,7 @@ function _fnSort ( oSettings, bApplyClasses ) * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] ); * } * Basically we have a test for each sorting column, if the data in that column is equal, - * test the next column. If all columns match, then we use a numeric sort on the row + * test the next column. If all columns match, then we use a numeric sort on the row * positions in the original data array to provide a stable sort. */ oSettings.aiDisplayMaster.sort( function ( a, b ) { @@ -146,7 +146,7 @@ function _fnSort ( oSettings, bApplyClasses ) { nTh.setAttribute('aria-sort', aaSort[0][1]=="asc" ? "ascending" : "descending" ); - var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ? + var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ? aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0]; nTh.setAttribute('aria-label', sTitle+ (nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) ); @@ -202,14 +202,14 @@ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) /* * This is a little bit odd I admit... I declare a temporary function inside the scope of - * _fnBuildHead and the click handler in order that the code presented here can be used - * twice - once for when bProcessing is enabled, and another time for when it is + * _fnBuildHead and the click handler in order that the code presented here can be used + * twice - once for when bProcessing is enabled, and another time for when it is * disabled, as we need to perform slightly different actions. - * Basically the issue here is that the Javascript engine in modern browsers don't + * Basically the issue here is that the Javascript engine in modern browsers don't * appear to allow the rendering engine to update the display while it is still executing - * it's thread (well - it does but only after long intervals). This means that the + * it's thread (well - it does but only after long intervals). This means that the * 'processing' display doesn't appear for a table sort. To break the js thread up a bit - * I force an execution break by using setTimeout - but this breaks the expected + * I force an execution break by using setTimeout - but this breaks the expected * thread continuation for the end-developer's point of view (their code would execute * too early), so we only do it when we absolutely have to. */ @@ -247,7 +247,7 @@ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) /* No sort yet - add it in */ if ( bFound === false ) { - oSettings.aaSorting.push( [ iDataIndex, + oSettings.aaSorting.push( [ iDataIndex, oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] ); } } @@ -268,7 +268,7 @@ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) else { oSettings.aaSorting.splice( 0, oSettings.aaSorting.length ); - oSettings.aaSorting.push( [ iDataIndex, + oSettings.aaSorting.push( [ iDataIndex, oSettings.aoColumns[iDataIndex].asSorting[0], 0 ] ); } } @@ -303,7 +303,7 @@ function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback ) /** - * Set the sorting classes on the header, Note: it is safe to call this function + * Set the sorting classes on the header, Note: it is safe to call this function * when bSort and bSortClasses are false * @param {object} oSettings dataTables settings object * @memberof DataTable#oApi @@ -356,7 +356,7 @@ function _fnSortingClasses( oSettings ) { /* jQuery UI uses extra markup */ var jqSpan = $("span."+oClasses.sSortIcon, oSettings.aoColumns[i].nTh); - jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+ + jqSpan.removeClass(oClasses.sSortJUIAsc +" "+ oClasses.sSortJUIDesc +" "+ oClasses.sSortJUI +" "+ oClasses.sSortJUIAscAllowed +" "+ oClasses.sSortJUIDescAllowed ); var sSpanClass; @@ -385,11 +385,11 @@ function _fnSortingClasses( oSettings ) } } - /* + /* * Apply the required classes to the table body * Note that this is given as a feature switch since it can significantly slow down a sort * on large data sets (adding and removing of classes is always slow at the best of times..) - * Further to this, note that this code is admittedly fairly ugly. It could be made a lot + * Further to this, note that this code is admittedly fairly ugly. It could be made a lot * simpler using jQuery selectors and add/removeClass, but that is significantly slower * (on the order of 5 times slower) - hence the direct DOM manipulation here. * Note that for deferred drawing we do use jQuery - the reason being that taking the first diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.state.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.state.js index 300b7d47..f99f0437 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.state.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.state.js @@ -108,7 +108,7 @@ function _fnCreateCookie ( sName, sValue, iSecs, sBaseName, fnCallback ) var date = new Date(); date.setTime( date.getTime()+(iSecs*1000) ); - /* + /* * Shocking but true - it would appear IE has major issues with having the path not having * a trailing slash on it. We need the cookie to be available based on the path, so we * have to append the file name to the cookie name. Appalling. Thanks to vex for adding the @@ -120,7 +120,7 @@ function _fnCreateCookie ( sName, sValue, iSecs, sBaseName, fnCallback ) if ( fnCallback !== null ) { - oData = (typeof $.parseJSON === 'function') ? + oData = (typeof $.parseJSON === 'function') ? $.parseJSON( sValue ) : eval( '('+sValue+')' ); sFullCookie = fnCallback( sNameFile, oData, date.toGMTString(), aParts.join('/')+"/" ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.support.js b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.support.js index dd5ad4c9..a3405607 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/core/core.support.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/core/core.support.js @@ -43,7 +43,7 @@ function _fnGetTrNodes ( oSettings ) /** * Return an flat array with all TD nodes for the table, or row * @param {object} oSettings dataTables settings object - * @param {int} [iIndividualRow] aoData index to get the nodes for - optional + * @param {int} [iIndividualRow] aoData index to get the nodes for - optional * if not given then the return array will contain all nodes for the table * @returns {array} TD array * @memberof DataTable#oApi @@ -270,7 +270,7 @@ function _fnCallbackFire( oSettings, sStore, sTrigger, aArgs ) /** * JSON stringify. If JSON.stringify it provided by the browser, json2.js or any other - * library, then we use that as it is fast, safe and accurate. If the function isn't + * library, then we use that as it is fast, safe and accurate. If the function isn't * available then we need to built it ourselves - the inspiration for this function comes * from Craig Buckler ( http://www.sitepoint.com/javascript-json-serialization/ ). It is * not perfect and absolutely should not be used as a replacement to json2.js - but it does diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.paging.js b/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.paging.js index 4183646a..10f5e6e8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.paging.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.paging.js @@ -1,6 +1,6 @@ /* * Variable: oPagination - * Purpose: + * Purpose: * Scope: jQuery.fn.dataTableExt */ $.extend( DataTable.ext.oPagination, { @@ -83,7 +83,7 @@ $.extend( DataTable.ext.oPagination, { /* Previous page */ nNode.className = ( oSettings._iDisplayStart === 0 ) ? oClasses.sPagePrevDisabled : oClasses.sPagePrevEnabled; - + /* Next page */ nNode = nNode.nextSibling; nNode.className = ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) ? @@ -241,12 +241,12 @@ $.extend( DataTable.ext.oPagination, { /* Update the permanent button's classes */ anButtons = nNode.getElementsByTagName('a'); anStatic = [ - anButtons[0], anButtons[1], + anButtons[0], anButtons[1], anButtons[anButtons.length-2], anButtons[anButtons.length-1] ]; $(anStatic).removeClass( oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled ); - $([anStatic[0], anStatic[1]]).addClass( + $([anStatic[0], anStatic[1]]).addClass( (iCurrentPage==1) ? oClasses.sPageButtonStaticDisabled : oClasses.sPageButton diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.types.js b/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.types.js index ffd4e143..1d67ccc3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.types.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/ext/ext.types.js @@ -25,17 +25,17 @@ $.extend( DataTable.ext.aTypes, [ var bDecimal = false; /* Check for a valid first char (no period and allow negatives) */ - Char = sData.charAt(0); - if (sValidFirstChars.indexOf(Char) == -1) + Char = sData.charAt(0); + if (sValidFirstChars.indexOf(Char) == -1) { return null; } /* Check all the other characters are valid */ - for ( var i=1 ; iDeprecated When using fnRender, you have two options for what - * to do with the data, and this property serves as the switch. Firstly, you - * can have the sorting and filtering use the rendered value (true - default), + * Deprecated When using fnRender, you have two options for what + * to do with the data, and this property serves as the switch. Firstly, you + * can have the sorting and filtering use the rendered value (true - default), * or you can have the sorting and filtering us the original value (false). * * Please note that this option has now been deprecated and will be removed @@ -94,12 +94,12 @@ DataTable.models.oColumn = { * Function to get data from a cell in a column. You should never * access data directly through _aData internally in DataTables - always use * the method attached to this property. It allows mData to function as - * required. This function is automatically assigned by the column + * required. This function is automatically assigned by the column * initialisation method * @type function - * @param {array|object} oData The data array/object for the array + * @param {array|object} oData The data array/object for the array * (i.e. aoData[]._aData) - * @param {string} sSpecific The specific data type you want to get - + * @param {string} sSpecific The specific data type you want to get - * 'display', 'type' 'filter' 'sort' * @returns {*} The data for the cell from the given row's data * @default null @@ -107,7 +107,7 @@ DataTable.models.oColumn = { "fnGetData": null, /** - * Deprecated Custom display function that will be called for the + * Deprecated Custom display function that will be called for the * display of each cell in this column. * * Please note that this option has now been deprecated and will be removed @@ -126,12 +126,12 @@ DataTable.models.oColumn = { "fnRender": null, /** - * Function to set data for a cell in the column. You should never + * Function to set data for a cell in the column. You should never * set the data directly to _aData internally in DataTables - always use * this method. It allows mData to function as required. This function * is automatically assigned by the column initialisation method * @type function - * @param {array|object} oData The data array/object for the array + * @param {array|object} oData The data array/object for the array * (i.e. aoData[]._aData) * @param {*} sValue Value to set * @default null @@ -139,7 +139,7 @@ DataTable.models.oColumn = { "fnSetData": null, /** - * Property to read the value for the cells in the column from the data + * Property to read the value for the cells in the column from the data * source array / object. If null, then the default content is used, if a * function is given then the return from the function is used. * @type function|int|string|null @@ -166,8 +166,8 @@ DataTable.models.oColumn = { "nTh": null, /** - * Unique footer TH/TD element for this column (if there is one). Not used - * in DataTables as such, but can be used for plug-ins to reference the + * Unique footer TH/TD element for this column (if there is one). Not used + * in DataTables as such, but can be used for plug-ins to reference the * footer for each column. * @type node * @default null @@ -185,7 +185,7 @@ DataTable.models.oColumn = { * When DataTables calculates the column widths to assign to each column, * it finds the longest string in each column and then constructs a * temporary table and reads the widths from that. The problem with this - * is that "mmm" is much wider then "iiii", but the latter is a longer + * is that "mmm" is much wider then "iiii", but the latter is a longer * string - thus the calculation can go wrong (doing it properly and putting * it into an DOM object and measuring that is horribly(!) slow). Thus as * a "work around" we provide this option. It will append its value to the diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.columns.js b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.columns.js index 9387fe2c..8d56d0e7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.columns.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.columns.js @@ -6,13 +6,13 @@ */ DataTable.defaults.columns = { /** - * Allows a column's sorting to take multiple columns into account when - * doing a sort. For example first name / last name columns make sense to + * Allows a column's sorting to take multiple columns into account when + * doing a sort. For example first name / last name columns make sense to * do a multi-column sort over the two columns. * @type array * @default null Takes the value of the column index automatically * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { @@ -24,7 +24,7 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { @@ -49,7 +49,7 @@ DataTable.defaults.columns = { * @type array * @default [ 'asc', 'desc' ] * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { @@ -61,7 +61,7 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { @@ -84,21 +84,21 @@ DataTable.defaults.columns = { * @type boolean * @default true * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "bSearchable": false, "aTargets": [ 0 ] } * ] } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "bSearchable": false }, * null, * null, @@ -115,21 +115,21 @@ DataTable.defaults.columns = { * @type boolean * @default true * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "bSortable": false, "aTargets": [ 0 ] } * ] } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "bSortable": false }, * null, * null, @@ -142,11 +142,11 @@ DataTable.defaults.columns = { /** - * Deprecated When using fnRender() for a column, you may wish - * to use the original data (before rendering) for sorting and filtering - * (the default is to used the rendered data that the user can see). This + * Deprecated When using fnRender() for a column, you may wish + * to use the original data (before rendering) for sorting and filtering + * (the default is to used the rendered data that the user can see). This * may be useful for dates etc. - * + * * Please note that this option has now been deprecated and will be removed * in the next version of DataTables. Please use mRender / mData rather than * fnRender. @@ -163,21 +163,21 @@ DataTable.defaults.columns = { * @type boolean * @default true * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "bVisible": false, "aTargets": [ 0 ] } * ] } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "bVisible": false }, * null, * null, @@ -201,7 +201,7 @@ DataTable.defaults.columns = { * @param {int} iRow The row index for the aoData data store * @param {int} iCol The column index for aoColumns * @dtopt Columns - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -220,7 +220,7 @@ DataTable.defaults.columns = { /** - * Deprecated Custom display function that will be called for the + * Deprecated Custom display function that will be called for the * display of each cell in this column. * * Please note that this option has now been deprecated and will be removed @@ -248,22 +248,22 @@ DataTable.defaults.columns = { * @type int * @default -1 Use automatically calculated column index * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "iDataSort": 1, "aTargets": [ 0 ] } * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "iDataSort": 1 }, * null, * null, @@ -297,15 +297,15 @@ DataTable.defaults.columns = { * data source. *
  • null - the sDefaultContent option will be used for the cell (null * by default, so you will need to specify the default content you want - - * typically an empty string). This can be useful on generated columns such + * typically an empty string). This can be useful on generated columns such * as edit / delete action columns.
  • - *
  • function - the function given will be executed whenever DataTables - * needs to set or get the data for a cell in the column. The function + *
  • function - the function given will be executed whenever DataTables + * needs to set or get the data for a cell in the column. The function * takes three parameters: *
      *
    • {array|object} The data source for the row
    • *
    • {string} The type call data requested - this will be 'set' when - * setting data or 'filter', 'display', 'type', 'sort' or undefined when + * setting data or 'filter', 'display', 'type', 'sort' or undefined when * gathering data. Note that when undefined is given for the type * DataTables expects to get the raw data for the object back
    • *
    • {*} Data to set when the second parameter is 'set'.
    • @@ -322,7 +322,7 @@ DataTable.defaults.columns = { * @type string|int|function|null * @default null Use automatically calculated column index * @dtopt Columns - * + * * @example * // Read table data from objects * $(document).ready( function() { @@ -337,7 +337,7 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using mData as a function to provide different information for * // sorting, filtering and display. In this case, currency (price) @@ -375,7 +375,7 @@ DataTable.defaults.columns = { * but not altering the underlying data for the table, use this property. mData * can actually do everything this property can and more, but this parameter is * easier to use since there is no 'set' option. Like mData is can be given - * in a number of different ways to effect its behaviour, with the addition of + * in a number of different ways to effect its behaviour, with the addition of * supporting array syntax for easy outputting of arrays (including arrays of * objects): *
        @@ -388,12 +388,12 @@ DataTable.defaults.columns = { * brackets, these characters are used to join the data source array together. * For example: "accounts[, ].name" would result in a comma separated list with * the 'name' value from the 'accounts' array of objects. - *
      • function - the function given will be executed whenever DataTables - * needs to set or get the data for a cell in the column. The function + *
      • function - the function given will be executed whenever DataTables + * needs to set or get the data for a cell in the column. The function * takes three parameters: *
          *
        • {array|object} The data source for the row (based on mData)
        • - *
        • {string} The type call data requested - this will be 'filter', 'display', + *
        • {string} The type call data requested - this will be 'filter', 'display', * 'type' or 'sort'.
        • *
        • {array|object} The full data source for the row (not based on mData)
        • *
        @@ -403,7 +403,7 @@ DataTable.defaults.columns = { * @type string|int|function|null * @default null Use mData * @dtopt Columns - * + * * @example * // Create a comma separated list from an array of objects * $(document).ready( function() { @@ -419,7 +419,7 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Use as a function to create a link from the data source * $(document).ready( function() { @@ -445,7 +445,7 @@ DataTable.defaults.columns = { * @type string * @default td * @dtopt Columns - * + * * @example * // Make the first column use TH cells * $(document).ready( function() { @@ -465,22 +465,22 @@ DataTable.defaults.columns = { * @type string * @default Empty string * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "sClass": "my_class", "aTargets": [ 0 ] } * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "sClass": "my_class" }, * null, * null, @@ -496,22 +496,22 @@ DataTable.defaults.columns = { * When DataTables calculates the column widths to assign to each column, * it finds the longest string in each column and then constructs a * temporary table and reads the widths from that. The problem with this - * is that "mmm" is much wider then "iiii", but the latter is a longer + * is that "mmm" is much wider then "iiii", but the latter is a longer * string - thus the calculation can go wrong (doing it properly and putting * it into an DOM object and measuring that is horribly(!) slow). Thus as * a "work around" we provide this option. It will append its value to the * text that is found to be the longest string for the column - i.e. padding. - * Generally you shouldn't need this, and it is not documented on the + * Generally you shouldn't need this, and it is not documented on the * general DataTables.net documentation * @type string * @default Empty string * @dtopt Columns - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * null, * null, * null, @@ -532,12 +532,12 @@ DataTable.defaults.columns = { * @type string * @default null * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { * "mData": null, * "sDefaultContent": "Edit", @@ -546,12 +546,12 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * null, * null, * null, @@ -576,12 +576,12 @@ DataTable.defaults.columns = { * @type string * @default Empty string * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "sName": "engine", "aTargets": [ 0 ] }, * { "sName": "browser", "aTargets": [ 1 ] }, * { "sName": "platform", "aTargets": [ 2 ] }, @@ -590,12 +590,12 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "sName": "engine" }, * { "sName": "browser" }, * { "sName": "platform" }, @@ -616,7 +616,7 @@ DataTable.defaults.columns = { * @type string * @default std * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { @@ -629,7 +629,7 @@ DataTable.defaults.columns = { * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { @@ -651,25 +651,25 @@ DataTable.defaults.columns = { /** * The title of this column. * @type string - * @default null Derived from the 'TH' value for this column in the + * @default null Derived from the 'TH' value for this column in the * original HTML table. * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "sTitle": "My column title", "aTargets": [ 0 ] } * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "sTitle": "My column title" }, * null, * null, @@ -693,22 +693,22 @@ DataTable.defaults.columns = { * @type string * @default null Auto-detected from raw data * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "sType": "html", "aTargets": [ 0 ] } * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "sType": "html" }, * null, * null, @@ -729,22 +729,22 @@ DataTable.defaults.columns = { * @type string * @default null Automatic * @dtopt Columns - * + * * @example * // Using aoColumnDefs * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumnDefs": [ + * "aoColumnDefs": [ * { "sWidth": "20%", "aTargets": [ 0 ] } * ] * } ); * } ); - * + * * @example * // Using aoColumns * $(document).ready( function() { * $('#example').dataTable( { - * "aoColumns": [ + * "aoColumns": [ * { "sWidth": "20%" }, * null, * null, diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.js b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.js index 779f19d8..16ee0d0c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.defaults.js @@ -1,20 +1,20 @@ /** - * Initialisation options that can be given to DataTables at initialisation + * Initialisation options that can be given to DataTables at initialisation * time. * @namespace */ DataTable.defaults = { /** - * An array of data to use for the table, passed in at initialisation which + * An array of data to use for the table, passed in at initialisation which * will be used in preference to any data which is already in the DOM. This is * particularly useful for constructing tables purely in Javascript, for * example with a custom Ajax call. * @type array * @default null * @dtopt Option - * + * * @example * // Using a 2D array data source * $(document).ready( function () { @@ -32,7 +32,7 @@ DataTable.defaults = { * ] * } ); * } ); - * + * * @example * // Using an array of objects as a data source (mData) * $(document).ready( function () { @@ -67,15 +67,15 @@ DataTable.defaults = { /** - * If sorting is enabled, then DataTables will perform a first pass sort on - * initialisation. You can define which column(s) the sort is performed upon, - * and the sorting direction, with this variable. The aaSorting array should - * contain an array for each column to be sorted initially containing the + * If sorting is enabled, then DataTables will perform a first pass sort on + * initialisation. You can define which column(s) the sort is performed upon, + * and the sorting direction, with this variable. The aaSorting array should + * contain an array for each column to be sorted initially containing the * column's index and a direction string ('asc' or 'desc'). * @type array * @default [[0,'asc']] * @dtopt Option - * + * * @example * // Sort by 3rd column first, and then 4th column * $(document).ready( function() { @@ -83,7 +83,7 @@ DataTable.defaults = { * "aaSorting": [[2,'asc'], [3,'desc']] * } ); * } ); - * + * * // No initial sorting * $(document).ready( function() { * $('#example').dataTable( { @@ -95,16 +95,16 @@ DataTable.defaults = { /** - * This parameter is basically identical to the aaSorting parameter, but - * cannot be overridden by user interaction with the table. What this means - * is that you could have a column (visible or hidden) which the sorting will - * always be forced on first - any sorting after that (from the user) will - * then be performed as required. This can be useful for grouping rows + * This parameter is basically identical to the aaSorting parameter, but + * cannot be overridden by user interaction with the table. What this means + * is that you could have a column (visible or hidden) which the sorting will + * always be forced on first - any sorting after that (from the user) will + * then be performed as required. This can be useful for grouping rows * together. * @type array * @default null * @dtopt Option - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -117,22 +117,22 @@ DataTable.defaults = { /** * This parameter allows you to readily specify the entries in the length drop - * down menu that DataTables shows when pagination is enabled. It can be - * either a 1D array of options which will be used for both the displayed - * option and the value, or a 2D array which will use the array in the first - * position as the value, and the array in the second position as the + * down menu that DataTables shows when pagination is enabled. It can be + * either a 1D array of options which will be used for both the displayed + * option and the value, or a 2D array which will use the array in the first + * position as the value, and the array in the second position as the * displayed options (useful for language strings such as 'All'). * @type array * @default [ 10, 25, 50, 100 ] * @dtopt Option - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { * "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]] * } ); * } ); - * + * * @example * // Setting the default display length as well as length menu * // This is likely to be wanted if you remove the '10' option which @@ -150,7 +150,7 @@ DataTable.defaults = { /** * The aoColumns option in the initialisation parameter allows you to define * details about the way individual columns behave. For a full list of - * column options that can be set, please see + * column options that can be set, please see * {@link DataTable.defaults.columns}. Note that if you use aoColumns to * define your columns, you must have an entry in the array for every single * column that you have in your table (these can be null if you don't which @@ -160,11 +160,11 @@ DataTable.defaults = { "aoColumns": null, /** - * Very similar to aoColumns, aoColumnDefs allows you to target a specific - * column, multiple columns, or all columns, using the aTargets property of - * each object in the array. This allows great flexibility when creating - * tables, as the aoColumnDefs arrays can be of any length, targeting the - * columns you specifically want. aoColumnDefs may use any of the column + * Very similar to aoColumns, aoColumnDefs allows you to target a specific + * column, multiple columns, or all columns, using the aTargets property of + * each object in the array. This allows great flexibility when creating + * tables, as the aoColumnDefs arrays can be of any length, targeting the + * columns you specifically want. aoColumnDefs may use any of the column * options available: {@link DataTable.defaults.columns}, but it _must_ * have aTargets defined in each object in the array. Values in the aTargets * array may be: @@ -181,14 +181,14 @@ DataTable.defaults = { /** * Basically the same as oSearch, this parameter defines the individual column - * filtering state at initialisation time. The array must be of the same size + * filtering state at initialisation time. The array must be of the same size * as the number of columns, and each element be an object with the parameters * "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also * accepted and the default will be used. * @type array * @default [] * @dtopt Option - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -205,14 +205,14 @@ DataTable.defaults = { /** - * An array of CSS classes that should be applied to displayed rows. This - * array may be of any length, and DataTables will apply each class + * An array of CSS classes that should be applied to displayed rows. This + * array may be of any length, and DataTables will apply each class * sequentially, looping when required. * @type array * @default null Will take the values determined by the oClasses.sStripe* * options * @dtopt Option - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -230,7 +230,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -250,7 +250,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Features - * + * * @example * $(document).ready( function() { * var oTable = $('#example').dataTable( { @@ -263,21 +263,21 @@ DataTable.defaults = { /** - * Replace a DataTable which matches the given selector and replace it with + * Replace a DataTable which matches the given selector and replace it with * one which has the properties of the new initialisation object passed. If no * table matches the selector, then the new DataTable will be constructed as * per normal. * @type boolean * @default false * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { * "sScrollY": "200px", * "bPaginate": false * } ); - * + * * // Some time later.... * $('#example').dataTable( { * "bFilter": false, @@ -299,7 +299,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -311,13 +311,13 @@ DataTable.defaults = { /** - * Enable or disable the table information display. This shows information + * Enable or disable the table information display. This shows information * about the data that is currently visible on the page, including information * about filtered data if that action is being performed. * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -335,7 +335,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Features - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -352,7 +352,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -368,7 +368,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -387,7 +387,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -409,13 +409,13 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Options - * + * * @example * $(document).ready( function() { * initTable(); * tableActions(); * } ); - * + * * function initTable () * { * return $('#example').dataTable( { @@ -424,11 +424,11 @@ DataTable.defaults = { * "bRetrieve": true * } ); * } - * + * * function tableActions () * { * var oTable = initTable(); - * // perform API operations with oTable + * // perform API operations with oTable * } */ "bRetrieve": false, @@ -441,7 +441,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -463,7 +463,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -485,7 +485,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Features - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -506,7 +506,7 @@ DataTable.defaults = { * @default false * @dtopt Features * @dtopt Server-side - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -524,7 +524,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -542,7 +542,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -562,7 +562,7 @@ DataTable.defaults = { * @type boolean * @default true * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -581,7 +581,7 @@ DataTable.defaults = { * @type boolean * @default false * @dtopt Features - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -606,7 +606,7 @@ DataTable.defaults = { * @returns {string} Cookie formatted string (which should be encoded by * using encodeURIComponent()) * @dtopt Callbacks - * + * * @example * $(document).ready( function () { * $('#example').dataTable( { @@ -629,7 +629,7 @@ DataTable.defaults = { * @param {array} aData Raw data array for this row * @param {int} iDataIndex The index of this row in aoData * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -652,7 +652,7 @@ DataTable.defaults = { * @type function * @param {object} oSettings DataTables settings object * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -671,14 +671,14 @@ DataTable.defaults = { * @type function * @param {node} nFoot "TR" element for the footer * @param {array} aData Full table data (as derived from the original HTML) - * @param {int} iStart Index for the current display starting point in the + * @param {int} iStart Index for the current display starting point in the * display array - * @param {int} iEnd Index for the current display ending point in the + * @param {int} iEnd Index for the current display ending point in the * display array * @param {array int} aiDisplay Index array to translate the visual position * to the full data array * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -702,7 +702,7 @@ DataTable.defaults = { * @param {int} iIn number to be formatted * @returns {string} formatted string for DataTables to show the number * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -710,11 +710,11 @@ DataTable.defaults = { * if ( iIn < 1000 ) { * return iIn; * } else { - * var - * s=(iIn+""), - * a=s.split(""), out="", + * var + * s=(iIn+""), + * a=s.split(""), out="", * iLen=s.length; - * + * * for ( var i=0 ; i<iLen ; i++ ) { * if ( i%3 === 0 && i !== 0 ) { * out = "'"+out; @@ -762,7 +762,7 @@ DataTable.defaults = { * @param {array int} aiDisplay Index array to translate the visual position * to the full data array * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -792,7 +792,7 @@ DataTable.defaults = { * own rules * @returns {string} The string to be displayed in the information element. * @dtopt Callbacks - * + * * @example * $('#example').dataTable( { * "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) { @@ -813,7 +813,7 @@ DataTable.defaults = { * @param {object} json The JSON object request from the server - only * present if client-side Ajax sourced data is used * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -835,7 +835,7 @@ DataTable.defaults = { * @returns {boolean} False will cancel the draw, anything else (including no * return) will allow it to complete. * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -861,7 +861,7 @@ DataTable.defaults = { * @param {int} iDisplayIndexFull The index of the data in the full list of * rows (after filtering) * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -893,7 +893,7 @@ DataTable.defaults = { * @param {object} oSettings DataTables settings object * @dtopt Callbacks * @dtopt Server-side - * + * * @example * // POST data to server * $(document).ready( function() { @@ -903,10 +903,10 @@ DataTable.defaults = { * "sAjaxSource": "xhr.php", * "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { * oSettings.jqXHR = $.ajax( { - * "dataType": 'json', - * "type": "POST", - * "url": sSource, - * "data": aoData, + * "dataType": 'json', + * "type": "POST", + * "url": sSource, + * "data": aoData, * "success": fnCallback * } ); * } @@ -954,7 +954,7 @@ DataTable.defaults = { * as this is passed by reference. * @dtopt Callbacks * @dtopt Server-side - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -979,14 +979,14 @@ DataTable.defaults = { * @param {object} oSettings DataTables settings object * @return {object} The DataTables state object to be loaded * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { * "bStateSave": true, * "fnStateLoad": function (oSettings) { * var o; - * + * * // Send an Ajax request to the server to get the data. Note that * // this is a synchronous request. * $.ajax( { @@ -997,7 +997,7 @@ DataTable.defaults = { * o = json; * } * } ); - * + * * return o; * } * } ); @@ -1008,7 +1008,7 @@ DataTable.defaults = { var oData; try { - oData = (typeof $.parseJSON === 'function') ? + oData = (typeof $.parseJSON === 'function') ? $.parseJSON(sData) : eval( '('+sData+')' ); } catch (e) { oData = null; @@ -1021,14 +1021,14 @@ DataTable.defaults = { /** * Callback which allows modification of the saved state prior to loading that state. * This callback is called when the table is loading state from the stored data, but - * prior to the settings object being modified by the saved state. Note that for - * plug-in authors, you should use the 'stateLoadParams' event to load parameters for + * prior to the settings object being modified by the saved state. Note that for + * plug-in authors, you should use the 'stateLoadParams' event to load parameters for * a plug-in. * @type function * @param {object} oSettings DataTables settings object * @param {object} oData The state object that is to be loaded * @dtopt Callbacks - * + * * @example * // Remove a saved filter, so filtering is never loaded * $(document).ready( function() { @@ -1039,7 +1039,7 @@ DataTable.defaults = { * } * } ); * } ); - * + * * @example * // Disallow state loading by returning false * $(document).ready( function() { @@ -1061,7 +1061,7 @@ DataTable.defaults = { * @param {object} oSettings DataTables settings object * @param {object} oData The state object that was loaded * @dtopt Callbacks - * + * * @example * // Show an alert with the filtering value that was saved * $(document).ready( function() { @@ -1085,7 +1085,7 @@ DataTable.defaults = { * @param {object} oSettings DataTables settings object * @param {object} oData The state object to be saved * @dtopt Callbacks - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1104,27 +1104,27 @@ DataTable.defaults = { * } ); */ "fnStateSave": function ( oSettings, oData ) { - this.oApi._fnCreateCookie( - oSettings.sCookiePrefix+oSettings.sInstance, - this.oApi._fnJsonString(oData), - oSettings.iCookieDuration, - oSettings.sCookiePrefix, + this.oApi._fnCreateCookie( + oSettings.sCookiePrefix+oSettings.sInstance, + this.oApi._fnJsonString(oData), + oSettings.iCookieDuration, + oSettings.sCookiePrefix, oSettings.fnCookieCallback ); }, /** - * Callback which allows modification of the state to be saved. Called when the table + * Callback which allows modification of the state to be saved. Called when the table * has changed state a new state save is required. This method allows modification of - * the state saving object prior to actually doing the save, including addition or - * other state properties or modification. Note that for plug-in authors, you should + * the state saving object prior to actually doing the save, including addition or + * other state properties or modification. Note that for plug-in authors, you should * use the 'stateSaveParams' event to save parameters for a plug-in. * @type function * @param {object} oSettings DataTables settings object * @param {object} oData The state object to be saved * @dtopt Callbacks - * + * * @example * // Remove a saved filter, so filtering is never saved * $(document).ready( function() { @@ -1145,7 +1145,7 @@ DataTable.defaults = { * @type int * @default 7200 (2 hours) * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1171,7 +1171,7 @@ DataTable.defaults = { * @type int | array * @default null * @dtopt Options - * + * * @example * // 57 records available in the table, no filtering applied * $(document).ready( function() { @@ -1181,7 +1181,7 @@ DataTable.defaults = { * "iDeferLoading": 57 * } ); * } ); - * + * * @example * // 57 records after filtering, 100 without filtering (an initial filter applied) * $(document).ready( function() { @@ -1205,7 +1205,7 @@ DataTable.defaults = { * @type int * @default 10 * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1224,7 +1224,7 @@ DataTable.defaults = { * @type int * @default 0 * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1243,7 +1243,7 @@ DataTable.defaults = { * @type int * @default 100 * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1267,7 +1267,7 @@ DataTable.defaults = { * @type int * @default 0 * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1299,7 +1299,7 @@ DataTable.defaults = { * @type string * @default : activate to sort column ascending * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1320,7 +1320,7 @@ DataTable.defaults = { * @type string * @default : activate to sort column ascending * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1347,7 +1347,7 @@ DataTable.defaults = { * @type string * @default First * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1368,7 +1368,7 @@ DataTable.defaults = { * @type string * @default Last * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1384,12 +1384,12 @@ DataTable.defaults = { /** - * Text to use for the 'next' pagination button (to take the user to the + * Text to use for the 'next' pagination button (to take the user to the * next page). * @type string * @default Next * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1405,12 +1405,12 @@ DataTable.defaults = { /** - * Text to use for the 'previous' pagination button (to take the user to + * Text to use for the 'previous' pagination button (to take the user to * the previous page). * @type string * @default Previous * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1433,7 +1433,7 @@ DataTable.defaults = { * @type string * @default No data available in table * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1447,14 +1447,14 @@ DataTable.defaults = { /** - * This string gives information to the end user about the information that - * is current on display on the page. The _START_, _END_ and _TOTAL_ - * variables are all dynamically replaced as the table display updates, and + * This string gives information to the end user about the information that + * is current on display on the page. The _START_, _END_ and _TOTAL_ + * variables are all dynamically replaced as the table display updates, and * can be freely moved or removed as the language requirements change. * @type string * @default Showing _START_ to _END_ of _TOTAL_ entries * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1468,12 +1468,12 @@ DataTable.defaults = { /** - * Display information string for when the table is empty. Typically the + * Display information string for when the table is empty. Typically the * format of this string should match sInfo. * @type string * @default Showing 0 to 0 of 0 entries * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1487,13 +1487,13 @@ DataTable.defaults = { /** - * When a user filters the information in a table, this string is appended - * to the information (sInfo) to give an idea of how strong the filtering + * When a user filters the information in a table, this string is appended + * to the information (sInfo) to give an idea of how strong the filtering * is. The variable _MAX_ is dynamically updated. * @type string * @default (filtered from _MAX_ total entries) * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1514,7 +1514,7 @@ DataTable.defaults = { * @type string * @default Empty string * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1535,7 +1535,7 @@ DataTable.defaults = { * @type string * @default , * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1556,7 +1556,7 @@ DataTable.defaults = { * @type string * @default Show _MENU_ entries * @dtopt Language - * + * * @example * // Language change only * $(document).ready( function() { @@ -1566,7 +1566,7 @@ DataTable.defaults = { * } * } ); * } ); - * + * * @example * // Language and options change * $(document).ready( function() { @@ -1596,7 +1596,7 @@ DataTable.defaults = { * @type string * @default Loading... * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1615,7 +1615,7 @@ DataTable.defaults = { * @type string * @default Processing... * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1637,7 +1637,7 @@ DataTable.defaults = { * @type string * @default Search: * @dtopt Language - * + * * @example * // Input text box will be appended at the end automatically * $(document).ready( function() { @@ -1647,7 +1647,7 @@ DataTable.defaults = { * } * } ); * } ); - * + * * @example * // Specify where the filter should appear * $(document).ready( function() { @@ -1671,7 +1671,7 @@ DataTable.defaults = { * @type string * @default Empty string - i.e. disabled * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1691,7 +1691,7 @@ DataTable.defaults = { * @type string * @default No matching records found * @dtopt Language - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1716,7 +1716,7 @@ DataTable.defaults = { * @namespace * @extends DataTable.models.oSearch * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1736,7 +1736,7 @@ DataTable.defaults = { * @default aaData * @dtopt Options * @dtopt Server-side - * + * * @example * // Get data from { "data": [...] } * $(document).ready( function() { @@ -1745,7 +1745,7 @@ DataTable.defaults = { * "sAjaxDataProp": "data" * } ); * } ); - * + * * @example * // Get data from { "data": { "inner": [...] } } * $(document).ready( function() { @@ -1767,7 +1767,7 @@ DataTable.defaults = { * @default null * @dtopt Options * @dtopt Server-side - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1784,7 +1784,7 @@ DataTable.defaults = { * @type string * @default SpryMedia_DataTables_ * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1833,10 +1833,10 @@ DataTable.defaults = { *
      • *
      * @type string - * @default lfrtip (when bJQueryUI is false) or + * @default lfrtip (when bJQueryUI is false) or * <"H"lfr>t<"F"ip> (when bJQueryUI is true) * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1854,7 +1854,7 @@ DataTable.defaults = { * @type string * @default two_button * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1874,7 +1874,7 @@ DataTable.defaults = { * @type string * @default blank string - i.e. disabled * @dtopt Features - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1896,7 +1896,7 @@ DataTable.defaults = { * @type string * @default blank string - i.e. disabled * @dtopt Options - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1918,7 +1918,7 @@ DataTable.defaults = { * @type string * @default blank string - i.e. disabled * @dtopt Features - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { @@ -1937,7 +1937,7 @@ DataTable.defaults = { * @default GET * @dtopt Options * @dtopt Server-side - * + * * @example * $(document).ready( function() { * $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.ext.js b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.ext.js index 45566a62..7a5fba0a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/src/model/model.ext.js +++ b/wqflask/wqflask/static/new/packages/DataTables/src/model/model.ext.js @@ -5,7 +5,7 @@ * for plug-ins that can be used to extend the default DataTables behaviour - indeed many * of the build in methods use this method to provide their own capabilities (sorting methods * for example). - * + * * Note that this namespace is aliased to jQuery.fn.dataTableExt so it can be readily accessed * and modified by plug-ins. * @namespace @@ -40,7 +40,7 @@ DataTable.models.ext = { * * @example * // The following example shows custom filtering being applied to the fourth column (i.e. - * // the aData[3] index) based on two input values from the end-user, matching the data in + * // the aData[3] index) based on two input values from the end-user, matching the data in * // a certain range. * $.fn.dataTableExt.afnFiltering.push( * function( oSettings, aData, iDataIndex ) { @@ -74,7 +74,7 @@ DataTable.models.ext = { * static string that DataTables knows of. The way these plug-ins work is that you create * an array of the values you wish to be sorted for the column in question and then return * that array. Which pre-sorting function is run here depends on the sSortDataType parameter - * that is used for the column (if any). This is the corollary of ofnSearch for sort + * that is used for the column (if any). This is the corollary of ofnSearch for sort * data. *
        *
      • @@ -91,10 +91,10 @@ DataTable.models.ext = { *
      * *
    - * + * * Note that as of v1.9, it is typically preferable to use mData to prepare data for * the different uses that DataTables can put the data to. Specifically mData when - * used as a function will give you a 'type' (sorting, filtering etc) that you can use to + * used as a function will give you a 'type' (sorting, filtering etc) that you can use to * prepare the data as required for the different types. As such, this method is deprecated. * @type array * @default [] @@ -133,8 +133,8 @@ DataTable.models.ext = { * Function return: *
      *
    • {node|null} The element which contains your feature. Note that the return - * may also be void if your plug-in does not require to inject any DOM elements - * into DataTables control (sDom) - for example this might be useful when + * may also be void if your plug-in does not require to inject any DOM elements + * into DataTables control (sDom) - for example this might be useful when * developing a plug-in which allows table control via keyboard entry.
    • *
    * @@ -145,7 +145,7 @@ DataTable.models.ext = { * * @type array * @default [] - * + * * @example * // How TableTools initialises itself. * $.fn.dataTableExt.aoFeatures.push( { @@ -163,7 +163,7 @@ DataTable.models.ext = { * Type detection plug-in functions - DataTables utilises types to define how sorting and * filtering behave, and types can be either be defined by the developer (sType for the * column) or they can be automatically detected by the methods in this array. The functions - * defined in the array are quite simple, taking a single parameter (the data to analyse) + * defined in the array are quite simple, taking a single parameter (the data to analyse) * and returning the type if it is a known type, or null otherwise. *
      *
    • @@ -182,22 +182,22 @@ DataTable.models.ext = { *
    * @type array * @default [] - * + * * @example * // Currency type detection plug-in: * jQuery.fn.dataTableExt.aTypes.push( * function ( sData ) { * var sValidChars = "0123456789.-"; * var Char; - * + * * // Check the numeric part * for ( i=1 ; iafnSortData
    for filtering data. *
      @@ -257,10 +257,10 @@ DataTable.models.ext = { *
    * * - * + * * Note that as of v1.9, it is typically preferable to use mData to prepare data for * the different uses that DataTables can put the data to. Specifically mData when - * used as a function will give you a 'type' (sorting, filtering etc) that you can use to + * used as a function will give you a 'type' (sorting, filtering etc) that you can use to * prepare the data as required for the different types. As such, this method is deprecated. * @type object * @default {} @@ -299,8 +299,8 @@ DataTable.models.ext = { /** - * Pagination plug-in methods - The style and controls of the pagination can significantly - * impact on how the end user interacts with the data in your table, and DataTables allows + * Pagination plug-in methods - The style and controls of the pagination can significantly + * impact on how the end user interacts with the data in your table, and DataTables allows * the addition of pagination controls by extending this object, which can then be enabled * through the sPaginationType initialisation parameter. Each pagination type that * is added is an object (the property name of which is what sPaginationType refers @@ -308,12 +308,12 @@ DataTable.models.ext = { * control's state. *
      *
    • - * fnInit - Initialisation of the paging controls. Called only during initialisation - * of the table. It is expected that this function will add the required DOM elements - * to the page for the paging controls to work. The element pointer - * 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging - * controls (note that this is a 2D array to allow for multiple instances of each - * DataTables DOM element). It is suggested that you add the controls to this element + * fnInit - Initialisation of the paging controls. Called only during initialisation + * of the table. It is expected that this function will add the required DOM elements + * to the page for the paging controls to work. The element pointer + * 'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging + * controls (note that this is a 2D array to allow for multiple instances of each + * DataTables DOM element). It is suggested that you add the controls to this element * as children *
        *
      • @@ -335,7 +335,7 @@ DataTable.models.ext = { * *
      • * fnInit - This function is called whenever the paging status of the table changes and is - * typically used to update classes and/or text of the paging controls to reflex the new + * typically used to update classes and/or text of the paging controls to reflex the new * status. *
          *
        • @@ -365,53 +365,53 @@ DataTable.models.ext = { * nPrevious = document.createElement( 'span' ); * nNext = document.createElement( 'span' ); * nLast = document.createElement( 'span' ); - * + * * nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) ); * nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) ); * nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) ); * nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) ); - * + * * nFirst.className = "paginate_button first"; * nPrevious.className = "paginate_button previous"; * nNext.className="paginate_button next"; * nLast.className = "paginate_button last"; - * + * * nPaging.appendChild( nFirst ); * nPaging.appendChild( nPrevious ); * nPaging.appendChild( nNext ); * nPaging.appendChild( nLast ); - * + * * $(nFirst).click( function () { * oSettings.oApi._fnPageChange( oSettings, "first" ); * fnCallbackDraw( oSettings ); * } ); - * + * * $(nPrevious).click( function() { * oSettings.oApi._fnPageChange( oSettings, "previous" ); * fnCallbackDraw( oSettings ); * } ); - * + * * $(nNext).click( function() { * oSettings.oApi._fnPageChange( oSettings, "next" ); * fnCallbackDraw( oSettings ); * } ); - * + * * $(nLast).click( function() { * oSettings.oApi._fnPageChange( oSettings, "last" ); * fnCallbackDraw( oSettings ); * } ); - * + * * $(nFirst).bind( 'selectstart', function () { return false; } ); * $(nPrevious).bind( 'selectstart', function () { return false; } ); * $(nNext).bind( 'selectstart', function () { return false; } ); * $(nLast).bind( 'selectstart', function () { return false; } ); * }, - * + * * "fnUpdate": function ( oSettings, fnCallbackDraw ) { * if ( !oSettings.aanFeatures.p ) { * return; * } - * + * * // Loop over each instance of the pager * var an = oSettings.aanFeatures.p; * for ( var i=0, iLen=an.length ; i
        • 'l' - Length changing
        • @@ -309,7 +309,7 @@ DataTable.models.oSettings = { "asDataSearch": [], /** - * Store the applied global search information in case we want to force a + * Store the applied global search information in case we want to force a * research or compare the old search to a new one. * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. @@ -319,7 +319,7 @@ DataTable.models.oSettings = { "oPreviousSearch": {}, /** - * Store the applied search for each column - see + * Store the applied search for each column - see * {@link DataTable.models.oSearch} for the format that is used for the * filtering information for each column. * @type array @@ -369,7 +369,7 @@ DataTable.models.oSettings = { "asDestroyStripes": [], /** - * If restoring a table - we should restore its width + * If restoring a table - we should restore its width * @type int * @default 0 */ @@ -411,7 +411,7 @@ DataTable.models.oSettings = { "aoRowCreatedCallback": [], /** - * Callback functions for just before the table is redrawn. A return of + * Callback functions for just before the table is redrawn. A return of * false will be used to cancel the draw. * @type array * @default [] @@ -493,7 +493,7 @@ DataTable.models.oSettings = { "nTableWrapper": null, /** - * Indicate if when using server-side processing the loading of data + * Indicate if when using server-side processing the loading of data * should be deferred until the second draw. * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. @@ -531,7 +531,7 @@ DataTable.models.oSettings = { * Which type of pagination should be used. * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. - * @type string + * @type string * @default two_button */ "sPaginationType": "two_button", @@ -564,12 +564,12 @@ DataTable.models.oSettings = { "fnCookieCallback": null, /** - * Array of callback functions for state saving. Each array element is an + * Array of callback functions for state saving. Each array element is an * object with the following parameters: *
            *
          • function:fn - function to call. Takes two parameters, oSettings * and the JSON string to save that has been thus far created. Returns - * a JSON string to be inserted into a json object + * a JSON string to be inserted into a json object * (i.e. '"param": [ 0, 1, 2]')
          • *
          • string:sName - name of callback
          • *
          @@ -579,10 +579,10 @@ DataTable.models.oSettings = { "aoStateSave": [], /** - * Array of callback functions for state loading. Each array element is an + * Array of callback functions for state loading. Each array element is an * object with the following parameters: *
            - *
          • function:fn - function to call. Takes two parameters, oSettings + *
          • function:fn - function to call. Takes two parameters, oSettings * and the object stored. May return false to cancel state loading
          • *
          • string:sName - name of callback
          • *
          @@ -609,7 +609,7 @@ DataTable.models.oSettings = { /** * Property from a given object from which to read the table data from. This - * can be an empty string (when not server-side processing), in which case + * can be an empty string (when not server-side processing), in which case * it is assumed an an array is given directly. * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. @@ -625,8 +625,8 @@ DataTable.models.oSettings = { "bAjaxDataGet": true, /** - * The last jQuery XHR object that was used for server-side data gathering. - * This can be used for working with the XHR information in one of the + * The last jQuery XHR object that was used for server-side data gathering. + * This can be used for working with the XHR information in one of the * callbacks * @type object * @default null @@ -642,7 +642,7 @@ DataTable.models.oSettings = { "fnServerData": null, /** - * Functions which are called prior to sending an Ajax request so extra + * Functions which are called prior to sending an Ajax request so extra * parameters can easily be sent to the server * @type array * @default [] @@ -650,7 +650,7 @@ DataTable.models.oSettings = { "aoServerParams": [], /** - * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if + * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if * required). * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. @@ -758,7 +758,7 @@ DataTable.models.oSettings = { "oClasses": {}, /** - * Flag attached to the settings object so you can check in the draw + * Flag attached to the settings object so you can check in the draw * callback if filtering has been done in the draw. Deprecated in favour of * events. * @type boolean @@ -768,7 +768,7 @@ DataTable.models.oSettings = { "bFiltered": false, /** - * Flag attached to the settings object so you can check in the draw + * Flag attached to the settings object so you can check in the draw * callback if sorting has been done in the draw. Deprecated in favour of * events. * @type boolean @@ -778,8 +778,8 @@ DataTable.models.oSettings = { "bSorted": false, /** - * Indicate that if multiple rows are in the header and there is more than - * one unique cell per column, if the top one (true) or bottom one (false) + * Indicate that if multiple rows are in the header and there is more than + * one unique cell per column, if the top one (true) or bottom one (false) * should be used for sorting / title by DataTables. * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. @@ -840,7 +840,7 @@ DataTable.models.oSettings = { if ( this.oFeatures.bPaginate === false || this._iDisplayLength == -1 ) { return this._iDisplayStart+this.aiDisplay.length; } else { - return Math.min( this._iDisplayStart+this._iDisplayLength, + return Math.min( this._iDisplayStart+this._iDisplayLength, this._iRecordsDisplay ); } } else { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/controller.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/controller.js index 590b756a..c0673cb9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/controller.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/controller.js @@ -9,7 +9,7 @@ var gtoTest; function fnTestStart ( sTestInfo ) { gaoTest[ giActiveModule ].iTests++; - document.getElementById('test_info').innerHTML += + document.getElementById('test_info').innerHTML += (giActiveModule+1)+'.'+(giModuleTests+1)+'. '+sTestInfo+'... '; document.getElementById('test_number').innerHTML = giTotalTestCount+1; giModuleTests++; @@ -42,7 +42,7 @@ function fnUnitStart( iTest ) if ( !gbStop ) { giModuleTests = 0; - window.parent.test_arena.location.href = + window.parent.test_arena.location.href = (iTest==0?"":"../")+'templates/'+gaoTest[iTest].sTemplate+'.php?scripts='+gaoTest[iTest].sTest; giTest = iTest; } @@ -73,7 +73,7 @@ function fnUnitComplete() } function fnEnd( bSuccess ) -{ +{ var iEndTime = new Date().getTime(); var sTime = '
          This test run took '+parseInt((iEndTime-giStartTime)/1000, 10)+ ' second(s) to complete.'; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests/1_dom/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests/1_dom/_zero_config.js index b3a941f8..f98449a8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests/1_dom/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests/1_dom/_zero_config.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: dom_data oTest.fnStart( "Sanity checks for DataTables with DOM data" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -23,135 +23,135 @@ $(document).ready( function () { $('#example').dataTable(); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -233,14 +233,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -250,7 +250,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -261,7 +261,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -270,21 +270,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -293,14 +293,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -310,7 +310,7 @@ $(document).ready( function () { */ oTest.fnTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable(); @@ -321,21 +321,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -348,7 +348,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -379,21 +379,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -403,7 +403,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -413,7 +413,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -422,7 +422,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-complex_header.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-complex_header.js index fb173a78..b8f10abd 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-complex_header.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-complex_header.js @@ -5,43 +5,43 @@ oTest.fnStart( "Complex header" ); $(document).ready( function () { $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Sorting on colspan has no effect", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on non-unique TH and first TH has no effect", function () { $('#example thead th:eq(2)').click(); }, function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on non-unique TH and second TH will sort", function () { $('#example thead th:eq(6)').click(); }, function () { return $('#example tbody tr td:eq(4)').html() == "A"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on non-unique TH and second TH will sort - reserve", function () { $('#example thead th:eq(6)').click(); }, function () { return $('#example tbody tr td:eq(4)').html() == "X"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on unique TH will sort", function () { $('#example thead th:eq(5)').click(); }, function () { return $('#example tbody tr td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on unique TH will sort - reserve", function () { $('#example thead th:eq(5)').click(); }, function () { return $('#example tbody tr td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on unique rowspan TH will sort", function () { $('#example thead th:eq(0)').click(); }, function () { return $('#example tbody tr td:eq(0)').html() == "Gecko"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-iDraw.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-iDraw.js index efbf7415..da64689e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-iDraw.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/-iDraw.js @@ -6,31 +6,31 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "After first draw, iDraw is 1", null, function () { return oSettings.iDraw == 1; } ); - oTest.fnTest( + oTest.fnTest( "After second draw, iDraw is 2", function () { oTable.fnDraw() }, function () { return oSettings.iDraw == 2; } ); - oTest.fnTest( + oTest.fnTest( "After sort", function () { oTable.fnSort([[1,'asc']]) }, function () { return oSettings.iDraw == 3; } ); - oTest.fnTest( + oTest.fnTest( "After filter", function () { oTable.fnFilter('gecko') }, function () { return oSettings.iDraw == 4; } ); - oTest.fnTest( + oTest.fnTest( "After another filter", function () { oTable.fnFilter('gec') }, function () { return oSettings.iDraw == 5; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2512.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2512.js index e0c91798..cdc9efbf 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2512.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2512.js @@ -6,7 +6,7 @@ $(document).ready( function () { $('#example').dataTable(); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Check filtering", function () { $('#example').dataTable().fnFilter('testsearchstring'); }, function () { return $('#example tbody tr').length == 1; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530-2.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530-2.js index cba8cf81..a772c2cb 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530-2.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530-2.js @@ -5,7 +5,7 @@ $(document).ready( function () { $('#example')[0].style.width = "80%"; $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Check user width is left", null, function () { return $('#example').width() == 640; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530.js index 29e642d7..d619d79c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2530.js @@ -18,7 +18,7 @@ $(document).ready( function () { } ); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Check calculated widths", null, function () { return $('#example tbody tr td:eq(0)').width() < 100; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2569.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2569.js index 59eae2ef..4c19ca53 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2569.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2569.js @@ -3,26 +3,26 @@ oTest.fnStart( "Destroy with hidden columns" ); $(document).ready( function () { $('#example').dataTable( { - "aoColumnDefs": [ + "aoColumnDefs": [ { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, { "bVisible": false, "aTargets": [ 3 ] } ] } ); $('#example').dataTable().fnDestroy(); - oTest.fnTest( + oTest.fnTest( "Check that the number of columns in table is correct", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "And with scrolling", function () { $('#example').dataTable( { "sScrollY": 200, - "aoColumnDefs": [ + "aoColumnDefs": [ { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, { "bVisible": false, "aTargets": [ 3 ] } ] diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2600.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2600.js index 7acda55b..75ad7338 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2600.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2600.js @@ -4,37 +4,37 @@ oTest.fnStart( "2600 - Display rewind when changing length" ); $(document).ready( function () { $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Info correct on init", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Page 2", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 11 to 20 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Page 3", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 21 to 30 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Page 4", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 31 to 40 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Page 5", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 41 to 50 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Rewind", function () { $('#example_length select').val('100'); $('#example_length select').change(); }, function () { return $('#example_info').html() == "Showing 1 to 57 of 57 entries"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2608.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2608.js index e306c4fc..fd90d101 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2608.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2608.js @@ -6,7 +6,7 @@ $(document).ready( function () { "bStateSave": true } ); - oTest.fnTest( + oTest.fnTest( "Set the filter", function () { $('#example_filter input').val( '\\s*CVM\\s*$' ); @@ -15,7 +15,7 @@ $(document).ready( function () { function () { return $('#example_filter input').val() == '\\s*CVM\\s*$'; } ); - oTest.fnTest( + oTest.fnTest( "Destroy the table and remake it - checking the filter was saved", function () { $('#example').dataTable( { @@ -26,7 +26,7 @@ $(document).ready( function () { function () { return $('#example_filter input').val() == '\\s*CVM\\s*$'; } ); - oTest.fnTest( + oTest.fnTest( "Do it again without state saving and make sure filter is empty", function () { $('#example').dataTable( { @@ -36,7 +36,7 @@ $(document).ready( function () { function () { return $('#example_filter input').val() == ''; } ); - oTest.fnTest( + oTest.fnTest( "Clean up", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2635.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2635.js index 7226ea4b..7cfc38eb 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2635.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2635.js @@ -6,7 +6,7 @@ $(document).ready( function () { "bStateSave": true } ); - oTest.fnTest( + oTest.fnTest( "Set the hidden column", function () { $('#example').dataTable().fnSetColumnVis( 2, false ); @@ -14,7 +14,7 @@ $(document).ready( function () { function () { return $('#example thead th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Destroy the table and remake it - checking one column was removed", function () { $('#example').dataTable( { @@ -25,7 +25,7 @@ $(document).ready( function () { function () { return $('#example thead th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Do it again without state saving and make sure we are back to 5 columns", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2746-stable-sort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2746-stable-sort.js index fbd3cf7d..671c0148 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2746-stable-sort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2746-stable-sort.js @@ -4,7 +4,7 @@ oTest.fnStart( "2746 - Stable sorting" ); $(document).ready( function () { $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Initial sort", null, function () { @@ -18,7 +18,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Reserve initial sort", function () { $('#example thead th:eq(0)').click(); @@ -34,7 +34,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Reserve to go back to initial sort sort", function () { $('#example thead th:eq(0)').click(); @@ -50,7 +50,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Reserve initial sort again", function () { $('#example thead th:eq(0)').click(); @@ -66,7 +66,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "And once more back to the initial sort", function () { $('#example thead th:eq(0)').click(); @@ -82,7 +82,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sort on second column", function () { $('#example thead th:eq(1)').click(); @@ -98,7 +98,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Reserve sort on second column", function () { $('#example thead th:eq(1)').click(); @@ -114,7 +114,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "And back to asc sorting on second column", function () { $('#example thead th:eq(1)').click(); @@ -130,7 +130,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sort on third column, having now sorted on second", function () { $('#example thead th:eq(2)').click(); @@ -146,7 +146,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Reserve sort on third column", function () { $('#example thead th:eq(2)').click(); @@ -162,7 +162,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Return sorting on third column to asc", function () { $('#example thead th:eq(2)').click(); @@ -178,7 +178,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sort on first column having sorted on second then third columns", function () { $('#example thead th:eq(0)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2799.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2799.js index fe3a2c6c..97efa682 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2799.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2799.js @@ -4,7 +4,7 @@ oTest.fnStart( "Initialise two tables" ); $(document).ready( function () { $('table.display').dataTable(); - oTest.fnTest( + oTest.fnTest( "Check that initialisation was okay", null, function () { return true; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2840-restore-table-width.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2840-restore-table-width.js index 435213f2..93fbdac8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2840-restore-table-width.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2840-restore-table-width.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); $('#example').dataTable().fnDestroy(); - oTest.fnTest( + oTest.fnTest( "Width after destroy", null, function () { return $('#example').width() == "800"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js index 0c616b6d..40083e86 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js @@ -8,13 +8,13 @@ $(document).ready( function () { "aaSorting": [] } ); - oTest.fnTest( + oTest.fnTest( "No sort", null, function () { return $('#example tbody td:eq(3)').html() == "4"; } ); - oTest.fnTest( + oTest.fnTest( "Next page", function () { $('#example').dataTable().fnPageChange( 'next' ); @@ -22,7 +22,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Destroy the table and remake it - checking we are still on the next page", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js index 4ab695b2..70f2251f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5396-fnUpdate-arrays.js @@ -30,7 +30,7 @@ $(document).ready( function () { "etc2", [ [ "test2@daum.net", "2009-09-26" ], - [ "test2@naver.com", "2009-05-21,hide" ], + [ "test2@naver.com", "2009-05-21,hide" ], [ "lsb@naver.com", "2010-03-05" ], [ "lsb3@naver.com", ",hide" ], [ "sooboklee9@daum.net", "2010-03-05" ] @@ -57,7 +57,7 @@ $(document).ready( function () { }); - oTest.fnTest( + oTest.fnTest( "Initialisation", null, function () { @@ -65,7 +65,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Update row", function () { $('#example').dataTable().fnUpdate( [ @@ -75,7 +75,7 @@ $(document).ready( function () { "etc2", [ [ "test2@daum.net", "2009-09-26" ], - [ "test2@naver.com", "2009-05-21,hide" ], + [ "test2@naver.com", "2009-05-21,hide" ], [ "lsb@naver.com", "2010-03-05" ], [ "lsb3@naver.com", ",hide" ], [ "sooboklee9@daum.net", "2010-03-05" ] @@ -89,7 +89,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Original row preserved", null, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5508-xscroll-zero-content.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5508-xscroll-zero-content.js index f71ae8f4..5ac7e097 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5508-xscroll-zero-content.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/5508-xscroll-zero-content.js @@ -7,13 +7,13 @@ $(document).ready( function () { "bPaginate": false } ); - oTest.fnTest( + oTest.fnTest( "Width of container 800px on init with scroll", null, function () { return $('div.dataTables_scrollBody').width() == 800; } ); - oTest.fnTest( + oTest.fnTest( "Unaltered when filter applied", function () { $('#example').dataTable().fnFilter('123'); }, function () { return $('div.dataTables_scrollBody').width() == 800; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.js index cfc70d5f..9d42536f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/6776-scrolling-table-grows.js @@ -12,49 +12,49 @@ $(document).ready( function () { var iWidth = $('div.dataTables_wrapper').width(); - oTest.fnTest( + oTest.fnTest( "First sort has no effect on width", function () { $('th:eq(1)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "Second sort has no effect on width", function () { $('th:eq(1)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "Third sort has no effect on width", function () { $('th:eq(2)').click(); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "Filter has no effect on width", function () { oTable.fnFilter('i'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "Filter 2 has no effect on width", function () { oTable.fnFilter('in'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "No result filter has header and body at same width", function () { oTable.fnFilter('xxx'); }, function () { return $('#example').width() == $('div.dataTables_scrollHeadInner').width(); } ); - oTest.fnTest( + oTest.fnTest( "Filter with no results has no effect on width", function () { oTable.fnFilter('xxx'); }, function () { return $('div.dataTables_wrapper').width() == iWidth; } ); - oTest.fnTest( + oTest.fnTest( "Filter with no results has table equal to wrapper width", function () { oTable.fnFilter('xxx'); }, function () { return $('div.dataTables_wrapper').width() == $('#example').width(); } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/_zero_config.js index b3a941f8..f98449a8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/_zero_config.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: dom_data oTest.fnStart( "Sanity checks for DataTables with DOM data" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -23,135 +23,135 @@ $(document).ready( function () { $('#example').dataTable(); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -233,14 +233,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -250,7 +250,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -261,7 +261,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -270,21 +270,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -293,14 +293,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -310,7 +310,7 @@ $(document).ready( function () { */ oTest.fnTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable(); @@ -321,21 +321,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -348,7 +348,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -379,21 +379,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -403,7 +403,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -413,7 +413,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -422,7 +422,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSorting.js index 848b85e4..291f1462 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSorting.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default sorting is single column", null, function () { @@ -14,7 +14,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Default sorting is first column asc", null, function () { @@ -23,14 +23,14 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -42,7 +42,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -66,7 +66,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -78,7 +78,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -100,7 +100,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -111,7 +111,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -123,7 +123,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -134,7 +134,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -145,7 +145,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -156,7 +156,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -167,7 +167,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSortingFixed.js index bc470e21..07ce724e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aaSortingFixed.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "No fixed sorting by default", null, function () { @@ -15,7 +15,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -27,7 +27,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -35,7 +35,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSearchable.js index 27c211a7..cf2dcf36 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSearchable.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/); } ); - oTest.fnTest( + oTest.fnTest( "Disabling sorting on a column removes it from the global filter", function () { oSession.fnRestore(); @@ -31,13 +31,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Disabled on one column has no effect on other columns", function () { oTable.fnFilter("Webkit"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Disable filtering on multiple columns", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Filter on second disabled column", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSortable.js index bbb41cd6..5435dad5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bSortable.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -30,13 +30,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnTest( + oTest.fnTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == "X"; } ); - oTest.fnTest( + oTest.fnTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -60,14 +60,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -75,7 +75,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -83,7 +83,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnTest( + oTest.fnTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnTest( + oTest.fnTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bUseRendered.js index 161c4121..98860c5c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bUseRendered.js @@ -26,13 +26,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } ); - oTest.fnTest( + oTest.fnTest( "When bUseRendered is false, original data is used for sorting", function () { mTmp = 0; @@ -40,7 +40,7 @@ $(document).ready( function () { oTable = $('#example').dataTable( { "aoColumns": [ null, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp == 0 ) { @@ -62,7 +62,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "bUseRendered set to false on one columns and true (default) on two others", function () { mTmp = 0; @@ -82,7 +82,7 @@ $(document).ready( function () { } } }, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp2 == 0 ) { @@ -111,13 +111,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'aaa1'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 2nd column sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 3rd column sorting", function () { $('#example thead th:eq(2)').click(); @@ -126,13 +126,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(2)').html() == 'zzz3'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 4th column sorting", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == '-'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 5th column sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible.js index 84f1ee60..b158c0b0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -29,24 +29,24 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -55,14 +55,14 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -72,7 +72,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -89,38 +89,38 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible2.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible2.js index 5dbe214f..015412cc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible2.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.bVisible2.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "Hide the first column", function () { oSession.fnRestore(); @@ -60,7 +60,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the second column", function () { oSession.fnRestore(); @@ -132,7 +132,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the first two columns", function () { oSession.fnRestore(); @@ -192,7 +192,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the third column", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.fnRender.js index 8060ddb8..11ad1ba8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.fnRender.js @@ -18,13 +18,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Single column - fnRender is called once for each row", null, function () { return mTmp == 57; } ); - oTest.fnTest( + oTest.fnTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -50,7 +50,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "fnRender iDataColumn is row number", function () { var iCount = 0; @@ -76,7 +76,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -100,7 +100,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -124,7 +124,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -143,7 +143,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnTest( + oTest.fnTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -162,7 +162,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.iDataSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.iDataSort.js index e9366ff4..c41b25f8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.iDataSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.iDataSort.js @@ -16,32 +16,32 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Sorting on first column is uneffected", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on second column is the order of the fifth", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "Reserve sorting on second column uses fifth column as well", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on 5th column retains it's own sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "Use 2nd col for sorting 5th col and via-versa - no effect on first col sorting", function () { mTmp = 0; @@ -59,25 +59,25 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnTest( + oTest.fnTest( "2nd col sorting uses fifth col", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "2nd col sorting uses fifth col - reversed", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnTest( + oTest.fnTest( "5th col sorting uses 2nd col", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnTest( + oTest.fnTest( "5th col sorting uses 2nd col - reversed", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'Seamonkey 1.1'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sClass.js index 09149bb0..7dbad2e5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sClass.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -29,50 +29,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -87,20 +87,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sName.js index 14a4c189..309fe7f5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sName.js @@ -16,7 +16,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sTitle.js index 5ebac2f4..58adf13f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sTitle.js @@ -6,12 +6,12 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Column names are read from the DOM by default", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -21,7 +21,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -37,7 +37,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -47,7 +47,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -63,7 +63,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sWidth.js index e2777f67..ea146271 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: dom_data oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -20,13 +20,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnTest( + oTest.fnTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -50,7 +50,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoSearchCols.js index 9a1a3ece..28300f5e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/aoSearchCols.js @@ -8,11 +8,11 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -23,7 +23,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); @@ -57,7 +57,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1.5"; } ); - oTest.fnTest( + oTest.fnTest( "Search on single column - escape regex false", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 3 of 3 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns - escape regex false on first, true on second", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Konqureror 3.3"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns (no records) - escape regex false on first, true on second", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/asStripClasses.js index 906fc788..77fde853 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/asStripClasses.js @@ -5,7 +5,7 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Default row striping is applied", null, function () { @@ -16,7 +16,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Row striping does not effect current classes", null, function () { @@ -27,7 +27,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -39,7 +39,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnTest( + oTest.fnTest( "No row striping", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnTest( + oTest.fnTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnTest( + oTest.fnTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -90,7 +90,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bAutoWidth.js index e88930bd..50c7ea57 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -12,13 +12,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnTest( + oTest.fnTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -28,7 +28,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnTest( + oTest.fnTest( "Check column widths on first page match second page", null, function () { @@ -52,7 +52,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check column widths on second page match thid page", null, function () { @@ -77,7 +77,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -89,14 +89,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnTest( + oTest.fnTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnTest( + oTest.fnTest( "Check column widths on first page do not match second page", null, function () { @@ -121,7 +121,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bFilter.js index f4ec3158..87e37228 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bFilter.js @@ -5,14 +5,14 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -24,7 +24,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfiniteScroll.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfiniteScroll.js index ce73892b..701e23ab 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfiniteScroll.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfiniteScroll.js @@ -8,118 +8,118 @@ $(document).ready( function () { "sScrollY": "200px" } ); - oTest.fnTest( + oTest.fnTest( "10 rows by default", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Info", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes", null, function () { return $('#example tbody>tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll on 20px adds 10 rows", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Info after 20px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 20 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after 20px scroll", null, function () { return $('#example tbody>tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Scroll on 10px more results in the same number of rows", function () { $('div.dataTables_scrollBody').scrollTop(30); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Info after 10 more px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 20 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll to 240px adds another 10 rows", function () { $('div.dataTables_scrollBody').scrollTop(240); }, function () { return $('#example tbody tr').length == 30; } ); - oTest.fnTest( + oTest.fnTest( "Info after 240px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 30 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after 240px scroll", null, function () { return $('#example tbody>tr').length == 30; } ); - oTest.fnTest( + oTest.fnTest( "Filtering will drop back to 10 rows", - function () { + function () { $('div.dataTables_scrollBody').scrollTop(0); oTable.fnFilter('gec') }, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Info after filtering", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 20 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after filtering", null, function () { return $('#example tbody>tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll after filtering adds 10", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after filtering", null, function () { return $('#example tbody>tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Sorting will drop back to 10 rows", function () { oTable.fnSort([[1,'asc']]) }, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll after sorting adds 10", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after scrolling", null, function () { return $('#example tbody>tr').length == 20; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfo.js index 54d470f0..3c621301 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bInfo.js @@ -5,14 +5,14 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -24,7 +24,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bJQueryUI.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bJQueryUI.js index 6c685468..d3537b15 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bJQueryUI.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bJQueryUI.js @@ -6,7 +6,7 @@ $(document).ready( function () { "bJQueryUI": true } ); - oTest.fnTest( + oTest.fnTest( "Header elements are fully wrapped by DIVs", null, function () { @@ -20,7 +20,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "One div for each header element", null, function () { @@ -28,7 +28,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "One span for each header element, nested as child of div", null, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bLengthChange.js index 1c8ef40b..3087e302 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bLengthChange.js @@ -5,7 +5,7 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -30,12 +30,12 @@ $(document).ready( function () { oTest.fnTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -49,12 +49,12 @@ $(document).ready( function () { oTest.fnTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bPaginate.js index 560114e3..cddcb4b4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bPaginate.js @@ -5,7 +5,7 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -14,12 +14,12 @@ $(document).ready( function () { oTest.fnTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -33,12 +33,12 @@ $(document).ready( function () { oTest.fnTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bProcessing.js index e342a40c..cd74aee7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bProcessing.js @@ -12,25 +12,25 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -38,7 +38,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -50,32 +50,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnTest( + oTest.fnTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnTest( + oTest.fnTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnTest( + oTest.fnTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -87,7 +87,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bServerSide.js index c6aacec6..f9bdb340 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bServerSide.js @@ -8,7 +8,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Server side is off by default", null, function () { return oSettings.oFeatures.bServerSide == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSort.js index ecaf168e..c24ff31d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSort.js @@ -5,13 +5,13 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -23,13 +23,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnTest( + oTest.fnTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -41,20 +41,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnTest( + oTest.fnTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortCellsTop.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortCellsTop.js index fc550d5d..a0794209 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortCellsTop.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortCellsTop.js @@ -6,38 +6,38 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Sorting class is on the bottom cells by default", null, function () { return $('#example thead tr:eq(1) th:eq(0)').hasClass('sorting_asc'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting is performed on bottom cells", function () { return $('#example thead tr:eq(1) th:eq(0)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting class is updated on the bottom cells", null, function () { return $('#example thead tr:eq(1) th:eq(0)').hasClass('sorting_desc'); } ); - oTest.fnTest( + oTest.fnTest( "Clicking on top cells has no effect", function () { return $('#example thead tr:eq(0) th:eq(0)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Clicking on another top cell has no effect", function () { return $('#example thead tr:eq(0) th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting class is on the top cell when bSortCellsTop is true", function () { oSession.fnRestore(); @@ -48,25 +48,25 @@ $(document).ready( function () { function () { return $('#example thead tr:eq(0) th:eq(0)').hasClass('sorting_asc'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting is performed on top cells now", function () { return $('#example thead tr:eq(0) th:eq(0)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting class is updated on the top cells", null, function () { return $('#example thead tr:eq(0) th:eq(0)').hasClass('sorting_desc'); } ); - oTest.fnTest( + oTest.fnTest( "Clicking on bottom cells has no effect", function () { return $('#example thead tr:eq(1) th:eq(0)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Clicking on another bottom cell has no effect", function () { return $('#example thead tr:eq(1) th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortClasses.js index 97f0c1fc..47234afb 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/bSortClasses.js @@ -5,27 +5,27 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -33,9 +33,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -44,9 +44,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -57,9 +57,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -70,7 +70,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -78,7 +78,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -89,9 +89,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -99,9 +99,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -112,7 +112,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCookieCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCookieCallback.js index 31d03936..813b14b0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCookieCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCookieCallback.js @@ -8,7 +8,7 @@ $(document).ready( function () { * stringify function to serialise the data array */ - oTest.fnTest( + oTest.fnTest( "null by default", function () { $('#example').dataTable(); @@ -16,7 +16,7 @@ $(document).ready( function () { function () { return $('#example').dataTable().fnSettings().fnCookieCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Number of arguments", function () { $('#example').dataTable( { @@ -31,7 +31,7 @@ $(document).ready( function () { function () { return mPass == 4; } ); - oTest.fnTest( + oTest.fnTest( "Name", function () { $('#example').dataTable( { @@ -46,7 +46,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data", function () { $('#example').dataTable( { @@ -61,7 +61,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Expires", function () { $('#example').dataTable( { @@ -76,7 +76,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Path", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedCell.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedCell.js index 1de49671..ee13ad60 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedCell.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedCell.js @@ -13,13 +13,13 @@ $(document).ready( function () { } ] } ); - oTest.fnTest( + oTest.fnTest( "Cell created is called once for each cell on init", null, function () { return tmp===285; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===285; } @@ -27,7 +27,7 @@ $(document).ready( function () { oTest.fnTest( "Four arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -47,7 +47,7 @@ $(document).ready( function () { oTest.fnTest( "First argument is a TD element", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -67,7 +67,7 @@ $(document).ready( function () { oTest.fnTest( "Second argument is the HTML value", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -87,7 +87,7 @@ $(document).ready( function () { oTest.fnTest( "Third argument is the data array", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -107,7 +107,7 @@ $(document).ready( function () { oTest.fnTest( "Fourth argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -127,7 +127,7 @@ $(document).ready( function () { oTest.fnTest( "Fifth argument is the the col index", - function () { + function () { oSession.fnRestore(); tmp = true; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedRow.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedRow.js index e408f709..c6eb07e4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedRow.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnCreatedRow.js @@ -10,13 +10,13 @@ $(document).ready( function () { } } ); - oTest.fnTest( + oTest.fnTest( "Row created is called once for each row on init", null, function () { return tmp===57; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===57; } @@ -24,7 +24,7 @@ $(document).ready( function () { oTest.fnTest( "Three arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -41,7 +41,7 @@ $(document).ready( function () { oTest.fnTest( "First argument is a TR element", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -58,7 +58,7 @@ $(document).ready( function () { oTest.fnTest( "Second argument is an array with 5 elements", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -75,7 +75,7 @@ $(document).ready( function () { oTest.fnTest( "Third argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -92,7 +92,7 @@ $(document).ready( function () { oTest.fnTest( "TR element is tied to the correct data", - function () { + function () { oSession.fnRestore(); tmp = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDeleteRow.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDeleteRow.js index 29a0b3fd..5d8f6ec6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDeleteRow.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDeleteRow.js @@ -6,19 +6,19 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Check that the default data is sane", null, function () { return oSettings.asDataSearch.join(' ').match(/4.0/g).length == 3; } ); - oTest.fnTest( + oTest.fnTest( "Remove the first data row, and check that hte search data has been updated", function () { oTable.fnDeleteRow( 0 ); }, function () { return oSettings.asDataSearch.join(' ').match(/4.0/g).length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Check that the info element has been updated", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 56 entries"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDrawCallback.js index ffa5f814..c497c946 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnDrawCallback.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "One argument passed", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -62,7 +62,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFilter.js index 1e18b22d..7e3050ce 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFilter.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); oTable.fnFilter(1); - oTest.fnTest( + oTest.fnTest( "Filtering with a non-string input is valid", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFooterCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFooterCallback.js index a02f8de2..10375015 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFooterCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnFooterCallback.js @@ -7,14 +7,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnFooterCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -30,7 +30,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); @@ -45,14 +45,14 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -66,7 +66,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching original data", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array's column lengths match original data", function () { oSession.fnRestore(); @@ -106,7 +106,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -125,7 +125,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -145,7 +145,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on first page", function () { oSession.fnRestore(); @@ -164,7 +164,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -184,7 +184,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -202,7 +202,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnHeaderCallback.js index 0acc4877..91a025c7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnHeaderCallback.js @@ -7,14 +7,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -30,7 +30,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); @@ -45,14 +45,14 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -66,7 +66,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching original data", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array's column lengths match original data", function () { oSession.fnRestore(); @@ -106,7 +106,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -125,7 +125,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -145,7 +145,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on first page", function () { oSession.fnRestore(); @@ -164,7 +164,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -184,7 +184,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -202,7 +202,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInfoCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInfoCallback.js index b4501d5f..91a74a82 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInfoCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInfoCallback.js @@ -7,13 +7,13 @@ $(document).ready( function () { $('#example').dataTable(); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "null by default", null, function () { return $('#example').dataTable().fnSettings().oLanguage.fnInfoCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Agrument length", function () { $('#example').dataTable( { @@ -27,7 +27,7 @@ $(document).ready( function () { function () { return mPass == 6; } ); - oTest.fnTest( + oTest.fnTest( "Settings first", function () { $('#example').dataTable( { @@ -41,7 +41,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Start arg", function () { $('#example').dataTable( { @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "1"; } ); - oTest.fnTest( + oTest.fnTest( "End arg", function () { $('#example').dataTable( { @@ -67,7 +67,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "10"; } ); - oTest.fnTest( + oTest.fnTest( "Max arg", function () { $('#example').dataTable( { @@ -80,7 +80,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "57"; } ); - oTest.fnTest( + oTest.fnTest( "Max arg - filter", function () { $('#example').dataTable().fnFilter("1.0"); @@ -88,7 +88,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "57"; } ); - oTest.fnTest( + oTest.fnTest( "Total arg", function () { $('#example').dataTable( { @@ -101,7 +101,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "57"; } ); - oTest.fnTest( + oTest.fnTest( "Total arg - filter", function () { $('#example').dataTable().fnFilter("1.0"); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInitComplete.js index 1659d124..3b238290 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnInitComplete.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); - oTest.fnTest( + oTest.fnTest( "Two arguments passed", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -62,7 +62,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnInitComplete never called there after", function () { $('#example_next').click(); @@ -73,7 +73,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnRowCallback.js index df4e72f7..2f248811 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnRowCallback.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -33,7 +33,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -49,7 +49,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -63,7 +63,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -80,7 +80,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis.js index 41d85e7c..d2733a69 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -22,24 +22,24 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -48,14 +48,14 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -65,7 +65,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -77,38 +77,38 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis2.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis2.js index 722fe11b..fe795378 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis2.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/fnSetColumnVis2.js @@ -6,13 +6,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "Hide the first column", function () { $('#example').dataTable().fnSetColumnVis( 0, false ); @@ -51,7 +51,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the second column", function () { $('#example').dataTable().fnSetColumnVis( 0, true ); @@ -115,7 +115,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the first two columns", function () { $('#example').dataTable().fnSetColumnVis( 0, false ); @@ -167,7 +167,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Hide the third column", function () { $('#example').dataTable().fnSetColumnVis( 0, true ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js index c0f4ec50..57964135 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/html-autodetect-sort.js @@ -4,7 +4,7 @@ oTest.fnStart( "HTML auto detect" ); $(document).ready( function () { var oTable = $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Initial sort", null, function () { @@ -16,7 +16,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "HTML sort", function () { $('#example thead th:eq(1)').click() }, function () { @@ -28,7 +28,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "HTML reverse sort", function () { $('#example thead th:eq(1)').click() }, function () { @@ -40,7 +40,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Numeric sort", function () { $('#example thead th:eq(0)').click() }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/iDisplayLength.js index 8d4b5ae6..d3985659 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/iDisplayLength.js @@ -5,20 +5,20 @@ $(document).ready( function () { /* Check the default */ $('#example').dataTable(); - oTest.fnTest( + oTest.fnTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -29,14 +29,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -47,14 +47,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -65,7 +65,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.oPaginate.js index e840348a..4b0f235f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.oPaginate.js @@ -8,11 +8,11 @@ $(document).ready( function () { var oTable = $('#example').dataTable( { "sPaginationType": "full_numbers" } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -21,11 +21,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -53,7 +53,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -62,11 +62,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfo.js index 25b23f44..234917c4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfo.js @@ -6,20 +6,20 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -33,13 +33,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -65,7 +65,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -78,7 +78,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoEmpty.js index 188984fc..adc5cc1f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoEmpty.js @@ -6,17 +6,17 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -24,7 +24,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -39,11 +39,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -51,7 +51,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -63,7 +63,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoPostFix.js index f948c729..920bc80d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sInfoPostFix.js @@ -6,20 +6,20 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -33,14 +33,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sLengthMenu.js index 89f131e3..ac513c45 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sLengthMenu.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -37,7 +37,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -51,7 +51,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -60,7 +60,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -81,7 +81,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sProcessing.js index 55518adc..007b5135 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sProcessing.js @@ -8,20 +8,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -36,7 +36,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sSearch.js index 60db49e5..7cb4ba21 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sSearch.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -18,7 +18,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -26,7 +26,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -40,14 +40,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnTest( + oTest.fnTest( "Blank search has a no (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sUrl.js index 61d2a932..5f0d0cf5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sUrl.js @@ -10,14 +10,14 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -29,7 +29,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sZeroRecords.js index 72aec437..3134957c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oLanguage.sZeroRecords.js @@ -6,7 +6,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -20,7 +20,7 @@ $(document).ready( function () { - oTest.fnTest( + oTest.fnTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oSearch.js index 8d23ee3d..7a96cbf4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/oSearch.js @@ -6,11 +6,11 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -19,7 +19,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnTest( + oTest.fnTest( "Search term only in object", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -40,7 +40,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnTest( + oTest.fnTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnTest( + oTest.fnTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnTest( + oTest.fnTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); @@ -82,7 +82,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Search regex text term and escape regex false", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sAjaxSource.js index ac61f9bd..dc86ad87 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sAjaxSource.js @@ -8,7 +8,7 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Server side is off by default", null, function () { return oSettings.sAjaxSource == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sDom.js index 165071c6..8401ec0a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sDom.js @@ -8,13 +8,13 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnTest( + oTest.fnTest( "Default DOM in document", null, function () { @@ -26,7 +26,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -37,7 +37,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -49,7 +49,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnTest( + oTest.fnTest( "Check example 1 in DOM", null, function () { @@ -74,7 +74,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -86,7 +86,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -122,7 +122,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -135,7 +135,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no length element", function () { oSession.fnRestore(); @@ -152,7 +152,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -163,7 +163,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no filter element", function () { oSession.fnRestore(); @@ -180,7 +180,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -193,7 +193,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnTest( + oTest.fnTest( "Check no info element", function () { oSession.fnRestore(); @@ -210,7 +210,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -221,7 +221,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no paging element", function () { oSession.fnRestore(); @@ -238,7 +238,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -249,7 +249,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Element with an id", function () { $('#example').dataTable( { @@ -262,7 +262,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Element with an id and a class", function () { $('#example').dataTable( { @@ -275,7 +275,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Element with just a class", function () { $('#example').dataTable( { @@ -288,7 +288,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Two elements with an id", function () { $('#example').dataTable( { @@ -301,7 +301,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Two elements with an id and one with a class", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sPaginationType.js index 8d975f55..3fea13b7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sPaginationType.js @@ -6,43 +6,43 @@ $(document).ready( function () { var oTable = $('#example').dataTable(); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnTest( + oTest.fnTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnTest( + oTest.fnTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnTest( + oTest.fnTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnTest( + oTest.fnTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnTest( + oTest.fnTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -52,7 +52,7 @@ $(document).ready( function () { /* Two buttons paging */ - oTest.fnTest( + oTest.fnTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -64,7 +64,7 @@ $(document).ready( function () { function () { return oSettings.sPaginationType == "full_numbers"; } ); - oTest.fnTest( + oTest.fnTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -72,7 +72,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnTest( + oTest.fnTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -86,7 +86,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Go to two pages previous", function () { nPrevious.click(); @@ -97,7 +97,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Next (second last) page", function () { nNext.click(); @@ -107,7 +107,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sScrollXY.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sScrollXY.js index d9a61195..58991d23 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sScrollXY.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/sScrollXY.js @@ -13,37 +13,37 @@ $(document).ready( function () { "bPaginate": false } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Header follows x-scrolling", function () { $('div.dataTables_scrollBody').scrollLeft(20); }, function () { return $('div.dataTables_scrollHead').scrollLeft() == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Footer follows x-scrolling", null, function () { return $('div.dataTables_scrollFoot').scrollLeft() == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "y-scrolling has no effect on header", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('div.dataTables_scrollHead').scrollLeft() == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering results in sets y-scroll back to 0", function () { oTable.fnFilter('1') }, function () { return $('div.dataTables_scrollBody').scrollTop() == 0; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering has no effect on x-scroll", null, function () { return $('div.dataTables_scrollBody').scrollLeft() == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Full x-scroll has header track all the way with it", function () { $('div.dataTables_scrollBody').scrollLeft( @@ -53,7 +53,7 @@ $(document).ready( function () { function () { return $('div.dataTables_scrollBody').scrollLeft() == $('div.dataTables_scrollHead').scrollLeft(); } ); - oTest.fnTest( + oTest.fnTest( "Footer also tracked all the way", null, function () { return $('div.dataTables_scrollBody').scrollLeft() == $('div.dataTables_scrollFoot').scrollLeft(); } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/th_in_body.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/th_in_body.js index bbf5ee3a..53c241ba 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/th_in_body.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/1_dom/th_in_body.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: dom_data_th oTest.fnStart( "Sanity checks for DataTables with DOM data and a TH in the body" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -23,135 +23,135 @@ $(document).ready( function () { $('#example').dataTable(); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -233,14 +233,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -250,7 +250,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -261,7 +261,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -270,21 +270,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -293,14 +293,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -310,7 +310,7 @@ $(document).ready( function () { */ oTest.fnTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable(); @@ -321,21 +321,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -348,7 +348,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -379,21 +379,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -403,7 +403,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -413,7 +413,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -422,7 +422,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/6872-default-content-missing-props.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/6872-default-content-missing-props.js index 5ae4126b..e9c384d6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/6872-default-content-missing-props.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/6872-default-content-missing-props.js @@ -31,13 +31,13 @@ $(document).ready( function () { ] } ); - oTest.fnTest( + oTest.fnTest( "Basic initialisation of objects works", null, function () { return $('#example tbody td:eq(0)').html() === "a"; } ); - oTest.fnTest( + oTest.fnTest( "Error when property missing (no default content)", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return test; } ); - oTest.fnTest( + oTest.fnTest( "Default content used for missing prop and no error", function () { oSession.fnRestore(); @@ -100,7 +100,7 @@ $(document).ready( function () { * Deep properties with a single object */ - oTest.fnTest( + oTest.fnTest( "Basic test with deep properties", function () { oSession.fnRestore(); @@ -129,7 +129,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(0)').html() === "a"; } ); - oTest.fnTest( + oTest.fnTest( "Error when property missing on deep get (no default content)", function () { oSession.fnRestore(); @@ -162,7 +162,7 @@ $(document).ready( function () { function () { return test; } ); - oTest.fnTest( + oTest.fnTest( "Default content used for missing prop on deep get and no error", function () { oSession.fnRestore(); @@ -196,7 +196,7 @@ $(document).ready( function () { * Deep properties with individual objects */ - oTest.fnTest( + oTest.fnTest( "Basic test with deep individual properties", function () { oSession.fnRestore(); @@ -223,7 +223,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(0)').html() === "a"; } ); - oTest.fnTest( + oTest.fnTest( "Error when property missing on deep individual get (no default content)", function () { oSession.fnRestore(); @@ -254,7 +254,7 @@ $(document).ready( function () { function () { return test; } ); - oTest.fnTest( + oTest.fnTest( "Default content used for missing prop on deep individual get and no error", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js index 57ffebc0..b3b0320e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/8549--string-sorting-nonstrings.js @@ -24,19 +24,19 @@ $(document).ready( function () { ] } ); - oTest.fnTest( + oTest.fnTest( "Sorting works - first cell is empty", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() === ""; } ); - oTest.fnTest( + oTest.fnTest( "Second cell is 1a", null, function () { return $('#example tbody tr:eq(1) td:eq(0)').html() === "1a"; } ); - oTest.fnTest( + oTest.fnTest( "Third cell is 5", null, function () { return $('#example tbody tr:eq(2) td:eq(0)').html() === "5"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/_zero_config.js index 51abbad2..58a8d6ae 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/_zero_config.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: js_data oTest.fnStart( "Sanity checks for DataTables with data from JS" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -26,135 +26,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnTest( + oTest.fnTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -236,14 +236,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -253,7 +253,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -264,7 +264,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -273,21 +273,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -296,14 +296,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -313,7 +313,7 @@ $(document).ready( function () { */ oTest.fnTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -324,21 +324,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -351,7 +351,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -382,21 +382,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -406,7 +406,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -416,7 +416,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -425,7 +425,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSorting.js index 3b16828e..12b528b7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSorting.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default sorting is single column", null, function () { @@ -16,7 +16,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Default sorting is first column asc", null, function () { @@ -25,14 +25,14 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -45,7 +45,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -96,7 +96,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -108,7 +108,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -120,7 +120,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -133,7 +133,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -145,7 +145,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -157,7 +157,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -169,7 +169,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -181,7 +181,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSortingFixed.js index a28e6101..be5b2f07 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aaSortingFixed.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "No fixed sorting by default", null, function () { @@ -17,7 +17,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -30,7 +30,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -38,7 +38,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -51,7 +51,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSearchable.js index 4ce91588..64ab0e42 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSearchable.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/); } ); - oTest.fnTest( + oTest.fnTest( "Disabling sorting on a column removes it from the global filter", function () { oSession.fnRestore(); @@ -34,13 +34,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Disabled on one column has no effect on other columns", function () { oTable.fnFilter("Webkit"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnTest( + oTest.fnTest( "Disable filtering on multiple columns", function () { oSession.fnRestore(); @@ -60,7 +60,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Filter on second disabled column", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSortable.js index 4e4548d1..47a88281 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bSortable.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -33,13 +33,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnTest( + oTest.fnTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -48,7 +48,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == "X"; } ); - oTest.fnTest( + oTest.fnTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -64,14 +64,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -87,7 +87,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnTest( + oTest.fnTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -95,7 +95,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnTest( + oTest.fnTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bUseRendered.js index 2e3a9489..068d7656 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bUseRendered.js @@ -27,13 +27,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } ); - oTest.fnTest( + oTest.fnTest( "When bUseRendered is false, original data is used for sorting", function () { mTmp = 0; @@ -42,7 +42,7 @@ $(document).ready( function () { "aaData": gaaData, "aoColumns": [ null, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp == 0 ) { @@ -64,7 +64,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "bUseRendered set to false on one columns and true (default) on two others", function () { mTmp = 0; @@ -85,7 +85,7 @@ $(document).ready( function () { } } }, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp2 == 0 ) { @@ -114,13 +114,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'aaa1'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 2nd column sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 3rd column sorting", function () { $('#example thead th:eq(2)').click(); @@ -129,13 +129,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(2)').html() == 'zzz3'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 4th column sorting", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == '-'; } ); - oTest.fnTest( + oTest.fnTest( "Multi-column rendering - 5th column sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bVisible.js index e38948ce..b7c6c745 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.bVisible.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -32,26 +32,26 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "Can hide one column and it removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 4; } ); - oTest.fnTest( + oTest.fnTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -61,7 +61,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -79,26 +79,26 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - removes tfoot th column from DOM", null, function () { return $('#example tfoot tr:eq(0) th').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.fnRender.js index cb89aeb9..6d868424 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.fnRender.js @@ -19,13 +19,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Single column - fnRender is called once for each row", null, function () { return mTmp == 57; } ); - oTest.fnTest( + oTest.fnTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -77,7 +77,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnTest( + oTest.fnTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -122,7 +122,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnTest( + oTest.fnTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -142,7 +142,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.iDataSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.iDataSort.js index 6c0c7057..972cceb3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.iDataSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.iDataSort.js @@ -17,32 +17,32 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Sorting on first column is uneffected", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on second column is the order of the fifth", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "Reserve sorting on second column uses fifth column as well", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnTest( + oTest.fnTest( "Sorting on 5th column retains it's own sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "Use 2nd col for sorting 5th col and via-versa - no effect on first col sorting", function () { mTmp = 0; @@ -61,25 +61,25 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnTest( + oTest.fnTest( "2nd col sorting uses fifth col", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnTest( + oTest.fnTest( "2nd col sorting uses fifth col - reversed", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnTest( + oTest.fnTest( "5th col sorting uses 2nd col", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnTest( + oTest.fnTest( "5th col sorting uses 2nd col - reversed", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'Seamonkey 1.1'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sClass.js index b99cf181..de3f4d9e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sClass.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -32,50 +32,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -91,20 +91,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sName.js index b11f58cb..bd033ef7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sName.js @@ -17,7 +17,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sTitle.js index da13f1c2..99dbc1dd 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sTitle.js @@ -8,12 +8,12 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -23,7 +23,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -50,7 +50,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sWidth.js index 960c0561..086a0e18 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -21,13 +21,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnTest( + oTest.fnTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoSearchCols.js index ac70b387..822b40fe 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/aoSearchCols.js @@ -10,11 +10,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -25,7 +25,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -43,7 +43,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1.5"; } ); - oTest.fnTest( + oTest.fnTest( "Search on single column - escape regex false", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 3 of 3 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns - escape regex false on first, true on second", function () { oSession.fnRestore(); @@ -97,7 +97,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Konqureror 3.3"; } ); - oTest.fnTest( + oTest.fnTest( "Search on two columns (no records) - escape regex false on first, true on second", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/asStripClasses.js index fa3af827..71d8d254 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/asStripClasses.js @@ -7,7 +7,7 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Default row striping is applied", null, function () { @@ -18,7 +18,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -30,7 +30,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnTest( + oTest.fnTest( "No row striping", function () { oSession.fnRestore(); @@ -48,7 +48,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnTest( + oTest.fnTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnTest( + oTest.fnTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bAutoWidth.js index 094fe15b..205deccc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -14,13 +14,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnTest( + oTest.fnTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -30,7 +30,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnTest( + oTest.fnTest( "Check column widths on first page match second page", null, function () { @@ -54,7 +54,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check column widths on second page match thid page", null, function () { @@ -79,7 +79,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -92,14 +92,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnTest( + oTest.fnTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnTest( + oTest.fnTest( "Check column widths on first page do not match second page", null, function () { @@ -124,7 +124,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bFilter.js index d838e4ad..a272114a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bFilter.js @@ -7,14 +7,14 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -27,7 +27,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bInfo.js index 60a42734..662c92a9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bInfo.js @@ -7,14 +7,14 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -27,7 +27,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bLengthChange.js index d67b4d2d..4e1a8987 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bLengthChange.js @@ -7,7 +7,7 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -32,12 +32,12 @@ $(document).ready( function () { oTest.fnTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -52,12 +52,12 @@ $(document).ready( function () { oTest.fnTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bPaginate.js index d386bbf0..25f0616f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bPaginate.js @@ -7,7 +7,7 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -16,12 +16,12 @@ $(document).ready( function () { oTest.fnTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -36,12 +36,12 @@ $(document).ready( function () { oTest.fnTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bProcessing.js index 1408656f..388e70f1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bProcessing.js @@ -14,25 +14,25 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -40,7 +40,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -53,32 +53,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnTest( + oTest.fnTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnTest( + oTest.fnTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnTest( + oTest.fnTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bServerSide.js index 65c75b1a..15ac8cac 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bServerSide.js @@ -10,7 +10,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Server side is off by default", null, function () { return oSettings.oFeatures.bServerSide == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSort.js index 9107937b..c2b99891 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSort.js @@ -7,13 +7,13 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -25,13 +25,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnTest( + oTest.fnTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -43,20 +43,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnTest( + oTest.fnTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -81,7 +81,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSortClasses.js index 5726561f..3b200904 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/bSortClasses.js @@ -7,27 +7,27 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -35,9 +35,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -46,9 +46,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -59,9 +59,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -72,7 +72,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -80,7 +80,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnTest( + oTest.fnTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -92,9 +92,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -102,9 +102,9 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -115,7 +115,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnTest( + oTest.fnTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedCell.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedCell.js index 59fe717d..333f23d5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedCell.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedCell.js @@ -14,13 +14,13 @@ $(document).ready( function () { } ] } ); - oTest.fnTest( + oTest.fnTest( "Cell created is called once for each cell on init", null, function () { return tmp===285; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===285; } @@ -28,7 +28,7 @@ $(document).ready( function () { oTest.fnTest( "Four arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -49,7 +49,7 @@ $(document).ready( function () { oTest.fnTest( "First argument is a TD element", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -70,7 +70,7 @@ $(document).ready( function () { oTest.fnTest( "Second argument is the HTML value", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -91,7 +91,7 @@ $(document).ready( function () { oTest.fnTest( "Third argument is the data array", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -112,7 +112,7 @@ $(document).ready( function () { oTest.fnTest( "Fourth argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -133,7 +133,7 @@ $(document).ready( function () { oTest.fnTest( "Fifth argument is the the col index", - function () { + function () { oSession.fnRestore(); tmp = true; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedRow.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedRow.js index 72b2ddde..069b3b4e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedRow.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnCreatedRow.js @@ -11,13 +11,13 @@ $(document).ready( function () { } } ); - oTest.fnTest( + oTest.fnTest( "Row created is called once for each row on init", null, function () { return tmp===57; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===57; } @@ -25,7 +25,7 @@ $(document).ready( function () { oTest.fnTest( "Three arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -43,7 +43,7 @@ $(document).ready( function () { oTest.fnTest( "First argument is a TR element", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -61,7 +61,7 @@ $(document).ready( function () { oTest.fnTest( "Second argument is an array with 5 elements", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -79,7 +79,7 @@ $(document).ready( function () { oTest.fnTest( "Third argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; @@ -97,7 +97,7 @@ $(document).ready( function () { oTest.fnTest( "TR element is tied to the correct data", - function () { + function () { oSession.fnRestore(); tmp = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnDrawCallback.js index 28d5871d..fee9da8c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnDrawCallback.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "One argument passed", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -51,7 +51,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnFooterCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnFooterCallback.js index f16b921c..7e37f565 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnFooterCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnFooterCallback.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnFooterCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -33,7 +33,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); @@ -49,14 +49,14 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching original data", function () { oSession.fnRestore(); @@ -90,7 +90,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array's column lengths match original data", function () { oSession.fnRestore(); @@ -113,7 +113,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -133,7 +133,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -154,7 +154,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on first page", function () { oSession.fnRestore(); @@ -174,7 +174,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -195,7 +195,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -214,7 +214,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnHeaderCallback.js index 124500f5..7de6a6ed 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnHeaderCallback.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -33,7 +33,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); @@ -49,14 +49,14 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching original data", function () { oSession.fnRestore(); @@ -90,7 +90,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array's column lengths match original data", function () { oSession.fnRestore(); @@ -113,7 +113,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -133,7 +133,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -154,7 +154,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on first page", function () { oSession.fnRestore(); @@ -174,7 +174,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -195,7 +195,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -214,7 +214,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnInitComplete.js index 08580e5b..c5b33551 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnInitComplete.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); - oTest.fnTest( + oTest.fnTest( "Two arguments passed", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -51,7 +51,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnTest( + oTest.fnTest( "fnInitComplete never called there after", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnRowCallback.js index db8f442d..2364cfd7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/fnRowCallback.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnTest( + oTest.fnTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnTest( + oTest.fnTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -36,7 +36,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -53,7 +53,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnTest( + oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -86,7 +86,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/iDisplayLength.js index fcefbfa9..0afb9bf8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/iDisplayLength.js @@ -7,20 +7,20 @@ $(document).ready( function () { "aaData": gaaData } ); - oTest.fnTest( + oTest.fnTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -32,14 +32,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -51,14 +51,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnTest( + oTest.fnTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnTest( + oTest.fnTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/js_data_mixed_types.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/js_data_mixed_types.js index cb1543ed..cc71e638 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/js_data_mixed_types.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/js_data_mixed_types.js @@ -7,13 +7,13 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnTest( + oTest.fnTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "" && @@ -21,92 +21,92 @@ $(document).ready( function () { ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == ""; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "true"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == ""; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody tr:eq(1) td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody tr:eq(1) td:eq(0)').html() == "Gecko" && $('#example tbody tr:eq(1) td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == ""; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Firefox 2.0"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == ""; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == ""; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -188,14 +188,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -205,7 +205,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -216,7 +216,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -225,21 +225,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -248,14 +248,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -265,7 +265,7 @@ $(document).ready( function () { */ oTest.fnTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -276,21 +276,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -303,7 +303,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -334,21 +334,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 5 of 5 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -358,7 +358,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -368,7 +368,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -377,7 +377,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.oPaginate.js index 0e872c0b..7b6232d7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.oPaginate.js @@ -11,11 +11,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -24,11 +24,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -38,7 +38,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -57,7 +57,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -66,11 +66,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfo.js index 0ce3ef47..89ece4ff 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfo.js @@ -8,20 +8,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -36,13 +36,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoEmpty.js index 3bfc60b8..bcba4f35 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoEmpty.js @@ -8,17 +8,17 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -26,7 +26,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -42,11 +42,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoPostFix.js index d5a6dcb9..66894ed7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sInfoPostFix.js @@ -8,20 +8,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -36,14 +36,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sLengthMenu.js index f831d35c..ff4344fa 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sLengthMenu.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -39,7 +39,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -63,7 +63,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -85,7 +85,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sProcessing.js index f2e09beb..93e11f74 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sProcessing.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sSearch.js index 1f8d24f8..89007a10 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sSearch.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -20,7 +20,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -28,7 +28,7 @@ $(document).ready( function () { ); - oTest.fnTest( + oTest.fnTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -43,14 +43,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnTest( + oTest.fnTest( "Blank search has a no (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sUrl.js index e28379d6..bed33081 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sUrl.js @@ -12,14 +12,14 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sZeroRecords.js index a52651a9..d64c42f5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oLanguage.sZeroRecords.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -22,7 +22,7 @@ $(document).ready( function () { - oTest.fnTest( + oTest.fnTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oSearch.js index fa935d68..0592dde0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/oSearch.js @@ -8,11 +8,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -21,7 +21,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnTest( + oTest.fnTest( "Search term only in object", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -43,7 +43,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnTest( + oTest.fnTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnTest( + oTest.fnTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -73,7 +73,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnTest( + oTest.fnTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); @@ -88,7 +88,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnTest( + oTest.fnTest( "Search regex text term and escape regex false", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sAjaxSource.js index 201ae730..9ae4e0d7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sAjaxSource.js @@ -10,7 +10,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Server side is off by default", null, function () { return oSettings.sAjaxSource == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sDom.js index 8293972a..19e2e98f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sDom.js @@ -10,13 +10,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnTest( + oTest.fnTest( "Default DOM in document", null, function () { @@ -28,7 +28,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -39,7 +39,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnTest( + oTest.fnTest( "Check example 1 in DOM", null, function () { @@ -77,7 +77,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -89,7 +89,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -126,7 +126,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -139,7 +139,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no length element", function () { oSession.fnRestore(); @@ -157,7 +157,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -168,7 +168,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no filter element", function () { oSession.fnRestore(); @@ -186,7 +186,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -199,7 +199,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnTest( + oTest.fnTest( "Check no info element", function () { oSession.fnRestore(); @@ -217,7 +217,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -228,7 +228,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Check no paging element", function () { oSession.fnRestore(); @@ -246,7 +246,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sPaginationType.js index 7fa7407f..b57b2017 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/2_js/sPaginationType.js @@ -8,43 +8,43 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnTest( + oTest.fnTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnTest( + oTest.fnTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnTest( + oTest.fnTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnTest( + oTest.fnTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnTest( + oTest.fnTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnTest( + oTest.fnTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -54,7 +54,7 @@ $(document).ready( function () { /* Two buttons paging */ - oTest.fnTest( + oTest.fnTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { function () { return oSettings.sPaginationType == "full_numbers"; } ); - oTest.fnTest( + oTest.fnTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -75,7 +75,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnTest( + oTest.fnTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -89,7 +89,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Go to two pages previous", function () { nPrevious.click(); @@ -100,7 +100,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Next (second last) page", function () { nNext.click(); @@ -110,7 +110,7 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/_zero_config.js index 4e08b491..81e24384 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/_zero_config.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -26,135 +26,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -236,14 +236,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -253,7 +253,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -264,7 +264,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -273,21 +273,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -296,14 +296,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -313,7 +313,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -324,21 +324,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -351,7 +351,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -382,21 +382,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -406,7 +406,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -416,7 +416,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -425,7 +425,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSorting.js index a2997125..d46a558b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSorting.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is single column", null, function () { @@ -16,7 +16,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is first column asc", null, function () { @@ -25,14 +25,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -45,7 +45,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -96,7 +96,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -108,7 +108,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -120,7 +120,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -133,7 +133,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -145,7 +145,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -157,7 +157,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -169,7 +169,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -181,7 +181,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSortingFixed.js index 083ada9b..6d8c793c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aaSortingFixed.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "No fixed sorting by default", null, function () { @@ -17,7 +17,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -33,7 +33,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -41,7 +41,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSearchable.js index 4f834697..6b227665 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSearchable.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { @@ -19,7 +19,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabling sorting on a column removes it from the global filter", function () { oSession.fnRestore(); @@ -39,13 +39,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled on one column has no effect on other columns", function () { oTable.fnFilter("Webkit"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable filtering on multiple columns", function () { oSession.fnRestore(); @@ -65,7 +65,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filter on second disabled column", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSortable.js index a6a8a2fb..3e059452 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bSortable.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -33,13 +33,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -48,7 +48,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == "X"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -64,14 +64,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -87,7 +87,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -95,7 +95,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bUseRendered.js index b98c6cc2..3663b7af 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bUseRendered.js @@ -27,13 +27,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "When bUseRendered is false, original data is used for sorting", function () { mTmp = 0; @@ -42,7 +42,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "aoColumns": [ null, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp == 0 ) { @@ -64,7 +64,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "bUseRendered set to false on one columns and true (default) on two others", function () { mTmp = 0; @@ -85,7 +85,7 @@ $(document).ready( function () { } } }, - { + { "bUseRendered": false, "fnRender": function (a) { if ( mTmp2 == 0 ) { @@ -114,13 +114,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'aaa1'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 2nd column sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 3rd column sorting", function () { $('#example thead th:eq(2)').click(); @@ -129,13 +129,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(2)').html() == 'zzz3'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 4th column sorting", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == '-'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 5th column sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bVisible.js index 9e9e7bbe..093afd22 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.bVisible.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -32,18 +32,18 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -52,14 +52,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -69,7 +69,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -87,32 +87,32 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js index ca6f6011..f4c0fbac 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js @@ -19,13 +19,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Single column - fnRender is called twice for each row", null, function () { return mTmp == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -77,7 +77,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -122,7 +122,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -142,7 +142,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.iDataSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.iDataSort.js index ab41697f..cf507fd2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.iDataSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.iDataSort.js @@ -17,32 +17,32 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on first column is uneffected", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on second column is the order of the fifth", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Reserve sorting on second column uses fifth column as well", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on 5th column retains it's own sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Use 2nd col for sorting 5th col and via-versa - no effect on first col sorting", function () { mTmp = 0; @@ -61,25 +61,25 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col - reversed", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col - reversed", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'Seamonkey 1.1'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sClass.js index 864ee962..17d9f4da 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sClass.js @@ -8,13 +8,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -32,50 +32,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -91,20 +91,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sName.js index 99efddb9..f5bcbbe3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sName.js @@ -17,7 +17,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sTitle.js index 5f1f837f..0a552350 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sTitle.js @@ -8,12 +8,12 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -23,7 +23,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -50,7 +50,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sWidth.js index cbcb4abd..46c84217 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -21,13 +21,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoSearchCols.js index d0a9a6be..6f96b7b0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/aoSearchCols.js @@ -10,11 +10,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -25,7 +25,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -43,7 +43,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on single column - escape regex false", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 3 of 3 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - escape regex false on first, true on second", function () { oSession.fnRestore(); @@ -97,7 +97,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Konqureror 3.3"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns (no records) - escape regex false on first, true on second", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/asStripClasses.js index b195c405..1595a075 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/asStripClasses.js @@ -7,7 +7,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default row striping is applied", null, function () { @@ -18,7 +18,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -30,7 +30,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "No row striping", function () { oSession.fnRestore(); @@ -53,7 +53,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -72,7 +72,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bAutoWidth.js index ee49f7c1..499fcf48 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -14,13 +14,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -30,7 +30,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page match second page", null, function () { @@ -54,7 +54,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on second page match thid page", null, function () { @@ -79,7 +79,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -92,14 +92,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page do not match second page", null, function () { @@ -124,7 +124,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bFilter.js index 8c322293..dd85c5e7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bFilter.js @@ -7,14 +7,14 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -27,7 +27,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bInfo.js index 24eeedfa..1757004e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bInfo.js @@ -7,14 +7,14 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -27,7 +27,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bLengthChange.js index 551878c5..35ca67dc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bLengthChange.js @@ -7,7 +7,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -32,12 +32,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -52,12 +52,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bPaginate.js index 6e3ec5e4..bef13db0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bPaginate.js @@ -7,7 +7,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -16,12 +16,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -36,12 +36,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bProcessing.js index 100db867..83c76c44 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bProcessing.js @@ -14,25 +14,25 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -40,7 +40,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -53,32 +53,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bServerSide.js index 61fdce4b..52779813 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bServerSide.js @@ -10,7 +10,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, function () { return oSettings.oFeatures.bServerSide == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSort.js index 066afee8..1304c195 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSort.js @@ -7,13 +7,13 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -25,13 +25,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -43,20 +43,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -81,7 +81,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSortClasses.js index b957c805..22376797 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/bSortClasses.js @@ -7,27 +7,27 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -35,9 +35,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -46,9 +46,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -59,9 +59,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -72,7 +72,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -80,7 +80,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -92,9 +92,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -102,9 +102,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -115,7 +115,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedCell.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedCell.js index e930d052..d6aa78b5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedCell.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedCell.js @@ -15,13 +15,13 @@ $(document).ready( function () { } ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Cell created is called once for each cell on init", null, function () { return tmp===285; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===285; } @@ -29,7 +29,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Four arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -54,7 +54,7 @@ $(document).ready( function () { oTest.fnWaitTest( "First argument is a TD element", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -79,7 +79,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Second argument is the HTML value", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -104,7 +104,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Third argument is the data array", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -129,7 +129,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Fourth argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -154,7 +154,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Fifth argument is the the col index", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedRow.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedRow.js index 66fc3287..68fa2b2a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedRow.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnCreatedRow.js @@ -12,13 +12,13 @@ $(document).ready( function () { } } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row created is called once for each row on init", null, function () { return tmp===57; } ); - oTest.fnTest( + oTest.fnTest( "Created isn't called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===57; } @@ -26,7 +26,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Three arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -48,7 +48,7 @@ $(document).ready( function () { oTest.fnWaitTest( "First argument is a TR element", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -70,7 +70,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Second argument is an array with 5 elements", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -92,7 +92,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Third argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -114,7 +114,7 @@ $(document).ready( function () { oTest.fnWaitTest( "TR element is tied to the correct data", - function () { + function () { oSession.fnRestore(); tmp = false; complete = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js index 14c5ff19..1954c17a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "One argument passed", function () { oSession.fnRestore(); @@ -39,7 +39,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -60,7 +60,7 @@ $(document).ready( function () { /* The draw callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -80,7 +80,7 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js index dd161287..c6d3d54b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js @@ -9,14 +9,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { /* The header callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnHeaderCallback called once per draw", function () { oSession.fnRestore(); @@ -58,14 +58,14 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 3; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -80,7 +80,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -100,7 +100,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -123,7 +123,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -146,7 +146,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -165,7 +165,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnInitComplete.js index fe2c65e4..bdc7a7a5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnInitComplete.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two arguments passed (for Ajax!)", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -51,7 +51,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete never called there after", function () { $('#example_next').click(); @@ -78,7 +78,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnRowCallback.js index 766f09a2..e1c46849 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnRowCallback.js @@ -11,14 +11,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -36,7 +36,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -53,7 +53,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -86,7 +86,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnServerData.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnServerData.js index ab20ba3d..e9d32065 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnServerData.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/fnServerData.js @@ -4,7 +4,7 @@ oTest.fnStart( "fnServerData for Ajax sourced data" ); $(document).ready( function () { var mPass; - oTest.fnTest( + oTest.fnTest( "Argument length", function () { $('#example').dataTable( { @@ -17,7 +17,7 @@ $(document).ready( function () { function () { return mPass == 4; } ); - oTest.fnTest( + oTest.fnTest( "Url", function () { $('#example').dataTable( { @@ -31,7 +31,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array", function () { $('#example').dataTable( { @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Callback function", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/iDisplayLength.js index 69e7abed..ed1c069b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/iDisplayLength.js @@ -7,20 +7,20 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -32,14 +32,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -51,14 +51,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.oPaginate.js index 0dc5812b..ea2f14a9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.oPaginate.js @@ -11,11 +11,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -24,11 +24,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -38,7 +38,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -57,7 +57,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -66,11 +66,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfo.js index 1a72a0a8..b425bf52 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfo.js @@ -8,20 +8,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -36,13 +36,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoEmpty.js index a5066cf8..e6983cdc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoEmpty.js @@ -8,17 +8,17 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -26,7 +26,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -42,11 +42,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoPostFix.js index f91e5daf..204027d9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sInfoPostFix.js @@ -8,20 +8,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -36,14 +36,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLengthMenu.js index 6fae9483..4aec2045 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLengthMenu.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -39,7 +39,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -63,7 +63,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -85,7 +85,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js index 616b0ef3..0afaa345 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sLoadingRecords.js @@ -3,7 +3,7 @@ oTest.fnStart( "oLanguage.sLoadingRecords" ); $(document).ready( function () { var tmp = false; - oTest.fnTest( + oTest.fnTest( "Default loading text is 'Loading...'", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sProcessing.js index 39886194..0da7c27c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sProcessing.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sSearch.js index 5a1584d1..ed734e64 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sSearch.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -20,7 +20,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -28,7 +28,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -43,14 +43,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Blank search has a no space (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sUrl.js index 5ebfe5dd..92ca1387 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sUrl.js @@ -12,14 +12,14 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js index 7dffc151..9d8fd310 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js @@ -8,7 +8,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -22,7 +22,7 @@ $(document).ready( function () { - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oSearch.js index 42f1b948..be1c21ee 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/oSearch.js @@ -8,11 +8,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -21,7 +21,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Search term only in object", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -43,7 +43,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -58,7 +58,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -73,7 +73,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); @@ -88,7 +88,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex false", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp.js index 5759c47d..983846a0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp.js @@ -9,105 +9,105 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp2.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp2.js index 646657e3..769afaf6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp2.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxDataProp2.js @@ -9,105 +9,105 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxSource.js index b633d097..0d306448 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sAjaxSource.js @@ -10,10 +10,10 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, - function () { + function () { return oSettings.sAjaxSource == "../../../examples/ajax/sources/arrays.txt"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sDom.js index 0af1f599..0c1f41d7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sDom.js @@ -10,13 +10,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM in document", null, function () { @@ -28,7 +28,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -39,7 +39,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in DOM", null, function () { @@ -77,7 +77,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -89,7 +89,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -126,7 +126,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -139,7 +139,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no length element", function () { oSession.fnRestore(); @@ -157,7 +157,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -168,7 +168,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no filter element", function () { oSession.fnRestore(); @@ -186,7 +186,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -199,7 +199,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no info element", function () { oSession.fnRestore(); @@ -217,7 +217,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -228,7 +228,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no paging element", function () { oSession.fnRestore(); @@ -246,7 +246,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sPaginationType.js index 71606c41..76b138b1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/3_ajax/sPaginationType.js @@ -8,43 +8,43 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -55,7 +55,7 @@ $(document).ready( function () { /* Two buttons paging */ var bComplete = false; - oTest.fnWaitTest( + oTest.fnWaitTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -76,7 +76,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -84,7 +84,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -98,7 +98,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Go to two pages previous", function () { nPrevious.click(); @@ -109,7 +109,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next (second last) page", function () { nNext.click(); @@ -119,7 +119,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/-iDraw.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/-iDraw.js index 1f9dc858..3117113c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/-iDraw.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/-iDraw.js @@ -9,31 +9,31 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "After first draw, iDraw is 1", null, function () { return oSettings.iDraw == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "After second draw, iDraw is 2", function () { oTable.fnDraw() }, function () { return oSettings.iDraw == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "After sort", function () { oTable.fnSort([[1,'asc']]) }, function () { return oSettings.iDraw == 3; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "After filter", function () { oTable.fnFilter('gecko') }, function () { return oSettings.iDraw == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "After another filter", function () { oTable.fnFilter('gec') }, function () { return oSettings.iDraw == 5; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2440.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2440.js index a18f0519..268a822b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2440.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2440.js @@ -19,11 +19,11 @@ $(document).ready( function () { /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Check length is correct when -1 length given", null, function () { - return document.getElementById('example_info').innerHTML == + return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2569.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2569.js index fbfbeb4e..052d5ed6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2569.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2569.js @@ -8,7 +8,7 @@ $(document).ready( function () { $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php", - "aoColumnDefs": [ + "aoColumnDefs": [ { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, { "bVisible": false, "aTargets": [ 3 ] } ], @@ -17,21 +17,21 @@ $(document).ready( function () { } } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check that the number of columns in table is correct", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnTest( + oTest.fnTest( "And with scrolling", function () { $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php", "sScrollY": 200, - "aoColumnDefs": [ + "aoColumnDefs": [ { "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, { "bVisible": false, "aTargets": [ 3 ] } ], diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2600.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2600.js index e20f3099..eb13ce3f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2600.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/2600.js @@ -7,37 +7,37 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info correct on init", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Page 2", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 11 to 20 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Page 3", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 21 to 30 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Page 4", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 31 to 40 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Page 5", function () { $('#example_next').click(); }, function () { return $('#example_info').html() == "Showing 41 to 50 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Rewind", function () { $('#example_length select').val('100'); $('#example_length select').change(); }, function () { return $('#example_info').html() == "Showing 1 to 57 of 57 entries"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/_zero_config.js index fcd69cc1..fd62a210 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/_zero_config.js @@ -7,7 +7,7 @@ */ oTest.fnStart( "Sanity checks for DataTables with data from JS" ); -oTest.fnWaitTest( +oTest.fnWaitTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -32,137 +32,137 @@ $(document).ready( function () { } ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - sorting first column only", - function () { + function () { $('#example thead th:eq(0)').click(); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Firefox 1.0"; return b; } ); /* Basic paging */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Mozilla 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); /* Changing length */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -244,14 +244,14 @@ $(document).ready( function () { oTest.fnWaitTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -261,7 +261,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -272,7 +272,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -281,21 +281,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -304,14 +304,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -329,21 +329,21 @@ $(document).ready( function () { oTest.fnWaitTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -356,7 +356,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -390,21 +390,21 @@ $(document).ready( function () { oTest.fnWaitTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 2 of 2 entries (filtered from 57 total entries)"; } ); oTest.fnWaitTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnWaitTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -414,7 +414,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSorting.js index cf3e2e62..a9e6910e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSorting.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is single column", null, function () { @@ -17,7 +17,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is first column asc", null, function () { @@ -26,14 +26,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -115,7 +115,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -128,7 +128,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -142,7 +142,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -155,7 +155,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -168,7 +168,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -181,7 +181,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -194,7 +194,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSortingFixed.js index a7d5ad3b..f2c40658 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aaSortingFixed.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "No fixed sorting by default", null, function () { @@ -18,7 +18,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -32,7 +32,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -40,7 +40,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSearchable.js index 3ba15000..3c45a4e2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSearchable.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Camino 1.0"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSortable.js index 6b5fb428..4a555f34 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bSortable.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -35,13 +35,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -50,7 +50,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Internet Explorer 4.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -67,14 +67,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -82,7 +82,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -90,7 +90,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js index 6a797913..bdc43851 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bUseRendered.js @@ -28,7 +28,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bVisible.js index 863f3dab..54daef60 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.bVisible.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -34,18 +34,18 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -54,12 +54,12 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct tbody column has been hidden", null, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Win 98+ / OSX.2+" && jqNodes[2].innerHTML == "1.7" && @@ -69,7 +69,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -88,30 +88,30 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct tbody columns have been hidden", null, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1.7" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js index 4481b75c..1d88083e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js @@ -20,13 +20,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Single column - fnRender is called once for each row", null, function () { return mTmp == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -80,7 +80,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -106,7 +106,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -127,7 +127,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -148,7 +148,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sClass.js index b8286a0b..b17be722 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sClass.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -34,50 +34,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -94,20 +94,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sName.js index 47034b77..b4fa4654 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sName.js @@ -18,7 +18,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sTitle.js index 93b99c95..f7e24b6c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sTitle.js @@ -9,12 +9,12 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -24,7 +24,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -42,7 +42,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -52,7 +52,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sWidth.js index b001ed5a..6f0da688 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -22,13 +22,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoSearchCols.js index 345858fc..8dce283d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/aoSearchCols.js @@ -11,11 +11,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -26,7 +26,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/asStripClasses.js index 760ba4e3..23da5bcd 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/asStripClasses.js @@ -8,7 +8,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default row striping is applied", null, function () { @@ -19,7 +19,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -31,7 +31,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "No row striping", function () { oSession.fnRestore(); @@ -55,7 +55,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -93,7 +93,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bAutoWidth.js index ce6052c9..ef97d26c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -15,13 +15,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -31,7 +31,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page match second page", null, function () { @@ -55,7 +55,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on second page match thid page", null, function () { @@ -80,7 +80,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -94,14 +94,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page do not match second page", null, function () { @@ -126,7 +126,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bFilter.js index 5505e703..e4bf1403 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bFilter.js @@ -8,14 +8,14 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -29,7 +29,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfiniteScroll.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfiniteScroll.js index 9d88d3ba..4cafecbe 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfiniteScroll.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfiniteScroll.js @@ -10,133 +10,133 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows by default", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Info", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes", null, function () { return $('#example tbody>tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes function", null, function () { return $('#example').dataTable().fnGetNodes().length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll on 20px adds 10 rows", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Info after 20px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 20 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after 20px scroll", null, function () { return $('#example tbody>tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes function after 20px scroll", null, function () { return $('#example').dataTable().fnGetNodes().length == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll on 10px more results in the same number of rows", function () { $('div.dataTables_scrollBody').scrollTop(30); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Info after 10 more px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 20 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll to 280px adds another 10 rows", function () { $('div.dataTables_scrollBody').scrollTop(280); }, function () { return $('#example tbody tr').length == 30; } ); - oTest.fnTest( + oTest.fnTest( "Info after 240px scroll", null, function () { return $('#example_info').html() == "Showing 1 to 30 of 57 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after 240px scroll", null, function () { return $('#example tbody>tr').length == 30; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes function after 240px scroll", null, function () { return $('#example').dataTable().fnGetNodes().length == 30; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering will drop back to 10 rows", function () { oTable.fnFilter('gec') }, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Info after filtering", null, function () { return $('#example_info').html() == "Showing 1 to 10 of 20 entries (filtered from 57 total entries)"; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after filtering", null, function () { return $('#example tbody>tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes function after filtering", null, function () { return $('#example').dataTable().fnGetNodes().length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll after filtering adds 10", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Get nodes after filtering", null, function () { return $('#example tbody>tr').length == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Get nodes function after filtering", null, function () { return $('#example').dataTable().fnGetNodes().length == 20; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting will drop back to 10 rows", function () { $('div.dataTables_scrollBody').scrollTop(0); @@ -145,19 +145,19 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Scroll after sorting adds 10", function () { $('div.dataTables_scrollBody').scrollTop(20); }, function () { return $('#example tbody tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes after scrolling", null, function () { return $('#example tbody>tr').length == 20; } ); - oTest.fnTest( + oTest.fnTest( "Get nodes function after scrolling", null, function () { return $('#example').dataTable().fnGetNodes().length == 20; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfo.js index 56bca571..de453b3a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bInfo.js @@ -8,14 +8,14 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -29,7 +29,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bLengthChange.js index fa56a030..8e0561c3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bLengthChange.js @@ -8,7 +8,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -33,12 +33,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -54,12 +54,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bPaginate.js index 9855a90b..863dc338 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bPaginate.js @@ -8,7 +8,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -17,12 +17,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -38,12 +38,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bProcessing.js index 29141df2..f47124bb 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bProcessing.js @@ -15,25 +15,25 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -41,7 +41,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -55,32 +55,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -94,7 +94,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bServerSide.js index 1b935928..1dd42ae3 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bServerSide.js @@ -11,7 +11,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side can be set to on", null, function () { return oSettings.oFeatures.bServerSide == true; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSort.js index fc94471f..37863066 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSort.js @@ -8,13 +8,13 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -26,13 +26,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -44,20 +44,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -83,7 +83,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSortClasses.js index f2ed23c2..9130afee 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/bSortClasses.js @@ -8,27 +8,27 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -36,9 +36,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -47,9 +47,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -60,9 +60,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -73,7 +73,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -81,7 +81,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -94,9 +94,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -104,9 +104,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -117,7 +117,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedCell.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedCell.js index de76ace5..04501e08 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedCell.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedCell.js @@ -16,13 +16,13 @@ $(document).ready( function () { } ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Cell created is called once for each cell on init", null, function () { return tmp===50; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Created is called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===100; } @@ -30,7 +30,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Four arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -56,7 +56,7 @@ $(document).ready( function () { oTest.fnWaitTest( "First argument is a TD element", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -82,7 +82,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Second argument is the HTML value", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -108,7 +108,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Third argument is the data array", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -134,7 +134,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Fourth argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -160,7 +160,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Fifth argument is the the col index", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedRow.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedRow.js index b81eba38..1baeaac2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedRow.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnCreatedRow.js @@ -13,13 +13,13 @@ $(document).ready( function () { } } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row created is called once for each row on init", null, function () { return tmp===10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Created is called back on other draws", function () { $('#example th:eq(1)').click(); }, function () { return tmp===20; } @@ -27,7 +27,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Three arguments for the function", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -50,7 +50,7 @@ $(document).ready( function () { oTest.fnWaitTest( "First argument is a TR element", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -73,7 +73,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Second argument is an array with 5 elements", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -96,7 +96,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Third argument is the data source for the row", - function () { + function () { oSession.fnRestore(); tmp = true; complete = false; @@ -119,7 +119,7 @@ $(document).ready( function () { oTest.fnWaitTest( "TR element is tied to the correct data", - function () { + function () { oSession.fnRestore(); tmp = false; complete = false; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnDrawCallback.js index 20239c25..8936c161 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnDrawCallback.js @@ -12,14 +12,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "One argument passed", function () { oSession.fnRestore(); @@ -37,7 +37,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnHeaderCallback.js index b9a1167a..8c9dc076 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnHeaderCallback.js @@ -10,14 +10,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); @@ -52,14 +52,14 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -96,7 +96,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -120,7 +120,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -144,7 +144,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -164,7 +164,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnInitComplete.js index 5e786b22..655b50ec 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnInitComplete.js @@ -4,7 +4,7 @@ oTest.fnStart( "fnInitComplete" ); /* Fairly boring function compared to the others! */ $(document).ready( function () { - oTest.fnWaitTest( + oTest.fnWaitTest( "Two arguments passed", function () { @@ -21,7 +21,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -55,7 +55,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete never called there after", function () { $('#example_next').click(); @@ -66,7 +66,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnRowCallback.js index 80227055..d175cfed 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/fnRowCallback.js @@ -12,14 +12,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -72,7 +72,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDeferLoading.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDeferLoading.js index d6adcb73..7a9f2ba8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDeferLoading.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDeferLoading.js @@ -24,13 +24,13 @@ $(document).ready( function () { } } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "No request to the server yet", null, function () { return !gotServerData; } @@ -42,31 +42,31 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Initial data order retained", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Initial data order retained 2", null, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Still no request to the server yet", null, function () { return !gotServerData; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Now we've had a request", null, function () { return gotServerData; } @@ -78,13 +78,13 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDisplayLength.js index e5e1e57b..7a31f7df 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/iDisplayLength.js @@ -8,20 +8,20 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -34,14 +34,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -54,14 +54,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.oPaginate.js index 48298c40..c7fc44d4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.oPaginate.js @@ -12,11 +12,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -25,11 +25,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -39,7 +39,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -59,7 +59,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -68,11 +68,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfo.js index 1b649737..5f77e9de 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfo.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -38,13 +38,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -59,7 +59,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -104,7 +104,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoEmpty.js index 1ce79dd2..a4b82c0d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoEmpty.js @@ -9,17 +9,17 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -27,7 +27,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -44,11 +44,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -56,7 +56,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoPostFix.js index adea1e98..3f2482d0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sInfoPostFix.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -38,14 +38,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sLengthMenu.js index 4e82a3af..6740bcb5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sLengthMenu.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -40,7 +40,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -65,7 +65,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -88,7 +88,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sProcessing.js index 328046ed..fa990668 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sProcessing.js @@ -10,20 +10,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sSearch.js index 1d6e3af9..0d58836b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sSearch.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -21,7 +21,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -29,7 +29,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -45,14 +45,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Blank search has no space (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.js index c9b86813..d15b0330 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.js @@ -13,14 +13,14 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -34,7 +34,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sZeroRecords.js index 308eb696..78668efe 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oLanguage.sZeroRecords.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -27,7 +27,7 @@ $(document).ready( function () { - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oSearch.js index dab33aba..8d8b0626 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/oSearch.js @@ -11,11 +11,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -24,7 +24,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Search term only in object", function () { oSession.fnRestore(); @@ -39,7 +39,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -47,7 +47,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Opera 7.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -63,7 +63,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Opera 7.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxDataProp.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxDataProp.js index c831c383..e0996103 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxDataProp.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxDataProp.js @@ -14,107 +14,107 @@ $(document).ready( function () { "sAjaxDataProp": "test" } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - sorting first column only", - function () { + function () { $('#example thead th:eq(0)').click(); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Firefox 1.0"; return b; } ); /* Basic paging */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Mozilla 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Firefox 1.0"; } ); /* Changing length */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxSource.js index da92ae72..bd6b0421 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sAjaxSource.js @@ -11,10 +11,10 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, - function () { + function () { return oSettings.sAjaxSource == "../../../examples/server_side/scripts/server_processing.php"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sDom.js index 159e2027..5ae7f153 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sDom.js @@ -11,13 +11,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM in document", null, function () { @@ -29,7 +29,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -40,7 +40,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in DOM", null, function () { @@ -79,7 +79,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -91,7 +91,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -129,7 +129,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -142,7 +142,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no length element", function () { oSession.fnRestore(); @@ -161,7 +161,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -172,7 +172,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no filter element", function () { oSession.fnRestore(); @@ -191,7 +191,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -204,7 +204,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no info element", function () { oSession.fnRestore(); @@ -223,7 +223,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -234,7 +234,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no paging element", function () { oSession.fnRestore(); @@ -253,7 +253,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sPaginationType.js index 5895f7e3..9b75a7ea 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/4_server-side/sPaginationType.js @@ -9,43 +9,43 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -56,7 +56,7 @@ $(document).ready( function () { /* Two buttons paging */ var bComplete = false; - oTest.fnWaitTest( + oTest.fnWaitTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -80,7 +80,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -88,7 +88,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -102,7 +102,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Go to two pages previous", function () { nPrevious.click(); @@ -113,7 +113,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next (second last) page", function () { nNext.click(); @@ -123,7 +123,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config.js index 2aff4602..d9c8a9d1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS - Object data source" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -433,135 +433,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -643,14 +643,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -660,7 +660,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -671,7 +671,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -680,21 +680,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -703,14 +703,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -720,7 +720,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -731,21 +731,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -758,7 +758,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -789,21 +789,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -813,7 +813,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -823,7 +823,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -832,7 +832,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_arrays_subobjects.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_arrays_subobjects.js index c37b8ed5..eccebb6b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_arrays_subobjects.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_arrays_subobjects.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS - Array / sub-object data source" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -547,135 +547,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -757,14 +757,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -774,7 +774,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -785,7 +785,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -794,21 +794,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -817,14 +817,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -834,7 +834,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -845,21 +845,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -872,7 +872,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -903,21 +903,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -927,7 +927,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -937,7 +937,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -946,7 +946,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_deep.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_deep.js index 69f17648..86b32a93 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_deep.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_deep.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS - Deep data source" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -661,135 +661,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -871,14 +871,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -888,7 +888,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -899,7 +899,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -908,21 +908,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -931,14 +931,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -948,7 +948,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -959,21 +959,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -986,7 +986,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -1017,21 +1017,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -1041,7 +1041,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -1051,7 +1051,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -1060,7 +1060,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_null_source.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_null_source.js index 2667e017..ffe97791 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_null_source.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_null_source.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: js_data oTest.fnStart( "Sanity checks for DataTables with data from JS - Null data source for last column" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -33,146 +33,146 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Data in last column is empty", null, function () { return $('#example tbody td:eq(4)').html() == ""; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Data in last column is still empty", null, function () { return $('#example tbody td:eq(4)').html() == ""; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -254,14 +254,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -271,7 +271,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -282,7 +282,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -291,21 +291,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -314,14 +314,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -331,7 +331,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -342,21 +342,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -369,7 +369,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -400,21 +400,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -424,7 +424,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -434,7 +434,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -443,7 +443,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects.js index 2aff4602..d9c8a9d1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS - Object data source" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -433,135 +433,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -643,14 +643,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -660,7 +660,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -671,7 +671,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -680,21 +680,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -703,14 +703,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -720,7 +720,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -731,21 +731,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -758,7 +758,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -789,21 +789,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -813,7 +813,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -823,7 +823,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -832,7 +832,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects_subarrays.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects_subarrays.js index 05fdb990..5171bc61 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects_subarrays.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/_zero_config_objects_subarrays.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "Sanity checks for DataTables with data from JS - Object / sub-array data source" ); -oTest.fnTest( +oTest.fnTest( "jQuery.dataTable function", null, function () { return typeof jQuery().dataTable == "function"; } @@ -547,135 +547,135 @@ $(document).ready( function () { $('#example').dataTable( oInit ); /* Basic checks */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length changing div exists", null, function () { return document.getElementById('example_length') != null; } ); - oTest.fnTest( + oTest.fnTest( "Filtering div exists", null, function () { return document.getElementById('example_filter') != null; } ); - oTest.fnTest( + oTest.fnTest( "Information div exists", null, function () { return document.getElementById('example_info') != null; } ); - oTest.fnTest( + oTest.fnTest( "Pagination div exists", null, function () { return document.getElementById('example_paginate') != null; } ); - oTest.fnTest( + oTest.fnTest( "Processing div is off by default", null, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -757,14 +757,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -774,7 +774,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -785,7 +785,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -794,21 +794,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -817,14 +817,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -834,7 +834,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -845,21 +845,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -872,7 +872,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -903,21 +903,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -927,7 +927,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -937,7 +937,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -946,7 +946,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSorting.js index f6b7e3ae..876c6d10 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSorting.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is single column", null, function () { @@ -23,7 +23,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is first column asc", null, function () { @@ -32,14 +32,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -59,7 +59,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -99,7 +99,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -119,7 +119,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -138,7 +138,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -157,7 +157,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -176,7 +176,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -196,7 +196,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -215,7 +215,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -234,7 +234,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -253,7 +253,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -272,7 +272,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSortingFixed.js index 5794cc0f..287219c1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aaSortingFixed.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "No fixed sorting by default", null, function () { @@ -24,7 +24,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -55,7 +55,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSearchable.js index 9f963f99..ff68c488 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSearchable.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { @@ -26,7 +26,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabling sorting on a column removes it from the global filter", function () { oSession.fnRestore(); @@ -46,13 +46,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled on one column has no effect on other columns", function () { oTable.fnFilter("Webkit"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable filtering on multiple columns", function () { oSession.fnRestore(); @@ -72,7 +72,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filter on second disabled column", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSortable.js index 60ec2406..da8104a6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bSortable.js @@ -15,13 +15,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -40,13 +40,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -55,7 +55,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == "X"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -71,14 +71,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -86,7 +86,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -94,7 +94,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bUseRendered.js index 9032e3ac..160e18b0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bUseRendered.js @@ -30,13 +30,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "When bUseRendered is false, original data is used for sorting", function () { mTmp = 0; @@ -45,7 +45,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumns": [ { "mData": "engine" }, - { + { "mData": "browser", "bUseRendered": false, "fnRender": function (a) { @@ -68,7 +68,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "bUseRendered set to false on one columns and true (default) on two others", function () { mTmp = 0; @@ -90,7 +90,7 @@ $(document).ready( function () { } } }, - { + { "mData": "browser", "bUseRendered": false, "fnRender": function (a) { @@ -121,13 +121,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'aaa1'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 2nd column sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 3rd column sorting", function () { $('#example thead th:eq(2)').click(); @@ -136,13 +136,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(2)').html() == 'zzz3'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 4th column sorting", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == '-'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 5th column sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bVisible.js index 638fc45a..831027ce 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.bVisible.js @@ -15,13 +15,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -39,18 +39,18 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -59,14 +59,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -76,7 +76,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -94,32 +94,32 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js index 0c1752d3..cee101cf 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js @@ -22,13 +22,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Single column - fnRender is called twice for each row", null, function () { return mTmp == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -37,7 +37,7 @@ $(document).ready( function () { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumns": [ { "mData": "engine" }, - { + { "fnRender": function (a) { if ( arguments.length != 2 || typeof a.iDataRow=='undefined' || typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' || @@ -58,7 +58,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -86,7 +86,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -114,7 +114,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -137,7 +137,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -146,13 +146,13 @@ $(document).ready( function () { "aoColumns": [ { "mData": "engine" }, { "mData": "browser" }, - { + { "mData": "platform", "fnRender": function (a) { return 'unittest1'; } }, - { + { "mData": "version", "fnRender": function (a) { return 'unittest2'; @@ -163,7 +163,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.iDataSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.iDataSort.js index d82585e3..daf2967c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.iDataSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.iDataSort.js @@ -17,32 +17,32 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on first column is uneffected", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on second column is the order of the fifth", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Reserve sorting on second column uses fifth column as well", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on 5th column retains it's own sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Use 2nd col for sorting 5th col and via-versa - no effect on first col sorting", function () { mTmp = 0; @@ -61,25 +61,25 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col - reversed", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col - reversed", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'Seamonkey 1.1'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sClass.js index c7efc466..2958ab6d 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sClass.js @@ -15,13 +15,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -39,50 +39,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -98,20 +98,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js index 08fe49bc..a04686f9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js @@ -17,7 +17,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sTitle.js index 3f849cf4..0d20b551 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sTitle.js @@ -15,12 +15,12 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -30,7 +30,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -57,7 +57,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sWidth.js index 91ce1004..4cfc0d31 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -21,13 +21,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoSearchCols.js index 35d4e97b..f89f6d4c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/aoSearchCols.js @@ -17,11 +17,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -32,7 +32,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -57,7 +57,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); @@ -82,7 +82,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on single column - escape regex false", function () { oSession.fnRestore(); @@ -107,7 +107,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 3 of 3 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - escape regex false on first, true on second", function () { oSession.fnRestore(); @@ -132,7 +132,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Konqureror 3.3"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns (no records) - escape regex false on first, true on second", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/asStripClasses.js index 30270540..836350a8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/asStripClasses.js @@ -14,7 +14,7 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default row striping is applied", null, function () { @@ -25,7 +25,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -37,7 +37,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "No row striping", function () { oSession.fnRestore(); @@ -67,7 +67,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -93,7 +93,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -117,7 +117,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bAutoWidth.js index 64a5c0e0..eccab9f1 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -21,13 +21,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -37,7 +37,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page match second page", null, function () { @@ -61,7 +61,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on second page match thid page", null, function () { @@ -86,7 +86,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -106,14 +106,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page do not match second page", null, function () { @@ -138,7 +138,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bFilter.js index 0a325f49..09b97302 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bFilter.js @@ -14,14 +14,14 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -41,7 +41,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bInfo.js index 85886237..8a550d89 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bInfo.js @@ -14,14 +14,14 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -41,7 +41,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bLengthChange.js index cfba6024..4ce3a769 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bLengthChange.js @@ -14,7 +14,7 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -39,12 +39,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -66,12 +66,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bPaginate.js index 7c2a3c98..ef891bd8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bPaginate.js @@ -14,7 +14,7 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -23,12 +23,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -50,12 +50,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bProcessing.js index c226fe07..a6414265 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bProcessing.js @@ -21,25 +21,25 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -47,7 +47,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -67,32 +67,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -112,7 +112,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bServerSide.js index 97689785..53d075e0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bServerSide.js @@ -17,7 +17,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, function () { return oSettings.oFeatures.bServerSide == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSort.js index d5cfa965..9bc69a7a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSort.js @@ -14,13 +14,13 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -32,13 +32,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -50,20 +50,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -95,7 +95,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSortClasses.js index 9b127cb5..281fc5f8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/bSortClasses.js @@ -14,27 +14,27 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -42,9 +42,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -53,9 +53,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -66,9 +66,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -79,7 +79,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -87,7 +87,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -106,9 +106,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -116,9 +116,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -129,7 +129,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnDrawCallback.js index 58c2118f..05ae7b3f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnDrawCallback.js @@ -18,14 +18,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "One argument passed", function () { oSession.fnRestore(); @@ -53,7 +53,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -81,7 +81,7 @@ $(document).ready( function () { /* The draw callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -108,7 +108,7 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnHeaderCallback.js index 321335eb..8b27bed8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnHeaderCallback.js @@ -16,14 +16,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { /* The header callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnHeaderCallback called once per draw", function () { oSession.fnRestore(); @@ -79,14 +79,14 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 3; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -108,7 +108,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -135,7 +135,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -165,7 +165,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -195,7 +195,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -221,7 +221,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnInitComplete.js index f700607b..dd5402f0 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnInitComplete.js @@ -18,14 +18,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two arguments passed (for Ajax!)", function () { oSession.fnRestore(); @@ -49,7 +49,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -72,7 +72,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -95,7 +95,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete never called there after", function () { $('#example_next').click(); @@ -106,7 +106,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnRowCallback.js index 25c78120..d54e3626 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnRowCallback.js @@ -18,14 +18,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -50,7 +50,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -96,7 +96,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -121,7 +121,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnServerData.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnServerData.js index f03deebd..207a6f1b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnServerData.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/fnServerData.js @@ -4,7 +4,7 @@ oTest.fnStart( "fnServerData for Ajax sourced data" ); $(document).ready( function () { var mPass; - oTest.fnTest( + oTest.fnTest( "Argument length", function () { $('#example').dataTable( { @@ -24,7 +24,7 @@ $(document).ready( function () { function () { return mPass == 4; } ); - oTest.fnTest( + oTest.fnTest( "Url", function () { $('#example').dataTable( { @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array", function () { $('#example').dataTable( { @@ -66,7 +66,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Callback function", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/iDisplayLength.js index 47264e08..56983e65 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/iDisplayLength.js @@ -14,20 +14,20 @@ $(document).ready( function () { ] } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -46,14 +46,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -72,14 +72,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.oPaginate.js index 3400bb58..e0c286ac 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.oPaginate.js @@ -18,11 +18,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -31,11 +31,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -45,7 +45,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -80,11 +80,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfo.js index 6ad42910..53d60859 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfo.js @@ -15,20 +15,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -50,13 +50,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -77,7 +77,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -119,7 +119,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -140,7 +140,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoEmpty.js index 116f3de6..da767fff 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoEmpty.js @@ -15,17 +15,17 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -33,7 +33,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -56,11 +56,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -68,7 +68,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -88,7 +88,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoPostFix.js index 9f6687cc..67bbcdc7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sInfoPostFix.js @@ -15,20 +15,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -50,14 +50,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sLengthMenu.js index 6abb0416..a079b2e8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sLengthMenu.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -46,7 +46,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -77,7 +77,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -106,7 +106,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js index 5e072411..ec387cf5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js @@ -16,20 +16,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -52,7 +52,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sSearch.js index 57927929..316c2961 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sSearch.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -27,7 +27,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -35,7 +35,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -57,14 +57,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Blank search has a no space (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sUrl.js index 80d04727..8e8d304a 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sUrl.js @@ -19,14 +19,14 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -46,7 +46,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sZeroRecords.js index 26e17835..c0f4564b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sZeroRecords.js @@ -15,7 +15,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -29,7 +29,7 @@ $(document).ready( function () { - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oSearch.js index cdcf1103..42dc3572 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/oSearch.js @@ -15,11 +15,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -28,7 +28,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Search term only in object", function () { oSession.fnRestore(); @@ -49,7 +49,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -57,7 +57,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -79,7 +79,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -101,7 +101,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); @@ -123,7 +123,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex false", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sAjaxSource.js index ea3f9836..00ae9b3f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sAjaxSource.js @@ -17,10 +17,10 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, - function () { + function () { return oSettings.sAjaxSource == "../../../examples/ajax/sources/objects.txt"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sDom.js index 3cacaf3c..2486413b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sDom.js @@ -17,13 +17,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM in document", null, function () { @@ -35,7 +35,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -46,7 +46,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -66,7 +66,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in DOM", null, function () { @@ -91,7 +91,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -103,7 +103,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -147,7 +147,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -160,7 +160,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no length element", function () { oSession.fnRestore(); @@ -185,7 +185,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -196,7 +196,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no filter element", function () { oSession.fnRestore(); @@ -221,7 +221,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -234,7 +234,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no info element", function () { oSession.fnRestore(); @@ -259,7 +259,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -270,7 +270,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no paging element", function () { oSession.fnRestore(); @@ -295,7 +295,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sPaginationType.js index e3b67dac..8bec597c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/5_ajax_objects/sPaginationType.js @@ -15,43 +15,43 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -62,7 +62,7 @@ $(document).ready( function () { /* Two buttons paging */ var bComplete = false; - oTest.fnWaitTest( + oTest.fnWaitTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -90,7 +90,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -98,7 +98,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -112,7 +112,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Go to two pages previous", function () { nPrevious.click(); @@ -123,7 +123,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next (second last) page", function () { nNext.click(); @@ -133,7 +133,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/_zero_config.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/_zero_config.js index aa257f94..52180696 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/_zero_config.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/_zero_config.js @@ -8,116 +8,116 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 TR elements available from fnGetNodes", null, function () { return $('#example').dataTable().fnGetNodes().length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "14 TR elements available from fnGetNodes after sort", null, function () { return $('#example').dataTable().fnGetNodes().length == 14; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } @@ -199,14 +199,14 @@ $(document).ready( function () { oTest.fnTest( "Information with filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter 'Win' second page", function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); @@ -216,7 +216,7 @@ $(document).ready( function () { $('#example_next').click(); $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 31 to 31 of 31 entries (filtered from 57 total entries)"; } ); @@ -227,7 +227,7 @@ $(document).ready( function () { $('#example_previous').click(); $('#example_previous').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -236,21 +236,21 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter increased to 'Win 98'", function () { $('#example_filter input').val("Win 98").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter decreased to 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -259,14 +259,14 @@ $(document).ready( function () { function () { $('#example_next').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 11 to 20 of 31 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Information with filter removed", function () { $('#example_filter input').val("").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -276,7 +276,7 @@ $(document).ready( function () { */ oTest.fnWaitTest( "Filter 'W' - rows", - function () { + function () { /* Reset the table such that the old sorting doesn't mess things up */ oSession.fnRestore(); $('#example').dataTable( oInit ); @@ -287,21 +287,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'W' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 42 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Wi'", function () { $('#example_filter input').val("Wi").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 32 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'Win'", function () { $('#example_filter input').val("Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -314,7 +314,7 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting column 1 info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 31 entries (filtered from 57 total entries)"; } ); @@ -345,21 +345,21 @@ $(document).ready( function () { oTest.fnTest( "Filter 'Win' - sorting col 3 - reversed info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 6 of 6 entries (filtered from 57 total entries)"; } ); oTest.fnTest( "Filter 'nothinghere'", function () { $('#example_filter input').val("nothinghere").keyup(); }, - function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == + function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); oTest.fnTest( "Filter 'nothinghere' - info", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -369,7 +369,7 @@ $(document).ready( function () { $('#example_filter input').val("").keyup(); $('#example thead th:eq(0)').click(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); @@ -379,7 +379,7 @@ $(document).ready( function () { $('#example_filter input').val("Win").keyup(); $('#example_filter input').val("GeckoWin").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 0 to 0 of 0 entries (filtered from 57 total entries)"; } ); @@ -388,7 +388,7 @@ $(document).ready( function () { function () { $('#example_filter input').val("Gecko Win").keyup(); }, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 17 entries (filtered from 57 total entries)"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSorting.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSorting.js index a46004b9..a71b5ebc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSorting.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSorting.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is single column", null, function () { @@ -17,7 +17,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default sorting is first column asc", null, function () { @@ -26,14 +26,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is applied", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column asc", function () { oSession.fnRestore(); @@ -47,7 +47,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single string column desc", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column asc", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom sorting on single int column desc", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string asc", function () { oSession.fnRestore(); @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / string desc", function () { oSession.fnRestore(); @@ -115,7 +115,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string asc", function () { oSession.fnRestore(); @@ -128,7 +128,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "iPod Touch / iPhone"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / string desc", function () { oSession.fnRestore(); @@ -142,7 +142,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int asc", function () { oSession.fnRestore(); @@ -155,7 +155,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string asc / int desc", function () { oSession.fnRestore(); @@ -168,7 +168,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "1.9"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int asc", function () { oSession.fnRestore(); @@ -181,7 +181,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "125.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (2 column) - string desc / int desc", function () { oSession.fnRestore(); @@ -194,7 +194,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column sorting (3 column) - string asc / int asc / string asc", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSortingFixed.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSortingFixed.js index 71055222..7211b288 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSortingFixed.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aaSortingFixed.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "No fixed sorting by default", null, function () { @@ -18,7 +18,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -35,7 +35,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); @@ -43,7 +43,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)", function () { oSession.fnRestore(); @@ -57,7 +57,7 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)", function () { $('#example thead th:eq(1)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSearchable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSearchable.js index 54c946a5..d3baf91e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSearchable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSearchable.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Columns are searchable by default", function () { oTable.fnFilter("Camino"); }, function () { @@ -20,7 +20,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabling sorting on a column removes it from the global filter", function () { oSession.fnRestore(); @@ -41,13 +41,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled on one column has no effect on other columns", function () { oTable.fnFilter("Webkit"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable filtering on multiple columns", function () { oSession.fnRestore(); @@ -68,7 +68,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filter on second disabled column", function () { oTable.fnFilter("Camino"); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSortable.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSortable.js index 6f7b2022..f6976fc2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSortable.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bSortable.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are sortable by default", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can disable sorting from one column", function () { oSession.fnRestore(); @@ -35,13 +35,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disabled column has no sorting class", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Other columns can still sort", function () { $('#example thead th:eq(4)').click(); @@ -50,7 +50,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == "X"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Disable sorting on multiple columns - no sorting classes", function () { oSession.fnRestore(); @@ -67,14 +67,14 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example thead th:eq(1)').hasClass("sorting") || $('#example thead th:eq(3)').hasClass("sorting") return bReturn == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 1 has no effect", function () { $('#example thead th:eq(1)').click(); @@ -82,7 +82,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() != "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -90,7 +90,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Second sort on disabled column 2 has no effect", function () { $('#example thead th:eq(3)').click(); @@ -98,7 +98,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() != "-"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Even with multiple disabled sorting columns other columns can still sort", function () { $('#example thead th:eq(4)').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bUseRendered.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bUseRendered.js index d64f70d7..fa99b5a7 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bUseRendered.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bUseRendered.js @@ -28,13 +28,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default for bUseRendered is true - rendered data is used for sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'aaa'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "When bUseRendered is false, original data is used for sorting", function () { mTmp = 0; @@ -44,7 +44,7 @@ $(document).ready( function () { "bDeferRender": true, "aoColumns": [ null, - { + { "bUseRendered": false, "fnRender": function (a) { if ( a.iDataRow == 0 ) { @@ -66,7 +66,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "bUseRendered set to false on one columns and true (default) on two others", function () { mTmp = 0; @@ -88,7 +88,7 @@ $(document).ready( function () { } } }, - { + { "bUseRendered": false, "fnRender": function (a) { if ( a.iDataRow == 0 ) { @@ -117,13 +117,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'aaa1'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 2nd column sorting", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 3rd column sorting", function () { $('#example thead th:eq(2)').click(); @@ -132,13 +132,13 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(2)').html() == 'zzz3'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 4th column sorting", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == '-'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multi-column rendering - 5th column sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bVisible.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bVisible.js index ccc84d7d..6a4a72c4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bVisible.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.bVisible.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "All columns are visible by default", null, function () { return $('#example tbody tr:eq(0) td').length == 5; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes td column from DOM", function () { oSession.fnRestore(); @@ -34,18 +34,18 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide one column and it removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 4; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct thead column has been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Platform(s)" && jqNodes[2].innerHTML == "Engine version" && @@ -54,14 +54,14 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "The correct tbody column has been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "Gnome" && jqNodes[2].innerHTML == "1.8" && @@ -71,7 +71,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can hide multiple columns and it removes td column from DOM", function () { oSession.fnRestore(); @@ -90,32 +90,32 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - removes thead th column from DOM", null, function () { return $('#example thead tr:eq(0) th').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct thead columns have been hidden", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Engine version" return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Multiple hide - the correct tbody columns have been hidden", function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { var jqNodes = $('#example tbody tr:eq(0) td'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Gecko" && jqNodes[1].innerHTML == "1" return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js index eefe2ade..c82981e6 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js @@ -20,13 +20,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Single column - fnRender is called once for each row", null, function () { return mTmp == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Confirm that fnRender passes two arguments with four parameters", function () { mTmp = true; @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender iDataColumn is row number", function () { var iCount = 0; @@ -82,7 +82,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender iDataColumn is the column", function () { mTmp = true; @@ -108,7 +108,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRender aData is data array of correct size", function () { mTmp = true; @@ -134,7 +134,7 @@ $(document).ready( function () { function () { return mTmp; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -155,7 +155,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'unittest'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Passed back data is put into the DOM", function () { oSession.fnRestore(); @@ -176,7 +176,7 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(0) td:eq(2)').html() == 'unittest1' && $('#example tbody tr:eq(0) td:eq(3)').html() == 'unittest2'; return bReturn; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.iDataSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.iDataSort.js index 5c5080ab..783e3cec 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.iDataSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.iDataSort.js @@ -18,32 +18,32 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on first column is uneffected", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on second column is the order of the fifth", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Reserve sorting on second column uses fifth column as well", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting on 5th column retains it's own sorting", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Use 2nd col for sorting 5th col and via-versa - no effect on first col sorting", function () { mTmp = 0; @@ -63,25 +63,25 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == 'Gecko'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'A'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "2nd col sorting uses fifth col - reversed", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(4)').html() == 'X'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'All others'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "5th col sorting uses 2nd col - reversed", function () { $('#example thead th:eq(4)').click(); }, function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == 'Seamonkey 1.1'; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sClass.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sClass.js index 5c2ffd9a..ffbe931e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sClass.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sClass.js @@ -9,13 +9,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "By default the test class hasn't been applied to the column (sanity!)", null, function () { return $('#example tbody tr:eq(0) td:eq(2)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - first row", function () { oSession.fnRestore(); @@ -34,50 +34,50 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - third row", null, function () { return $('#example tbody tr:eq(3) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - last row", null, function () { return $('#example tbody tr:eq(9) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 1st", null, function () { return $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to other columns - 5th", null, function () { return $('#example tbody tr:eq(3) td:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - seventh row - second page", function () { $('#example_next').click(); }, function () { return $('#example tbody tr:eq(6) td:eq(2)').hasClass('unittest'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to header", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Add a class to a single column - has not applied to footer", null, function () { return $('#example thead tr:eq(3) th:eq(4)').hasClass('unittest') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - first row", function () { oSession.fnRestore(); @@ -94,20 +94,20 @@ $(document).ready( function () { } ); }, function () { - var bReturn = + var bReturn = $('#example tbody tr:eq(3) td:eq(0)').hasClass('unittest2') && $('#example tbody tr:eq(8) td:eq(3)').hasClass('unittest1'); return bReturn; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 1", null, function () { return $('#example tbody tr:eq(0) td:eq(4)').hasClass('unittest1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Class defined for multiple columns - has not applied to other columns - 5th 2", null, function () { return $('#example tbody tr:eq(6) td:eq(4)').hasClass('unittest2') == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sName.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sName.js index a197bc31..4e5a17ad 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sName.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sName.js @@ -18,7 +18,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Names are stored in the columns object", null, function () { return oSettings.aoColumns[3].sName =="unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sTitle.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sTitle.js index e0e02819..4561fbe4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sTitle.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sTitle.js @@ -9,12 +9,12 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "If not given, then the columns titles are empty", null, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "Browser" && jqNodes[2].innerHTML == "Platform(s)" && @@ -24,7 +24,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set a single column title - and others are read from DOM", function () { oSession.fnRestore(); @@ -42,7 +42,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test" && jqNodes[2].innerHTML == "Platform(s)" && @@ -52,7 +52,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Can set multiple column titles", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { }, function () { var jqNodes = $('#example thead tr:eq(0) th'); - var bReturn = + var bReturn = jqNodes[0].innerHTML == "Rendering engine" && jqNodes[1].innerHTML == "unit test 1" && jqNodes[2].innerHTML == "Platform(s)" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sWidth.js index 251d0792..9cb05834 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.sWidth.js @@ -1,7 +1,7 @@ // DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sWidth" ); -/* NOTE - we need to disable the auto width for the majority of these test in order to preform +/* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales columns as required */ @@ -22,13 +22,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", null, function () { return $('#example thead th:eq(1)')[0].style.width == "40%"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width disabled the width for one column is appled", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "With auto width, it will make the smallest column the largest with percentage width given", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoSearchCols.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoSearchCols.js index aa61f90c..083f8817 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoSearchCols.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/aoSearchCols.js @@ -11,11 +11,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be to have a empty colums array", null, function () { - var bReturn = + var bReturn = oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex && oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex && oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex && @@ -26,7 +26,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on a single column - no regex statement given", function () { oSession.fnRestore(); @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 9 of 9 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - no regex statement given", function () { oSession.fnRestore(); @@ -64,7 +64,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(3)').html() == "1.5"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on single column - escape regex false", function () { oSession.fnRestore(); @@ -83,7 +83,7 @@ $(document).ready( function () { function () { return $('#example_info').html() == "Showing 1 to 3 of 3 entries (filtered from 57 total entries)"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns - escape regex false on first, true on second", function () { oSession.fnRestore(); @@ -102,7 +102,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Konqureror 3.3"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search on two columns (no records) - escape regex false on first, true on second", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/asStripClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/asStripClasses.js index 038447f2..a26b6669 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/asStripClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/asStripClasses.js @@ -8,7 +8,7 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default row striping is applied", null, function () { @@ -19,7 +19,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Row striping on the second page", function () { $('#example_next').click(); }, function () { @@ -31,7 +31,7 @@ $(document).ready( function () { ); /* No striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "No row striping", function () { oSession.fnRestore(); @@ -55,7 +55,7 @@ $(document).ready( function () { ); /* Custom striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [2]", function () { oSession.fnRestore(); @@ -75,7 +75,7 @@ $(document).ready( function () { /* long array of striping */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping [4]", function () { oSession.fnRestore(); @@ -93,7 +93,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Custom striping is restarted on second page [2]", function () { $('#example_next').click(); }, function () { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bAutoWidth.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bAutoWidth.js index 45b5a003..477691d2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bAutoWidth.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bAutoWidth.js @@ -3,7 +3,7 @@ oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly - * differently. However, we certainly can test the principle of what should happen (column + * differently. However, we certainly can test the principle of what should happen (column * width doesn't change over pages) */ @@ -15,13 +15,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width is enabled by default", null, function () { return oSettings.oFeatures.bAutoWidth; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column has a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style').match(/width/i); } @@ -31,7 +31,7 @@ $(document).ready( function () { This would seem like a better test - but there appear to be difficulties with tables which are bigger (calculated) than there is actually room for. I suspect this is actually a bug in datatables - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page match second page", null, function () { @@ -55,7 +55,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on second page match thid page", null, function () { @@ -80,7 +80,7 @@ $(document).ready( function () { */ /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width can be disabled", function () { oSession.fnRestore(); @@ -94,14 +94,14 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bAutoWidth == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "First column does not have a width assigned to it", null, function () { return $('#example thead th:eq(0)').attr('style') == null; } ); /* - oTest.fnWaitTest( + oTest.fnWaitTest( "Check column widths on first page do not match second page", null, function () { @@ -126,7 +126,7 @@ $(document).ready( function () { */ /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Auto width enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bFilter.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bFilter.js index f40d7ae0..4ce6f1fc 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bFilter.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bFilter.js @@ -8,14 +8,14 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering div exists by default", null, function () { return document.getElementById('example_filter') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Fltering can be disabled", function () { oSession.fnRestore(); @@ -29,7 +29,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Filtering enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bInfo.js index 4cdd5e1e..b06403cd 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bInfo.js @@ -8,14 +8,14 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info can be disabled", function () { oSession.fnRestore(); @@ -29,7 +29,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Info enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bLengthChange.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bLengthChange.js index 2ca7c0d5..197f7923 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bLengthChange.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bLengthChange.js @@ -8,7 +8,7 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } @@ -33,12 +33,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Info takes length into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Change length can be disabled", function () { oSession.fnRestore(); @@ -54,12 +54,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information takes length disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Length change enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bPaginate.js index ed63fa83..e0b112c9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bPaginate.js @@ -8,7 +8,7 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion div exists by default", null, function () { return document.getElementById('example_paginate') != null; } @@ -17,12 +17,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 10 of 57 entries"; } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -38,12 +38,12 @@ $(document).ready( function () { oTest.fnWaitTest( "Information div takes paging disabled into account", null, - function () { return document.getElementById('example_info').innerHTML == + function () { return document.getElementById('example_info').innerHTML == "Showing 1 to 57 of 57 entries"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bProcessing.js index 4193c701..57b36aaf 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bProcessing.js @@ -15,25 +15,25 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing is off by default", null, function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div cannot be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing') == null; } @@ -41,7 +41,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing can be enabled", function () { oSession.fnRestore(); @@ -55,32 +55,32 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is hidden by default", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be shown", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing').style.visibility = "visible"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div can be hidden", function () { oTable.oApi._fnProcessingDisplay( oSettings, false ); }, function () { return document.getElementById('example_processing').style.visibility = "hidden"; } ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing disabled override", function () { oSession.fnRestore(); @@ -94,7 +94,7 @@ $(document).ready( function () { function () { return oSettings.oFeatures.bProcessing == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing div is not in the DOM", function () { oTable.oApi._fnProcessingDisplay( oSettings, true ); }, function () { return document.getElementById('example_processing') == null; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bServerSide.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bServerSide.js index da58fac0..03f9272c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bServerSide.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bServerSide.js @@ -11,7 +11,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, function () { return oSettings.oFeatures.bServerSide == false; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSort.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSort.js index 2a252d95..2a166e93 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSort.js @@ -8,13 +8,13 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting is on by default", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting Asc by default class applied", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc"); } @@ -26,13 +26,13 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class removed from first column", null, function () { return $('#example thead th:eq(0)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting asc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc"); } @@ -44,20 +44,20 @@ $(document).ready( function () { function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting acs class removed from second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_asc") != true; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting desc class applied to second column", null, function () { return $('#example thead th:eq(1)').hasClass("sorting_desc"); } ); /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Pagiantion can be disabled", function () { oSession.fnRestore(); @@ -83,7 +83,7 @@ $(document).ready( function () { ); /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSortClasses.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSortClasses.js index 33cd0a28..6214d907 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSortClasses.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/bSortClasses.js @@ -8,27 +8,27 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are applied to all required cells", null, function () { return $('#example tbody tr:eq(7) td:eq(0)').hasClass('sorting_1'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes are not applied to non-sorting columns", null, function () { return $('#example tbody tr:eq(0) td:eq(1)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 1", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -36,9 +36,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 2", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') && @@ -47,9 +47,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting multi-column - add column 3", - function () { + function () { oDispacher.click( $('#example thead th:eq(3)')[0], { 'shift': true } ); }, function () { @@ -60,9 +60,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Remove sorting classes on single column sort", - function () { + function () { $('#example thead th:eq(4)').click(); }, function () { @@ -73,7 +73,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting class 1 was added", null, function () { return $('#example tbody tr:eq(1) td:eq(4)').hasClass('sorting_1'); } @@ -81,7 +81,7 @@ $(document).ready( function () { /* Check can disable */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes can be disabled", function () { oSession.fnRestore(); @@ -94,9 +94,9 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 1 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -104,9 +104,9 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes disabled - add column 2 - no effect", - function () { + function () { oDispacher.click( $('#example thead th:eq(2)')[0], { 'shift': true } ); }, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting_1') == false && @@ -117,7 +117,7 @@ $(document).ready( function () { /* Enable makes no difference */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Sorting classes enabled override", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnDrawCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnDrawCallback.js index 8d06e246..6fc4df8c 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnDrawCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnDrawCallback.js @@ -12,14 +12,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnDrawCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "One argument passed", function () { oSession.fnRestore(); @@ -41,7 +41,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -63,7 +63,7 @@ $(document).ready( function () { /* The draw callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on first draw", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once on each draw there after as well", function () { $('#example_next').click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnHeaderCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnHeaderCallback.js index 2e2d52f6..89b81908 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnHeaderCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnHeaderCallback.js @@ -10,14 +10,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass, bInit; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnHeaderCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Five arguments passed", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { /* The header callback is called once for the init and then when the data is added */ - oTest.fnWaitTest( + oTest.fnWaitTest( "fnHeaderCallback called once per draw", function () { oSession.fnRestore(); @@ -61,14 +61,14 @@ $(document).ready( function () { function () { return mPass == 2 && bInit; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 3; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -84,7 +84,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on first page", function () { oSession.fnRestore(); @@ -105,7 +105,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iStart correct on second page", function () { oSession.fnRestore(); @@ -129,7 +129,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "iEnd correct on second page", function () { oSession.fnRestore(); @@ -153,7 +153,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); @@ -173,7 +173,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnInitComplete.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnInitComplete.js index f49b7216..d2542a84 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnInitComplete.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnInitComplete.js @@ -12,14 +12,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two arguments passed (for Ajax!)", function () { oSession.fnRestore(); @@ -37,7 +37,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); @@ -71,7 +71,7 @@ $(document).ready( function () { function () { return mPass == 1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnInitComplete never called there after", function () { $('#example_next').click(); @@ -82,7 +82,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnRowCallback.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnRowCallback.js index 41c7c9b3..0a9b4ef9 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnRowCallback.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnRowCallback.js @@ -12,14 +12,14 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); var mPass; - oTest.fnWaitTest( + oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnRowCallback == null; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Four arguments passed", function () { oSession.fnRestore(); @@ -38,7 +38,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback called once for each drawn row", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return mPass == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); @@ -72,7 +72,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(1)').hasClass('unit_test'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); @@ -91,7 +91,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Data array has length matching columns", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnServerData.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnServerData.js index 5c4b3191..809e8ba5 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnServerData.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/fnServerData.js @@ -4,7 +4,7 @@ oTest.fnStart( "fnServerData for Ajax sourced data" ); $(document).ready( function () { var mPass; - oTest.fnTest( + oTest.fnTest( "Argument length", function () { $('#example').dataTable( { @@ -18,7 +18,7 @@ $(document).ready( function () { function () { return mPass == 4; } ); - oTest.fnTest( + oTest.fnTest( "Url", function () { $('#example').dataTable( { @@ -33,7 +33,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Data array", function () { $('#example').dataTable( { @@ -48,7 +48,7 @@ $(document).ready( function () { function () { return mPass; } ); - oTest.fnTest( + oTest.fnTest( "Callback function", function () { $('#example').dataTable( { diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/iDisplayLength.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/iDisplayLength.js index 5aa7ff30..6ffb0c06 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/iDisplayLength.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/iDisplayLength.js @@ -8,20 +8,20 @@ $(document).ready( function () { "bDeferRender": true } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default length is ten", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10", null, function () { return $('#example_length select').val() == 10; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 25", function () { oSession.fnRestore(); @@ -34,14 +34,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 25; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 100", function () { oSession.fnRestore(); @@ -54,14 +54,14 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 57; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 25", null, function () { return $('#example_length select').val() == 100; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Set initial length to 23 (unknown select menu length)", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return $('#example tbody tr').length == 23; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Select menu shows 10 (since 23 is unknow)", null, function () { return $('#example_length select').val() == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.oPaginate.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.oPaginate.js index 908136e1..23cb4c9b 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.oPaginate.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.oPaginate.js @@ -12,11 +12,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate defaults", null, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && @@ -25,11 +25,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && @@ -39,7 +39,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); @@ -59,7 +59,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && @@ -68,11 +68,11 @@ $(document).ready( function () { } ); - oTest.fnTest( + oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { - var bReturn = + var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfo.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfo.js index 9849dc7d..f87a2638 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfo.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfo.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default", null, function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - without any macros", function () { oSession.fnRestore(); @@ -38,13 +38,13 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfo == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _START_ only", function () { oSession.fnRestore(); @@ -59,7 +59,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _END_ only", function () { oSession.fnRestore(); @@ -74,7 +74,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macro _TOTAL_ only", function () { oSession.fnRestore(); @@ -89,7 +89,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_ and _END_", function () { oSession.fnRestore(); @@ -104,7 +104,7 @@ $(document).ready( function () { function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info language can be defined - with macros _START_, _END_ and _TOTAL_", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoEmpty.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoEmpty.js index e5ad5e9e..411742c4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoEmpty.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoEmpty.js @@ -9,17 +9,17 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", function () { oTable.fnFilter("nothinghere"); }, function () { return oSettings.oLanguage.sInfoEmpty == "Showing 0 to 0 of 0 entries"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "Showing 0 to 0 of 0 entries"; return bReturn; @@ -27,7 +27,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info empty language can be defined", function () { oSession.fnRestore(); @@ -44,11 +44,11 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoEmpty == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit test"; return bReturn; @@ -56,7 +56,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macro's replaced", function () { oSession.fnRestore(); @@ -70,7 +70,7 @@ $(document).ready( function () { oTable.fnFilter("nothinghere"); }, function () { - var bReturn = document.getElementById('example_info').innerHTML.replace( + var bReturn = document.getElementById('example_info').innerHTML.replace( ' '+oSettings.oLanguage.sInfoFiltered.replace( '_MAX_', '57' ), "" ) == "unit 1 0 0 test"; return bReturn; diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoPostFix.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoPostFix.js index deced0fd..2073aace 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoPostFix.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sInfoPostFix.js @@ -9,20 +9,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language is '' (blank) by default", null, function () { return oSettings.oLanguage.sInfoPostFix == ""; } ); - oTest.fnTest( + oTest.fnTest( "Width no post fix, the basic info shows", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Info post fix language can be defined", function () { oSession.fnRestore(); @@ -38,14 +38,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info empty language default is in the DOM", null, function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Macros have no effect in the post fix", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Post fix is applied after fintering info", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sLengthMenu.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sLengthMenu.js index 284c588e..db834ad8 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sLengthMenu.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sLengthMenu.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu language is 'Show _MENU_ entries' by default", null, function () { return oSettings.oLanguage.sLengthMenu == "Show _MENU_ entries"; } @@ -40,7 +40,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - no _MENU_ macro", function () { oSession.fnRestore(); @@ -56,7 +56,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sLengthMenu == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Menu length language definition is in the DOM", null, function () { @@ -65,7 +65,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Menu length language can be defined - with _MENU_ macro", function () { oSession.fnRestore(); @@ -88,7 +88,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Only the _MENU_ macro", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sProcessing.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sProcessing.js index 65f2e6d0..fcdfd533 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sProcessing.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sProcessing.js @@ -10,20 +10,20 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language is 'Processing...' by default", null, function () { return oSettings.oLanguage.sProcessing == "Processing..."; } ); - oTest.fnTest( + oTest.fnTest( "Processing language default is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Processing language can be defined", function () { oSession.fnRestore(); @@ -40,7 +40,7 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sProcessing == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Processing language definition is in the DOM", null, function () { return document.getElementById('example_processing').innerHTML = "unit test"; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sSearch.js index d6f6f097..7bff7495 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sSearch.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language is 'Search:' by default", null, function () { return oSettings.oLanguage.sSearch == "Search:"; } @@ -21,7 +21,7 @@ $(document).ready( function () { function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 } ); - oTest.fnTest( + oTest.fnTest( "Search language default is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text() @@ -29,7 +29,7 @@ $(document).ready( function () { ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search language can be defined", function () { oSession.fnRestore(); @@ -45,14 +45,14 @@ $(document).ready( function () { function () { return oSettings.oLanguage.sSearch == "unit test"; } ); - oTest.fnTest( + oTest.fnTest( "Info language definition is in the DOM", null, function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Blank search has a no space (separator) inserted", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sUrl.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sUrl.js index 03001855..59f18eaf 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sUrl.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sUrl.js @@ -13,14 +13,14 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnTest( + oTest.fnTest( "sUrl is blank by default", null, function () { return oSettings.oLanguage.sUrl == ""; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Loading of German file loads language information", function () { oSession.fnRestore(); @@ -34,7 +34,7 @@ $(document).ready( function () { oSettings = oTable.fnSettings(); }, function () { - var bReturn = + var bReturn = oSettings.oLanguage.sProcessing == "Bitte warten..." && oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" && oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sZeroRecords.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sZeroRecords.js index b1a17a24..9bc0655e 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sZeroRecords.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oLanguage.sZeroRecords.js @@ -9,7 +9,7 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language is 'No matching records found' by default", null, function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; } @@ -23,7 +23,7 @@ $(document).ready( function () { - oTest.fnWaitTest( + oTest.fnWaitTest( "Zero records language can be defined", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oSearch.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oSearch.js index 1bc693ab..cb98c342 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oSearch.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/oSearch.js @@ -9,11 +9,11 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default values should be blank", null, function () { - var bReturn = oSettings.oPreviousSearch.sSearch == "" && + var bReturn = oSettings.oPreviousSearch.sSearch == "" && !oSettings.oPreviousSearch.bRegex; return bReturn; } @@ -22,7 +22,7 @@ $(document).ready( function () { /* This test might be considered iffy since the full object isn't given, but it's reasonable to * expect DataTables to cope with this. It should just assumine regex false */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Search term only in object", function () { oSession.fnRestore(); @@ -37,7 +37,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Gecko"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "New search will kill old one", function () { oTable.fnFilter("Opera"); @@ -45,7 +45,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex true", function () { oSession.fnRestore(); @@ -61,7 +61,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(1)').html() == "Nintendo DS browser"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search plain text term and escape regex false", function () { oSession.fnRestore(); @@ -77,7 +77,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Presto"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex true", function () { oSession.fnRestore(); @@ -93,7 +93,7 @@ $(document).ready( function () { function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Search regex text term and escape regex false", function () { oSession.fnRestore(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp.js index e4b875c1..ead02891 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp.js @@ -10,105 +10,105 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp2.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp2.js index bd0c3466..e76a8fd4 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp2.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxDataProp2.js @@ -10,105 +10,105 @@ $(document).ready( function () { }; $('#example').dataTable( oInit ); - oTest.fnWaitTest( + oTest.fnWaitTest( "10 rows shown on the first page", null, function () { return $('#example tbody tr').length == 10; } ); - oTest.fnTest( + oTest.fnTest( "Initial sort occured", null, function () { return $('#example tbody td:eq(0)').html() == "Gecko"; } ); /* Need to use the WaitTest for sorting due to the setTimeout datatables uses */ - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (third click) on second column", function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (first click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "-"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting (second click) on numeric column", function () { $('#example thead th:eq(3)').click(); }, function () { return $('#example tbody td:eq(3)').html() == "522.1"; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column (first click)", - function () { + function () { $('#example thead th:eq(0)').click(); oDispacher.click( $('#example thead th:eq(1)')[0], { 'shift': true } ); }, - function () { var b = - $('#example tbody td:eq(0)').html() == "Gecko" && + function () { var b = + $('#example tbody td:eq(0)').html() == "Gecko" && $('#example tbody td:eq(1)').html() == "Camino 1.0"; return b; } ); - oTest.fnTest( + oTest.fnTest( "Sorting multi-column - sorting second column only", - function () { + function () { $('#example thead th:eq(1)').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Basic paging */ - oTest.fnTest( + oTest.fnTest( "Paging to second page", function () { $('#example_next').click(); }, function () { return $('#example tbody td:eq(1)').html() == "IE Mobile"; } ); - oTest.fnTest( + oTest.fnTest( "Paging to first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); - oTest.fnTest( + oTest.fnTest( "Attempting to page back beyond the first page", function () { $('#example_previous').click(); }, function () { return $('#example tbody td:eq(1)').html() == "All others"; } ); /* Changing length */ - oTest.fnTest( + oTest.fnTest( "Changing table length to 25 records", function () { $("select[name=example_length]").val('25').change(); }, function () { return $('#example tbody tr').length == 25; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 50 records", function () { $("select[name=example_length]").val('50').change(); }, function () { return $('#example tbody tr').length == 50; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 100 records", function () { $("select[name=example_length]").val('100').change(); }, function () { return $('#example tbody tr').length == 57; } ); - oTest.fnTest( + oTest.fnTest( "Changing table length to 10 records", function () { $("select[name=example_length]").val('10').change(); }, function () { return $('#example tbody tr').length == 10; } diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxSource.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxSource.js index 0672ed72..9d14e048 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxSource.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sAjaxSource.js @@ -11,10 +11,10 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Server side is off by default", null, - function () { + function () { return oSettings.sAjaxSource == "../../../examples/ajax/sources/arrays.txt"; } ); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sDom.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sDom.js index 4227ff0a..f54fd007 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sDom.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sDom.js @@ -11,13 +11,13 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM varaible", null, function () { return oSettings.sDom == "lfrtip"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Default DOM in document", null, function () { @@ -29,7 +29,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -40,7 +40,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in code propagates", function () { oSession.fnRestore(); @@ -54,7 +54,7 @@ $(document).ready( function () { function () { return oSettings.sDom == '<"wrapper"flipt>'; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 1 in DOM", null, function () { @@ -79,7 +79,7 @@ $(document).ready( function () { var nTable = document.getElementById('example'); var nCustomWrapper = $('div.wrapper')[0]; - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrapper && nNodes[2] == nFilter && @@ -91,7 +91,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check example 2 in DOM", function () { oSession.fnRestore(); @@ -129,7 +129,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nCustomWrappers[0] && nNodes[2] == nLength && @@ -142,7 +142,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no length element", function () { oSession.fnRestore(); @@ -161,7 +161,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && null == nLength && nNodes[1] == nFilter && @@ -172,7 +172,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no filter element", function () { oSession.fnRestore(); @@ -191,7 +191,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && null == nFilter && @@ -204,7 +204,7 @@ $(document).ready( function () { /* Note we don't test for no table as this is not supported (and it would be fairly daft! */ - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no info element", function () { oSession.fnRestore(); @@ -223,7 +223,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && @@ -234,7 +234,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check no paging element", function () { oSession.fnRestore(); @@ -253,7 +253,7 @@ $(document).ready( function () { var nPaging = document.getElementById('example_paginate'); var nTable = document.getElementById('example'); - var bReturn = + var bReturn = nNodes[0] == nWrapper && nNodes[1] == nLength && nNodes[2] == nFilter && diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sPaginationType.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sPaginationType.js index 8364f90c..9eed1054 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sPaginationType.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/tests_onhold/6_delayed_rendering/sPaginationType.js @@ -9,43 +9,43 @@ $(document).ready( function () { } ); var oSettings = oTable.fnSettings(); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check two button paging is the default", null, function () { return oSettings.sPaginationType == "two_button"; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check class is applied", null, function () { return $('#example_paginate').hasClass('paging_two_button'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Two A elements are in the wrapper", null, function () { return $('#example_paginate a').length == 2; } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the previous button", null, function () { return document.getElementById('example_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "We have the next button", null, function () { return document.getElementById('example_next'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Previous button is disabled", null, function () { return $('#example_previous').hasClass('paginate_disabled_previous'); } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next button is enabled", null, function () { return $('#example_next').hasClass('paginate_enabled_next'); } @@ -56,7 +56,7 @@ $(document).ready( function () { /* Two buttons paging */ var bComplete = false; - oTest.fnWaitTest( + oTest.fnWaitTest( "Can enabled full numbers paging", function () { oSession.fnRestore(); @@ -78,7 +78,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Check full numbers class is applied", null, function () { return $('#example_paginate').hasClass('paging_full_numbers'); } @@ -86,7 +86,7 @@ $(document).ready( function () { var nFirst, nPrevious, nNext, nLast; - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to last page", function () { nFirst = $('div.dataTables_paginate a.first'); @@ -100,7 +100,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Go to two pages previous", function () { nPrevious.click(); @@ -111,7 +111,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Next (second last) page", function () { nNext.click(); @@ -121,7 +121,7 @@ $(document).ready( function () { } ); - oTest.fnWaitTest( + oTest.fnWaitTest( "Jump to first page", function () { nFirst.click(); diff --git a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/unit_test.js b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/unit_test.js index 9c112308..d85d7ee2 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/unit_testing/unit_test.js +++ b/wqflask/wqflask/static/new/packages/DataTables/unit_testing/unit_test.js @@ -10,14 +10,14 @@ * License: GPL v2 or BSD 3 point style * Project: DataTables * Contact: allan.jardine@sprymedia.co.uk - * + * * Copyright 2009 Allan Jardine, all rights reserved. * * Description: * This is a javascript library suitable for use as a unit testing framework. Employing a queuing * mechanisim to take account of async events in javascript, this library will communicates with * a controller frame (to report individual test status). - * + * */ @@ -258,8 +258,8 @@ var oDispacher = { { case 'mouse': evt = document.createEvent( "MouseEvents" ); - evt.initMouseEvent( sType, true, true, window, 0, oTargetPos[0], oTargetPos[1], - oTargetPos[0], oTargetPos[1], ctrlKey, altKey, shiftKey, + evt.initMouseEvent( sType, true, true, window, 0, oTargetPos[0], oTargetPos[1], + oTargetPos[0], oTargetPos[1], ctrlKey, altKey, shiftKey, metaKey, button, null ); break; @@ -310,22 +310,22 @@ var oDispacher = { return evt; }, - /* + /* * Function: DesignCore.fnGetPos * Purpose: Get the position of an element on the page * Returns: array[ 0-int:left, 1-int:top ] * Inputs: node:obj - node to analyse */ - _fnGetPos: function ( obj ) + _fnGetPos: function ( obj ) { var curleft = 0; var curtop = 0; - if (obj.offsetParent) + if (obj.offsetParent) { curleft = obj.offsetLeft; curtop = obj.offsetTop; - while (obj = obj.offsetParent ) + while (obj = obj.offsetParent ) { curleft += obj.offsetLeft; curtop += obj.offsetTop; diff --git a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js index 4d8b9d65..f64a6c14 100644 --- a/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js +++ b/wqflask/wqflask/static/new/packages/nvd3/nv.d3.js @@ -705,7 +705,7 @@ nv.nearestValueIndex = function (values, searchVal, threshold) { tTop = tooltipTop(tooltipElem); break; } - + // adjust tooltip offsets left -= offset.left; top -= offset.top; @@ -736,7 +736,7 @@ nv.nearestValueIndex = function (values, searchVal, threshold) { .styleTween('transform', function (d) { return translateInterpolator; }, 'important') - // Safari has its own `-webkit-transform` and does not support `transform` + // Safari has its own `-webkit-transform` and does not support `transform` // transform tooltip without transition only in Safari .style('-webkit-transform', new_translate) .style('opacity', 1); @@ -1861,9 +1861,9 @@ nv.models.axis = function() { and the arithmetic trick below solves that. */ return !parseFloat(Math.round(d * 100000) / 1000000) && (d !== undefined) - }) + }) .classed('zero', true); - + //store old scales for use in transitions on update scale0 = scale.copy(); @@ -2268,7 +2268,7 @@ nv.models.boxPlotChart = function() { .orient((rightAlignYAxis) ? 'right' : 'left') .tickFormat(d3.format(',.1f')) ; - + tooltip.duration(0); //============================================================ @@ -2299,7 +2299,7 @@ nv.models.boxPlotChart = function() { chart.container = this; // Display No Data message if there's nothing to show. (quartiles required at minimum) - if (!data || !data.length || + if (!data || !data.length || !data.filter(function(d) { return d.values.hasOwnProperty("Q1") && d.values.hasOwnProperty("Q2") && d.values.hasOwnProperty("Q3"); }).length) { var noDataText = container.selectAll('.nv-noData').data([noData]); @@ -7217,7 +7217,7 @@ nv.models.lineWithFocusChart = function() { wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); - + //Set up interactive layer if (useInteractiveGuideline) { interactiveLayer @@ -7360,7 +7360,7 @@ nv.models.lineWithFocusChart = function() { var currentValues = series.values.filter(function(d,i) { return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1]; }); - + pointIndex = nv.interactiveBisect(currentValues, e.pointXValue, lines.x()); var point = currentValues[pointIndex]; var pointYValue = chart.y()(point, pointIndex); @@ -7683,10 +7683,10 @@ nv.models.multiBar = function() { parsed.forEach(function(series, i){ // if series is non-stackable, use un-parsed data if (series.nonStackable) { - data[i].nonStackableSeries = nonStackableCount++; + data[i].nonStackableSeries = nonStackableCount++; parsed[i] = data[i]; } else { - // don't stack this seires on top of the nonStackable seriees + // don't stack this seires on top of the nonStackable seriees if (i > 0 && parsed[i - 1].nonStackable){ parsed[i].values.map(function(d,j){ d.y0 -= parsed[i - 1].values[j].y; @@ -7722,7 +7722,7 @@ nv.models.multiBar = function() { posBase = posBase + f.size; } } - + }); }); } @@ -7948,7 +7948,7 @@ nv.models.multiBar = function() { if (data[j].nonStackable) { width = d.series * x.rangeBand() / data.length; if (data.length !== nonStackableCount){ - width = data[j].nonStackableSeries * x.rangeBand()/(nonStackableCount*2); + width = data[j].nonStackableSeries * x.rangeBand()/(nonStackableCount*2); } } var xVal = width + x(getX(d, i)); @@ -7968,7 +7968,7 @@ nv.models.multiBar = function() { } else { // if all series are nonStacable, take the full width var width = (x.rangeBand() / nonStackableCount); - // otherwise, nonStackable graph will be only taking the half-width + // otherwise, nonStackable graph will be only taking the half-width // of the x rangeBand if (data.length !== nonStackableCount) { width = x.rangeBand()/(nonStackableCount*2); @@ -12241,13 +12241,13 @@ nv.models.stackedArea = function() { gEnter.append('g').attr('class', 'nv-scatterWrap'); wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); - + // If the user has not specified forceY, make sure 0 is included in the domain // Otherwise, use user-specified values for forceY if (scatter.forceY().length == 0) { scatter.forceY().push(0); } - + scatter .width(availableWidth) .height(availableHeight) diff --git a/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.js b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.js index 3c3ae911..b4bf4a6b 100755 --- a/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.js +++ b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.js @@ -6,7 +6,7 @@ * Language: Javascript * License: GPL v2 or BSD 3 point style * Project: DataTables - * + * * Copyright 2009-2013 Allan Jardine, all rights reserved. * * This source file is free software, under either the GPL v2 license or a @@ -20,7 +20,7 @@ var TableTools; (function($, window, document) { -/** +/** * TableTools provides flexible buttons and other tools for a DataTables enhanced table * @class TableTools * @constructor @@ -58,7 +58,7 @@ TableTools = function( oDT, oOpts ) */ "that": this, - /** + /** * DataTables settings objects * @property dt * @type object @@ -70,7 +70,7 @@ TableTools = function( oDT, oOpts ) * @namespace Print specific information */ "print": { - /** + /** * DataTables draw 'start' point before the printing display was shown * @property saveStart * @type int @@ -78,7 +78,7 @@ TableTools = function( oDT, oOpts ) */ "saveStart": -1, - /** + /** * DataTables draw 'length' point before the printing display was shown * @property saveLength * @type int @@ -86,7 +86,7 @@ TableTools = function( oDT, oOpts ) */ "saveLength": -1, - /** + /** * Page scrolling point before the printing display was shown so it can be restored * @property saveScroll * @type int @@ -94,7 +94,7 @@ TableTools = function( oDT, oOpts ) */ "saveScroll": -1, - /** + /** * Wrapped function to end the print display (to maintain scope) * @property funcEnd * @type Function @@ -198,7 +198,7 @@ TableTools = function( oDT, oOpts ) "buttonSet": [], /** - * When there is more than one TableTools instance for a DataTable, there must be a + * When there is more than one TableTools instance for a DataTable, there must be a * master which controls events (row selection etc) * @property master * @type boolean @@ -323,9 +323,9 @@ TableTools.prototype = { /** * Retreieve the settings object from an instance * @returns {array} List of TR nodes which are currently selected - * @param {boolean} [filtered=false] Get only selected rows which are + * @param {boolean} [filtered=false] Get only selected rows which are * available given the filtering applied to the table. By default - * this is false - i.e. all rows, regardless of filtering are + * this is false - i.e. all rows, regardless of filtering are selected. */ "fnGetSelected": function ( filtered ) @@ -400,8 +400,8 @@ TableTools.prototype = { /** * Select all rows in the table - * @param {boolean} [filtered=false] Select only rows which are available - * given the filtering applied to the table. By default this is false - + * @param {boolean} [filtered=false] Select only rows which are available + * given the filtering applied to the table. By default this is false - * i.e. all rows, regardless of filtering are selected. */ "fnSelectAll": function ( filtered ) @@ -417,8 +417,8 @@ TableTools.prototype = { /** * Deselect all rows in the table - * @param {boolean} [filtered=false] Deselect only rows which are available - * given the filtering applied to the table. By default this is false - + * @param {boolean} [filtered=false] Deselect only rows which are available + * given the filtering applied to the table. By default this is false - * i.e. all rows, regardless of filtering are deselected. */ "fnSelectNone": function ( filtered ) @@ -652,7 +652,7 @@ TableTools.prototype = { * @method _fnConstruct * @param {Object} oOpts Same as TableTools constructor * @returns void - * @private + * @private */ "_fnConstruct": function ( oOpts ) { @@ -689,7 +689,7 @@ TableTools.prototype = { * @method _fnCustomiseSettings * @param {Object} oOpts Same as TableTools constructor * @returns void - * @private + * @private */ "_fnCustomiseSettings": function ( oOpts ) { @@ -739,7 +739,7 @@ TableTools.prototype = { * @param {array} buttonSet Set of user defined buttons * @param {node} wrapper Node to add the created buttons to * @returns void - * @private + * @private */ "_fnButtonDefinations": function ( buttonSet, wrapper ) { @@ -767,8 +767,8 @@ TableTools.prototype = { buttonDef = $.extend( o, buttonSet[i], true ); } - wrapper.appendChild( this._fnCreateButton( - buttonDef, + wrapper.appendChild( this._fnCreateButton( + buttonDef, $(wrapper).hasClass(this.classes.collection.container) ) ); } @@ -780,7 +780,7 @@ TableTools.prototype = { * @method _fnCreateButton * @param {Object} oConfig Button configuration object * @returns {Node} Button element - * @private + * @private */ "_fnCreateButton": function ( oConfig, bCollectionButton ) { @@ -813,7 +813,7 @@ TableTools.prototype = { * @method _fnButtonBase * @param {o} oConfig Button configuration object * @returns {Node} DIV element for the button - * @private + * @private */ "_fnButtonBase": function ( o, bCollectionButton ) { @@ -854,7 +854,7 @@ TableTools.prototype = { * we will typically want to interact with that master for global properties. * @method _fnGetMasterSettings * @returns {Object} TableTools settings object - * @private + * @private */ "_fnGetMasterSettings": function () { @@ -1011,15 +1011,15 @@ TableTools.prototype = { * Add event handlers to a table to allow for row selection * @method _fnRowSelectConfig * @returns void - * @private + * @private */ "_fnRowSelectConfig": function () { if ( this.s.master ) { var - that = this, - i, iLen, + that = this, + i, iLen, dt = this.s.dt, aoOpenRows = this.s.dt.aoOpenRows; @@ -1067,7 +1067,7 @@ TableTools.prototype = { /** * Select rows * @param {*} src Rows to select - see _fnSelectData for a description of valid inputs - * @private + * @private */ "_fnRowSelect": function ( src, e ) { @@ -1116,7 +1116,7 @@ TableTools.prototype = { /** * Deselect rows * @param {*} src Rows to deselect - see _fnSelectData for a description of valid inputs - * @private + * @private */ "_fnRowDeselect": function ( src, e ) { @@ -1221,7 +1221,7 @@ TableTools.prototype = { * @param {Node} nButton Button element which is being considered * @param {Object} oConfig Button configuration object * @returns void - * @private + * @private */ "_fnTextConfig": function ( nButton, oConfig ) { @@ -1286,7 +1286,7 @@ TableTools.prototype = { * @param {Node} nButton Button element which is being considered * @param {o} oConfig Button configuration object * @returns void - * @private + * @private */ "_fnFlashConfig": function ( nButton, oConfig ) { @@ -1358,7 +1358,7 @@ TableTools.prototype = { * @param {Node} node node to glue swf to * @param {String} text title of the flash movie * @returns void - * @private + * @private */ "_fnFlashGlue": function ( flash, node, text ) { @@ -1380,8 +1380,8 @@ TableTools.prototype = { /** * Set the text for the flash clip to deal with - * - * This function is required for large information sets. There is a limit on the + * + * This function is required for large information sets. There is a limit on the * amount of data that can be transferred between Javascript and Flash in a single call, so * we use this method to build up the text in Flash by sending over chunks. It is estimated * that the data limit is around 64k, although it is undocumented, and appears to be different @@ -1390,7 +1390,7 @@ TableTools.prototype = { * @param {Object} clip the ZeroClipboard object * @param {String} sData the data to be set * @returns void - * @private + * @private */ "_fnFlashSetText": function ( clip, sData ) { @@ -1418,7 +1418,7 @@ TableTools.prototype = { * hidden columns respectively). Or an array of column indexes * @returns {Array} A boolean array the length of the columns of the table, which each value * indicating if the column is to be included or not - * @private + * @private */ "_fnColumnTargets": function ( mColumns ) { @@ -1501,7 +1501,7 @@ TableTools.prototype = { * @param {Boolean} oConfig.bFooter Include the footer * @param {Boolean} oConfig.bSelectedOnly Include only the selected rows in the output * @returns {String} Concatenated string of data - * @private + * @private */ "_fnGetDataTablesData": function ( oConfig ) { @@ -1585,9 +1585,9 @@ TableTools.prototype = { aRow.push( this._fnBoundData( sLoopData, oConfig.sFieldBoundary, regex ) ); } } - + aData.push( aRow.join(oConfig.sFieldSeperator) ); - + /* Details rows from fnOpen */ if ( oConfig.bOpenRows ) { @@ -1635,7 +1635,7 @@ TableTools.prototype = { * @param {RegExp} regex search for the bounding chars - constructed outside for efficiency * in the loop * @returns {String} bound data - * @private + * @private */ "_fnBoundData": function ( sData, sBoundary, regex ) { @@ -1656,7 +1656,7 @@ TableTools.prototype = { * @param {String} sData data to be broken up * @param {Int} iSize chunk size * @returns {Array} String array of broken up text - * @private + * @private */ "_fnChunkData": function ( sData, iSize ) { @@ -1684,7 +1684,7 @@ TableTools.prototype = { * @method _fnHtmlDecode * @param {String} sData encoded string * @returns {String} decoded string - * @private + * @private */ "_fnHtmlDecode": function ( sData ) { @@ -1720,13 +1720,13 @@ TableTools.prototype = { * @param {Event} e Event object * @param {Object} oConfig Button configuration object * @returns void - * @private + * @private */ "_fnPrintStart": function ( oConfig ) { var that = this; var oSetDT = this.s.dt; - + /* Parse through the DOM hiding everything that isn't needed for the table */ this._fnPrintHideNodes( oSetDT.nTable ); @@ -1812,7 +1812,7 @@ TableTools.prototype = { * @method _fnPrintEnd * @param {Event} e Event object * @returns void - * @private + * @private */ "_fnPrintEnd": function ( e ) { @@ -1858,11 +1858,11 @@ TableTools.prototype = { /** * Take account of scrolling in DataTables by showing the full table * @returns void - * @private + * @private */ "_fnPrintScrollStart": function () { - var + var oSetDT = this.s.dt, nScrollHeadInner = oSetDT.nScrollHead.getElementsByTagName('div')[0], nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0], @@ -1915,11 +1915,11 @@ TableTools.prototype = { * Take account of scrolling in DataTables by showing the full table. Note that the redraw of * the DataTable that we do will actually deal with the majority of the hard work here * @returns void - * @private + * @private */ "_fnPrintScrollEnd": function () { - var + var oSetDT = this.s.dt, nScrollBody = oSetDT.nTable.parentNode; @@ -1941,12 +1941,12 @@ TableTools.prototype = { * Resume the display of all TableTools hidden nodes * @method _fnPrintShowNodes * @returns void - * @private + * @private */ "_fnPrintShowNodes": function ( ) { var anHidden = this.dom.print.hidden; - + for ( var i=0, iLen=anHidden.length ; i1){m--}if(6*m<1){return j+(i-j)*6*m}else{if(2*m<1){return i}else{if(3*m<2){return j+(i-j)*(2/3-m)*6}else{return j}}}}var C={};function F(j){if(j in C){return C[j]}var ag,Z=1;j=String(j);if(j.charAt(0)=="#"){ag=j}else{if(/^rgb/.test(j)){var p=M(j);var ag="#",ah;for(var m=0;m<3;m++){if(p[m].indexOf("%")!=-1){ah=Math.floor(c(p[m])*255)}else{ah=+p[m]}ag+=k[r(ah,0,255)]}Z=+p[3]}else{if(/^hsl/.test(j)){var p=M(j);ag=I(p);Z=p[3]}else{ag=b[j]||j}}}return C[j]={color:ag,alpha:Z}}var o={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var L={};function E(i){if(L[i]){return L[i]}var p=document.createElement("div");var m=p.style;try{m.font=i}catch(j){}return L[i]={style:m.fontStyle||o.style,variant:m.fontVariant||o.variant,weight:m.fontWeight||o.weight,size:m.fontSize||o.size,family:m.fontFamily||o.family}}function u(m,j){var i={};for(var ah in m){i[ah]=m[ah]}var ag=parseFloat(j.currentStyle.fontSize),Z=parseFloat(m.size);if(typeof m.size=="number"){i.size=m.size}else{if(m.size.indexOf("px")!=-1){i.size=Z}else{if(m.size.indexOf("em")!=-1){i.size=ag*Z}else{if(m.size.indexOf("%")!=-1){i.size=(ag/100)*Z}else{if(m.size.indexOf("pt")!=-1){i.size=Z/0.75}else{i.size=ag}}}}}i.size*=0.981;i.family="'"+i.family.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'";return i}function ac(i){return i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family}var s={butt:"flat",round:"round"};function S(i){return s[i]||"square"}function D(i){this.m_=B();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=d*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var m="width:"+i.clientWidth+"px;height:"+i.clientHeight+"px;overflow:hidden;position:absolute";var j=i.ownerDocument.createElement("div");j.style.cssText=m;i.appendChild(j);var p=j.cloneNode(false);p.style.backgroundColor="red";p.style.filter="alpha(opacity=0)";i.appendChild(p);this.element_=j;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var q=D.prototype;q.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};q.beginPath=function(){this.currentPath_=[]};q.moveTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"moveTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.lineTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"lineTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.bezierCurveTo=function(m,j,ak,aj,ai,ag){var i=V(this,ai,ag);var ah=V(this,m,j);var Z=V(this,ak,aj);K(this,ah,Z,i)};function K(i,Z,m,j){i.currentPath_.push({type:"bezierCurveTo",cp1x:Z.x,cp1y:Z.y,cp2x:m.x,cp2y:m.y,x:j.x,y:j.y});i.currentX_=j.x;i.currentY_=j.y}q.quadraticCurveTo=function(ai,m,j,i){var ah=V(this,ai,m);var ag=V(this,j,i);var aj={x:this.currentX_+2/3*(ah.x-this.currentX_),y:this.currentY_+2/3*(ah.y-this.currentY_)};var Z={x:aj.x+(ag.x-this.currentX_)/3,y:aj.y+(ag.y-this.currentY_)/3};K(this,aj,Z,ag)};q.arc=function(al,aj,ak,ag,j,m){ak*=d;var ap=m?"at":"wa";var am=al+A(ag)*ak-f;var ao=aj+l(ag)*ak-f;var i=al+A(j)*ak-f;var an=aj+l(j)*ak-f;if(am==i&&!m){am+=0.125}var Z=V(this,al,aj);var ai=V(this,am,ao);var ah=V(this,i,an);this.currentPath_.push({type:ap,x:Z.x,y:Z.y,radius:ak,xStart:ai.x,yStart:ai.y,xEnd:ah.x,yEnd:ah.y})};q.rect=function(m,j,i,p){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath()};q.strokeRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.stroke();this.currentPath_=Z};q.fillRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.fill();this.currentPath_=Z};q.createLinearGradient=function(j,p,i,m){var Z=new U("gradient");Z.x0_=j;Z.y0_=p;Z.x1_=i;Z.y1_=m;return Z};q.createRadialGradient=function(p,ag,m,j,Z,i){var ah=new U("gradientradial");ah.x0_=p;ah.y0_=ag;ah.r0_=m;ah.x1_=j;ah.y1_=Z;ah.r1_=i;return ah};q.drawImage=function(aq,m){var aj,ah,al,ay,ao,am,at,aA;var ak=aq.runtimeStyle.width;var ap=aq.runtimeStyle.height;aq.runtimeStyle.width="auto";aq.runtimeStyle.height="auto";var ai=aq.width;var aw=aq.height;aq.runtimeStyle.width=ak;aq.runtimeStyle.height=ap;if(arguments.length==3){aj=arguments[1];ah=arguments[2];ao=am=0;at=al=ai;aA=ay=aw}else{if(arguments.length==5){aj=arguments[1];ah=arguments[2];al=arguments[3];ay=arguments[4];ao=am=0;at=ai;aA=aw}else{if(arguments.length==9){ao=arguments[1];am=arguments[2];at=arguments[3];aA=arguments[4];aj=arguments[5];ah=arguments[6];al=arguments[7];ay=arguments[8]}else{throw Error("Invalid number of arguments")}}}var az=V(this,aj,ah);var p=at/2;var j=aA/2;var ax=[];var i=10;var ag=10;ax.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",ax.join(""))};q.stroke=function(al){var aj=[];var Z=false;var m=10;var am=10;aj.push("ak.x){ak.x=j.x}if(ag.y==null||j.yak.y){ak.y=j.y}}}aj.push(' ">');if(!al){w(this,aj)}else{G(this,aj,ag,ak)}aj.push("");this.element_.insertAdjacentHTML("beforeEnd",aj.join(""))};function w(m,ag){var j=F(m.strokeStyle);var p=j.color;var Z=j.alpha*m.globalAlpha;var i=m.lineScale_*m.lineWidth;if(i<1){Z*=i}ag.push("')}function G(aq,ai,aK,ar){var aj=aq.fillStyle;var aB=aq.arcScaleX_;var aA=aq.arcScaleY_;var j=ar.x-aK.x;var p=ar.y-aK.y;if(aj instanceof U){var an=0;var aF={x:0,y:0};var ax=0;var am=1;if(aj.type_=="gradient"){var al=aj.x0_/aB;var m=aj.y0_/aA;var ak=aj.x1_/aB;var aM=aj.y1_/aA;var aJ=V(aq,al,m);var aI=V(aq,ak,aM);var ag=aI.x-aJ.x;var Z=aI.y-aJ.y;an=Math.atan2(ag,Z)*180/Math.PI;if(an<0){an+=360}if(an<0.000001){an=0}}else{var aJ=V(aq,aj.x0_,aj.y0_);aF={x:(aJ.x-aK.x)/j,y:(aJ.y-aK.y)/p};j/=aB*d;p/=aA*d;var aD=ab.max(j,p);ax=2*aj.r0_/aD;am=2*aj.r1_/aD-ax}var av=aj.colors_;av.sort(function(aN,i){return aN.offset-i.offset});var ap=av.length;var au=av[0].color;var at=av[ap-1].color;var az=av[0].alpha*aq.globalAlpha;var ay=av[ap-1].alpha*aq.globalAlpha;var aE=[];for(var aH=0;aH')}else{if(aj instanceof T){if(j&&p){var ah=-aK.x;var aC=-aK.y;ai.push("')}}else{var aL=F(aq.fillStyle);var aw=aL.color;var aG=aL.alpha*aq.globalAlpha;ai.push('')}}}q.fill=function(){this.stroke(true)};q.closePath=function(){this.currentPath_.push({type:"close"})};function V(j,Z,p){var i=j.m_;return{x:d*(Z*i[0][0]+p*i[1][0]+i[2][0])-f,y:d*(Z*i[0][1]+p*i[1][1]+i[2][1])-f}}q.save=function(){var i={};v(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=J(B(),this.m_)};q.restore=function(){if(this.aStack_.length){v(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function h(i){return isFinite(i[0][0])&&isFinite(i[0][1])&&isFinite(i[1][0])&&isFinite(i[1][1])&&isFinite(i[2][0])&&isFinite(i[2][1])}function aa(j,i,p){if(!h(i)){return}j.m_=i;if(p){var Z=i[0][0]*i[1][1]-i[0][1]*i[1][0];j.lineScale_=N(H(Z))}}q.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];aa(this,J(i,this.m_),false)};q.rotate=function(j){var p=A(j);var m=l(j);var i=[[p,m,0],[-m,p,0],[0,0,1]];aa(this,J(i,this.m_),false)};q.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];aa(this,J(i,this.m_),true)};q.transform=function(Z,p,ah,ag,j,i){var m=[[Z,p,0],[ah,ag,0],[j,i,1]];aa(this,J(m,this.m_),true)};q.setTransform=function(ag,Z,ai,ah,p,j){var i=[[ag,Z,0],[ai,ah,0],[p,j,1]];aa(this,i,true)};q.drawText_=function(am,ak,aj,ap,ai){var ao=this.m_,at=1000,j=0,ar=at,ah={x:0,y:0},ag=[];var i=u(E(this.font),this.element_);var p=ac(i);var au=this.element_.currentStyle;var Z=this.textAlign.toLowerCase();switch(Z){case"left":case"center":case"right":break;case"end":Z=au.direction=="ltr"?"right":"left";break;case"start":Z=au.direction=="rtl"?"right":"left";break;default:Z="left"}switch(this.textBaseline){case"hanging":case"top":ah.y=i.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":ah.y=-i.size/2.25;break}switch(Z){case"right":j=at;ar=0.05;break;case"center":j=ar=at/2;break}var aq=V(this,ak+ah.x,aj+ah.y);ag.push('');if(ai){w(this,ag)}else{G(this,ag,{x:-j,y:0},{x:ar,y:i.size})}var an=ao[0][0].toFixed(3)+","+ao[1][0].toFixed(3)+","+ao[0][1].toFixed(3)+","+ao[1][1].toFixed(3)+",0,0";var al=n(aq.x/d+1-ao[0][0])+","+n(aq.y/d-2*ao[1][0]);ag.push('','','');this.element_.insertAdjacentHTML("beforeEnd",ag.join(""))};q.fillText=function(m,i,p,j){this.drawText_(m,i,p,j,false)};q.strokeText=function(m,i,p,j){this.drawText_(m,i,p,j,true)};q.measureText=function(m){if(!this.textMeasureEl_){var i='';this.element_.insertAdjacentHTML("beforeEnd",i);this.textMeasureEl_=this.element_.lastChild}var j=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(j.createTextNode(m));return{width:this.textMeasureEl_.offsetWidth}};q.clip=function(){};q.arcTo=function(){};q.createPattern=function(j,i){return new T(j,i)};function U(i){this.type_=i;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}U.prototype.addColorStop=function(j,i){i=F(i);this.colors_.push({offset:j,color:i.color,alpha:i.alpha})};function T(j,i){Q(j);switch(i){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=i;break;default:O("SYNTAX_ERR")}this.src_=j.src;this.width_=j.width;this.height_=j.height}function O(i){throw new P(i)}function Q(i){if(!i||i.nodeType!=1||i.tagName!="IMG"){O("TYPE_MISMATCH_ERR")}if(i.readyState!="complete"){O("INVALID_STATE_ERR")}}function P(i){this.code=this[i];this.message=i+": DOM Exception "+this.code}var X=P.prototype=new Error;X.INDEX_SIZE_ERR=1;X.DOMSTRING_SIZE_ERR=2;X.HIERARCHY_REQUEST_ERR=3;X.WRONG_DOCUMENT_ERR=4;X.INVALID_CHARACTER_ERR=5;X.NO_DATA_ALLOWED_ERR=6;X.NO_MODIFICATION_ALLOWED_ERR=7;X.NOT_FOUND_ERR=8;X.NOT_SUPPORTED_ERR=9;X.INUSE_ATTRIBUTE_ERR=10;X.INVALID_STATE_ERR=11;X.SYNTAX_ERR=12;X.INVALID_MODIFICATION_ERR=13;X.NAMESPACE_ERR=14;X.INVALID_ACCESS_ERR=15;X.VALIDATION_ERR=16;X.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=e;CanvasRenderingContext2D=D;CanvasGradient=U;CanvasPattern=T;DOMException=P;G_vmlCanvasManager._version=888})()}; \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.js b/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.js index cded47ab..c77c353d 100755 --- a/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.js +++ b/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.js @@ -1,98 +1,98 @@ /** * Title: jqPlot Charts - * + * * Pure JavaScript plotting plugin for jQuery. - * + * * About: Version - * - * version: 1.0.4 + * + * version: 1.0.4 * revision: 1121 - * + * * About: Copyright & License - * + * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. - * - * See and contained within this distribution for further information. + * + * See and contained within this distribution for further information. * * The author would appreciate an email letting him know of any substantial - * use of jqPlot. You can reach the author at: chris at jqplot dot com + * use of jqPlot. You can reach the author at: chris at jqplot dot com * or see http://www.jqplot.com/info.php. This is, of course, not required. * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php. * * sprintf functions contained in jqplot.sprintf.js by Ash Searle: - * + * * version 2007.04.27 * author Ash Searle * http://hexmen.com/blog/2007/03/printf-sprintf/ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * - * + * + * * About: Introduction - * - * jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.2 is included in the distribution. - * To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and optionally + * + * jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.2 is included in the distribution. + * To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and optionally * the excanvas script for IE support in your web page: - * + * * > * > * > * > - * + * * jqPlot can be customized by overriding the defaults of any of the objects which make * up the plot. The general usage of jqplot is: - * + * * > chart = $.jqplot('targetElemId', [dataArray,...], {optionsObject}); - * + * * The options available to jqplot are detailed in in the jqPlotOptions.txt file. - * - * An actual call to $.jqplot() may look like the + * + * An actual call to $.jqplot() may look like the * examples below: - * + * * > chart = $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]]); - * + * * or - * + * * > dataArray = [34,12,43,55,77]; * > chart = $.jqplot('targetElemId', [dataArray, ...], {title:'My Plot', axes:{yaxis:{min:20, max:100}}}); - * + * * For more inforrmation, see . - * + * * About: Usage - * + * * See - * - * About: Available Options - * + * + * About: Available Options + * * See for a list of options available thorugh the options object (not complete yet!) - * + * * About: Options Usage - * + * * See - * + * * About: Changes - * + * * See - * + * */ (function($) { // make sure undefined is undefined var undefined; - + $.fn.emptyForce = function() { for ( var i = 0, elem; (elem = $(this)[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { $.cleanData( elem.getElementsByTagName("*") ); } - + // Remove any remaining nodes if ($.jqplot.use_excanvas) { elem.outerHTML = ""; @@ -105,10 +105,10 @@ elem = null; } - + return $(this); }; - + $.fn.removeChildForce = function(parent) { while ( parent.firstChild ) { this.removeChildForce( parent.firstChild ); @@ -130,12 +130,12 @@ } return this.each(function(index) { - var tid, - plot, + var tid, + plot, $this = $(this), dl = datas.length, ol = options.length, - data, + data, opts; if (index < dl) { @@ -170,17 +170,17 @@ /** * Namespace: $.jqplot * jQuery function called by the user to create a plot. - * + * * Parameters: * target - ID of target element to render the plot into. * data - an array of data series. * options - user defined options object. See the individual classes for available options. - * + * * Properties: * config - object to hold configuration information for jqPlot plot object. - * + * * attributes: - * enablePlugins - False to disable plugins by default. Plugins must then be explicitly + * enablePlugins - False to disable plugins by default. Plugins must then be explicitly * enabled in the individual plot options. Default: false. * This property sets the "show" property of certain plugins to true or false. * Only plugins that can be immediately active upon loading are affected. This includes @@ -216,7 +216,7 @@ var plot = new jqPlot(); // remove any error class that may be stuck on target. $('#'+target).removeClass('jqplot-error'); - + if ($.jqplot.config.catchErrors) { try { plot.init(target, _data, _options); @@ -236,7 +236,7 @@ document.getElementById(target).style.fontWeight = $.jqplot.config.errorFontWeight; } } - else { + else { plot.init(target, _data, _options); plot.draw(); plot.themeEngine.init.call(plot); @@ -259,13 +259,13 @@ $.jqplot.CanvasManager.canvases = []; $.jqplot.CanvasManager.free = []; } - + var myCanvases = []; - + this.getCanvas = function() { var canvas; var makeNew = true; - + if (!$.jqplot.use_excanvas) { for (var i = 0, l = $.jqplot.CanvasManager.canvases.length; i < l; i++) { if ($.jqplot.CanvasManager.free[i] === true) { @@ -284,11 +284,11 @@ myCanvases.push($.jqplot.CanvasManager.canvases.length); $.jqplot.CanvasManager.canvases.push(canvas); $.jqplot.CanvasManager.free.push(false); - } - + } + return canvas; }; - + // this method has to be used after settings the dimesions // on the element returned by getCanvas() this.initCanvas = function(canvas) { @@ -310,7 +310,7 @@ // excanvas can't be reused, but properly unset window.G_vmlCanvasManager.uninitElement($.jqplot.CanvasManager.canvases[idx]); $.jqplot.CanvasManager.canvases[idx] = null; - } + } else { var canvas = $.jqplot.CanvasManager.canvases[idx]; canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height); @@ -324,17 +324,17 @@ $.jqplot.CanvasManager.free[idx] = true; } }; - + }; - + // Convienence function that won't hang IE or FF without FireBug. $.jqplot.log = function() { if (window.console) { window.console.log.apply(window.console, arguments); } }; - + $.jqplot.config = { addDomReference: false, enablePlugins:false, @@ -359,29 +359,29 @@ srcLocation: 'jqplot/src/', pluginLocation: 'jqplot/src/plugins/' }; - - + + $.jqplot.arrayMax = function( array ){ return Math.max.apply( Math, array ); }; - + $.jqplot.arrayMin = function( array ){ return Math.min.apply( Math, array ); }; - + $.jqplot.enablePlugins = $.jqplot.config.enablePlugins; - + // canvas related tests taken from modernizer: // Copyright (c) 2009 - 2010 Faruk Ates. // http://www.modernizr.com - + $.jqplot.support_canvas = function() { if (typeof $.jqplot.support_canvas.result == 'undefined') { - $.jqplot.support_canvas.result = !!document.createElement('canvas').getContext; + $.jqplot.support_canvas.result = !!document.createElement('canvas').getContext; } return $.jqplot.support_canvas.result; }; - + $.jqplot.support_canvas_text = function() { if (typeof $.jqplot.support_canvas_text.result == 'undefined') { if (window.G_vmlCanvasManager !== undefined && window.G_vmlCanvasManager._version > 887) { @@ -390,17 +390,17 @@ else { $.jqplot.support_canvas_text.result = !!(document.createElement('canvas').getContext && typeof document.createElement('canvas').getContext('2d').fillText == 'function'); } - + } return $.jqplot.support_canvas_text.result; }; - + $.jqplot.use_excanvas = ($.browser.msie && !$.jqplot.support_canvas()) ? true : false; - + /** - * + * * Hooks: jqPlot Pugin Hooks - * + * * $.jqplot.preInitHooks - called before initialization. * $.jqplot.postInitHooks - called after initialization. * $.jqplot.preParseOptionsHooks - called before user options are parsed. @@ -422,9 +422,9 @@ * listeners to the event canvas which lays on top of the grid area. * $.jqplot.preDrawSeriesShadowHooks - called before series shadows are drawn. * $.jqplot.postDrawSeriesShadowHooks - called after series shadows are drawn. - * + * */ - + $.jqplot.preInitHooks = []; $.jqplot.postInitHooks = []; $.jqplot.preParseOptionsHooks = []; @@ -450,7 +450,7 @@ this._plotHeight; this._plotDimensions = {height:null, width:null}; }; - + $.jqplot.ElemContainer.prototype.createElement = function(el, offsets, clss, cssopts, attrib) { this._offsets = offsets; var klass = clss || 'jqplot'; @@ -463,7 +463,7 @@ elem = null; return this._elem; }; - + $.jqplot.ElemContainer.prototype.getWidth = function() { if (this._elem) { return this._elem.outerWidth(true); @@ -472,7 +472,7 @@ return null; } }; - + $.jqplot.ElemContainer.prototype.getHeight = function() { if (this._elem) { return this._elem.outerHeight(true); @@ -481,7 +481,7 @@ return null; } }; - + $.jqplot.ElemContainer.prototype.getPosition = function() { if (this._elem) { return this._elem.position(); @@ -490,36 +490,36 @@ return {top:null, left:null, bottom:null, right:null}; } }; - + $.jqplot.ElemContainer.prototype.getTop = function() { return this.getPosition().top; }; - + $.jqplot.ElemContainer.prototype.getLeft = function() { return this.getPosition().left; }; - + $.jqplot.ElemContainer.prototype.getBottom = function() { return this._elem.css('bottom'); }; - + $.jqplot.ElemContainer.prototype.getRight = function() { return this._elem.css('right'); }; - + /** * Class: Axis * An individual axis object. Cannot be instantiated directly, but created - * by the Plot oject. Axis properties can be set or overriden by the + * by the Plot oject. Axis properties can be set or overriden by the * options passed in from the user. - * + * */ function Axis(name) { $.jqplot.ElemContainer.call(this); // Group: Properties // - // Axes options are specified within an axes object at the top level of the + // Axes options are specified within an axes object at the top level of the // plot options like so: // > { // > axes: { @@ -529,7 +529,7 @@ // > y2axis: {ticks:[22, 44, 66, 88]} // > } // > } - // There are 2 x axes, 'xaxis' and 'x2axis', and + // There are 2 x axes, 'xaxis' and 'x2axis', and // 9 yaxes, 'yaxis', 'y2axis'. 'y3axis', ... Any or all of which may be specified. this.name = name; this._series = []; @@ -537,7 +537,7 @@ // Wether to display the axis on the graph. this.show = false; // prop: tickRenderer - // A class of a rendering engine for creating the ticks labels displayed on the plot, + // A class of a rendering engine for creating the ticks labels displayed on the plot, // See <$.jqplot.AxisTickRenderer>. this.tickRenderer = $.jqplot.AxisTickRenderer; // prop: tickOptions @@ -591,7 +591,7 @@ // number of units between ticks. Mutually exclusive with numberTicks. this.tickInterval; // prop: renderer - // A class of a rendering engine that handles tick generation, + // A class of a rendering engine that handles tick generation, // scaling input data to pixel grid units and drawing the axis element. this.renderer = $.jqplot.LinearAxisRenderer; // prop: rendererOptions @@ -663,13 +663,13 @@ // hold original user options. this._options = {}; } - + Axis.prototype = new $.jqplot.ElemContainer(); Axis.prototype.constructor = Axis; - + Axis.prototype.init = function() { if ($.isFunction(this.renderer)) { - this.renderer = new this.renderer(); + this.renderer = new this.renderer(); } // set the axis name this.tickOptions.axis = this.name; @@ -684,7 +684,7 @@ if (this.tickOptions.showLabel == null) { this.tickOptions.showLabel = this.showTicks; } - + if (this.label == null || this.label == '') { this.showLabel = false; } @@ -712,7 +712,7 @@ if (this.padMin == null) { this.padMin = (this.pad-1)/2 + 1; } - // now that padMin and padMax are correctly set, reset pad in case user has supplied + // now that padMin and padMax are correctly set, reset pad in case user has supplied // padMin and/or padMax this.pad = this.padMax + this.padMin - 1; if (this.min != null || this.max != null) { @@ -726,9 +726,9 @@ this.syncTicks = false; } this.renderer.init.call(this, this.rendererOptions); - + }; - + Axis.prototype.draw = function(ctx, plot) { // Memory Leaks patch if (this.__ticks) { @@ -736,13 +736,13 @@ } return this.renderer.draw.call(this, ctx, plot); - + }; - + Axis.prototype.set = function() { this.renderer.set.call(this); }; - + Axis.prototype.pack = function(pos, offsets) { if (this.show) { this.renderer.pack.call(this, pos, offsets); @@ -756,17 +756,17 @@ this.__ticks = this._ticks; } }; - + // reset the axis back to original values if it has been scaled, zoomed, etc. Axis.prototype.reset = function() { this.renderer.reset.call(this); }; - + Axis.prototype.resetScale = function(opts) { $.extend(true, this, {min: null, max: null, numberTicks: null, tickInterval: null, _ticks: [], ticks: []}, opts); this.resetDataBounds(); }; - + Axis.prototype.resetDataBounds = function() { // Go through all the series attached to this axis and find // the min/max bounds for this axis. @@ -790,8 +790,8 @@ minyidx = 3; maxyidx = 2; } - - for (var j=0, l=d.length; j db.max) || db.max == null) { db.max = d[j][0]; } - } + } else { if ((d[j][minyidx] != null && d[j][minyidx] < db.min) || db.min == null) { db.min = d[j][minyidx]; @@ -807,11 +807,11 @@ if ((d[j][maxyidx] != null && d[j][maxyidx] > db.max) || db.max == null) { db.max = d[j][maxyidx]; } - } + } } // Hack to not pad out bottom of bar plots unless user has specified a padding. - // every series will have a chance to set doforce to false. once it is set to + // every series will have a chance to set doforce to false. once it is set to // false, it cannot be reset to true. // If any series attached to axis is not a bar, wont force 0. if (doforce && s.renderer.constructor !== $.jqplot.BarRenderer) { @@ -823,7 +823,7 @@ } else if (doforce && s.renderer.constructor === $.jqplot.BarRenderer) { - if (s.barDirection == 'vertical' && this.name != 'xaxis' && this.name != 'x2axis') { + if (s.barDirection == 'vertical' && this.name != 'xaxis' && this.name != 'x2axis') { if (this._options.pad != null || this._options.padMin != null) { doforce = false; } @@ -848,13 +848,13 @@ /** * Class: Legend * Legend object. Cannot be instantiated directly, but created - * by the Plot oject. Legend properties can be set or overriden by the + * by the Plot oject. Legend properties can be set or overriden by the * options passed in from the user. */ function Legend(options) { $.jqplot.ElemContainer.call(this); // Group: Properties - + // prop: show // Wether to display the legend on the graph. this.show = false; @@ -873,18 +873,18 @@ this.showSwatches = true; // prop: placement // "insideGrid" places legend inside the grid area of the plot. - // "outsideGrid" places the legend outside the grid but inside the plot container, + // "outsideGrid" places the legend outside the grid but inside the plot container, // shrinking the grid to accomodate the legend. - // "inside" synonym for "insideGrid", + // "inside" synonym for "insideGrid", // "outside" places the legend ouside the grid area, but does not shrink the grid which // can cause the legend to overflow the plot container. this.placement = "insideGrid"; // prop: xoffset - // DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. + // DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. // properties or via CSS margin styling of the .jqplot-table-legend class. this.xoffset = 0; // prop: yoffset - // DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. + // DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. // properties or via CSS margin styling of the .jqplot-table-legend class. this.yoffset = 0; // prop: border @@ -898,7 +898,7 @@ this.textColor; // prop: fontFamily // css font-family spec for the legend text. - this.fontFamily; + this.fontFamily; // prop: fontSize // css font-size spec for the legend text. this.fontSize ; @@ -917,22 +917,22 @@ // Used with series specific legend renderers for pie, donut, mekko charts, etc. this.preDraw = false; // prop: marginTop - // CSS margin for the legend DOM element. This will set an element + // CSS margin for the legend DOM element. This will set an element // CSS style for the margin which will override any style sheet setting. // The default will be taken from the stylesheet. this.marginTop = null; // prop: marginRight - // CSS margin for the legend DOM element. This will set an element + // CSS margin for the legend DOM element. This will set an element // CSS style for the margin which will override any style sheet setting. // The default will be taken from the stylesheet. this.marginRight = null; // prop: marginBottom - // CSS margin for the legend DOM element. This will set an element + // CSS margin for the legend DOM element. This will set an element // CSS style for the margin which will override any style sheet setting. // The default will be taken from the stylesheet. this.marginBottom = null; // prop: marginLeft - // CSS margin for the legend DOM element. This will set an element + // CSS margin for the legend DOM element. This will set an element // CSS style for the margin which will override any style sheet setting. // The default will be taken from the stylesheet. this.marginLeft = null; @@ -941,24 +941,24 @@ // in legend text. "<" becomes < and so on, so html tags are not rendered. this.escapeHtml = false; this._series = []; - + $.extend(true, this, options); } - + Legend.prototype = new $.jqplot.ElemContainer(); Legend.prototype.constructor = Legend; - + Legend.prototype.setOptions = function(options) { $.extend(true, this, options); - + // Try to emulate deprecated behaviour // if user has specified xoffset or yoffset, copy these to // the margin properties. - + if (this.placement == 'inside') { this.placement = 'insideGrid'; } - + if (this.xoffset >0) { if (this.placement == 'insideGrid') { switch (this.location) { @@ -1004,7 +1004,7 @@ } this.xoffset = 0; } - + if (this.yoffset >0) { if (this.placement == 'outside') { switch (this.location) { @@ -1050,26 +1050,26 @@ } this.yoffset = 0; } - + // TO-DO: // Handle case where offsets are < 0. // }; - + Legend.prototype.init = function() { if ($.isFunction(this.renderer)) { - this.renderer = new this.renderer(); + this.renderer = new this.renderer(); } this.renderer.init.call(this, this.rendererOptions); }; - + Legend.prototype.draw = function(offsets, plot) { for (var i=0; i<$.jqplot.preDrawLegendHooks.length; i++){ $.jqplot.preDrawLegendHooks[i].call(this, offsets); } return this.renderer.draw.call(this, offsets, plot); }; - + Legend.prototype.pack = function(offsets) { this.renderer.pack.call(this, offsets); }; @@ -1077,16 +1077,16 @@ /** * Class: Title * Plot Title object. Cannot be instantiated directly, but created - * by the Plot oject. Title properties can be set or overriden by the + * by the Plot oject. Title properties can be set or overriden by the * options passed in from the user. - * + * * Parameters: * text - text of the title. */ function Title(text) { $.jqplot.ElemContainer.call(this); // Group: Properties - + // prop: text // text of the title; this.text = text; @@ -1111,27 +1111,27 @@ this.renderer = $.jqplot.DivTitleRenderer; // prop: rendererOptions // renderer specific options passed to the renderer. - this.rendererOptions = {}; + this.rendererOptions = {}; // prop: escapeHtml // True to escape special characters with their html entity equivalents // in title text. "<" becomes < and so on, so html tags are not rendered. this.escapeHtml = false; } - + Title.prototype = new $.jqplot.ElemContainer(); Title.prototype.constructor = Title; - + Title.prototype.init = function() { if ($.isFunction(this.renderer)) { - this.renderer = new this.renderer(); + this.renderer = new this.renderer(); } this.renderer.init.call(this, this.rendererOptions); }; - + Title.prototype.draw = function(width) { return this.renderer.draw.call(this, width); }; - + Title.prototype.pack = function() { this.renderer.pack.call(this); }; @@ -1140,7 +1140,7 @@ /** * Class: Series * An individual data series object. Cannot be instantiated directly, but created - * by the Plot oject. Series properties can be set or overriden by the + * by the Plot oject. Series properties can be set or overriden by the * options passed in from the user. */ function Series(options) { @@ -1171,7 +1171,7 @@ this._yaxis; this.gridBorderWidth = 2.0; // prop: renderer - // A class of a renderer which will draw the series, + // A class of a renderer which will draw the series, // see <$.jqplot.LineRenderer>. this.renderer = $.jqplot.LineRenderer; // prop: rendererOptions @@ -1203,8 +1203,8 @@ this.lineCap = 'round'; // prop: linePattern // line pattern 'dashed', 'dotted', 'solid', some combination - // of '-' and '.' characters such as '.-.' or a numerical array like - // [draw, skip, draw, skip, ...] such as [1, 10] to draw a dotted line, + // of '-' and '.' characters such as '.-.' or a numerical array like + // [draw, skip, draw, skip, ...] such as [1, 10] to draw a dotted line, // [1, 10, 20, 10] to draw a dot-dash line, and so on. this.linePattern = 'solid'; this.shadow = true; @@ -1308,10 +1308,10 @@ this._sumx = 0; this._type = ''; } - + Series.prototype = new $.jqplot.ElemContainer(); Series.prototype.constructor = Series; - + Series.prototype.init = function(index, gridbw, plot) { // weed out any null values in the data. this.index = index; @@ -1358,7 +1358,7 @@ this.fillColor = 'rgba('+comp[0]+','+comp[1]+','+comp[2]+','+this.fillAlpha+')'; } if ($.isFunction(this.renderer)) { - this.renderer = new this.renderer(); + this.renderer = new this.renderer(); } this.renderer.init.call(this, this.rendererOptions, plot); this.markerRenderer = new this.markerRenderer(); @@ -1372,16 +1372,16 @@ // the markerRenderer is called within it's own scaope, don't want to overwrite series options!! this.markerRenderer.init(this.markerOptions); }; - + // data - optional data point array to draw using this series renderer // gridData - optional grid data point array to draw using this series renderer // stackData - array of cumulative data for stacked plots. Series.prototype.draw = function(sctx, opts, plot) { var options = (opts == undefined) ? {} : opts; sctx = (sctx == undefined) ? this.canvas._ctx : sctx; - + var j, data, gridData; - + // hooks get called even if series not shown // we don't clear canvas here, it would wipe out all other series as well. for (j=0; j<$.jqplot.preDrawSeriesHooks.length; j++) { @@ -1410,20 +1410,20 @@ this.renderer.draw.call(this, sctx, gridData, options, plot); } - + for (j=0; j<$.jqplot.postDrawSeriesHooks.length; j++) { $.jqplot.postDrawSeriesHooks[j].call(this, sctx, options, plot); } - + sctx = opts = plot = j = data = gridData = null; }; - + Series.prototype.drawShadow = function(sctx, opts, plot) { var options = (opts == undefined) ? {} : opts; sctx = (sctx == undefined) ? this.shadowCanvas._ctx : sctx; - + var j, data, gridData; - + // hooks get called even if series not shown // we don't clear canvas here, it would wipe out all other series as well. for (j=0; j<$.jqplot.preDrawSeriesShadowHooks.length; j++) { @@ -1443,18 +1443,18 @@ data = this._plotData; } gridData = options.gridData || this.renderer.makeGridData.call(this, data, plot); - + this.renderer.drawShadow.call(this, sctx, gridData, options, plot); } - + for (j=0; j<$.jqplot.postDrawSeriesShadowHooks.length; j++) { $.jqplot.postDrawSeriesShadowHooks[j].call(this, sctx, options); } - + sctx = opts = plot = j = data = gridData = null; - + }; - + // toggles series display on plot, e.g. show/hide series Series.prototype.toggleDisplay = function(ev, callback) { var s, speed; @@ -1515,22 +1515,22 @@ } } }; - + /** * Class: Grid - * + * * Object representing the grid on which the plot is drawn. The grid in this * context is the area bounded by the axes, the area which will contain the series. * Note, the series are drawn on their own canvas. - * The Grid object cannot be instantiated directly, but is created by the Plot oject. + * The Grid object cannot be instantiated directly, but is created by the Plot oject. * Grid properties can be set or overriden by the options passed in from the user. */ function Grid() { $.jqplot.ElemContainer.call(this); // Group: Properties - + // prop: drawGridlines // wether to draw the gridlines on the plot. this.drawGridlines = true; @@ -1590,34 +1590,34 @@ this.rendererOptions = {}; this._offsets = {top:null, bottom:null, left:null, right:null}; } - + Grid.prototype = new $.jqplot.ElemContainer(); Grid.prototype.constructor = Grid; - + Grid.prototype.init = function() { if ($.isFunction(this.renderer)) { - this.renderer = new this.renderer(); + this.renderer = new this.renderer(); } this.renderer.init.call(this, this.rendererOptions); }; - + Grid.prototype.createElement = function(offsets,plot) { this._offsets = offsets; return this.renderer.createElement.call(this, plot); }; - + Grid.prototype.draw = function() { this.renderer.draw.call(this); }; - + $.jqplot.GenericCanvas = function() { $.jqplot.ElemContainer.call(this); - this._ctx; + this._ctx; }; - + $.jqplot.GenericCanvas.prototype = new $.jqplot.ElemContainer(); $.jqplot.GenericCanvas.prototype.constructor = $.jqplot.GenericCanvas; - + $.jqplot.GenericCanvas.prototype.createElement = function(offsets, clss, plotDimensions, plot) { this._offsets = offsets; var klass = 'jqplot'; @@ -1627,49 +1627,49 @@ var elem; elem = plot.canvasManager.getCanvas(); - + // if new plotDimensions supplied, use them. if (plotDimensions != null) { this._plotDimensions = plotDimensions; } - + elem.width = this._plotDimensions.width - this._offsets.left - this._offsets.right; elem.height = this._plotDimensions.height - this._offsets.top - this._offsets.bottom; this._elem = $(elem); this._elem.css({ position: 'absolute', left: this._offsets.left, top: this._offsets.top }); - + this._elem.addClass(klass); - + elem = plot.canvasManager.initCanvas(elem); - + elem = null; return this._elem; }; - + $.jqplot.GenericCanvas.prototype.setContext = function() { this._ctx = this._elem.get(0).getContext("2d"); return this._ctx; }; - + // Memory Leaks patch $.jqplot.GenericCanvas.prototype.resetCanvas = function() { if (this._elem) { if ($.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== undefined) { window.G_vmlCanvasManager.uninitElement(this._elem.get(0)); } - + //this._elem.remove(); this._elem.emptyForce(); } - + this._ctx = null; }; - + $.jqplot.HooksManager = function () { this.hooks =[]; this.args = []; }; - + $.jqplot.HooksManager.prototype.addOnce = function(fn, args) { args = args || []; var havehook = false; @@ -1683,17 +1683,17 @@ this.args.push(args); } }; - + $.jqplot.HooksManager.prototype.add = function(fn, args) { args = args || []; this.hooks.push(fn); this.args.push(args); }; - + $.jqplot.EventListenerManager = function () { this.hooks =[]; }; - + $.jqplot.EventListenerManager.prototype.addOnce = function(ev, fn) { var havehook = false, h, i; for (var i=0, l=this.hooks.length; i for axis specific options. this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis'), yMidAxis: new Axis('yMidAxis')}; this.baseCanvas = new $.jqplot.GenericCanvas(); @@ -1751,7 +1751,7 @@ // prop: data // user's data. Data should *NOT* be specified in the options object, // but be passed in as the second argument to the $.jqplot() function. - // The data property is described here soley for reference. + // The data property is described here soley for reference. // The data should be in the form of an array of 2D or 1D arrays like // > [ [[x1, y1], [x2, y2],...], [y1, y2, ...] ]. this.data = []; @@ -1821,7 +1821,7 @@ // prop: noDataIndicator // Options to set up a mock plot with a data loading indicator if no data is specified. this.negativeSeriesColors = $.jqplot.config.defaultNegativeColors; - this.noDataIndicator = { + this.noDataIndicator = { show: false, indicator: 'Loading Data...', axes: { @@ -1872,7 +1872,7 @@ // a shortcut for axis syncTicks options. Not implemented yet. this.syncYTicks = true; // the jquery object for the dom target. - this.target = null; + this.target = null; // The id of the dom element to render the plot into this.targetId = null; // prop textColor @@ -1902,7 +1902,7 @@ // merged with the the appropriate data from _stackData according to the stackAxis. this._plotData = []; this._width = null; - this._height = null; + this._height = null; this._plotDimensions = {height:null, width:null}; this._gridPadding = {top:null, right:null, bottom:null, left:null}; this._defaultGridPadding = {top:10, right:10, bottom:23, left:10}; @@ -1926,14 +1926,14 @@ this.eventListenerHooks = new $.jqplot.EventListenerManager(); this.preDrawSeriesShadowHooks = new $.jqplot.HooksManager(); this.postDrawSeriesShadowHooks = new $.jqplot.HooksManager(); - + this.colorGenerator = new $.jqplot.ColorGenerator(); this.negativeColorGenerator = new $.jqplot.ColorGenerator(); this.canvasManager = new $.jqplot.CanvasManager(); this.themeEngine = new $.jqplot.ThemeEngine(); - + var seriesColorsIndex = 0; // Group: methods @@ -1950,7 +1950,7 @@ for (var i=0; i'); temp.append(temp2); temp2.html(this.noDataIndicator.indicator); @@ -2076,12 +2076,12 @@ } } - + // make a copy of the data this.data = $.extend(true, [], data); - + this.parseOptions(options); - + if (this.textColor) { this.target.css('color', this.textColor); } @@ -2091,7 +2091,7 @@ if (this.fontSize) { this.target.css('font-size', this.fontSize); } - + this.title.init(); this.legend.init(); this._sumy = 0; @@ -2138,13 +2138,13 @@ } } } - + if (this.sortData) { sortData(this.series); } this.grid.init(); this.grid._axes = this.axes; - + this.legend._series = this.series; for (var i=0; i<$.jqplot.postInitHooks.length; i++) { @@ -2154,8 +2154,8 @@ for (var i=0; i s._innerRadius) { for (j=0; j= cv[0][1] && y <= cv[3][1] && x >= lex[0] && x <= rex[0]) { return {seriesIndex:s.index, pointIndex:j, gridData:null, data:s.data[j]}; } - } - break; - + } + break; + case $.jqplot.LineRenderer: x = gridpos.x; y = gridpos.y; @@ -3406,14 +3406,14 @@ if ((s.fill || (s.renderer.bands.show && s.renderer.bands.fill)) && (!plot.plugins.highlighter || !plot.plugins.highlighter.show)) { // first check if it is in bounding box var inside = false; - if (x>s._boundingBox[0][0] && xs._boundingBox[1][1] && ys._boundingBox[0][0] && xs._boundingBox[1][1] && y 0) { return colors[idx--]; } @@ -3832,17 +3832,17 @@ return colors[idx]; } }; - + // get a color by index without advancing pointer. this.get = function(i) { var idx = i - colors.length * Math.floor(i/colors.length); return colors[idx]; }; - + this.setColors = function(c) { colors = c; }; - + this.reset = function() { idx = 0; }; @@ -3872,7 +3872,7 @@ rgb += ')'; return rgb; }; - + // convert an rgb color spec to a hex spec. ignore any alpha specification. $.jqplot.rgb2hex = function(s) { var pat = /rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/; @@ -3896,11 +3896,11 @@ } return h; }; - + // given a css color spec, return an rgb css color spec $.jqplot.normalize2rgb = function(s, a) { if (s.search(/^ *rgba?\(/) != -1) { - return s; + return s; } else if (s.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/) != -1) { return $.jqplot.hex2rgb(s, a); @@ -3909,7 +3909,7 @@ throw 'invalid color spec'; } }; - + // extract the r, g, b, a color components out of a css color spec. $.jqplot.getColorComponents = function(s) { // check to see if a color keyword. @@ -3929,7 +3929,7 @@ ret[3] = parseFloat(m[4]) ? parseFloat(m[4]) : 1.0; return ret; }; - + $.jqplot.colorKeywordMap = { aliceblue: 'rgb(240, 248, 255)', antiquewhite: 'rgb(250, 235, 215)', @@ -4080,7 +4080,7 @@ yellowgreen: 'rgb(154, 205, 50)' }; - + // class: $.jqplot.AxisLabelRenderer // Renderer to place labels on the axes. @@ -4102,17 +4102,17 @@ // prop: escapeHTML // true to escape HTML entities in the label. this.escapeHTML = false; - + $.extend(true, this, options); }; - + $.jqplot.AxisLabelRenderer.prototype = new $.jqplot.ElemContainer(); $.jqplot.AxisLabelRenderer.prototype.constructor = $.jqplot.AxisLabelRenderer; - + $.jqplot.AxisLabelRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + $.jqplot.AxisLabelRenderer.prototype.draw = function(ctx, plot) { // Memory Leaks patch if (this._elem) { @@ -4121,11 +4121,11 @@ } this._elem = $('
          '); - + if (Number(this.label)) { this._elem.css('white-space', 'nowrap'); } - + if (!this.escapeHTML) { this._elem.html(this.label); } @@ -4141,10 +4141,10 @@ if (this.textColor) { this._elem.css('color', this.textColor); } - + return this._elem; }; - + $.jqplot.AxisLabelRenderer.prototype.pack = function() { }; @@ -4214,17 +4214,17 @@ this.escapeHTML = false; this._elem; this._breakTick = false; - + $.extend(true, this, options); }; - + $.jqplot.AxisTickRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + $.jqplot.AxisTickRenderer.prototype = new $.jqplot.ElemContainer(); $.jqplot.AxisTickRenderer.prototype.constructor = $.jqplot.AxisTickRenderer; - + $.jqplot.AxisTickRenderer.prototype.setTick = function(value, axisName, isMinor) { this.value = value; this.axis = axisName; @@ -4233,7 +4233,7 @@ } return this; }; - + $.jqplot.AxisTickRenderer.prototype.draw = function() { if (this.label === null) { this.label = this.prefix + this.formatter(this.formatString, this.value) + this.suffix; @@ -4242,7 +4242,7 @@ if (Number(this.label)) { style['whitSpace'] = 'nowrap'; } - + // Memory Leaks patch if (this._elem) { this._elem.emptyForce(); @@ -4251,14 +4251,14 @@ this._elem = $(document.createElement('div')); this._elem.addClass("jqplot-"+this.axis+"-tick"); - + if (!this.escapeHTML) { this._elem.html(this.label); } else { this._elem.text(this.label); } - + this._elem.css(style); for (var s in this._styles) { @@ -4276,10 +4276,10 @@ if (this._breakTick) { this._elem.addClass('jqplot-breakTick'); } - + return this._elem; }; - + $.jqplot.DefaultTickFormatter = function (format, val) { if (typeof val == 'number') { if (!format) { @@ -4291,7 +4291,7 @@ return String(val); } }; - + $.jqplot.PercentTickFormatter = function (format, val) { if (typeof val == 'number') { val = 100 * val; @@ -4304,17 +4304,17 @@ return String(val); } }; - + $.jqplot.AxisTickRenderer.prototype.pack = function() { }; - + // Class: $.jqplot.CanvasGridRenderer // The default jqPlot grid renderer, creating a grid on a canvas element. // The renderer has no additional options beyond the class. $.jqplot.CanvasGridRenderer = function(){ this.shadowRenderer = new $.jqplot.ShadowRenderer(); }; - + // called with context of Grid object $.jqplot.CanvasGridRenderer.prototype.init = function(options) { this._ctx; @@ -4323,7 +4323,7 @@ var sopts = {lineJoin:'miter', lineCap:'round', fill:false, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.shadowWidth, closePath:false, strokeStyle:this.shadowColor}; this.renderer.shadowRenderer.init(sopts); }; - + // called with context of Grid. $.jqplot.CanvasGridRenderer.prototype.createElement = function(plot) { var elem; @@ -4334,11 +4334,11 @@ window.G_vmlCanvasManager.uninitElement(elem); elem = null; } - + this._elem.emptyForce(); this._elem = null; } - + elem = plot.canvasManager.getCanvas(); var w = this._plotDimensions.width; @@ -4348,7 +4348,7 @@ this._elem = $(elem); this._elem.addClass('jqplot-grid-canvas'); this._elem.css({ position: 'absolute', left: 0, top: 0 }); - + elem = plot.canvasManager.initCanvas(elem); this._top = this._offsets.top; @@ -4361,7 +4361,7 @@ elem = null; return this._elem; }; - + $.jqplot.CanvasGridRenderer.prototype.draw = function() { this._ctx = this._elem.get(0).getContext("2d"); var ctx = this._ctx; @@ -4371,7 +4371,7 @@ ctx.clearRect(0, 0, this._plotDimensions.width, this._plotDimensions.height); ctx.fillStyle = this.backgroundColor || this.background; ctx.fillRect(this._left, this._top, this._width, this._height); - + ctx.save(); ctx.lineJoin = 'miter'; ctx.lineCap = 'butt'; @@ -4623,9 +4623,9 @@ axis = null; ticks = null; } - + ctx.restore(); - + function drawLine(bx, by, ex, ey, opts) { ctx.save(); opts = opts || {}; @@ -4638,7 +4638,7 @@ ctx.restore(); } } - + if (this.shadow) { var points = [[this._left, this._bottom], [this._right, this._bottom], [this._right, this._top]]; this.renderer.shadowRenderer.draw(ctx, points); @@ -4654,21 +4654,21 @@ // ctx.lineWidth = this.borderWidth; // ctx.strokeStyle = this.borderColor; // ctx.strokeRect(this._left, this._top, this._width, this._height); - + ctx.restore(); ctx = null; axes = null; }; - + // Class: $.jqplot.DivTitleRenderer - // The default title renderer for jqPlot. This class has no options beyond the class. + // The default title renderer for jqPlot. This class has no options beyond the <Title> class. $.jqplot.DivTitleRenderer = function() { }; - + $.jqplot.DivTitleRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + $.jqplot.DivTitleRenderer.prototype.draw = function() { // Memory Leaks patch if (this._elem) { @@ -4741,14 +4741,14 @@ } elem = null; - + return this._elem; }; - + $.jqplot.DivTitleRenderer.prototype.pack = function() { // nothing to do here }; - + var dotlen = 0.1; @@ -4866,7 +4866,7 @@ this.shapeRenderer = new $.jqplot.ShapeRenderer(); this.shadowRenderer = new $.jqplot.ShadowRenderer(); }; - + // called with scope of series. $.jqplot.LineRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -4905,7 +4905,7 @@ // // bandData can be input in 3 forms. jqPlot will figure out which is the // low band line and which is the high band line for all forms: - // + // // A 2 dimensional array like [[yl1, yl2, ...], [yu1, yu2, ...]] where // [yl1, yl2, ...] are y values of the lower line and // [yu1, yu2, ...] are y values of the upper line. @@ -4920,7 +4920,7 @@ // // Can be of form [[yl1, yu1], [yl2, yu2], [yl3, yu3], ...] where // there must be 3 or more arrays and there must be the same number of arrays - // as there are data points in the series. In this case, + // as there are data points in the series. In this case, // [yl1, yu1] specifies the lower and upper y values for the 1st // data point and so on. The bands will inherit the x // values from the series. @@ -4951,18 +4951,18 @@ _max: null, // prop: interval // User specified interval above and below line for bands [default: '3%'']. - // Can be a value like 3 or a string like '3%' + // Can be a value like 3 or a string like '3%' // or an upper/lower array like [1, -2] or ['2%', '-1.5%'] interval: '3%' }; var lopts = {highlightMouseOver: options.highlightMouseOver, highlightMouseDown: options.highlightMouseDown, highlightColor: options.highlightColor}; - + delete (options.highlightMouseOver); delete (options.highlightMouseDown); delete (options.highlightColor); - + $.extend(true, this.renderer, options); this.renderer.options = options; @@ -5009,15 +5009,15 @@ shadow_offset = 1.25 * Math.atan((this.lineWidth/2.5))/0.785398163; } } - + var sopts = {lineJoin:this.lineJoin, lineCap:this.lineCap, fill:this.fill, isarc:false, angle:this.shadowAngle, offset:shadow_offset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.lineWidth, linePattern:this.linePattern, closePath:this.fill}; this.renderer.shadowRenderer.init(sopts); this._areaPoints = []; this._boundingBox = [[],[]]; - + if (!this.isTrendline && this.fill || this.renderer.bands.show) { // Group: Properties - // + // // prop: highlightMouseOver // True to highlight area on a filled plot when moused over. // This must be false to enable highlightMouseDown to highlight when clicking on an area on a filled plot. @@ -5033,9 +5033,9 @@ if (lopts.highlightMouseDown && lopts.highlightMouseOver == null) { lopts.highlightMouseOver = false; } - + $.extend(true, this, {highlightMouseOver: lopts.highlightMouseOver, highlightMouseDown: lopts.highlightMouseDown, highlightColor: lopts.highlightColor}); - + if (!this.highlightColor) { var fc = (this.renderer.bands.show) ? this.renderer.bands.fillColor : this.fillColor; this.highlightColor = $.jqplot.computeHighlightColors(fc); @@ -5045,7 +5045,7 @@ this.highlighter.show = false; } } - + if (!this.isTrendline && plot) { plot.plugins.lineRenderer = {}; plot.postInitHooks.addOnce(postInit); @@ -5285,7 +5285,7 @@ var smooth = this.renderer.smooth; var dim = this.canvas.getWidth(); var xp = this._xaxis.series_p2u; - var yp = this._yaxis.series_p2u; + var yp = this._yaxis.series_p2u; var steps =null; var _steps = null; var dist = gd.length/dim; @@ -5352,7 +5352,7 @@ else if (num == nmax) { // Last point has 0 2nd derivative gxx[1] = 3 / 2 * (yy[nmax] - yy[nmax - 1]) / dxx(xx[nmax], xx[nmax - 1]) - gxx[0] / 2; - } + } // Calc second derivative at points ggxx[0] = -2 * (gxx[1] + 2 * gxx[0]) / dxx(xx[num], xx[num - 1]) + 6 * (yy[num] - yy[num - 1]) / Math.pow(dxx(xx[num], xx[num - 1]), 2); @@ -5406,7 +5406,7 @@ var tension = this.renderer.tension; var dim = this.canvas.getWidth(); var xp = this._xaxis.series_p2u; - var yp = this._yaxis.series_p2u; + var yp = this._yaxis.series_p2u; var steps =null; var _steps = null; var a = null; @@ -5449,7 +5449,7 @@ a1 = stretch * tanh(temp) - stretch * tanh(shift) + min; - // if have both left and right line segments, will use minimum tension. + // if have both left and right line segments, will use minimum tension. if (i > 0) { slope2 = Math.abs((gd[i][1] - gd[i-1][1]) / (gd[i][0] - gd[i-1][0])); } @@ -5468,23 +5468,23 @@ h1 = (1 + 2*s)*Math.pow((1-s),2); h2 = s*Math.pow((1-s),2); h3 = Math.pow(s,2)*(3-2*s); - h4 = Math.pow(s,2)*(s-1); - - if (gd[i-1]) { - TiX = a * (gd[i+1][0] - gd[i-1][0]); + h4 = Math.pow(s,2)*(s-1); + + if (gd[i-1]) { + TiX = a * (gd[i+1][0] - gd[i-1][0]); TiY = a * (gd[i+1][1] - gd[i-1][1]); } else { - TiX = a * (gd[i+1][0] - gd[i][0]); - TiY = a * (gd[i+1][1] - gd[i][1]); + TiX = a * (gd[i+1][0] - gd[i][0]); + TiY = a * (gd[i+1][1] - gd[i][1]); } - if (gd[i+2]) { - Ti1X = a * (gd[i+2][0] - gd[i][0]); + if (gd[i+2]) { + Ti1X = a * (gd[i+2][0] - gd[i][0]); Ti1Y = a * (gd[i+2][1] - gd[i][1]); } else { - Ti1X = a * (gd[i+1][0] - gd[i][0]); - Ti1Y = a * (gd[i+1][1] - gd[i][1]); + Ti1X = a * (gd[i+1][0] - gd[i][0]); + Ti1Y = a * (gd[i+1][1] - gd[i][1]); } - + pX = h1*gd[i][0] + h3*gd[i+1][0] + h2*TiX + h4*Ti1X; pY = h1*gd[i][1] + h3*gd[i+1][1] + h2*TiY + h4*Ti1Y; p = [pX, pY]; @@ -5498,7 +5498,7 @@ return [_smoothedData, _smoothedPlotData]; } - + // setGridData // converts the user data values to grid coordinates and stores them // in the gridData array. @@ -5540,7 +5540,7 @@ // else if there is a null, preserve it. else if (pdata[i] != null && pdata[i][0] == null) { this._prevGridData.push([null, yp.call(this._yaxis, pdata[i][1])]); - } + } else if (pdata[i] != null && pdata[i][0] != null && pdata[i][1] == null) { this._prevGridData.push([xp.call(this._xaxis, pdata[i][0]), null]); } @@ -5596,7 +5596,7 @@ } } }; - + // makeGridData // converts any arbitrary data values to grid coordinates and // returns them. This method exists so that plugins can use a series' @@ -5683,7 +5683,7 @@ } return gd; }; - + // called within scope of series. $.jqplot.LineRenderer.prototype.draw = function(ctx, gd, options, plot) { @@ -5700,7 +5700,7 @@ if (showLine) { // if we fill, we'll have to add points to close the curve. if (fill) { - if (this.fillToZero) { + if (this.fillToZero) { // have to break line up into shapes at axis crossings var negativeColor = this.negativeColor; if (! this.useNegativeColors) { @@ -5708,14 +5708,14 @@ } var isnegative = false; var posfs = opts.fillStyle; - + // if stoking line as well as filling, get a copy of line data. if (fillAndStroke) { var fasgd = gd.slice(0); } // if not stacked, fill down to axis if (this.index == 0 || !this._stack) { - + var tempgd = []; var pd = (this.renderer.smooth) ? this.renderer._smoothedPlotData : this._plotData; this._areaPoints = []; @@ -5723,11 +5723,11 @@ var pxzero = this._xaxis.series_u2p(this.fillToValue); opts.closePath = true; - + if (this.fillAxis == 'y') { tempgd.push([gd[0][0], pyzero]); this._areaPoints.push([gd[0][0], pyzero]); - + for (var i=0; i<gd.length-1; i++) { tempgd.push(gd[i]); this._areaPoints.push(gd[i]); @@ -5741,7 +5741,7 @@ isnegative = false; opts.fillStyle = posfs; } - + var xintercept = gd[i][0] + (gd[i+1][0] - gd[i][0]) * (pyzero-gd[i][1])/(gd[i+1][1] - gd[i][1]); tempgd.push([xintercept, pyzero]); this._areaPoints.push([xintercept, pyzero]); @@ -5753,7 +5753,7 @@ // now empty temp array and continue tempgd = [[xintercept, pyzero]]; // this._areaPoints = [[xintercept, pyzero]]; - } + } } if (pd[gd.length-1][1] < 0) { isnegative = true; @@ -5765,23 +5765,23 @@ } tempgd.push(gd[gd.length-1]); this._areaPoints.push(gd[gd.length-1]); - tempgd.push([gd[gd.length-1][0], pyzero]); - this._areaPoints.push([gd[gd.length-1][0], pyzero]); + tempgd.push([gd[gd.length-1][0], pyzero]); + this._areaPoints.push([gd[gd.length-1][0], pyzero]); } // now draw the last area. if (shadow) { this.renderer.shadowRenderer.draw(ctx, tempgd, opts); } this.renderer.shapeRenderer.draw(ctx, tempgd, opts); - - + + // var gridymin = this._yaxis.series_u2p(0); // // IE doesn't return new length on unshift // gd.unshift([gd[0][0], gridymin]); // len = gd.length; - // gd.push([gd[len - 1][0], gridymin]); + // gd.push([gd[len - 1][0], gridymin]); } - // if stacked, fill to line below + // if stacked, fill to line below else { var prev = this._prevGridData; for (var i=prev.length; i>0; i--) { @@ -5798,7 +5798,7 @@ ///////////////////////// // Not filled to zero //////////////////////// - else { + else { // if stoking line as well as filling, get a copy of line data. if (fillAndStroke) { var fasgd = gd.slice(0); @@ -5810,9 +5810,9 @@ // IE doesn't return new length on unshift gd.unshift([gd[0][0], gridymin]); var len = gd.length; - gd.push([gd[len - 1][0], gridymin]); + gd.push([gd[len - 1][0], gridymin]); } - // if stacked, fill to line below + // if stacked, fill to line below else { var prev = this._prevGridData; for (var i=prev.length; i>0; i--) { @@ -5820,12 +5820,12 @@ } } this._areaPoints = gd; - + if (shadow) { this.renderer.shadowRenderer.draw(ctx, gd, opts); } - - this.renderer.shapeRenderer.draw(ctx, gd, opts); + + this.renderer.shapeRenderer.draw(ctx, gd, opts); } if (fillAndStroke) { var fasopts = $.extend(true, {}, opts, {fill:false, closePath:false}); @@ -5876,7 +5876,7 @@ if (shadow) { this.renderer.shadowRenderer.draw(ctx, gd, opts); } - + this.renderer.shapeRenderer.draw(ctx, gd, opts); } } @@ -5904,7 +5904,7 @@ } this._boundingBox = [[xmin, ymax], [xmax, ymin]]; - + // now draw the markers if (this.markerRenderer.show && !fill) { if (this.renderer.smooth) { @@ -5917,14 +5917,14 @@ } } } - + ctx.restore(); - }; - + }; + $.jqplot.LineRenderer.prototype.drawShadow = function(ctx, gd, options) { // This is a no-op, shadows drawn with lines. }; - + // called with scope of plot. // make sure to not leave anything highlighted. function postInit(target, data, options) { @@ -5936,26 +5936,26 @@ } } } - } - + } + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.lineRenderer && this.plugins.lineRenderer.highlightCanvas) { this.plugins.lineRenderer.highlightCanvas.resetCanvas(); this.plugins.lineRenderer.highlightCanvas = null; } - + this.plugins.lineRenderer.highlightedSeriesIndex = null; this.plugins.lineRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(this.plugins.lineRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-lineRenderer-highlight-canvas', this._plotDimensions, this)); this.plugins.lineRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); - } - + } + function highlight (plot, sidx, pidx, points) { var s = plot.series[sidx]; var canvas = plot.plugins.lineRenderer.highlightCanvas; @@ -5970,7 +5970,7 @@ s.renderer.shapeRenderer.draw(canvas._ctx, points, opts); canvas = null; } - + function unhighlight (plot) { var canvas = plot.plugins.lineRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -5981,8 +5981,8 @@ plot.target.trigger('jqplotDataUnhighlight'); canvas = null; } - - + + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -6003,7 +6003,7 @@ unhighlight (plot); } } - + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -6020,14 +6020,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.lineRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -6038,7 +6038,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -6053,20 +6053,20 @@ plot.target.trigger(evt, ins); } } - - + + // class: $.jqplot.LinearAxisRenderer // The default jqPlot axis renderer, creating a numeric axis. $.jqplot.LinearAxisRenderer = function() { }; - + // called with scope of axis object. $.jqplot.LinearAxisRenderer.prototype.init = function(options){ // prop: breakPoints // EXPERIMENTAL!! Use at your own risk! // Works only with linear axes and the default tick renderer. // Array of [start, stop] points to create a broken axis. - // Broken axes have a "jump" in them, which is an immediate + // Broken axes have a "jump" in them, which is an immediate // transition from a smaller value to a larger value. // Currently, axis ticks MUST be manually assigned if using breakPoints // by using the axis ticks array option. @@ -6102,7 +6102,7 @@ // are set: autoscale, min, max, numberTicks or tickInterval. this.forceTickAt100 = false; // prop: tickInset - // Controls the amount to inset the first and last ticks from + // Controls the amount to inset the first and last ticks from // the edges of the grid, in multiples of the tick interval. // 0 is no inset, 0.5 is one half a tick interval, 1 is a full // tick interval, etc. @@ -6133,7 +6133,7 @@ } this.resetDataBounds(); }; - + // called with scope of axis $.jqplot.LinearAxisRenderer.prototype.draw = function(ctx, plot) { if (this.show) { @@ -6153,19 +6153,19 @@ this._elem.emptyForce(); this._elem = null; } - + this._elem = $(document.createElement('div')); this._elem.addClass('jqplot-axis jqplot-'+this.name); this._elem.css('position', 'absolute'); - + if (this.name == 'xaxis' || this.name == 'x2axis') { this._elem.width(this._plotDimensions.width); } else { this._elem.height(this._plotDimensions.height); } - + // create a _label object. this.labelOptions.axis = this.name; this._label = new this.labelRenderer(this.labelOptions); @@ -6174,7 +6174,7 @@ elem.appendTo(this._elem); elem = null; } - + var t = this._ticks; var tick; for (var i=0; i<t.length; i++) { @@ -6188,7 +6188,7 @@ } return this._elem; }; - + // called with scope of an axis $.jqplot.LinearAxisRenderer.prototype.reset = function() { this.min = this._options.min; @@ -6202,9 +6202,9 @@ // this._ticks = this.__ticks; }; - + // called with scope of axis - $.jqplot.LinearAxisRenderer.prototype.set = function() { + $.jqplot.LinearAxisRenderer.prototype.set = function() { var dim = 0; var temp; var w = 0; @@ -6229,10 +6229,10 @@ } tick = null; t = null; - + if (lshow) { w = this._label._elem.outerWidth(true); - h = this._label._elem.outerHeight(true); + h = this._label._elem.outerHeight(true); } if (this.name == 'xaxis') { dim = dim + h; @@ -6256,9 +6256,9 @@ this._label._elem.css('width', w+'px'); } } - } - }; - + } + }; + // called with scope of axis $.jqplot.LinearAxisRenderer.prototype.createTicks = function(plot) { // we're are operating on an axis here @@ -6280,10 +6280,10 @@ var threshold = 30; this._scalefact = (Math.max(dim, threshold+1) - threshold)/300.0; - + // if we already have ticks, use them. // ticks must be in order of increasing value. - + if (userTicks.length) { // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed for (i=0; i<userTicks.length; i++){ @@ -6319,7 +6319,7 @@ t.axis = this.name; this._ticks.push(t); } - + else { t.value = ut; if (this.breakPoints) { @@ -6343,7 +6343,7 @@ this.max = this._ticks[this.numberTicks-1].value; this.tickInterval = (this.max - this.min) / (this.numberTicks - 1); } - + // we don't have any ticks yet, let's make some! else { if (name == 'xaxis' || name == 'x2axis') { @@ -6365,7 +6365,7 @@ _numberTicks = plot.axes.yaxis.numberTicks; } } - + min = ((this.min != null) ? this.min : db.min); max = ((this.max != null) ? this.max : db.max); @@ -6413,10 +6413,10 @@ // var threshold = 30; // var tdim = Math.max(dim, threshold+1); // this._scalefact = (tdim-threshold)/300.0; - var ret = $.jqplot.LinearTickGenerator(min, max, this._scalefact, _numberTicks, keepMin, keepMax); + var ret = $.jqplot.LinearTickGenerator(min, max, this._scalefact, _numberTicks, keepMin, keepMax); // calculate a padded max and min, points should be less than these // so that they aren't too close to the edges of the plot. - // User can adjust how much padding is allowed with pad, padMin and PadMax options. + // User can adjust how much padding is allowed with pad, padMin and PadMax options. // If min or max is set, don't pad that end of axis. var tumin = (this.min != null) ? min : min + range*(this.padMin - 1); var tumax = (this.max != null) ? max : max - range*(this.padMax - 1); @@ -6439,7 +6439,7 @@ // User has specified some axis scale related option, can use auto algorithm else { - + // if min and max are same, space them out a bit if (min == max) { var adj = 0.05; @@ -6449,7 +6449,7 @@ min -= adj; max += adj; } - + // autoscale. Can't autoscale if min or max is supplied. // Will use numberTicks and tickInterval if supplied. Ticks // across multiple axes may not line up depending on how @@ -6494,7 +6494,7 @@ } } } - + // if not a bar and filling, use appropriate method. else if (s.fill) { if (vmin >= 0 && (s.fillToZero || dp > 0.1)) { @@ -6509,7 +6509,7 @@ forceZeroLine = false; } } - + // if not a bar and not filling, only change existing state // if it doesn't make sense else if (vmin < 0) { @@ -6517,7 +6517,7 @@ } } } - + // check if we need make axis min at 0. if (forceMinZero) { // compute number of ticks @@ -6534,7 +6534,7 @@ this.tickInterval = Math.ceil(ti/temp) * temp; this.max = this.tickInterval * (this.numberTicks - 1); } - + // check if we need to make sure there is a tick at 0. else if (forceZeroLine) { // compute number of ticks @@ -6547,9 +6547,9 @@ this.max = this.tickInterval * ntmax; this.min = -this.tickInterval * ntmin; } - + // if nothing else, do autoscaling which will try to line up ticks across axes. - else { + else { if (this.numberTicks == null){ if (this.tickInterval) { this.numberTicks = 3 + Math.ceil(range / this.tickInterval); @@ -6558,7 +6558,7 @@ this.numberTicks = 2 + Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing); } } - + if (this.tickInterval == null) { // get a tick interval ti = range/(this.numberTicks - 1); @@ -6574,13 +6574,13 @@ else { temp = 1 / this.tickInterval; } - + // try to compute a nicer, more even tick interval // temp = Math.pow(10, Math.floor(Math.log(ti)/Math.LN10)); // this.tickInterval = Math.ceil(ti/temp) * temp; rrange = this.tickInterval * (this.numberTicks - 1); margin = (rrange - range)/2; - + if (this.min == null) { this.min = Math.floor(temp*(min-margin))/temp; } @@ -6608,7 +6608,7 @@ this._autoFormatString = fstr; } - + // Use the default algorithm which pads each axis to make the chart // centered nicely on the grid. else { @@ -6616,7 +6616,7 @@ rmin = (this.min != null) ? this.min : min - range*(this.padMin - 1); rmax = (this.max != null) ? this.max : max + range*(this.padMax - 1); range = rmax - rmin; - + if (this.numberTicks == null){ // if tickInterval is specified by user, we will ignore computed maximum. // max will be equal or greater to fit even # of ticks. @@ -6630,14 +6630,14 @@ this.numberTicks = 2; } } - + if (this.tickInterval == null) { this.tickInterval = range / (this.numberTicks-1); } - + if (this.max == null) { rmax = rmin + this.tickInterval*(this.numberTicks - 1); - } + } if (this.min == null) { rmin = rmax - this.tickInterval*(this.numberTicks - 1); } @@ -6664,14 +6664,14 @@ this.min = rmin; this.max = rmax; } - + if (this.renderer.constructor == $.jqplot.LinearAxisRenderer && this._autoFormatString == '') { // fix for misleading tick display with small range and low precision. range = this.max - this.min; // figure out precision var temptick = new this.tickRenderer(this.tickOptions); // use the tick formatString or, the default. - var fs = temptick.formatString || $.jqplot.config.defaultTickFormatString; + var fs = temptick.formatString || $.jqplot.config.defaultTickFormatString; var fs = fs.match($.jqplot.sprintf.regex)[0]; var precision = 0; if (fs) { @@ -6738,9 +6738,9 @@ } } } - + } - + if (this._overrideFormatString && this._autoFormatString != '') { this.tickOptions = this.tickOptions || {}; this.tickOptions.formatString = this._autoFormatString; @@ -6774,9 +6774,9 @@ ticks = null; }; - + // Used to reset just the values of the ticks and then repack, which will - // recalculate the positioning functions. It is assuemd that the + // recalculate the positioning functions. It is assuemd that the // number of ticks is the same and the values of the new array are at the // proper interval. // This method needs to be called with the scope of an axis object, like: @@ -6800,40 +6800,40 @@ } // Not implemented yet. // else if ($.isPlainObject(opts)) { - // + // // } }; - + // called with scope of axis $.jqplot.LinearAxisRenderer.prototype.pack = function(pos, offsets) { // Add defaults for repacking from resetTickValues function. pos = pos || {}; offsets = offsets || this._offsets; - + var ticks = this._ticks; var max = this.max; var min = this.min; var offmax = offsets.max; var offmin = offsets.min; var lshow = (this._label == null) ? false : this._label.show; - + for (var p in pos) { this._elem.css(p, pos[p]); } - + this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; - + // point to unit and unit to point conversions references to Plot DOM element top left corner. if (this.breakPoints) { unitlength = unitlength - this.breakPoints[1] + this.breakPoints[0]; - + this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + this.u2p = function(u){ if (u > this.breakPoints[0] && u < this.breakPoints[1]){ u = this.breakPoints[0]; @@ -6845,7 +6845,7 @@ return (u - this.breakPoints[1] + this.breakPoints[0] - min) * pixellength / unitlength + offmin; } }; - + if (this.name.charAt(0) == 'x'){ this.series_u2p = function(u){ if (u > this.breakPoints[0] && u < this.breakPoints[1]){ @@ -6862,7 +6862,7 @@ return p * unitlength / pixellength + min; }; } - + else { this.series_u2p = function(u){ if (u > this.breakPoints[0] && u < this.breakPoints[1]){ @@ -6884,11 +6884,11 @@ this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + this.u2p = function(u){ return (u - min) * pixellength / unitlength + offmin; }; - + if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (u - min) * pixellength / unitlength; @@ -6897,7 +6897,7 @@ return p * unitlength / pixellength + min; }; } - + else { this.series_u2p = function(u){ return (u - max) * pixellength / unitlength; @@ -6907,14 +6907,14 @@ }; } } - + if (this.show) { if (this.name == 'xaxis' || this.name == 'x2axis') { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; - + if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. var temp = (this.name == 'xaxis') ? 1 : -1; @@ -6966,7 +6966,7 @@ else { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; - if (t.show && t.showLabel) { + if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. @@ -7007,7 +7007,7 @@ else { shim = -t.getHeight()/2; } - + var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); @@ -7021,7 +7021,7 @@ } else { this._label._elem.css('right', '0px'); - } + } this._label.pack(); } } @@ -7033,23 +7033,23 @@ /** * The following code was generaously given to me a while back by Scott Prahl. - * He did a good job at computing axes min, max and number of ticks for the + * He did a good job at computing axes min, max and number of ticks for the * case where the user has not set any scale related parameters (tickInterval, * numberTicks, min or max). I had ignored this use case for a long time, * focusing on the more difficult case where user has set some option controlling * tick generation. Anyway, about time I got this into jqPlot. * Thanks Scott!! */ - + /** * Copyright (c) 2010 Scott Prahl - * The next three routines are currently available for use in all personal - * or commercial projects under both the MIT and GPL version 2.0 licenses. - * This means that you can choose the license that best suits your project - * and use it accordingly. + * The next three routines are currently available for use in all personal + * or commercial projects under both the MIT and GPL version 2.0 licenses. + * This means that you can choose the license that best suits your project + * and use it accordingly. */ - // A good format string depends on the interval. If the interval is greater + // A good format string depends on the interval. If the interval is greater // than 1 then there is no need to show any decimal digits. If it is < 1.0, then // use the magnitude of the interval to determine the number of digits to show. function bestFormatString (interval) @@ -7073,8 +7073,8 @@ var expv = -Math.floor(Math.log(interval)/Math.LN10); fstr = '%.' + expv + 'f'; } - - return fstr; + + return fstr; } var _factors = [0.1, 0.2, 0.3, 0.4, 0.5, 0.8, 1, 2, 3, 4, 5]; @@ -7100,7 +7100,7 @@ }; // Given a fixed minimum and maximum and a target number ot ticks - // figure out the best interval and + // figure out the best interval and // return min, max, number ticks, format string and tick interval function bestConstrainedInterval(min, max, nttarget) { // run through possible number to ticks and see which interval is best @@ -7160,7 +7160,7 @@ var residual = minimum / magnitude; var interval; // "nicest" ranges are 1, 2, 5 or powers of these. - // for magnitudes below 1, only allow these. + // for magnitudes below 1, only allow these. if (magnitude < 1) { if (residual > 5) { interval = 10 * magnitude; @@ -7176,7 +7176,7 @@ } } // for large ranges (whole integers), allow intervals like 3, 4 or powers of these. - // this helps a lot with poor choices for number of ticks. + // this helps a lot with poor choices for number of ticks. else { if (residual > 5) { interval = 10 * magnitude; @@ -7233,9 +7233,9 @@ } else { fact = 5; - } + } - return fact*magnitude; + return fact*magnitude; } function bestLinearComponents(range, scalefact) { @@ -7274,7 +7274,7 @@ // } else { fact = 5; - } + } interval = fact * magnitude; @@ -7308,7 +7308,7 @@ var ss = bestLinearInterval(axis_max - axis_min, scalefact); var gsf = $.jqplot.getSignificantFigures; - + if (numberTicks == null) { // Figure out the axis min, max and number of ticks @@ -7397,7 +7397,7 @@ // The default jqPlot marker renderer, rendering the points on the line. $.jqplot.MarkerRenderer = function(options){ // Group: Properties - + // prop: show // wether or not to show the marker. this.show = true; @@ -7434,10 +7434,10 @@ // prop: shapeRenderer // Renderer that will draw the marker. this.shapeRenderer = new $.jqplot.ShapeRenderer(); - + $.extend(true, this, options); }; - + $.jqplot.MarkerRenderer.prototype.init = function(options) { $.extend(true, this, options); var sdopt = {angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, lineWidth:this.lineWidth, depth:this.shadowDepth, closePath:true}; @@ -7449,7 +7449,7 @@ sdopt.closePath = false; } this.shadowRenderer.init(sdopt); - + var shopt = {fill:false, isarc:false, strokeStyle:this.color, fillStyle:this.color, lineWidth:this.lineWidth, closePath:true}; if (this.style.indexOf('filled') != -1) { shopt.fill = true; @@ -7460,7 +7460,7 @@ } this.shapeRenderer.init(shopt); }; - + $.jqplot.MarkerRenderer.prototype.drawDiamond = function(x, y, ctx, fill, options) { var stretch = 1.2; var dx = this.size/2/stretch; @@ -7471,7 +7471,7 @@ } this.shapeRenderer.draw(ctx, points, options); }; - + $.jqplot.MarkerRenderer.prototype.drawPlus = function(x, y, ctx, fill, options) { var stretch = 1.0; var dx = this.size/2*stretch; @@ -7486,7 +7486,7 @@ this.shapeRenderer.draw(ctx, points1, opts); this.shapeRenderer.draw(ctx, points2, opts); }; - + $.jqplot.MarkerRenderer.prototype.drawX = function(x, y, ctx, fill, options) { var stretch = 1.0; var dx = this.size/2*stretch; @@ -7501,7 +7501,7 @@ this.shapeRenderer.draw(ctx, points1, opts); this.shapeRenderer.draw(ctx, points2, opts); }; - + $.jqplot.MarkerRenderer.prototype.drawDash = function(x, y, ctx, fill, options) { var stretch = 1.0; var dx = this.size/2*stretch; @@ -7512,7 +7512,7 @@ } this.shapeRenderer.draw(ctx, points, options); }; - + $.jqplot.MarkerRenderer.prototype.drawLine = function(p1, p2, ctx, fill, options) { var points = [p1, p2]; if (this.shadow) { @@ -7520,7 +7520,7 @@ } this.shapeRenderer.draw(ctx, points, options); }; - + $.jqplot.MarkerRenderer.prototype.drawSquare = function(x, y, ctx, fill, options) { var stretch = 1.0; var dx = this.size/2/stretch; @@ -7531,7 +7531,7 @@ } this.shapeRenderer.draw(ctx, points, options); }; - + $.jqplot.MarkerRenderer.prototype.drawCircle = function(x, y, ctx, fill, options) { var radius = this.size/2; var end = 2*Math.PI; @@ -7541,7 +7541,7 @@ } this.shapeRenderer.draw(ctx, points, options); }; - + $.jqplot.MarkerRenderer.prototype.draw = function(x, y, ctx, options) { options = options || {}; // hack here b/c shape renderer uses canvas based color style options @@ -7590,12 +7590,12 @@ } } }; - + // class: $.jqplot.shadowRenderer // The default jqPlot shadow renderer, rendering shadows behind shapes. - $.jqplot.ShadowRenderer = function(options){ + $.jqplot.ShadowRenderer = function(options){ // Group: Properties - + // prop: angle // Angle of the shadow in degrees. Measured counter-clockwise from the x axis. this.angle = 45; @@ -7627,14 +7627,14 @@ // prop: isarc // wether the shadow is an arc or not. this.isarc = false; - + $.extend(true, this, options); }; - + $.jqplot.ShadowRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + // function: draw // draws an transparent black (i.e. gray) shadow. // @@ -7661,7 +7661,7 @@ ctx.translate(Math.cos(this.angle*Math.PI/180)*offset, Math.sin(this.angle*Math.PI/180)*offset); ctxPattern.beginPath(); if (isarc) { - ctx.arc(points[0], points[1], points[2], points[3], points[4], true); + ctx.arc(points[0], points[1], points[2], points[3], points[4], true); } else if (fillRect) { if (fillRect) { @@ -7685,7 +7685,7 @@ move = true; } } - + } if (closePath) { ctxPattern.closePath(); @@ -7699,19 +7699,19 @@ } ctx.restore(); }; - + // class: $.jqplot.shapeRenderer // The default jqPlot shape renderer. Given a set of points will // plot them and either stroke a line (fill = false) or fill them (fill = true). // If a filled shape is desired, closePath = true must also be set to close // the shape. $.jqplot.ShapeRenderer = function(options){ - + this.lineWidth = 1.5; // prop: linePattern // line pattern 'dashed', 'dotted', 'solid', some combination - // of '-' and '.' characters such as '.-.' or a numerical array like - // [draw, skip, draw, skip, ...] such as [1, 10] to draw a dotted line, + // of '-' and '.' characters such as '.-.' or a numerical array like + // [draw, skip, draw, skip, ...] such as [1, 10] to draw a dotted line, // [1, 10, 20, 10] to draw a dot-dash line, and so on. this.linePattern = 'solid'; // prop: lineJoin @@ -7743,20 +7743,20 @@ this.strokeStyle = '#999999'; // prop: fillStyle // css color spec for the fill style. - this.fillStyle = '#999999'; - + this.fillStyle = '#999999'; + $.extend(true, this, options); }; - + $.jqplot.ShapeRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + // function: draw // draws the shape. // // ctx - canvas drawing context - // points - array of points for shapes or + // points - array of points for shapes or // [x, y, width, height] for rectangles or // [x, y, radius, start angle (rad), end angle (rad)] for circles and arcs. $.jqplot.ShapeRenderer.prototype.draw = function(ctx, points, options) { @@ -7777,7 +7777,7 @@ ctx.fillStyle = opts.fillStyle || this.fillStyle; ctx.beginPath(); if (isarc) { - ctx.arc(points[0], points[1], points[2], points[3], points[4], true); + ctx.arc(points[0], points[1], points[2], points[3], points[4], true); if (closePath) { ctx.closePath(); } @@ -7834,17 +7834,17 @@ } ctx.restore(); }; - + // class $.jqplot.TableLegendRenderer // The default legend renderer for jqPlot. $.jqplot.TableLegendRenderer = function(){ // }; - + $.jqplot.TableLegendRenderer.prototype.init = function(options) { $.extend(true, this, options); }; - + $.jqplot.TableLegendRenderer.prototype.addrow = function (label, color, pad, reverse) { var rs = (pad) ? this.rowSpacing+'px' : '0px'; var tr; @@ -7903,7 +7903,7 @@ tr = null; elem = null; }; - + // called with scope of legend $.jqplot.TableLegendRenderer.prototype.draw = function() { if (this._elem) { @@ -7946,9 +7946,9 @@ if (this.marginRight != null) { ss['marginRight'] = this.marginRight; } - - - var pad = false, + + + var pad = false, reverse = false, s; for (var i = 0; i< series.length; i++) { @@ -7975,7 +7975,7 @@ if (item) { this.renderer.addrow.call(this, item.label, item.color, pad); pad = true; - } + } } lt = null; } @@ -7983,9 +7983,9 @@ } return this._elem; }; - + $.jqplot.TableLegendRenderer.prototype.pack = function(offsets) { - if (this.show) { + if (this.show) { if (this.placement == 'insideGrid') { switch (this.location) { case 'nw': @@ -8036,7 +8036,7 @@ this._elem.css({right:a, bottom:b}); break; } - + } else if (this.placement == 'outside'){ switch (this.location) { @@ -8124,7 +8124,7 @@ break; } } - } + } }; /** @@ -8132,19 +8132,19 @@ * Theme Engine provides a programatic way to change some of the more * common jqplot styling options such as fonts, colors and grid options. * A theme engine instance is created with each plot. The theme engine - * manages a collection of themes which can be modified, added to, or + * manages a collection of themes which can be modified, added to, or * applied to the plot. - * + * * The themeEngine class is not instantiated directly. * When a plot is initialized, the current plot options are scanned * an a default theme named "Default" is created. This theme is * used as the basis for other themes added to the theme engine and * is always available. - * + * * A theme is a simple javascript object with styling parameters for * various entities of the plot. A theme has the form: - * - * + * + * * > { * > _name:f "Default", * > target: { @@ -8245,17 +8245,17 @@ * > } * > } * > } - * + * * "seriesStyles" is a style object that will be applied to all series in the plot. * It will forcibly override any styles applied on the individual series. "axesStyles" is * a style object that will be applied to all axes in the plot. It will also forcibly * override any styles on the individual axes. - * + * * The example shown above has series options for a line series. Options for other * series types are shown below: - * + * * Bar Series: - * + * * > { * > color: "#4bb2c5", * > seriesColors: ["#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"], @@ -8266,9 +8266,9 @@ * > barWidth: 15.09375, * > highlightColors: ["rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)", "rgb(129,201,214)"] * > } - * + * * Pie Series: - * + * * > { * > seriesColors: ["#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"], * > padding: 20, @@ -8279,9 +8279,9 @@ * > lineWidth: 2.5, * > highlightColors: ["rgb(129,201,214)", "rgb(240,189,104)", "rgb(214,202,165)", "rgb(137,180,158)", "rgb(168,180,137)", "rgb(180,174,89)", "rgb(180,113,161)", "rgb(129,141,236)", "rgb(227,205,120)", "rgb(255,138,76)", "rgb(76,169,219)", "rgb(215,126,190)", "rgb(220,232,135)", "rgb(200,167,96)", "rgb(103,202,235)", "rgb(208,154,215)"] * > } - * + * * Funnel Series: - * + * * > { * > color: "#4bb2c5", * > lineWidth: 2, @@ -8296,27 +8296,27 @@ * > seriesColors: ["#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"], * > highlightColors: ["rgb(147,208,220)", "rgb(242,199,126)", "rgb(220,210,178)", "rgb(154,191,172)", "rgb(180,191,154)", "rgb(191,186,112)", "rgb(191,133,174)", "rgb(147,157,238)", "rgb(231,212,139)", "rgb(255,154,102)", "rgb(102,181,224)", "rgb(221,144,199)", "rgb(225,235,152)", "rgb(200,167,96)", "rgb(124,210,238)", "rgb(215,169,221)"] * > } - * + * */ $.jqplot.ThemeEngine = function(){ // Group: Properties // // prop: themes - // hash of themes managed by the theme engine. + // hash of themes managed by the theme engine. // Indexed by theme name. this.themes = {}; // prop: activeTheme // Pointer to currently active theme this.activeTheme=null; - + }; - + // called with scope of plot $.jqplot.ThemeEngine.prototype.init = function() { // get the Default theme from the current plot settings. var th = new $.jqplot.Theme({_name:'Default'}); var n, i, nn; - + for (n in th.target) { if (n == "textColor") { th.target[n] = this.target.css('color'); @@ -8325,7 +8325,7 @@ th.target[n] = this.target.css(n); } } - + if (this.title.show && this.title._elem) { for (n in th.title) { if (n == "textColor") { @@ -8336,7 +8336,7 @@ } } } - + for (n in th.grid) { th.grid[n] = this.grid[n]; } @@ -8354,7 +8354,7 @@ } } var s; - + for (i=0; i<this.series.length; i++) { s = this.series[i]; if (s.renderer.constructor == $.jqplot.LineRenderer) { @@ -8420,19 +8420,19 @@ }; /** * Group: methods - * + * * method: get - * + * * Get and return the named theme or the active theme if no name given. - * + * * parameter: - * + * * name - name of theme to get. - * + * * returns: - * + * * Theme instance of given name. - */ + */ $.jqplot.ThemeEngine.prototype.get = function(name) { if (!name) { // return the active theme @@ -8442,22 +8442,22 @@ return this.themes[name]; } }; - + function numericalOrder(a,b) { return a-b; } - + /** * method: getThemeNames - * + * * Return the list of theme names in this manager in alpha-numerical order. - * + * * parameter: - * + * * None - * + * * returns: - * + * * A the list of theme names in this manager in alpha-numerical order. - */ + */ $.jqplot.ThemeEngine.prototype.getThemeNames = function() { var tn = []; for (var n in this.themes) { @@ -8468,17 +8468,17 @@ /** * method: getThemes - * + * * Return a list of themes in alpha-numerical order by name. - * + * * parameter: - * + * * None - * + * * returns: - * + * * A list of themes in alpha-numerical order by name. - */ + */ $.jqplot.ThemeEngine.prototype.getThemes = function() { var tn = []; var themes = []; @@ -8491,7 +8491,7 @@ } return themes; }; - + $.jqplot.ThemeEngine.prototype.activate = function(plot, name) { // sometimes need to redraw whole plot. var redrawPlot = false; @@ -8506,7 +8506,7 @@ this.activeTheme = th; var val, checkBorderColor = false, checkBorderWidth = false; var arr = ['xaxis', 'x2axis', 'yaxis', 'y2axis']; - + for (i=0; i<arr.length; i++) { var ax = arr[i]; if (th.axesStyles.borderColor != null) { @@ -8516,7 +8516,7 @@ plot.axes[ax].borderWidth = th.axesStyles.borderWidth; } } - + for (var axname in plot.axes) { var axis = plot.axes[axname]; if (axis.show) { @@ -8566,10 +8566,10 @@ } } } - + } - } - + } + for (var n in th.grid) { if (th.grid[n] != null) { plot.grid[n] = th.grid[n]; @@ -8578,8 +8578,8 @@ if (!redrawPlot) { plot.grid.draw(); } - - if (plot.legend.show) { + + if (plot.legend.show) { for (n in th.legend) { if (th.legend[n] != null) { plot.legend[n] = th.legend[n]; @@ -8593,7 +8593,7 @@ } } } - + var i; for (i=0; i<th.series.length; i++) { var opts = {}; @@ -8622,21 +8622,21 @@ } } } - + if (redrawPlot) { plot.target.empty(); plot.draw(); } - + for (n in th.target) { if (th.target[n] != null) { plot.target.css(n, th.target[n]); } } } - + }; - + $.jqplot.ThemeEngine.prototype._add = function(theme, name) { if (name) { theme._name = name; @@ -8651,22 +8651,22 @@ throw new Error("jqplot.ThemeEngine Error: Theme already in use"); } }; - + // method remove // Delete the named theme, return true on success, false on failure. - + /** * method: remove - * + * * Remove the given theme from the themeEngine. - * + * * parameters: - * + * * name - name of the theme to remove. - * + * * returns: - * + * * true on success, false on failure. */ $.jqplot.ThemeEngine.prototype.remove = function(name) { @@ -8678,16 +8678,16 @@ /** * method: newTheme - * + * * Create a new theme based on the default theme, adding it the themeEngine. - * + * * parameters: - * + * * name - name of the new theme. * obj - optional object of styles to be applied to this new theme. - * + * * returns: - * + * * new Theme object. */ $.jqplot.ThemeEngine.prototype.newTheme = function(name, obj) { @@ -8706,25 +8706,25 @@ $.jqplot.extend(th, obj); return th; }; - + // function clone(obj) { // return eval(obj.toSource()); // } - + function clone(obj){ if(obj == null || typeof(obj) != 'object'){ return obj; } - + var temp = new obj.constructor(); for(var key in obj){ temp[key] = clone(obj[key]); - } + } return temp; } - + $.jqplot.clone = clone; - + function merge(obj1, obj2) { if (obj2 == null || typeof(obj2) != 'object') { return; @@ -8744,9 +8744,9 @@ } } } - + $.jqplot.merge = merge; - + // Use the jQuery 1.3.2 extend function since behaviour in jQuery 1.4 seems problematic $.jqplot.extend = function() { // copy reference to target object @@ -8779,7 +8779,7 @@ // Recurse if we're merging object values if ( deep && copy && typeof copy === "object" && !copy.nodeType ) { - target[ name ] = $.jqplot.extend( deep, + target[ name ] = $.jqplot.extend( deep, // Never move original objects, clone them src || ( copy.length != null ? [ ] : { } ) , copy ); @@ -8797,16 +8797,16 @@ /** * method: rename - * + * * Rename a theme. - * + * * parameters: - * + * * oldName - current name of the theme. * newName - desired name of the theme. - * + * * returns: - * + * * new Theme object. */ $.jqplot.ThemeEngine.prototype.rename = function (oldName, newName) { @@ -8826,17 +8826,17 @@ /** * method: copy - * + * * Create a copy of an existing theme in the themeEngine, adding it the themeEngine. - * + * * parameters: - * + * * sourceName - name of the existing theme. * targetName - name of the copy. * obj - optional object of style parameter to apply to the new theme. - * + * * returns: - * + * * new Theme object. */ $.jqplot.ThemeEngine.prototype.copy = function (sourceName, targetName, obj) { @@ -8859,8 +8859,8 @@ return th; } }; - - + + $.jqplot.Theme = function(name, obj) { if (typeof(name) == 'object') { obj = obj || name; @@ -8904,14 +8904,14 @@ $.jqplot.extend(true, this, obj); } }; - + var AxisProperties = function() { this.borderColor = null; this.borderWidth = null; this.ticks = new AxisTicks(); this.label = new AxisLabel(); }; - + var AxisTicks = function() { this.show = null; this.showGridline = null; @@ -8923,7 +8923,7 @@ this.fontSize = null; this.fontFamily = null; }; - + var AxisLabel = function() { this.textColor = null; this.whiteSpace = null; @@ -8931,7 +8931,7 @@ this.fontFamily = null; this.fontWeight = null; }; - + var LineSeriesProperties = function() { this.color=null; this.lineWidth=null; @@ -8941,7 +8941,7 @@ this.showMarker=null; this.markerOptions = new MarkerOptions(); }; - + var MarkerOptions = function() { this.show = null; this.style = null; @@ -8950,7 +8950,7 @@ this.color = null; this.shadow = null; }; - + var BarSeriesProperties = function() { this.color=null; this.seriesColors=null; @@ -8961,7 +8961,7 @@ this.barWidth=null; this.highlightColors=null; }; - + var PieSeriesProperties = function() { this.seriesColors=null; this.padding=null; @@ -8972,7 +8972,7 @@ this.lineWidth=null; this.highlightColors=null; }; - + var DonutSeriesProperties = function() { this.seriesColors=null; this.padding=null; @@ -8986,7 +8986,7 @@ this.ringMargin=null; this.highlightColors=null; }; - + var FunnelSeriesProperties = function() { this.color=null; this.lineWidth=null; @@ -8996,7 +8996,7 @@ this.seriesColors=null; this.highlightColors=null; }; - + var MeterSeriesProperties = function() { this.padding=null; this.backgroundColor=null; @@ -9010,7 +9010,7 @@ this.needleThickness=null; this.needlePad=null; }; - + @@ -9039,7 +9039,7 @@ /** * Namespace: $.fn * jQuery namespace to attach functions to jQuery elements. - * + * */ $.fn.jqplotToImageCanvas = function(options) { @@ -9057,7 +9057,7 @@ if ($.jqplot.use_excanvas) { return null; } - + var newCanvas = document.createElement("canvas"); var h = $(this).outerHeight(true); var w = $(this).outerWidth(true); @@ -9069,9 +9069,9 @@ // have to check if any elements are hanging outside of plot area before rendering, // since changing width of canvas will erase canvas. - var clses = ['jqplot-table-legend', 'jqplot-xaxis-tick', 'jqplot-x2axis-tick', 'jqplot-yaxis-tick', 'jqplot-y2axis-tick', 'jqplot-y3axis-tick', + var clses = ['jqplot-table-legend', 'jqplot-xaxis-tick', 'jqplot-x2axis-tick', 'jqplot-yaxis-tick', 'jqplot-y2axis-tick', 'jqplot-y3axis-tick', 'jqplot-y4axis-tick', 'jqplot-y5axis-tick', 'jqplot-y6axis-tick', 'jqplot-y7axis-tick', 'jqplot-y8axis-tick', 'jqplot-y9axis-tick', - 'jqplot-xaxis-label', 'jqplot-x2axis-label', 'jqplot-yaxis-label', 'jqplot-y2axis-label', 'jqplot-y3axis-label', 'jqplot-y4axis-label', + 'jqplot-xaxis-label', 'jqplot-x2axis-label', 'jqplot-yaxis-label', 'jqplot-y2axis-label', 'jqplot-y3axis-label', 'jqplot-y4axis-label', 'jqplot-y5axis-label', 'jqplot-y6axis-label', 'jqplot-y7axis-label', 'jqplot-y8axis-label', 'jqplot-y9axis-label' ]; var temptop, templeft, tempbottom, tempright; @@ -9102,7 +9102,7 @@ newCanvas.width = w + Number(x_offset); newCanvas.height = h + Number(y_offset); - var newContext = newCanvas.getContext("2d"); + var newContext = newCanvas.getContext("2d"); newContext.save(); newContext.fillStyle = backgroundColor; @@ -9139,7 +9139,7 @@ breaks.push(i); w = ''; i--; - } + } } if (breaks.length === 0) { // center text if necessary @@ -9182,7 +9182,7 @@ var left = x_offset + p.left + parseInt(css.marginLeft, 10) + parseInt(css.borderLeftWidth, 10) + parseInt(css.paddingLeft, 10); var top = y_offset + p.top + parseInt(css.marginTop, 10) + parseInt(css.borderTopWidth, 10)+ parseInt(css.paddingTop, 10); var w = newCanvas.width; - // var left = x_offset + p.left + $(el).css('marginLeft') + $(el).css('borderLeftWidth') + // var left = x_offset + p.left + $(el).css('marginLeft') + $(el).css('borderLeftWidth') // somehow in here, for divs within divs, the width of the inner div should be used instead of the canvas. @@ -9220,7 +9220,7 @@ newContext.strokeRect(l, t, elem.innerWidth(), elem.innerHeight()); // now fill the swatch - + l += parseInt(elem.css('padding-left'), 10); t += parseInt(elem.css('padding-top'), 10); var h = elem.innerHeight() - 2 * parseInt(elem.css('padding-top'), 10); @@ -9283,7 +9283,7 @@ return str; }; - // Not gauranteed to work, even on canvas supporting browsers due to + // Not gauranteed to work, even on canvas supporting browsers due to // limitations with location.href and browser support. $.fn.jqplotSaveImage = function() { var imgData = $(this).jqplotToImageStr({}); @@ -9306,45 +9306,45 @@ w = null; } }; - - /** + + /** * @description * <p>Object with extended date parsing and formatting capabilities. - * This library borrows many concepts and ideas from the Date Instance + * This library borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code.</p> * - * <p>jsDate takes a different approach by not extending the built-in - * Date Object, improving date parsing, allowing for multiple formatting + * <p>jsDate takes a different approach by not extending the built-in + * Date Object, improving date parsing, allowing for multiple formatting * syntaxes and multiple and more easily expandable localization.</p> - * + * * @author Chris Leonello * @date #date# * @version #VERSION# * @copyright (c) 2010 Chris Leonello - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. - * + * * <p>Ken's origianl Date Instance Methods and copyright notice:</p> * <pre> * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * </pre> - * + * * @class * @name jsDate * @param {String | Number | Array | Date Object | Options Object} arguments Optional arguments, either a parsable date/time string, * a JavaScript timestamp, an array of numbers of form [year, month, day, hours, minutes, seconds, milliseconds], * a Date object, or an options object of form {syntax: "perl", date:some Date} where all options are optional. */ - + var jsDate = function () { - + this.syntax = jsDate.config.syntax; this._type = "jsDate"; this.proxy = new Date(); @@ -9384,7 +9384,7 @@ break; } }; - + /** * @namespace Configuration options that will be used as defaults for all instances on the page. * @property {String} defaultLocale The default locale to use [en]. @@ -9396,15 +9396,15 @@ syntax: 'perl', defaultCentury: 1900 }; - + /** * Add an arbitrary amount to the currently stored date - * - * @param {Number} number + * + * @param {Number} number * @param {String} unit - * @returns {jsDate} + * @returns {jsDate} */ - + jsDate.prototype.add = function(number, unit) { var factor = multipliers[unit] || multipliers.day; if (typeof factor == 'number') { @@ -9414,13 +9414,13 @@ } return this; }; - + /** * Create a new jqplot.date object with the same date - * + * * @returns {jsDate} - */ - + */ + jsDate.prototype.clone = function() { return new jsDate(this.proxy.getTime()); }; @@ -9437,13 +9437,13 @@ /** * Find the difference between this jsDate and another date. - * + * * @param {String| Number| Array| jsDate Object| Date Object} dateObj * @param {String} unit * @param {Boolean} allowDecimal * @returns {Number} Number of units difference between dates. */ - + jsDate.prototype.diff = function(dateObj, unit, allowDecimal) { // ensure we have a Date object dateObj = new jsDate(dateObj); @@ -9460,85 +9460,85 @@ var unitDiff = factor.diff(this.proxy, dateObj.proxy); } // if decimals are not allowed, round toward zero - return (allowDecimal ? unitDiff : Math[unitDiff > 0 ? 'floor' : 'ceil'](unitDiff)); + return (allowDecimal ? unitDiff : Math[unitDiff > 0 ? 'floor' : 'ceil'](unitDiff)); }; - + /** * Get the abbreviated name of the current week day - * + * * @returns {String} - */ - + */ + jsDate.prototype.getAbbrDayName = function() { return jsDate.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]; }; - + /** * Get the abbreviated name of the current month - * + * * @returns {String} */ - + jsDate.prototype.getAbbrMonthName = function() { return jsDate.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]; }; - + /** * Get UPPER CASE AM or PM for the current time - * + * * @returns {String} */ - + jsDate.prototype.getAMPM = function() { return this.proxy.getHours() >= 12 ? 'PM' : 'AM'; }; - + /** * Get lower case am or pm for the current time - * + * * @returns {String} */ - + jsDate.prototype.getAmPm = function() { return this.proxy.getHours() >= 12 ? 'pm' : 'am'; }; - + /** * Get the century (19 for 20th Century) * * @returns {Integer} Century (19 for 20th century). */ - jsDate.prototype.getCentury = function() { + jsDate.prototype.getCentury = function() { return parseInt(this.proxy.getFullYear()/100, 10); }; - + /** * Implements Date functionality */ jsDate.prototype.getDate = function() { return this.proxy.getDate(); }; - + /** * Implements Date functionality */ jsDate.prototype.getDay = function() { return this.proxy.getDay(); }; - + /** * Get the Day of week 1 (Monday) thru 7 (Sunday) - * + * * @returns {Integer} Day of week 1 (Monday) thru 7 (Sunday) */ - jsDate.prototype.getDayOfWeek = function() { - var dow = this.proxy.getDay(); - return dow===0?7:dow; + jsDate.prototype.getDayOfWeek = function() { + var dow = this.proxy.getDay(); + return dow===0?7:dow; }; - + /** * Get the day of the year - * + * * @returns {Integer} 1 - 366, day of the year */ jsDate.prototype.getDayOfYear = function() { @@ -9548,17 +9548,17 @@ d = null; return parseInt(ms/60000/60/24, 10)+1; }; - + /** * Get the name of the current week day - * + * * @returns {String} - */ - + */ + jsDate.prototype.getDayName = function() { return jsDate.regional[this.locale]["dayNames"][this.proxy.getDay()]; }; - + /** * Get the week number of the given year, starting with the first Sunday as the first week * @returns {Integer} Week number (13 for the 13th full week of the year). @@ -9570,20 +9570,20 @@ var woy = parseInt((doy+rdow)/7, 10); return woy; }; - + /** * Implements Date functionality */ jsDate.prototype.getFullYear = function() { return this.proxy.getFullYear(); }; - + /** * Get the GMT offset in hours and minutes (e.g. +06:30) - * + * * @returns {String} */ - + jsDate.prototype.getGmtOffset = function() { // divide the minutes offset by 60 var hours = this.proxy.getTimezoneOffset() / 60; @@ -9594,26 +9594,26 @@ // add the +/- to the padded number of hours to : to the padded minutes return prefix + addZeros(Math.floor(hours), 2) + ':' + addZeros((hours % 1) * 60, 2); }; - + /** * Implements Date functionality */ jsDate.prototype.getHours = function() { return this.proxy.getHours(); }; - + /** * Get the current hour on a 12-hour scheme - * + * * @returns {Integer} */ - + jsDate.prototype.getHours12 = function() { var hours = this.proxy.getHours(); return hours > 12 ? hours - 12 : (hours == 0 ? 12 : hours); }; - - + + jsDate.prototype.getIsoWeek = function() { var d = this.proxy; var woy = d.getWeekOfYear(); @@ -9621,7 +9621,7 @@ // First week is 01 and not 00 as in the case of %U and %W, // so we add 1 to the final result except if day 1 of the year // is a Monday (then %W returns 01). - // We also need to subtract 1 if the day 1 of the year is + // We also need to subtract 1 if the day 1 of the year is // Friday-Sunday, so the resulting equation becomes: var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1); if(idow == 53 && (new Date('' + d.getFullYear() + '/12/31')).getDay() < 4) @@ -9636,99 +9636,99 @@ d = null; return idow; }; - + /** * Implements Date functionality */ jsDate.prototype.getMilliseconds = function() { return this.proxy.getMilliseconds(); }; - + /** * Implements Date functionality */ jsDate.prototype.getMinutes = function() { return this.proxy.getMinutes(); }; - + /** * Implements Date functionality */ jsDate.prototype.getMonth = function() { return this.proxy.getMonth(); }; - + /** * Get the name of the current month - * + * * @returns {String} */ - + jsDate.prototype.getMonthName = function() { return jsDate.regional[this.locale]["monthNames"][this.proxy.getMonth()]; }; - + /** * Get the number of the current month, 1-12 - * + * * @returns {Integer} */ - + jsDate.prototype.getMonthNumber = function() { return this.proxy.getMonth() + 1; }; - + /** * Implements Date functionality */ jsDate.prototype.getSeconds = function() { return this.proxy.getSeconds(); }; - + /** * Return a proper two-digit year integer - * + * * @returns {Integer} */ - + jsDate.prototype.getShortYear = function() { return this.proxy.getYear() % 100; }; - + /** * Implements Date functionality */ jsDate.prototype.getTime = function() { return this.proxy.getTime(); }; - + /** * Get the timezone abbreviation * * @returns {String} Abbreviation for the timezone */ jsDate.prototype.getTimezoneAbbr = function() { - return this.proxy.toString().replace(/^.*\(([^)]+)\)$/, '$1'); + return this.proxy.toString().replace(/^.*\(([^)]+)\)$/, '$1'); }; - + /** * Get the browser-reported name for the current timezone (e.g. MDT, Mountain Daylight Time) - * + * * @returns {String} */ jsDate.prototype.getTimezoneName = function() { var match = /(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString()); return match[1] || match[2] || 'GMT' + this.getGmtOffset(); - }; - + }; + /** * Implements Date functionality */ jsDate.prototype.getTimezoneOffset = function() { return this.proxy.getTimezoneOffset(); }; - - + + /** * Get the week number of the given year, starting with the first Monday as the first week * @returns {Integer} Week number (13 for the 13th week of the year). @@ -9739,40 +9739,40 @@ var woy = parseInt((doy+rdow)/7, 10); return woy; }; - + /** * Get the current date as a Unix timestamp - * + * * @returns {Integer} */ - + jsDate.prototype.getUnix = function() { return Math.round(this.proxy.getTime() / 1000, 0); - }; - + }; + /** * Implements Date functionality */ jsDate.prototype.getYear = function() { return this.proxy.getYear(); }; - + /** * Return a date one day ahead (or any other unit) - * + * * @param {String} unit Optional, year | month | day | week | hour | minute | second | millisecond * @returns {jsDate} */ - + jsDate.prototype.next = function(unit) { unit = unit || 'day'; return this.clone().add(1, unit); }; - + /** * Set the jsDate instance to a new date. * - * @param {String | Number | Array | Date Object | jsDate Object | Options Object} arguments Optional arguments, + * @param {String | Number | Array | Date Object | jsDate Object | Options Object} arguments Optional arguments, * either a parsable date/time string, * a JavaScript timestamp, an array of numbers of form [year, month, day, hours, minutes, seconds, milliseconds], * a Date object, jsDate Object or an options object of form {syntax: "perl", date:some Date} where all options are optional. @@ -9811,129 +9811,129 @@ } return this; }; - + /** * Sets the day of the month for a specified date according to local time. - * @param {Integer} dayValue An integer from 1 to 31, representing the day of the month. + * @param {Integer} dayValue An integer from 1 to 31, representing the day of the month. */ jsDate.prototype.setDate = function(n) { this.proxy.setDate(n); return this; }; - + /** * Sets the full year for a specified date according to local time. - * @param {Integer} yearValue The numeric value of the year, for example, 1995. - * @param {Integer} monthValue Optional, between 0 and 11 representing the months January through December. - * @param {Integer} dayValue Optional, between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also specify the monthValue. + * @param {Integer} yearValue The numeric value of the year, for example, 1995. + * @param {Integer} monthValue Optional, between 0 and 11 representing the months January through December. + * @param {Integer} dayValue Optional, between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also specify the monthValue. */ jsDate.prototype.setFullYear = function() { this.proxy.setFullYear.apply(this.proxy, arguments); return this; }; - + /** * Sets the hours for a specified date according to local time. - * - * @param {Integer} hoursValue An integer between 0 and 23, representing the hour. - * @param {Integer} minutesValue Optional, An integer between 0 and 59, representing the minutes. - * @param {Integer} secondsValue Optional, An integer between 0 and 59, representing the seconds. - * If you specify the secondsValue parameter, you must also specify the minutesValue. - * @param {Integer} msValue Optional, A number between 0 and 999, representing the milliseconds. - * If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. + * + * @param {Integer} hoursValue An integer between 0 and 23, representing the hour. + * @param {Integer} minutesValue Optional, An integer between 0 and 59, representing the minutes. + * @param {Integer} secondsValue Optional, An integer between 0 and 59, representing the seconds. + * If you specify the secondsValue parameter, you must also specify the minutesValue. + * @param {Integer} msValue Optional, A number between 0 and 999, representing the milliseconds. + * If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. */ jsDate.prototype.setHours = function() { this.proxy.setHours.apply(this.proxy, arguments); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setMilliseconds = function(n) { this.proxy.setMilliseconds(n); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setMinutes = function() { this.proxy.setMinutes.apply(this.proxy, arguments); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setMonth = function() { this.proxy.setMonth.apply(this.proxy, arguments); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setSeconds = function() { this.proxy.setSeconds.apply(this.proxy, arguments); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setTime = function(n) { this.proxy.setTime(n); return this; }; - + /** * Implements Date functionality - */ + */ jsDate.prototype.setYear = function() { this.proxy.setYear.apply(this.proxy, arguments); return this; }; - + /** * Provide a formatted string representation of this date. - * - * @param {String} formatString A format string. + * + * @param {String} formatString A format string. * See: {@link jsDate.formats}. * @returns {String} Date String. */ - + jsDate.prototype.strftime = function(formatString) { formatString = formatString || this.formatString || jsDate.regional[this.locale]['formatString']; return jsDate.strftime(this, formatString, this.syntax); }; - + /** * Return a String representation of this jsDate object. * @returns {String} Date string. */ - + jsDate.prototype.toString = function() { return this.proxy.toString(); }; - + /** * Convert the current date to an 8-digit integer (%Y%m%d) - * + * * @returns {Integer} */ - + jsDate.prototype.toYmdInt = function() { return (this.proxy.getFullYear() * 10000) + (this.getMonthNumber() * 100) + this.proxy.getDate(); }; - + /** * @namespace Holds localizations for month/day names. * <p>jsDate attempts to detect locale when loaded and defaults to 'en'. * If a localization is detected which is not available, jsDate defaults to 'en'. * Additional localizations can be added after jsDate loads. After adding a localization, * call the jsDate.regional.getLocale() method. Currently, en, fr and de are defined.</p> - * + * * <p>Localizations must be an object and have the following properties defined: monthNames, monthNamesShort, dayNames, dayNamesShort and Localizations are added like:</p> * <pre class="code"> * jsDate.regional['en'] = { @@ -9946,7 +9946,7 @@ * <p>After adding localizations, call <code>jsDate.regional.getLocale();</code> to update the locale setting with the * new localizations.</p> */ - + jsDate.regional = { 'en': { monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'], @@ -9955,7 +9955,7 @@ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'fr': { monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'], monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun','Jul','Aoû','Sep','Oct','Nov','Déc'], @@ -9963,7 +9963,7 @@ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'de': { monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], @@ -9971,7 +9971,7 @@ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'es': { monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', 'Jul','Ago','Sep','Oct','Nov','Dic'], @@ -9979,7 +9979,7 @@ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'ru': { monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'], @@ -9987,7 +9987,7 @@ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'ar': { monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران','تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], @@ -9995,15 +9995,15 @@ dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], formatString: '%Y-%m-%d %H:%M:%S' }, - + 'pt': { monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'], dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], - formatString: '%Y-%m-%d %H:%M:%S' + formatString: '%Y-%m-%d %H:%M:%S' }, - + 'pt-BR': { monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'], @@ -10011,35 +10011,35 @@ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], formatString: '%Y-%m-%d %H:%M:%S' } - - + + }; - + // Set english variants to 'en' jsDate.regional['en-US'] = jsDate.regional['en-GB'] = jsDate.regional['en']; - + /** * Try to determine the users locale based on the lang attribute of the html page. Defaults to 'en' * if it cannot figure out a locale of if the locale does not have a localization defined. * @returns {String} locale */ - + jsDate.regional.getLocale = function () { var l = jsDate.config.defaultLocale; - + if ( document && document.getElementsByTagName('html') && document.getElementsByTagName('html')[0].lang ) { l = document.getElementsByTagName('html')[0].lang; if (!jsDate.regional.hasOwnProperty(l)) { l = jsDate.config.defaultLocale; } } - + return l; }; - + // ms in day var day = 24 * 60 * 60 * 1000; - + // padd a number with zeros var addZeros = function(num, digits) { num = String(num); @@ -10096,7 +10096,7 @@ diff: function(d1, d2) { return multipliers.month.diff(d1, d2) / 12; } - } + } }; // // Alias each multiplier with an 's' to allow 'year' and 'years' for example. @@ -10107,7 +10107,7 @@ multipliers[unit + 's'] = multipliers[unit]; } } - + // // take a jsDate instance and a format code and return the formatted value. // This is a somewhat modified version of Ken Snyder's method. @@ -10124,9 +10124,9 @@ nbr = addZeros(nbr, getter[1]); } return nbr; - } + } }; - + /** * @static * Static function for convert a date to a string according to a given format. Also acts as namespace for strftime format codes. @@ -10135,8 +10135,8 @@ * var formattedDate = jsDate.strftime('Feb 8, 2006 8:48:32', '%Y-%m-%d %H:%M:%S'); * </pre> * @param {String | Number | Array | jsDate Object | Date Object} date A parsable date string, JavaScript time stamp, Array of form [year, month, day, hours, minutes, seconds, milliseconds], jsDate Object or Date object. - * @param {String} formatString String with embedded date formatting codes. - * See: {@link jsDate.formats}. + * @param {String} formatString String with embedded date formatting codes. + * See: {@link jsDate.formats}. * @param {String} syntax Optional syntax to use [default perl]. * @param {String} locale Optional locale to use. * @returns {String} Formatted representation of the date. @@ -10147,7 +10147,7 @@ jsDate.strftime = function(d, formatString, syntax, locale) { var syn = 'perl'; var loc = jsDate.regional.getLocale(); - + // check if syntax and locale are available or reversed if (syntax && jsDate.formats.hasOwnProperty(syntax)) { syn = syntax; @@ -10155,14 +10155,14 @@ else if (syntax && jsDate.regional.hasOwnProperty(syntax)) { loc = syntax; } - + if (locale && jsDate.formats.hasOwnProperty(locale)) { syn = locale; } else if (locale && jsDate.regional.hasOwnProperty(locale)) { loc = locale; } - + if (get_type(d) != "[object Object]" || d._type != "jsDate") { d = new jsDate(d); d.locale = loc; @@ -10171,8 +10171,8 @@ formatString = d.formatString || jsDate.regional[loc]['formatString']; } // default the format string to year-month-day - var source = formatString || '%Y-%m-%d', - result = '', + var source = formatString || '%Y-%m-%d', + result = '', match; // replace each format code while (source.length > 0) { @@ -10187,13 +10187,13 @@ } return result; }; - + /** * @namespace - * Namespace to hold format codes and format shortcuts. "perl" and "php" format codes + * Namespace to hold format codes and format shortcuts. "perl" and "php" format codes * and shortcuts are defined by default. Additional codes and shortcuts can be * added like: - * + * * <pre class="code"> * jsDate.formats["perl"] = { * "codes": { @@ -10207,71 +10207,71 @@ * } * }; * </pre> - * + * * <p>Additionally, ISO and SQL shortcuts are defined and can be accesses via: * <code>jsDate.formats.ISO</code> and <code>jsDate.formats.SQL</code> */ - + jsDate.formats = { ISO:'%Y-%m-%dT%H:%M:%S.%N%G', SQL:'%Y-%m-%d %H:%M:%S' }; - + /** * Perl format codes and shortcuts for strftime. - * - * A hash (object) of codes where each code must be an array where the first member is + * + * A hash (object) of codes where each code must be an array where the first member is * the name of a Date.prototype or jsDate.prototype function to call * and optionally a second member indicating the number to pass to addZeros() - * + * * <p>The following format codes are defined:</p> - * + * * <pre class="code"> * Code Result Description - * == Years == + * == Years == * %Y 2008 Four-digit year * %y 08 Two-digit year - * - * == Months == + * + * == Months == * %m 09 Two-digit month * %#m 9 One or two-digit month * %B September Full month name * %b Sep Abbreviated month name - * - * == Days == + * + * == Days == * %d 05 Two-digit day of month * %#d 5 One or two-digit day of month * %e 5 One or two-digit day of month * %A Sunday Full name of the day of the week * %a Sun Abbreviated name of the day of the week * %w 0 Number of the day of the week (0 = Sunday, 6 = Saturday) - * - * == Hours == + * + * == Hours == * %H 23 Hours in 24-hour format (two digits) * %#H 3 Hours in 24-hour integer format (one or two digits) * %I 11 Hours in 12-hour format (two digits) * %#I 3 Hours in 12-hour integer format (one or two digits) * %p PM AM or PM - * - * == Minutes == + * + * == Minutes == * %M 09 Minutes (two digits) * %#M 9 Minutes (one or two digits) - * - * == Seconds == + * + * == Seconds == * %S 02 Seconds (two digits) * %#S 2 Seconds (one or two digits) * %s 1206567625723 Unix timestamp (Seconds past 1970-01-01 00:00:00) - * - * == Milliseconds == + * + * == Milliseconds == * %N 008 Milliseconds (three digits) * %#N 8 Milliseconds (one to three digits) - * - * == Timezone == + * + * == Timezone == * %O 360 difference in minutes between local time and GMT * %Z Mountain Standard Time Name of timezone as reported by browser * %G 06:00 Hours and minutes between GMT - * - * == Shortcuts == + * + * == Shortcuts == * %F 2008-03-26 %Y-%m-%d * %T 05:06:30 %H:%M:%S * %X 05:06:30 %H:%M:%S @@ -10281,29 +10281,29 @@ * %v 3-Sep-2008 %e-%b-%Y * %R 15:31 %H:%M * %r 03:31:00 PM %I:%M:%S %p - * - * == Characters == + * + * == Characters == * %n \n Newline * %t \t Tab * %% % Percent Symbol * </pre> - * + * * <p>Formatting shortcuts that will be translated into their longer version. * Be sure that format shortcuts do not refer to themselves: this will cause an infinite loop.</p> - * + * * <p>Format codes and format shortcuts can be redefined after the jsDate * module is imported.</p> - * + * * <p>Note that if you redefine the whole hash (object), you must supply a "matcher" * regex for the parser. The default matcher is:</p> - * + * * <code>/()%(#?(%|[a-z]))/i</code> - * + * * <p>which corresponds to the Perl syntax used by default.</p> - * + * * <p>By customizing the matcher and format codes, nearly any strftime functionality is possible.</p> */ - + jsDate.formats.perl = { codes: { // @@ -10347,9 +10347,9 @@ // timezone O: 'TimezoneOffset', Z: 'TimezoneName', - G: 'GmtOffset' + G: 'GmtOffset' }, - + shortcuts: { // date F: '%Y-%m-%d', @@ -10371,19 +10371,19 @@ '%': '%' } }; - + /** * PHP format codes and shortcuts for strftime. - * - * A hash (object) of codes where each code must be an array where the first member is + * + * A hash (object) of codes where each code must be an array where the first member is * the name of a Date.prototype or jsDate.prototype function to call * and optionally a second member indicating the number to pass to addZeros() - * + * * <p>The following format codes are defined:</p> - * + * * <pre class="code"> * Code Result Description - * === Days === + * === Days === * %a Sun through Sat An abbreviated textual representation of the day * %A Sunday - Saturday A full textual representation of the day * %d 01 to 31 Two-digit day of the month (with leading zeros) @@ -10391,25 +10391,25 @@ * %j 001 to 366 Day of the year, 3 digits with leading zeros * %u 1 - 7 (Mon - Sun) ISO-8601 numeric representation of the day of the week * %w 0 - 6 (Sun - Sat) Numeric representation of the day of the week - * - * === Week === + * + * === Week === * %U 13 Full Week number, starting with the first Sunday as the first week - * %V 01 through 53 ISO-8601:1988 week number, starting with the first week of the year + * %V 01 through 53 ISO-8601:1988 week number, starting with the first week of the year * with at least 4 weekdays, with Monday being the start of the week - * %W 46 A numeric representation of the week of the year, + * %W 46 A numeric representation of the week of the year, * starting with the first Monday as the first week - * === Month === + * === Month === * %b Jan through Dec Abbreviated month name, based on the locale * %B January - December Full month name, based on the locale * %h Jan through Dec Abbreviated month name, based on the locale (an alias of %b) * %m 01 - 12 (Jan - Dec) Two digit representation of the month - * - * === Year === + * + * === Year === * %C 19 Two digit century (year/100, truncated to an integer) * %y 09 for 2009 Two digit year * %Y 2038 Four digit year - * - * === Time === + * + * === Time === * %H 00 through 23 Two digit representation of the hour in 24-hour format * %I 01 through 12 Two digit representation of the hour in 12-hour format * %l 1 through 12 Hour in 12-hour format, with a space preceeding single digits @@ -10423,20 +10423,20 @@ * %X 03:59:16 Preferred time representation based on locale, without the date * %z -0500 or EST Either the time zone offset from UTC or the abbreviation * %Z -0500 or EST The time zone offset/abbreviation option NOT given by %z - * - * === Time and Date === + * + * === Time and Date === * %D 02/05/09 Same as %m/%d/%y * %F 2009-02-05 Same as %Y-%m-%d (commonly used in database datestamps) * %s 305815200 Unix Epoch Time timestamp (same as the time() function) * %x 02/05/09 Preferred date representation, without the time - * - * === Miscellaneous === + * + * === Miscellaneous === * %n --- A newline character (\n) * %t --- A Tab character (\t) * %% --- A literal percentage character (%) * </pre> */ - + jsDate.formats.php = { codes: { // @@ -10480,7 +10480,7 @@ z: 'GmtOffset', Z: 'TimezoneAbbr' }, - + shortcuts: { D: '%m/%d/%y', F: '%Y-%m-%d', @@ -10493,7 +10493,7 @@ n: '\n', '%': '%' } - }; + }; // // Conceptually, the logic implemented here is similar to Ken Snyder's Date Instance Methods. // I use his idea of a set of parsers which can be regular expressions or functions, @@ -10516,87 +10516,87 @@ if (typeof date == 'number') { return new Date(date); } - + // Before passing strings into Date.parse(), have to normalize them for certain conditions. - // If strings are not formatted staccording to the EcmaScript spec, results from Date parse will be implementation dependent. - // - // For example: - // * FF and Opera assume 2 digit dates are pre y2k, Chome assumes <50 is pre y2k, 50+ is 21st century. + // If strings are not formatted staccording to the EcmaScript spec, results from Date parse will be implementation dependent. + // + // For example: + // * FF and Opera assume 2 digit dates are pre y2k, Chome assumes <50 is pre y2k, 50+ is 21st century. // * Chrome will correctly parse '1984-1-25' into localtime, FF and Opera will not parse. // * Both FF, Chrome and Opera will parse '1984/1/25' into localtime. - + // remove leading and trailing spaces var parsable = String(date).replace(/^\s*(.+)\s*$/g, '$1'); - + // replace dahses (-) with slashes (/) in dates like n[nnn]/n[n]/n[nnn] parsable = parsable.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/, "$1/$2/$3"); - + ///////// // Need to check for '15-Dec-09' also. // FF will not parse, but Chrome will. // Chrome will set date to 2009 as well. ///////// - + // first check for 'dd-mmm-yyyy' or 'dd/mmm/yyyy' like '15-Dec-2010' parsable = parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i, "$1 $2 $3"); - + // Now check for 'dd-mmm-yy' or 'dd/mmm/yy' and normalize years to default century. var match = parsable.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i); if (match && match.length > 3) { var m3 = parseFloat(match[3]); var ny = jsDate.config.defaultCentury + m3; ny = String(ny); - + // now replace 2 digit year with 4 digit year parsable = parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i, match[1] +' '+ match[2] +' '+ ny); - + } - + // Check for '1/19/70 8:14PM' // where starts with mm/dd/yy or yy/mm/dd and have something after // Check if 1st postiion is greater than 31, assume it is year. // Assme all 2 digit years are 1900's. // Finally, change them into US style mm/dd/yyyy representations. match = parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/); - + function h1(parsable, match) { var m1 = parseFloat(match[1]); var m2 = parseFloat(match[2]); var m3 = parseFloat(match[3]); var cent = jsDate.config.defaultCentury; var ny, nd, nm, str; - + if (m1 > 31) { // first number is a year nd = m3; nm = m2; ny = cent + m1; } - + else { // last number is the year nd = m2; nm = m1; ny = cent + m3; } - + str = nm+'/'+nd+'/'+ny; - + // now replace 2 digit year with 4 digit year return parsable.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/, str); - + } - + if (match && match.length > 3) { parsable = h1(parsable, match); } - + // Now check for '1/19/70' with nothing after and do as above var match = parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/); - + if (match && match.length > 3) { parsable = h1(parsable, match); } - - + + var i = 0; var length = jsDate.matchers.length; var pattern, @@ -10621,7 +10621,7 @@ } return NaN; }; - + /** * @static @@ -10632,7 +10632,7 @@ */ // // handy utility method Borrowed right from Ken Snyder's Date Instance Mehtods. - // + // jsDate.daysInMonth = function(year, month) { if (month == 2) { return new Date(year, 1, 29).getDate() == 29 ? 29 : 28; @@ -10651,7 +10651,7 @@ // convert yyyy-mm-dd to mm/dd/yyyy (ISO date to US date). [/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/, '$2/$3/$1'], // Handle 12 hour or 24 hour time with milliseconds am/pm and optional date part. - function(str) { + function(str) { var match = str.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i); // opt. date hour opt. minute opt. second opt. msec opt. am or pm if (match) { @@ -10711,27 +10711,27 @@ nd = m3; ny = cent + m1; } - + else { // last number is the year nd = m1; ny = cent + m3; } - + var nm = inArray(match[2], jsDate.regional[jsDate.regional.getLocale()]["monthNamesShort"]); - + if (nm == -1) { nm = inArray(match[2], jsDate.regional[jsDate.regional.getLocale()]["monthNames"]); } - + d.setFullYear(ny, nm, nd); d.setHours(0,0,0,0); return d; } - + else { return str; } - } + } ]; // @@ -10750,7 +10750,7 @@ return -1; } - + // // Thanks to Kangax, Christian Sciberras and Stack Overflow for this method. // @@ -10758,18 +10758,18 @@ if(thing===null) return "[object Null]"; // special case return Object.prototype.toString.call(thing); } - + $.jsDate = jsDate; - + /** * JavaScript printf/sprintf functions. - * + * * This code has been adapted from the publicly available sprintf methods * by Ash Searle. His original header follows: * * This code is unrestricted: you are free to use it however you like. - * + * * The functions should work as expected, performing left or right alignment, * truncating strings, outputting numbers with a required precision etc. * @@ -10792,22 +10792,22 @@ * Not implemented (yet): * - vector flag * - size (bytes, words, long-words etc.) - * + * * Will not implement: * - %n or %p (no pass-by-reference in JavaScript) * * @version 2007.04.27 - * @author Ash Searle - * + * @author Ash Searle + * * You can see the original work and comments on his blog: * http://hexmen.com/blog/2007/03/printf-sprintf/ * http://hexmen.com/js/sprintf.js */ - + /** * @Modifications 2009.05.26 * @author Chris Leonello - * + * * Added %p %P specifier * Acts like %g or %G but will not add more significant digits to the output than present in the input. * Example: @@ -10817,7 +10817,7 @@ * Format: '%.4g', Input: 12.0, Output: 12.00 * Format: '%.4p', Input: 4.321e-5, Output: 4.321e-5 * Format: '%.4g', Input: 4.321e-5, Output: 4.3210e-5 - * + * * Example: * >>> $.jqplot.sprintf('%.2f, %d', 23.3452, 43.23) * "23.35, 43" @@ -10836,7 +10836,7 @@ for (var i=10; i>0; i--) { if (value_str == (value_str = value_str.replace(/^(\d+)(\d{3})/, "$1"+$.jqplot.sprintf.thousandsSeparator+"$2"))) break; } - return value_str; + return value_str; } function justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace) { @@ -10890,13 +10890,13 @@ if (!minWidth) { minWidth = 0; - } + } else if (minWidth == '*') { minWidth = +a[i++]; - } + } else if (minWidth.charAt(0) == '*') { minWidth = +a[minWidth.slice(1, -1)]; - } + } else { minWidth = +minWidth; } @@ -10913,13 +10913,13 @@ if (!precision) { precision = 'fFeE'.indexOf(type) > -1 ? 6 : (type == 'd') ? 0 : void(0); - } + } else if (precision == '*') { precision = +a[i++]; - } + } else if (precision.charAt(0) == '*') { precision = +a[precision.slice(1, -1)]; - } + } else { precision = +precision; } @@ -10999,7 +10999,7 @@ var parts = String(Number(Math.abs(number)).toExponential()).split(/e|E/); var sd = (parts[0].indexOf('.') != -1) ? parts[0].length - 1 : parts[0].length; var zeros = (parts[1] < 0) ? -parts[1] - 1 : 0; - + if (Math.abs(number) < 1) { if (sd + zeros <= precision) { value = prefix + Math.abs(number).toPrecision(sd); @@ -11032,7 +11032,7 @@ // change the thousands separator or else this won't work since a simple String // replace is used (replacing all periods with the mark specified here). $.jqplot.sprintf.decimalMark = '.'; - + $.jqplot.sprintf.regex = /%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g; $.jqplot.getSignificantFigures = function(number) { @@ -11053,7 +11053,7 @@ return $.jqplot.getSignificantFigures(number).digitsRight; }; -})(jQuery); +})(jQuery); var backCompat = $.uiBackCompat !== false; diff --git a/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.min.js b/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.min.js index 79c35d06..1def2792 100755 --- a/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.min.js +++ b/wqflask/wqflask/static/packages/jqplot/jquery.jqplot.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(H){var r;H.fn.emptyForce=function(){for(var ab=0,ac;(ac=H(this)[ab])!=null;ab++){if(ac.nodeType===1){H.cleanData(ac.getElementsByTagName("*"))}if(H.jqplot.use_excanvas){ac.outerHTML=""}else{while(ac.firstChild){ac.removeChild(ac.firstChild)}}ac=null}return H(this)};H.fn.removeChildForce=function(ab){while(ab.firstChild){this.removeChildForce(ab.firstChild);ab.removeChild(ab.firstChild)}};H.fn.jqplot=function(){var ab=[];var ad=[];for(var ae=0,ac=arguments.length;ae<ac;ae++){if(H.isArray(arguments[ae])){ab.push(arguments[ae])}else{if(H.isPlainObject(arguments[ae])){ad.push(arguments[ae])}}}return this.each(function(ah){var am,al,ak=H(this),ag=ab.length,af=ad.length,aj,ai;if(ah<ag){aj=ab[ah]}else{aj=ag?ab[ag-1]:null}if(ah<af){ai=ad[ah]}else{ai=af?ad[af-1]:null}am=ak.attr("id");if(am===r){am="jqplot_target_"+H.jqplot.targetCounter++;ak.attr("id",am)}al=H.jqplot(am,aj,ai);ak.data("jqplot",al)})};H.jqplot=function(ah,ae,ac){var ad=null,ab=null;if(arguments.length===3){ad=ae;ab=ac}else{if(arguments.length===2){if(H.isArray(ae)){ad=ae}else{if(H.isPlainObject(ae)){ab=ae}}}}if(ad===null&&ab!==null&&ab.data){ad=ab.data}var ag=new N();H("#"+ah).removeClass("jqplot-error");if(H.jqplot.config.catchErrors){try{ag.init(ah,ad,ab);ag.draw();ag.themeEngine.init.call(ag);return ag}catch(af){var ai=H.jqplot.config.errorMessage||af.message;H("#"+ah).append('<div class="jqplot-error-message">'+ai+"</div>");H("#"+ah).addClass("jqplot-error");document.getElementById(ah).style.background=H.jqplot.config.errorBackground;document.getElementById(ah).style.border=H.jqplot.config.errorBorder;document.getElementById(ah).style.fontFamily=H.jqplot.config.errorFontFamily;document.getElementById(ah).style.fontSize=H.jqplot.config.errorFontSize;document.getElementById(ah).style.fontStyle=H.jqplot.config.errorFontStyle;document.getElementById(ah).style.fontWeight=H.jqplot.config.errorFontWeight}}else{ag.init(ah,ad,ab);ag.draw();ag.themeEngine.init.call(ag);return ag}};H.jqplot.version="1.0.4";H.jqplot.revision="1121";H.jqplot.targetCounter=1;H.jqplot.CanvasManager=function(){if(typeof H.jqplot.CanvasManager.canvases=="undefined"){H.jqplot.CanvasManager.canvases=[];H.jqplot.CanvasManager.free=[]}var ab=[];this.getCanvas=function(){var ae;var ad=true;if(!H.jqplot.use_excanvas){for(var af=0,ac=H.jqplot.CanvasManager.canvases.length;af<ac;af++){if(H.jqplot.CanvasManager.free[af]===true){ad=false;ae=H.jqplot.CanvasManager.canvases[af];H.jqplot.CanvasManager.free[af]=false;ab.push(af);break}}}if(ad){ae=document.createElement("canvas");ab.push(H.jqplot.CanvasManager.canvases.length);H.jqplot.CanvasManager.canvases.push(ae);H.jqplot.CanvasManager.free.push(false)}return ae};this.initCanvas=function(ac){if(H.jqplot.use_excanvas){return window.G_vmlCanvasManager.initElement(ac)}return ac};this.freeAllCanvases=function(){for(var ad=0,ac=ab.length;ad<ac;ad++){this.freeCanvas(ab[ad])}ab=[]};this.freeCanvas=function(ac){if(H.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==r){window.G_vmlCanvasManager.uninitElement(H.jqplot.CanvasManager.canvases[ac]);H.jqplot.CanvasManager.canvases[ac]=null}else{var ad=H.jqplot.CanvasManager.canvases[ac];ad.getContext("2d").clearRect(0,0,ad.width,ad.height);H(ad).unbind().removeAttr("class").removeAttr("style");H(ad).css({left:"",top:"",position:""});ad.width=0;ad.height=0;H.jqplot.CanvasManager.free[ac]=true}}};H.jqplot.log=function(){if(window.console){window.console.log.apply(window.console,arguments)}};H.jqplot.config={addDomReference:false,enablePlugins:false,defaultHeight:300,defaultWidth:400,UTCAdjust:false,timezoneOffset:new Date(new Date().getTimezoneOffset()*60000),errorMessage:"",errorBackground:"",errorBorder:"",errorFontFamily:"",errorFontSize:"",errorFontStyle:"",errorFontWeight:"",catchErrors:false,defaultTickFormatString:"%.1f",defaultColors:["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"],defaultNegativeColors:["#498991","#C08840","#9F9274","#546D61","#646C4A","#6F6621","#6E3F5F","#4F64B0","#A89050","#C45923","#187399","#945381","#959E5C","#C7AF7B","#478396","#907294"],dashLength:4,gapLength:4,dotGapLength:2.5,srcLocation:"jqplot/src/",pluginLocation:"jqplot/src/plugins/"};H.jqplot.arrayMax=function(ab){return Math.max.apply(Math,ab)};H.jqplot.arrayMin=function(ab){return Math.min.apply(Math,ab)};H.jqplot.enablePlugins=H.jqplot.config.enablePlugins;H.jqplot.support_canvas=function(){if(typeof H.jqplot.support_canvas.result=="undefined"){H.jqplot.support_canvas.result=!!document.createElement("canvas").getContext}return H.jqplot.support_canvas.result};H.jqplot.support_canvas_text=function(){if(typeof H.jqplot.support_canvas_text.result=="undefined"){if(window.G_vmlCanvasManager!==r&&window.G_vmlCanvasManager._version>887){H.jqplot.support_canvas_text.result=true}else{H.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return H.jqplot.support_canvas_text.result};H.jqplot.use_excanvas=(H.browser.msie&&!H.jqplot.support_canvas())?true:false;H.jqplot.preInitHooks=[];H.jqplot.postInitHooks=[];H.jqplot.preParseOptionsHooks=[];H.jqplot.postParseOptionsHooks=[];H.jqplot.preDrawHooks=[];H.jqplot.postDrawHooks=[];H.jqplot.preDrawSeriesHooks=[];H.jqplot.postDrawSeriesHooks=[];H.jqplot.preDrawLegendHooks=[];H.jqplot.addLegendRowHooks=[];H.jqplot.preSeriesInitHooks=[];H.jqplot.postSeriesInitHooks=[];H.jqplot.preParseSeriesOptionsHooks=[];H.jqplot.postParseSeriesOptionsHooks=[];H.jqplot.eventListenerHooks=[];H.jqplot.preDrawSeriesShadowHooks=[];H.jqplot.postDrawSeriesShadowHooks=[];H.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};H.jqplot.ElemContainer.prototype.createElement=function(ae,ag,ac,ad,ah){this._offsets=ag;var ab=ac||"jqplot";var af=document.createElement(ae);this._elem=H(af);this._elem.addClass(ab);this._elem.css(ad);this._elem.attr(ah);af=null;return this._elem};H.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};H.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};H.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};H.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};H.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};H.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};H.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function s(ab){H.jqplot.ElemContainer.call(this);this.name=ab;this._series=[];this.show=false;this.tickRenderer=H.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=H.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=H.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}s.prototype=new H.jqplot.ElemContainer();s.prototype.constructor=s;s.prototype.init=function(){if(H.isFunction(this.renderer)){this.renderer=new this.renderer()}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};s.prototype.draw=function(ab,ac){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,ab,ac)};s.prototype.set=function(){this.renderer.set.call(this)};s.prototype.pack=function(ac,ab){if(this.show){this.renderer.pack.call(this,ac,ab)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};s.prototype.reset=function(){this.renderer.reset.call(this)};s.prototype.resetScale=function(ab){H.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},ab);this.resetDataBounds()};s.prototype.resetDataBounds=function(){var ai=this._dataBounds;ai.min=null;ai.max=null;var ac,aj,ag;var ad=(this.show)?true:false;for(var af=0;af<this._series.length;af++){aj=this._series[af];if(aj.show||this.scaleToHiddenSeries){ag=aj._plotData;if(aj._type==="line"&&aj.renderer.bands.show&&this.name.charAt(0)!=="x"){ag=[[0,aj.renderer.bands._min],[1,aj.renderer.bands._max]]}var ab=1,ah=1;if(aj._type!=null&&aj._type=="ohlc"){ab=3;ah=2}for(var ae=0,ac=ag.length;ae<ac;ae++){if(this.name=="xaxis"||this.name=="x2axis"){if((ag[ae][0]!=null&&ag[ae][0]<ai.min)||ai.min==null){ai.min=ag[ae][0]}if((ag[ae][0]!=null&&ag[ae][0]>ai.max)||ai.max==null){ai.max=ag[ae][0]}}else{if((ag[ae][ab]!=null&&ag[ae][ab]<ai.min)||ai.min==null){ai.min=ag[ae][ab]}if((ag[ae][ah]!=null&&ag[ae][ah]>ai.max)||ai.max==null){ai.max=ag[ae][ah]}}}if(ad&&aj.renderer.constructor!==H.jqplot.BarRenderer){ad=false}else{if(ad&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){ad=false}else{if(ad&&aj.renderer.constructor===H.jqplot.BarRenderer){if(aj.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){ad=false}}else{if(aj.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){ad=false}}}}}}}}if(ad&&this.renderer.constructor===H.jqplot.LinearAxisRenderer&&ai.min>=0){this.padMin=1;this.forceTickAt0=true}};function n(ab){H.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=H.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];H.extend(true,this,ab)}n.prototype=new H.jqplot.ElemContainer();n.prototype.constructor=n;n.prototype.setOptions=function(ab){H.extend(true,this,ab);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else{if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break}}else{if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}}this.yoffset=0}};n.prototype.init=function(){if(H.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};n.prototype.draw=function(ac,ad){for(var ab=0;ab<H.jqplot.preDrawLegendHooks.length;ab++){H.jqplot.preDrawLegendHooks[ab].call(this,ac)}return this.renderer.draw.call(this,ac,ad)};n.prototype.pack=function(ab){this.renderer.pack.call(this,ab)};function u(ab){H.jqplot.ElemContainer.call(this);this.text=ab;this.show=true;this.fontFamily;this.fontSize;this.textAlign;this.textColor;this.renderer=H.jqplot.DivTitleRenderer;this.rendererOptions={};this.escapeHtml=false}u.prototype=new H.jqplot.ElemContainer();u.prototype.constructor=u;u.prototype.init=function(){if(H.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};u.prototype.draw=function(ab){return this.renderer.draw.call(this,ab)};u.prototype.pack=function(){this.renderer.pack.call(this)};function O(ab){ab=ab||{};H.jqplot.ElemContainer.call(this);this.show=true;this.xaxis="xaxis";this._xaxis;this.yaxis="yaxis";this._yaxis;this.gridBorderWidth=2;this.renderer=H.jqplot.LineRenderer;this.rendererOptions={};this.data=[];this.gridData=[];this.label="";this.showLabel=true;this.color;this.negativeColor;this.lineWidth=2.5;this.lineJoin="round";this.lineCap="round";this.linePattern="solid";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.25;this.shadowDepth=3;this.shadowAlpha="0.1";this.breakOnNull=false;this.markerRenderer=H.jqplot.MarkerRenderer;this.markerOptions={};this.showLine=true;this.showMarker=true;this.index;this.fill=false;this.fillColor;this.fillAlpha;this.fillAndStroke=false;this.disableStack=false;this._stack=false;this.neighborThreshold=4;this.fillToZero=false;this.fillToValue=0;this.fillAxis="y";this.useNegativeColors=true;this._stackData=[];this._plotData=[];this._plotValues={x:[],y:[]};this._intervals={x:{},y:{}};this._prevPlotData=[];this._prevGridData=[];this._stackAxis="y";this._primaryAxis="_xaxis";this.canvas=new H.jqplot.GenericCanvas();this.shadowCanvas=new H.jqplot.GenericCanvas();this.plugins={};this._sumy=0;this._sumx=0;this._type=""}O.prototype=new H.jqplot.ElemContainer();O.prototype.constructor=O;O.prototype.init=function(ae,ai,ag){this.index=ae;this.gridBorderWidth=ai;var ah=this.data;var ad=[],af,ab;for(af=0,ab=ah.length;af<ab;af++){if(!this.breakOnNull){if(ah[af]==null||ah[af][0]==null||ah[af][1]==null){continue}else{ad.push(ah[af])}}else{ad.push(ah[af])}}this.data=ad;if(!this.color){this.color=ag.colorGenerator.get(this.index)}if(!this.negativeColor){this.negativeColor=ag.negativeColorGenerator.get(this.index)}if(!this.fillColor){this.fillColor=this.color}if(this.fillAlpha){var ac=H.jqplot.normalize2rgb(this.fillColor);var ac=H.jqplot.getColorComponents(ac);this.fillColor="rgba("+ac[0]+","+ac[1]+","+ac[2]+","+this.fillAlpha+")"}if(H.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions,ag);this.markerRenderer=new this.markerRenderer();if(!this.markerOptions.color){this.markerOptions.color=this.color}if(this.markerOptions.show==null){this.markerOptions.show=this.showMarker}this.showMarker=this.markerOptions.show;this.markerRenderer.init(this.markerOptions)};O.prototype.draw=function(ah,ae,ag){var ac=(ae==r)?{}:ae;ah=(ah==r)?this.canvas._ctx:ah;var ab,af,ad;for(ab=0;ab<H.jqplot.preDrawSeriesHooks.length;ab++){H.jqplot.preDrawSeriesHooks[ab].call(this,ah,ac)}if(this.show){this.renderer.setGridData.call(this,ag);if(!ac.preventJqPlotSeriesDrawTrigger){H(ah.canvas).trigger("jqplotSeriesDraw",[this.data,this.gridData])}af=[];if(ac.data){af=ac.data}else{if(!this._stack){af=this.data}else{af=this._plotData}}ad=ac.gridData||this.renderer.makeGridData.call(this,af,ag);if(this._type==="line"&&this.renderer.smooth&&this.renderer._smoothedData.length){ad=this.renderer._smoothedData}this.renderer.draw.call(this,ah,ad,ac,ag)}for(ab=0;ab<H.jqplot.postDrawSeriesHooks.length;ab++){H.jqplot.postDrawSeriesHooks[ab].call(this,ah,ac,ag)}ah=ae=ag=ab=af=ad=null};O.prototype.drawShadow=function(ah,ae,ag){var ac=(ae==r)?{}:ae;ah=(ah==r)?this.shadowCanvas._ctx:ah;var ab,af,ad;for(ab=0;ab<H.jqplot.preDrawSeriesShadowHooks.length;ab++){H.jqplot.preDrawSeriesShadowHooks[ab].call(this,ah,ac)}if(this.shadow){this.renderer.setGridData.call(this,ag);af=[];if(ac.data){af=ac.data}else{if(!this._stack){af=this.data}else{af=this._plotData}}ad=ac.gridData||this.renderer.makeGridData.call(this,af,ag);this.renderer.drawShadow.call(this,ah,ad,ac,ag)}for(ab=0;ab<H.jqplot.postDrawSeriesShadowHooks.length;ab++){H.jqplot.postDrawSeriesShadowHooks[ab].call(this,ah,ac)}ah=ae=ag=ab=af=ad=null};O.prototype.toggleDisplay=function(ac,ae){var ab,ad;if(ac.data.series){ab=ac.data.series}else{ab=this}if(ac.data.speed){ad=ac.data.speed}if(ad){if(ab.canvas._elem.is(":hidden")||!ab.show){ab.show=true;ab.canvas._elem.removeClass("jqplot-series-hidden");if(ab.shadowCanvas._elem){ab.shadowCanvas._elem.fadeIn(ad)}ab.canvas._elem.fadeIn(ad,ae);ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ab.index).fadeIn(ad)}else{ab.show=false;ab.canvas._elem.addClass("jqplot-series-hidden");if(ab.shadowCanvas._elem){ab.shadowCanvas._elem.fadeOut(ad)}ab.canvas._elem.fadeOut(ad,ae);ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ab.index).fadeOut(ad)}}else{if(ab.canvas._elem.is(":hidden")||!ab.show){ab.show=true;ab.canvas._elem.removeClass("jqplot-series-hidden");if(ab.shadowCanvas._elem){ab.shadowCanvas._elem.show()}ab.canvas._elem.show(0,ae);ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ab.index).show()}else{ab.show=false;ab.canvas._elem.addClass("jqplot-series-hidden");if(ab.shadowCanvas._elem){ab.shadowCanvas._elem.hide()}ab.canvas._elem.hide(0,ae);ab.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ab.index).hide()}}};function I(){H.jqplot.ElemContainer.call(this);this.drawGridlines=true;this.gridLineColor="#cccccc";this.gridLineWidth=1;this.background="#fffdf6";this.borderColor="#999999";this.borderWidth=2;this.drawBorder=true;this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.5;this.shadowWidth=3;this.shadowDepth=3;this.shadowColor=null;this.shadowAlpha="0.07";this._left;this._top;this._right;this._bottom;this._width;this._height;this._axes=[];this.renderer=H.jqplot.CanvasGridRenderer;this.rendererOptions={};this._offsets={top:null,bottom:null,left:null,right:null}}I.prototype=new H.jqplot.ElemContainer();I.prototype.constructor=I;I.prototype.init=function(){if(H.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};I.prototype.createElement=function(ab,ac){this._offsets=ab;return this.renderer.createElement.call(this,ac)};I.prototype.draw=function(){this.renderer.draw.call(this)};H.jqplot.GenericCanvas=function(){H.jqplot.ElemContainer.call(this);this._ctx};H.jqplot.GenericCanvas.prototype=new H.jqplot.ElemContainer();H.jqplot.GenericCanvas.prototype.constructor=H.jqplot.GenericCanvas;H.jqplot.GenericCanvas.prototype.createElement=function(af,ad,ac,ag){this._offsets=af;var ab="jqplot";if(ad!=r){ab=ad}var ae;ae=ag.canvasManager.getCanvas();if(ac!=null){this._plotDimensions=ac}ae.width=this._plotDimensions.width-this._offsets.left-this._offsets.right;ae.height=this._plotDimensions.height-this._offsets.top-this._offsets.bottom;this._elem=H(ae);this._elem.css({position:"absolute",left:this._offsets.left,top:this._offsets.top});this._elem.addClass(ab);ae=ag.canvasManager.initCanvas(ae);ae=null;return this._elem};H.jqplot.GenericCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};H.jqplot.GenericCanvas.prototype.resetCanvas=function(){if(this._elem){if(H.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==r){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce()}this._ctx=null};H.jqplot.HooksManager=function(){this.hooks=[];this.args=[]};H.jqplot.HooksManager.prototype.addOnce=function(ae,ac){ac=ac||[];var af=false;for(var ad=0,ab=this.hooks.length;ad<ab;ad++){if(this.hooks[ad]==ae){af=true}}if(!af){this.hooks.push(ae);this.args.push(ac)}};H.jqplot.HooksManager.prototype.add=function(ac,ab){ab=ab||[];this.hooks.push(ac);this.args.push(ab)};H.jqplot.EventListenerManager=function(){this.hooks=[]};H.jqplot.EventListenerManager.prototype.addOnce=function(af,ae){var ag=false,ad,ac;for(var ac=0,ab=this.hooks.length;ac<ab;ac++){ad=this.hooks[ac];if(ad[0]==af&&ad[1]==ae){ag=true}}if(!ag){this.hooks.push([af,ae])}};H.jqplot.EventListenerManager.prototype.add=function(ac,ab){this.hooks.push([ac,ab])};var Q=["yMidAxis","xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];function N(){this.animate=false;this.animateReplot=false;this.axes={xaxis:new s("xaxis"),yaxis:new s("yaxis"),x2axis:new s("x2axis"),y2axis:new s("y2axis"),y3axis:new s("y3axis"),y4axis:new s("y4axis"),y5axis:new s("y5axis"),y6axis:new s("y6axis"),y7axis:new s("y7axis"),y8axis:new s("y8axis"),y9axis:new s("y9axis"),yMidAxis:new s("yMidAxis")};this.baseCanvas=new H.jqplot.GenericCanvas();this.captureRightClick=false;this.data=[];this.dataRenderer;this.dataRendererOptions;this.defaults={axesDefaults:{},axes:{xaxis:{},yaxis:{},x2axis:{},y2axis:{},y3axis:{},y4axis:{},y5axis:{},y6axis:{},y7axis:{},y8axis:{},y9axis:{},yMidAxis:{}},seriesDefaults:{},series:[]};this.defaultAxisStart=1;this.drawIfHidden=false;this.eventCanvas=new H.jqplot.GenericCanvas();this.fillBetween={series1:null,series2:null,color:null,baseSeries:0,fill:true};this.fontFamily;this.fontSize;this.grid=new I();this.legend=new n();this.negativeSeriesColors=H.jqplot.config.defaultNegativeColors;this.noDataIndicator={show:false,indicator:"Loading Data...",axes:{xaxis:{min:0,max:10,tickInterval:2,show:true},yaxis:{min:0,max:12,tickInterval:3,show:true}}};this.options={};this.previousSeriesStack=[];this.plugins={};this.series=[];this.seriesStack=[];this.seriesColors=H.jqplot.config.defaultColors;this.sortData=true;this.stackSeries=false;this.syncXTicks=true;this.syncYTicks=true;this.target=null;this.targetId=null;this.textColor;this.title=new u();this._drawCount=0;this._sumy=0;this._sumx=0;this._stackData=[];this._plotData=[];this._width=null;this._height=null;this._plotDimensions={height:null,width:null};this._gridPadding={top:null,right:null,bottom:null,left:null};this._defaultGridPadding={top:10,right:10,bottom:23,left:10};this._addDomReference=H.jqplot.config.addDomReference;this.preInitHooks=new H.jqplot.HooksManager();this.postInitHooks=new H.jqplot.HooksManager();this.preParseOptionsHooks=new H.jqplot.HooksManager();this.postParseOptionsHooks=new H.jqplot.HooksManager();this.preDrawHooks=new H.jqplot.HooksManager();this.postDrawHooks=new H.jqplot.HooksManager();this.preDrawSeriesHooks=new H.jqplot.HooksManager();this.postDrawSeriesHooks=new H.jqplot.HooksManager();this.preDrawLegendHooks=new H.jqplot.HooksManager();this.addLegendRowHooks=new H.jqplot.HooksManager();this.preSeriesInitHooks=new H.jqplot.HooksManager();this.postSeriesInitHooks=new H.jqplot.HooksManager();this.preParseSeriesOptionsHooks=new H.jqplot.HooksManager();this.postParseSeriesOptionsHooks=new H.jqplot.HooksManager();this.eventListenerHooks=new H.jqplot.EventListenerManager();this.preDrawSeriesShadowHooks=new H.jqplot.HooksManager();this.postDrawSeriesShadowHooks=new H.jqplot.HooksManager();this.colorGenerator=new H.jqplot.ColorGenerator();this.negativeColorGenerator=new H.jqplot.ColorGenerator();this.canvasManager=new H.jqplot.CanvasManager();this.themeEngine=new H.jqplot.ThemeEngine();var ad=0;this.init=function(ao,al,aq){aq=aq||{};for(var am=0;am<H.jqplot.preInitHooks.length;am++){H.jqplot.preInitHooks[am].call(this,ao,al,aq)}for(var am=0;am<this.preInitHooks.hooks.length;am++){this.preInitHooks.hooks[am].call(this,ao,al,aq)}this.targetId="#"+ao;this.target=H("#"+ao);if(this._addDomReference){this.target.data("jqplot",this)}this.target.removeClass("jqplot-error");if(!this.target.get(0)){throw"No plot target specified"}if(this.target.css("position")=="static"){this.target.css("position","relative")}if(!this.target.hasClass("jqplot-target")){this.target.addClass("jqplot-target")}if(!this.target.height()){var an;if(aq&&aq.height){an=parseInt(aq.height,10)}else{if(this.target.attr("data-height")){an=parseInt(this.target.attr("data-height"),10)}else{an=parseInt(H.jqplot.config.defaultHeight,10)}}this._height=an;this.target.css("height",an+"px")}else{this._height=an=this.target.height()}if(!this.target.width()){var ap;if(aq&&aq.width){ap=parseInt(aq.width,10)}else{if(this.target.attr("data-width")){ap=parseInt(this.target.attr("data-width"),10)}else{ap=parseInt(H.jqplot.config.defaultWidth,10)}}this._width=ap;this.target.css("width",ap+"px")}else{this._width=ap=this.target.width()}for(var am=0,aj=Q.length;am<aj;am++){this.axes[Q[am]]=new s(Q[am])}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;if(this._height<=0||this._width<=0||!this._height||!this._width){throw"Canvas dimension not set"}if(aq.dataRenderer&&H.isFunction(aq.dataRenderer)){if(aq.dataRendererOptions){this.dataRendererOptions=aq.dataRendererOptions}this.dataRenderer=aq.dataRenderer;al=this.dataRenderer(al,this,this.dataRendererOptions)}if(aq.noDataIndicator&&H.isPlainObject(aq.noDataIndicator)){H.extend(true,this.noDataIndicator,aq.noDataIndicator)}if(al==null||H.isArray(al)==false||al.length==0||H.isArray(al[0])==false||al[0].length==0){if(this.noDataIndicator.show==false){throw"No Data"}else{for(var af in this.noDataIndicator.axes){for(var ah in this.noDataIndicator.axes[af]){this.axes[af][ah]=this.noDataIndicator.axes[af][ah]}}this.postDrawHooks.add(function(){var ax=this.eventCanvas.getHeight();var au=this.eventCanvas.getWidth();var at=H('<div class="jqplot-noData-container" style="position:absolute;"></div>');this.target.append(at);at.height(ax);at.width(au);at.css("top",this.eventCanvas._offsets.top);at.css("left",this.eventCanvas._offsets.left);var aw=H('<div class="jqplot-noData-contents" style="text-align:center; position:relative; margin-left:auto; margin-right:auto;"></div>');at.append(aw);aw.html(this.noDataIndicator.indicator);var av=aw.height();var ar=aw.width();aw.height(av);aw.width(ar);aw.css("top",(ax-av)/2+"px")})}}this.data=H.extend(true,[],al);this.parseOptions(aq);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var am=0;am<this.series.length;am++){this.seriesStack.push(am);this.previousSeriesStack.push(am);this.series[am].shadowCanvas._plotDimensions=this._plotDimensions;this.series[am].canvas._plotDimensions=this._plotDimensions;for(var ak=0;ak<H.jqplot.preSeriesInitHooks.length;ak++){H.jqplot.preSeriesInitHooks[ak].call(this.series[am],ao,this.data,this.options.seriesDefaults,this.options.series[am],this)}for(var ak=0;ak<this.preSeriesInitHooks.hooks.length;ak++){this.preSeriesInitHooks.hooks[ak].call(this.series[am],ao,this.data,this.options.seriesDefaults,this.options.series[am],this)}this.series[am]._plotDimensions=this._plotDimensions;this.series[am].init(am,this.grid.borderWidth,this);for(var ak=0;ak<H.jqplot.postSeriesInitHooks.length;ak++){H.jqplot.postSeriesInitHooks[ak].call(this.series[am],ao,this.data,this.options.seriesDefaults,this.options.series[am],this)}for(var ak=0;ak<this.postSeriesInitHooks.hooks.length;ak++){this.postSeriesInitHooks.hooks[ak].call(this.series[am],ao,this.data,this.options.seriesDefaults,this.options.series[am],this)}this._sumy+=this.series[am]._sumy;this._sumx+=this.series[am]._sumx}var ag,ai;for(var am=0,aj=Q.length;am<aj;am++){ag=Q[am];ai=this.axes[ag];ai._plotDimensions=this._plotDimensions;ai.init();if(this.axes[ag].borderColor==null){if(ag.charAt(0)!=="x"&&ai.useSeriesColor===true&&ai.show){ai.borderColor=ai._series[0].color}else{ai.borderColor=this.grid.borderColor}}}if(this.sortData){ab(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var am=0;am<H.jqplot.postInitHooks.length;am++){H.jqplot.postInitHooks[am].call(this,ao,this.data,aq)}for(var am=0;am<this.postInitHooks.hooks.length;am++){this.postInitHooks.hooks[am].call(this,ao,this.data,aq)}};this.resetAxesScale=function(ak,ag){var ai=ag||{};var aj=ak||this.axes;if(aj===true){aj=this.axes}if(H.isArray(aj)){for(var ah=0;ah<aj.length;ah++){this.axes[aj[ah]].resetScale(ai[aj[ah]])}}else{if(typeof(aj)==="object"){for(var af in aj){this.axes[af].resetScale(ai[af])}}}};this.reInitialize=function(an,af){var ar=H.extend(true,{},this.options,af);var ap=this.targetId.substr(1);var al=(an==null)?this.data:an;for(var ao=0;ao<H.jqplot.preInitHooks.length;ao++){H.jqplot.preInitHooks[ao].call(this,ap,al,ar)}for(var ao=0;ao<this.preInitHooks.hooks.length;ao++){this.preInitHooks.hooks[ao].call(this,ap,al,ar)}this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw"Target dimension not set"}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;var ag,aq,am,ai;for(var ao=0,ak=Q.length;ao<ak;ao++){ag=Q[ao];ai=this.axes[ag];aq=ai._ticks;for(var am=0,aj=aq.length;am<aj;am++){var ah=aq[am]._elem;if(ah){if(H.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==r){window.G_vmlCanvasManager.uninitElement(ah.get(0))}ah.emptyForce();ah=null;aq._elem=null}}aq=null;delete ai.ticks;delete ai._ticks;this.axes[ag]=new s(ag);this.axes[ag]._plotWidth=this._width;this.axes[ag]._plotHeight=this._height}if(an){if(ar.dataRenderer&&H.isFunction(ar.dataRenderer)){if(ar.dataRendererOptions){this.dataRendererOptions=ar.dataRendererOptions}this.dataRenderer=ar.dataRenderer;an=this.dataRenderer(an,this,this.dataRendererOptions)}this.data=H.extend(true,[],an)}if(af){this.parseOptions(ar)}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.seriesStack=[];this.previousSeriesStack=[];this.computePlotData();for(var ao=0,ak=this.series.length;ao<ak;ao++){this.seriesStack.push(ao);this.previousSeriesStack.push(ao);this.series[ao].shadowCanvas._plotDimensions=this._plotDimensions;this.series[ao].canvas._plotDimensions=this._plotDimensions;for(var am=0;am<H.jqplot.preSeriesInitHooks.length;am++){H.jqplot.preSeriesInitHooks[am].call(this.series[ao],ap,this.data,this.options.seriesDefaults,this.options.series[ao],this)}for(var am=0;am<this.preSeriesInitHooks.hooks.length;am++){this.preSeriesInitHooks.hooks[am].call(this.series[ao],ap,this.data,this.options.seriesDefaults,this.options.series[ao],this)}this.series[ao]._plotDimensions=this._plotDimensions;this.series[ao].init(ao,this.grid.borderWidth,this);for(var am=0;am<H.jqplot.postSeriesInitHooks.length;am++){H.jqplot.postSeriesInitHooks[am].call(this.series[ao],ap,this.data,this.options.seriesDefaults,this.options.series[ao],this)}for(var am=0;am<this.postSeriesInitHooks.hooks.length;am++){this.postSeriesInitHooks.hooks[am].call(this.series[ao],ap,this.data,this.options.seriesDefaults,this.options.series[ao],this)}this._sumy+=this.series[ao]._sumy;this._sumx+=this.series[ao]._sumx}for(var ao=0,ak=Q.length;ao<ak;ao++){ag=Q[ao];ai=this.axes[ag];ai._plotDimensions=this._plotDimensions;ai.init();if(ai.borderColor==null){if(ag.charAt(0)!=="x"&&ai.useSeriesColor===true&&ai.show){ai.borderColor=ai._series[0].color}else{ai.borderColor=this.grid.borderColor}}}if(this.sortData){ab(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var ao=0,ak=H.jqplot.postInitHooks.length;ao<ak;ao++){H.jqplot.postInitHooks[ao].call(this,ap,this.data,ar)}for(var ao=0,ak=this.postInitHooks.hooks.length;ao<ak;ao++){this.postInitHooks.hooks[ao].call(this,ap,this.data,ar)}};this.quickInit=function(){this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw"Target dimension not set"}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;for(var ak in this.axes){this.axes[ak]._plotWidth=this._width;this.axes[ak]._plotHeight=this._height}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this._sumy=0;this._sumx=0;this.computePlotData();for(var ai=0;ai<this.series.length;ai++){if(this.series[ai]._type==="line"&&this.series[ai].renderer.bands.show){this.series[ai].renderer.initBands.call(this.series[ai],this.series[ai].renderer.options,this)}this.series[ai]._plotDimensions=this._plotDimensions;this.series[ai].canvas._plotDimensions=this._plotDimensions;this._sumy+=this.series[ai]._sumy;this._sumx+=this.series[ai]._sumx}var ag;for(var af=0;af<12;af++){ag=Q[af];var ah=this.axes[ag]._ticks;for(var ai=0;ai<ah.length;ai++){var aj=ah[ai]._elem;if(aj){if(H.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==r){window.G_vmlCanvasManager.uninitElement(aj.get(0))}aj.emptyForce();aj=null;ah._elem=null}}ah=null;this.axes[ag]._plotDimensions=this._plotDimensions;this.axes[ag]._ticks=[]}if(this.sortData){ab(this.series)}this.grid._axes=this.axes;this.legend._series=this.series};function ab(aj){var an,ao,ap,af,am;for(var ak=0;ak<aj.length;ak++){var ag;var al=[aj[ak].data,aj[ak]._stackData,aj[ak]._plotData,aj[ak]._prevPlotData];for(var ah=0;ah<4;ah++){ag=true;an=al[ah];if(aj[ak]._stackAxis=="x"){for(var ai=0;ai<an.length;ai++){if(typeof(an[ai][1])!="number"){ag=false;break}}if(ag){an.sort(function(ar,aq){return ar[1]-aq[1]})}}else{for(var ai=0;ai<an.length;ai++){if(typeof(an[ai][0])!="number"){ag=false;break}}if(ag){an.sort(function(ar,aq){return ar[0]-aq[0]})}}}}}this.computePlotData=function(){this._plotData=[];this._stackData=[];var am,an,ai;for(an=0,ai=this.series.length;an<ai;an++){am=this.series[an];this._plotData.push([]);this._stackData.push([]);var ag=am.data;this._plotData[an]=H.extend(true,[],ag);this._stackData[an]=H.extend(true,[],ag);am._plotData=this._plotData[an];am._stackData=this._stackData[an];var aq={x:[],y:[]};if(this.stackSeries&&!am.disableStack){am._stack=true;var ao=(am._stackAxis==="x")?0:1;for(var aj=0,af=ag.length;aj<af;aj++){var ap=ag[aj][ao];if(ap==null){ap=0}this._plotData[an][aj][ao]=ap;this._stackData[an][aj][ao]=ap;if(an>0){for(var ak=an;ak--;){var ah=this._plotData[ak][aj][ao];if(ap*ah>=0){this._plotData[an][aj][ao]+=ah;this._stackData[an][aj][ao]+=ah;break}}}}}else{for(var al=0;al<am.data.length;al++){aq.x.push(am.data[al][0]);aq.y.push(am.data[al][1])}this._stackData.push(am.data);this.series[an]._stackData=am.data;this._plotData.push(am.data);am._plotData=am.data;am._plotValues=aq}if(an>0){am._prevPlotData=this.series[an-1]._plotData}am._sumy=0;am._sumx=0;for(al=am.data.length-1;al>-1;al--){am._sumy+=am.data[al][1];am._sumx+=am.data[al][0]}}};this.populatePlotData=function(an,ao){this._plotData=[];this._stackData=[];an._stackData=[];an._plotData=[];var ar={x:[],y:[]};if(this.stackSeries&&!an.disableStack){an._stack=true;var aq=(an._stackAxis==="x")?0:1;var at=H.extend(true,[],an.data);var au=H.extend(true,[],an.data);var ah,ag,ai,ap,af;for(var al=0;al<ao;al++){var aj=this.series[al].data;for(var ak=0;ak<aj.length;ak++){ai=aj[ak];ah=(ai[0]!=null)?ai[0]:0;ag=(ai[1]!=null)?ai[1]:0;at[ak][0]+=ah;at[ak][1]+=ag;ap=(aq)?ag:ah;if(an.data[ak][aq]*ap>=0){au[ak][aq]+=ap}}}for(var am=0;am<au.length;am++){ar.x.push(au[am][0]);ar.y.push(au[am][1])}this._plotData.push(au);this._stackData.push(at);an._stackData=at;an._plotData=au;an._plotValues=ar}else{for(var am=0;am<an.data.length;am++){ar.x.push(an.data[am][0]);ar.y.push(an.data[am][1])}this._stackData.push(an.data);this.series[ao]._stackData=an.data;this._plotData.push(an.data);an._plotData=an.data;an._plotValues=ar}if(ao>0){an._prevPlotData=this.series[ao-1]._plotData}an._sumy=0;an._sumx=0;for(am=an.data.length-1;am>-1;am--){an._sumy+=an.data[am][1];an._sumx+=an.data[am][0]}};this.getNextSeriesColor=(function(ag){var af=0;var ah=ag.seriesColors;return function(){if(af<ah.length){return ah[af++]}else{af=0;return ah[af++]}}})(this);this.parseOptions=function(ar){for(var am=0;am<this.preParseOptionsHooks.hooks.length;am++){this.preParseOptionsHooks.hooks[am].call(this,ar)}for(var am=0;am<H.jqplot.preParseOptionsHooks.length;am++){H.jqplot.preParseOptionsHooks[am].call(this,ar)}this.options=H.extend(true,{},this.defaults,ar);var ag=this.options;this.animate=ag.animate;this.animateReplot=ag.animateReplot;this.stackSeries=ag.stackSeries;if(H.isPlainObject(ag.fillBetween)){var aq=["series1","series2","color","baseSeries","fill"],an;for(var am=0,ak=aq.length;am<ak;am++){an=aq[am];if(ag.fillBetween[an]!=null){this.fillBetween[an]=ag.fillBetween[an]}}}if(ag.seriesColors){this.seriesColors=ag.seriesColors}if(ag.negativeSeriesColors){this.negativeSeriesColors=ag.negativeSeriesColors}if(ag.captureRightClick){this.captureRightClick=ag.captureRightClick}this.defaultAxisStart=(ar&&ar.defaultAxisStart!=null)?ar.defaultAxisStart:this.defaultAxisStart;this.colorGenerator.setColors(this.seriesColors);this.negativeColorGenerator.setColors(this.negativeSeriesColors);H.extend(true,this._gridPadding,ag.gridPadding);this.sortData=(ag.sortData!=null)?ag.sortData:this.sortData;for(var am=0;am<12;am++){var ah=Q[am];var aj=this.axes[ah];aj._options=H.extend(true,{},ag.axesDefaults,ag.axes[ah]);H.extend(true,aj,ag.axesDefaults,ag.axes[ah]);aj._plotWidth=this._width;aj._plotHeight=this._height}var ap=function(ax,av,ay){var au=[];var aw,at;av=av||"vertical";if(!H.isArray(ax[0])){for(aw=0,at=ax.length;aw<at;aw++){if(av=="vertical"){au.push([ay+aw,ax[aw]])}else{au.push([ax[aw],ay+aw])}}}else{H.extend(true,au,ax)}return au};var ao=0;this.series=[];for(var am=0;am<this.data.length;am++){var af=H.extend(true,{index:am},{seriesColors:this.seriesColors,negativeSeriesColors:this.negativeSeriesColors},this.options.seriesDefaults,this.options.series[am],{rendererOptions:{animation:{show:this.animate}}});var aq=new O(af);for(var al=0;al<H.jqplot.preParseSeriesOptionsHooks.length;al++){H.jqplot.preParseSeriesOptionsHooks[al].call(aq,this.options.seriesDefaults,this.options.series[am])}for(var al=0;al<this.preParseSeriesOptionsHooks.hooks.length;al++){this.preParseSeriesOptionsHooks.hooks[al].call(aq,this.options.seriesDefaults,this.options.series[am])}H.extend(true,aq,af);var ai="vertical";if(aq.renderer===H.jqplot.BarRenderer&&aq.rendererOptions&&aq.rendererOptions.barDirection=="horizontal"){ai="horizontal";aq._stackAxis="x";aq._primaryAxis="_yaxis"}aq.data=ap(this.data[am],ai,this.defaultAxisStart);switch(aq.xaxis){case"xaxis":aq._xaxis=this.axes.xaxis;break;case"x2axis":aq._xaxis=this.axes.x2axis;break;default:break}aq._yaxis=this.axes[aq.yaxis];aq._xaxis._series.push(aq);aq._yaxis._series.push(aq);if(aq.show){aq._xaxis.show=true;aq._yaxis.show=true}else{if(aq._xaxis.scaleToHiddenSeries){aq._xaxis.show=true}if(aq._yaxis.scaleToHiddenSeries){aq._yaxis.show=true}}if(!aq.label){aq.label="Series "+(am+1).toString()}this.series.push(aq);for(var al=0;al<H.jqplot.postParseSeriesOptionsHooks.length;al++){H.jqplot.postParseSeriesOptionsHooks[al].call(this.series[am],this.options.seriesDefaults,this.options.series[am])}for(var al=0;al<this.postParseSeriesOptionsHooks.hooks.length;al++){this.postParseSeriesOptionsHooks.hooks[al].call(this.series[am],this.options.seriesDefaults,this.options.series[am])}}H.extend(true,this.grid,this.options.grid);for(var am=0,ak=Q.length;am<ak;am++){var ah=Q[am];var aj=this.axes[ah];if(aj.borderWidth==null){aj.borderWidth=this.grid.borderWidth}}if(typeof this.options.title=="string"){this.title.text=this.options.title}else{if(typeof this.options.title=="object"){H.extend(true,this.title,this.options.title)}}this.title._plotWidth=this._width;this.legend.setOptions(this.options.legend);for(var am=0;am<H.jqplot.postParseOptionsHooks.length;am++){H.jqplot.postParseOptionsHooks[am].call(this,ar)}for(var am=0;am<this.postParseOptionsHooks.hooks.length;am++){this.postParseOptionsHooks.hooks[am].call(this,ar)}};this.destroy=function(){this.canvasManager.freeAllCanvases();if(this.eventCanvas&&this.eventCanvas._elem){this.eventCanvas._elem.unbind()}this.target.empty();this.target[0].innerHTML=""};this.replot=function(ag){var ah=ag||{};var aj=ah.data||null;var af=(ah.clear===false)?false:true;var ai=ah.resetAxes||false;delete ah.data;delete ah.clear;delete ah.resetAxes;this.target.trigger("jqplotPreReplot");if(af){this.destroy()}if(aj||!H.isEmptyObject(ah)){this.reInitialize(aj,ah)}else{this.quickInit()}if(ai){this.resetAxesScale(ai,ah.axes)}this.draw();this.target.trigger("jqplotPostReplot")};this.redraw=function(af){af=(af!=null)?af:true;this.target.trigger("jqplotPreRedraw");if(af){this.canvasManager.freeAllCanvases();this.eventCanvas._elem.unbind();this.target.empty()}for(var ah in this.axes){this.axes[ah]._ticks=[]}this.computePlotData();this._sumy=0;this._sumx=0;for(var ag=0,ai=this.series.length;ag<ai;ag++){this._sumy+=this.series[ag]._sumy;this._sumx+=this.series[ag]._sumx}this.draw();this.target.trigger("jqplotPostRedraw")};this.draw=function(){if(this.drawIfHidden||this.target.is(":visible")){this.target.trigger("jqplotPreDraw");var aB,az,ay,ai;for(aB=0,ay=H.jqplot.preDrawHooks.length;aB<ay;aB++){H.jqplot.preDrawHooks[aB].call(this)}for(aB=0,ay=this.preDrawHooks.length;aB<ay;aB++){this.preDrawHooks.hooks[aB].apply(this,this.preDrawSeriesHooks.args[aB])}this.target.append(this.baseCanvas.createElement({left:0,right:0,top:0,bottom:0},"jqplot-base-canvas",null,this));this.baseCanvas.setContext();this.target.append(this.title.draw());this.title.pack({top:0,left:0});var aF=this.legend.draw({},this);var af={top:0,left:0,bottom:0,right:0};if(this.legend.placement=="outsideGrid"){this.target.append(aF);switch(this.legend.location){case"n":af.top+=this.legend.getHeight();break;case"s":af.bottom+=this.legend.getHeight();break;case"ne":case"e":case"se":af.right+=this.legend.getWidth();break;case"nw":case"w":case"sw":af.left+=this.legend.getWidth();break;default:af.right+=this.legend.getWidth();break}aF=aF.detach()}var al=this.axes;var aG;for(aB=0;aB<12;aB++){aG=Q[aB];this.target.append(al[aG].draw(this.baseCanvas._ctx,this));al[aG].set()}if(al.yaxis.show){af.left+=al.yaxis.getWidth()}var aA=["y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];var ar=[0,0,0,0,0,0,0,0];var av=0;var au;for(au=0;au<8;au++){if(al[aA[au]].show){av+=al[aA[au]].getWidth();ar[au]=av}}af.right+=av;if(al.x2axis.show){af.top+=al.x2axis.getHeight()}if(this.title.show){af.top+=this.title.getHeight()}if(al.xaxis.show){af.bottom+=al.xaxis.getHeight()}if(this.options.gridDimensions&&H.isPlainObject(this.options.gridDimensions)){var am=parseInt(this.options.gridDimensions.width,10)||0;var aC=parseInt(this.options.gridDimensions.height,10)||0;var ah=(this._width-af.left-af.right-am)/2;var aE=(this._height-af.top-af.bottom-aC)/2;if(aE>=0&&ah>=0){af.top+=aE;af.bottom+=aE;af.left+=ah;af.right+=ah}}var ag=["top","bottom","left","right"];for(var au in ag){if(this._gridPadding[ag[au]]==null&&af[ag[au]]>0){this._gridPadding[ag[au]]=af[ag[au]]}else{if(this._gridPadding[ag[au]]==null){this._gridPadding[ag[au]]=this._defaultGridPadding[ag[au]]}}}var at=this._gridPadding;if(this.legend.placement==="outsideGrid"){at={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){at.left=this._gridPadding.left;at.right=this._gridPadding.right}}al.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-al.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});al.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-al.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});al.x2axis.pack({position:"absolute",top:this._gridPadding.top-al.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(aB=8;aB>0;aB--){al[aA[aB-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-ar[aB-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var an=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-al.yMidAxis.getWidth()/2;al.yMidAxis.pack({position:"absolute",top:0,left:an,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var ak=this.series;var aD=ak.length;for(aB=0,ay=aD;aB<ay;aB++){az=this.seriesStack[aB];this.target.append(ak[az].shadowCanvas.createElement(this._gridPadding,"jqplot-series-shadowCanvas",null,this));ak[az].shadowCanvas.setContext();ak[az].shadowCanvas._elem.data("seriesIndex",az)}for(aB=0,ay=aD;aB<ay;aB++){az=this.seriesStack[aB];this.target.append(ak[az].canvas.createElement(this._gridPadding,"jqplot-series-canvas",null,this));ak[az].canvas.setContext();ak[az].canvas._elem.data("seriesIndex",az)}this.target.append(this.eventCanvas.createElement(this._gridPadding,"jqplot-event-canvas",null,this));this.eventCanvas.setContext();this.eventCanvas._ctx.fillStyle="rgba(0,0,0,0)";this.eventCanvas._ctx.fillRect(0,0,this.eventCanvas._ctx.canvas.width,this.eventCanvas._ctx.canvas.height);this.bindCustomEvents();if(this.legend.preDraw){this.eventCanvas._elem.before(aF);this.legend.pack(at);if(this.legend._elem){this.drawSeries({legendInfo:{location:this.legend.location,placement:this.legend.placement,width:this.legend.getWidth(),height:this.legend.getHeight(),xoffset:this.legend.xoffset,yoffset:this.legend.yoffset}})}else{this.drawSeries()}}else{this.drawSeries();if(aD){H(ak[aD-1].canvas._elem).after(aF)}this.legend.pack(at)}for(var aB=0,ay=H.jqplot.eventListenerHooks.length;aB<ay;aB++){this.eventCanvas._elem.bind(H.jqplot.eventListenerHooks[aB][0],{plot:this},H.jqplot.eventListenerHooks[aB][1])}for(var aB=0,ay=this.eventListenerHooks.hooks.length;aB<ay;aB++){this.eventCanvas._elem.bind(this.eventListenerHooks.hooks[aB][0],{plot:this},this.eventListenerHooks.hooks[aB][1])}var aq=this.fillBetween;if(aq.fill&&aq.series1!==aq.series2&&aq.series1<aD&&aq.series2<aD&&ak[aq.series1]._type==="line"&&ak[aq.series2]._type==="line"){this.doFillBetweenLines()}for(var aB=0,ay=H.jqplot.postDrawHooks.length;aB<ay;aB++){H.jqplot.postDrawHooks[aB].call(this)}for(var aB=0,ay=this.postDrawHooks.hooks.length;aB<ay;aB++){this.postDrawHooks.hooks[aB].apply(this,this.postDrawHooks.args[aB])}if(this.target.is(":visible")){this._drawCount+=1}var ao,ap,aw,aj;for(aB=0,ay=aD;aB<ay;aB++){ao=ak[aB];ap=ao.renderer;aw=".jqplot-point-label.jqplot-series-"+aB;if(ap.animation&&ap.animation._supported&&ap.animation.show&&(this._drawCount<2||this.animateReplot)){aj=this.target.find(aw);aj.stop(true,true).hide();ao.canvas._elem.stop(true,true).hide();ao.shadowCanvas._elem.stop(true,true).hide();ao.canvas._elem.jqplotEffect("blind",{mode:"show",direction:ap.animation.direction},ap.animation.speed);ao.shadowCanvas._elem.jqplotEffect("blind",{mode:"show",direction:ap.animation.direction},ap.animation.speed);aj.fadeIn(ap.animation.speed*0.8)}}aj=null;this.target.trigger("jqplotPostDraw",[this])}};N.prototype.doFillBetweenLines=function(){var ah=this.fillBetween;var aq=ah.series1;var ao=ah.series2;var ap=(aq<ao)?aq:ao;var an=(ao>aq)?ao:aq;var al=this.series[ap];var ak=this.series[an];if(ak.renderer.smooth){var aj=ak.renderer._smoothedData.slice(0).reverse()}else{var aj=ak.gridData.slice(0).reverse()}if(al.renderer.smooth){var am=al.renderer._smoothedData.concat(aj)}else{var am=al.gridData.concat(aj)}var ai=(ah.color!==null)?ah.color:this.series[aq].fillColor;var ar=(ah.baseSeries!==null)?ah.baseSeries:ap;var ag=this.series[ar].renderer.shapeRenderer;var af={fillStyle:ai,fill:true,closePath:true};ag.draw(al.shadowCanvas._ctx,am,af)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function ac(ao){var am=ao.data.plot;var ai=am.eventCanvas._elem.offset();var al={x:ao.pageX-ai.left,y:ao.pageY-ai.top};var aj={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var ak=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var af=am.axes;var ag,ah;for(ag=11;ag>0;ag--){ah=ak[ag-1];if(af[ah].show){aj[ah]=af[ah].series_p2u(al[ah.charAt(0)])}}return{offsets:ai,gridPos:al,dataPos:aj}}function ae(af,ag){var ak=ag.series;var aQ,aO,aN,aI,aJ,aD,aC,ap,an,at,au,aE;var aM,aR,aK,al,aB,aG,aP;var ah,aH;for(aN=ag.seriesStack.length-1;aN>=0;aN--){aQ=ag.seriesStack[aN];aI=ak[aQ];aP=aI._highlightThreshold;switch(aI.renderer.constructor){case H.jqplot.BarRenderer:aD=af.x;aC=af.y;for(aO=0;aO<aI._barPoints.length;aO++){aB=aI._barPoints[aO];aK=aI.gridData[aO];if(aD>aB[0][0]&&aD<aB[2][0]&&aC>aB[2][1]&&aC<aB[0][1]){return{seriesIndex:aI.index,pointIndex:aO,gridData:aK,data:aI.data[aO],points:aI._barPoints[aO]}}}break;case H.jqplot.PyramidRenderer:aD=af.x;aC=af.y;for(aO=0;aO<aI._barPoints.length;aO++){aB=aI._barPoints[aO];aK=aI.gridData[aO];if(aD>aB[0][0]+aP[0][0]&&aD<aB[2][0]+aP[2][0]&&aC>aB[2][1]&&aC<aB[0][1]){return{seriesIndex:aI.index,pointIndex:aO,gridData:aK,data:aI.data[aO],points:aI._barPoints[aO]}}}break;case H.jqplot.DonutRenderer:at=aI.startAngle/180*Math.PI;aD=af.x-aI._center[0];aC=af.y-aI._center[1];aJ=Math.sqrt(Math.pow(aD,2)+Math.pow(aC,2));if(aD>0&&-aC>=0){ap=2*Math.PI-Math.atan(-aC/aD)}else{if(aD>0&&-aC<0){ap=-Math.atan(-aC/aD)}else{if(aD<0){ap=Math.PI-Math.atan(-aC/aD)}else{if(aD==0&&-aC>0){ap=3*Math.PI/2}else{if(aD==0&&-aC<0){ap=Math.PI/2}else{if(aD==0&&aC==0){ap=0}}}}}}if(at){ap-=at;if(ap<0){ap+=2*Math.PI}else{if(ap>2*Math.PI){ap-=2*Math.PI}}}an=aI.sliceMargin/180*Math.PI;if(aJ<aI._radius&&aJ>aI._innerRadius){for(aO=0;aO<aI.gridData.length;aO++){au=(aO>0)?aI.gridData[aO-1][1]+an:an;aE=aI.gridData[aO][1];if(ap>au&&ap<aE){return{seriesIndex:aI.index,pointIndex:aO,gridData:aI.gridData[aO],data:aI.data[aO]}}}}break;case H.jqplot.PieRenderer:at=aI.startAngle/180*Math.PI;aD=af.x-aI._center[0];aC=af.y-aI._center[1];aJ=Math.sqrt(Math.pow(aD,2)+Math.pow(aC,2));if(aD>0&&-aC>=0){ap=2*Math.PI-Math.atan(-aC/aD)}else{if(aD>0&&-aC<0){ap=-Math.atan(-aC/aD)}else{if(aD<0){ap=Math.PI-Math.atan(-aC/aD)}else{if(aD==0&&-aC>0){ap=3*Math.PI/2}else{if(aD==0&&-aC<0){ap=Math.PI/2}else{if(aD==0&&aC==0){ap=0}}}}}}if(at){ap-=at;if(ap<0){ap+=2*Math.PI}else{if(ap>2*Math.PI){ap-=2*Math.PI}}}an=aI.sliceMargin/180*Math.PI;if(aJ<aI._radius){for(aO=0;aO<aI.gridData.length;aO++){au=(aO>0)?aI.gridData[aO-1][1]+an:an;aE=aI.gridData[aO][1];if(ap>au&&ap<aE){return{seriesIndex:aI.index,pointIndex:aO,gridData:aI.gridData[aO],data:aI.data[aO]}}}}break;case H.jqplot.BubbleRenderer:aD=af.x;aC=af.y;var az=null;if(aI.show){for(var aO=0;aO<aI.gridData.length;aO++){aK=aI.gridData[aO];aR=Math.sqrt((aD-aK[0])*(aD-aK[0])+(aC-aK[1])*(aC-aK[1]));if(aR<=aK[2]&&(aR<=aM||aM==null)){aM=aR;az={seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}if(az!=null){return az}}break;case H.jqplot.FunnelRenderer:aD=af.x;aC=af.y;var aF=aI._vertices,aj=aF[0],ai=aF[aF.length-1],am,ay,ar;function aL(aU,aW,aV){var aT=(aW[1]-aV[1])/(aW[0]-aV[0]);var aS=aW[1]-aT*aW[0];var aX=aU+aW[1];return[(aX-aS)/aT,aX]}am=aL(aC,aj[0],ai[3]);ay=aL(aC,aj[1],ai[2]);for(aO=0;aO<aF.length;aO++){ar=aF[aO];if(aC>=ar[0][1]&&aC<=ar[3][1]&&aD>=am[0]&&aD<=ay[0]){return{seriesIndex:aI.index,pointIndex:aO,gridData:null,data:aI.data[aO]}}}break;case H.jqplot.LineRenderer:aD=af.x;aC=af.y;aJ=aI.renderer;if(aI.show){if((aI.fill||(aI.renderer.bands.show&&aI.renderer.bands.fill))&&(!ag.plugins.highlighter||!ag.plugins.highlighter.show)){var aq=false;if(aD>aI._boundingBox[0][0]&&aD<aI._boundingBox[1][0]&&aC>aI._boundingBox[1][1]&&aC<aI._boundingBox[0][1]){var ax=aI._areaPoints.length;var aA;var aO=ax-1;for(var aA=0;aA<ax;aA++){var aw=[aI._areaPoints[aA][0],aI._areaPoints[aA][1]];var av=[aI._areaPoints[aO][0],aI._areaPoints[aO][1]];if(aw[1]<aC&&av[1]>=aC||av[1]<aC&&aw[1]>=aC){if(aw[0]+(aC-aw[1])/(av[1]-aw[1])*(av[0]-aw[0])<aD){aq=!aq}}aO=aA}}if(aq){return{seriesIndex:aQ,pointIndex:null,gridData:aI.gridData,data:aI.data,points:aI._areaPoints}}break}else{aH=aI.markerRenderer.size/2+aI.neighborThreshold;ah=(aH>0)?aH:0;for(var aO=0;aO<aI.gridData.length;aO++){aK=aI.gridData[aO];if(aJ.constructor==H.jqplot.OHLCRenderer){if(aJ.candleStick){var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._bodyWidth/2&&aD<=aK[0]+aJ._bodyWidth/2&&aC>=ao(aI.data[aO][2])&&aC<=ao(aI.data[aO][3])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}else{if(!aJ.hlc){var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._tickLength&&aD<=aK[0]+aJ._tickLength&&aC>=ao(aI.data[aO][2])&&aC<=ao(aI.data[aO][3])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}else{var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._tickLength&&aD<=aK[0]+aJ._tickLength&&aC>=ao(aI.data[aO][1])&&aC<=ao(aI.data[aO][2])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}}}else{if(aK[0]!=null&&aK[1]!=null){aR=Math.sqrt((aD-aK[0])*(aD-aK[0])+(aC-aK[1])*(aC-aK[1]));if(aR<=ah&&(aR<=aM||aM==null)){aM=aR;return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}}}}}break;default:aD=af.x;aC=af.y;aJ=aI.renderer;if(aI.show){aH=aI.markerRenderer.size/2+aI.neighborThreshold;ah=(aH>0)?aH:0;for(var aO=0;aO<aI.gridData.length;aO++){aK=aI.gridData[aO];if(aJ.constructor==H.jqplot.OHLCRenderer){if(aJ.candleStick){var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._bodyWidth/2&&aD<=aK[0]+aJ._bodyWidth/2&&aC>=ao(aI.data[aO][2])&&aC<=ao(aI.data[aO][3])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}else{if(!aJ.hlc){var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._tickLength&&aD<=aK[0]+aJ._tickLength&&aC>=ao(aI.data[aO][2])&&aC<=ao(aI.data[aO][3])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}else{var ao=aI._yaxis.series_u2p;if(aD>=aK[0]-aJ._tickLength&&aD<=aK[0]+aJ._tickLength&&aC>=ao(aI.data[aO][1])&&aC<=ao(aI.data[aO][2])){return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}}}else{aR=Math.sqrt((aD-aK[0])*(aD-aK[0])+(aC-aK[1])*(aC-aK[1]));if(aR<=ah&&(aR<=aM||aM==null)){aM=aR;return{seriesIndex:aQ,pointIndex:aO,gridData:aK,data:aI.data[aO]}}}}}break}}return null}this.onClick=function(ah){var ag=ac(ah);var aj=ah.data.plot;var ai=ae(ag.gridPos,aj);var af=H.Event("jqplotClick");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])};this.onDblClick=function(ah){var ag=ac(ah);var aj=ah.data.plot;var ai=ae(ag.gridPos,aj);var af=H.Event("jqplotDblClick");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])};this.onMouseDown=function(ah){var ag=ac(ah);var aj=ah.data.plot;var ai=ae(ag.gridPos,aj);var af=H.Event("jqplotMouseDown");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])};this.onMouseUp=function(ah){var ag=ac(ah);var af=H.Event("jqplotMouseUp");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,null,ah.data.plot])};this.onRightClick=function(ah){var ag=ac(ah);var aj=ah.data.plot;var ai=ae(ag.gridPos,aj);if(aj.captureRightClick){if(ah.which==3){var af=H.Event("jqplotRightClick");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])}else{var af=H.Event("jqplotMouseUp");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])}}};this.onMouseMove=function(ah){var ag=ac(ah);var aj=ah.data.plot;var ai=ae(ag.gridPos,aj);var af=H.Event("jqplotMouseMove");af.pageX=ah.pageX;af.pageY=ah.pageY;H(this).trigger(af,[ag.gridPos,ag.dataPos,ai,aj])};this.onMouseEnter=function(ah){var ag=ac(ah);var ai=ah.data.plot;var af=H.Event("jqplotMouseEnter");af.pageX=ah.pageX;af.pageY=ah.pageY;af.relatedTarget=ah.relatedTarget;H(this).trigger(af,[ag.gridPos,ag.dataPos,null,ai])};this.onMouseLeave=function(ah){var ag=ac(ah);var ai=ah.data.plot;var af=H.Event("jqplotMouseLeave");af.pageX=ah.pageX;af.pageY=ah.pageY;af.relatedTarget=ah.relatedTarget;H(this).trigger(af,[ag.gridPos,ag.dataPos,null,ai])};this.drawSeries=function(ah,af){var aj,ai,ag;af=(typeof(ah)==="number"&&af==null)?ah:af;ah=(typeof(ah)==="object")?ah:{};if(af!=r){ai=this.series[af];ag=ai.shadowCanvas._ctx;ag.clearRect(0,0,ag.canvas.width,ag.canvas.height);ai.drawShadow(ag,ah,this);ag=ai.canvas._ctx;ag.clearRect(0,0,ag.canvas.width,ag.canvas.height);ai.draw(ag,ah,this);if(ai.renderer.constructor==H.jqplot.BezierCurveRenderer){if(af<this.series.length-1){this.drawSeries(af+1)}}}else{for(aj=0;aj<this.series.length;aj++){ai=this.series[aj];ag=ai.shadowCanvas._ctx;ag.clearRect(0,0,ag.canvas.width,ag.canvas.height);ai.drawShadow(ag,ah,this);ag=ai.canvas._ctx;ag.clearRect(0,0,ag.canvas.width,ag.canvas.height);ai.draw(ag,ah,this)}}ah=af=aj=ai=ag=null};this.moveSeriesToFront=function(ag){ag=parseInt(ag,10);var aj=H.inArray(ag,this.seriesStack);if(aj==-1){return}if(aj==this.seriesStack.length-1){this.previousSeriesStack=this.seriesStack.slice(0);return}var af=this.seriesStack[this.seriesStack.length-1];var ai=this.series[ag].canvas._elem.detach();var ah=this.series[ag].shadowCanvas._elem.detach();this.series[af].shadowCanvas._elem.after(ah);this.series[af].canvas._elem.after(ai);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(aj,1);this.seriesStack.push(ag)};this.moveSeriesToBack=function(ag){ag=parseInt(ag,10);var aj=H.inArray(ag,this.seriesStack);if(aj==0||aj==-1){return}var af=this.seriesStack[0];var ai=this.series[ag].canvas._elem.detach();var ah=this.series[ag].shadowCanvas._elem.detach();this.series[af].shadowCanvas._elem.before(ah);this.series[af].canvas._elem.before(ai);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(aj,1);this.seriesStack.unshift(ag)};this.restorePreviousSeriesOrder=function(){var al,ak,aj,ai,ah,af,ag;if(this.seriesStack==this.previousSeriesStack){return}for(al=1;al<this.previousSeriesStack.length;al++){af=this.previousSeriesStack[al];ag=this.previousSeriesStack[al-1];aj=this.series[af].canvas._elem.detach();ai=this.series[af].shadowCanvas._elem.detach();this.series[ag].shadowCanvas._elem.after(ai);this.series[ag].canvas._elem.after(aj)}ah=this.seriesStack.slice(0);this.seriesStack=this.previousSeriesStack.slice(0);this.previousSeriesStack=ah};this.restoreOriginalSeriesOrder=function(){var aj,ai,af=[],ah,ag;for(aj=0;aj<this.series.length;aj++){af.push(aj)}if(this.seriesStack==af){return}this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack=af;for(aj=1;aj<this.seriesStack.length;aj++){ah=this.series[aj].canvas._elem.detach();ag=this.series[aj].shadowCanvas._elem.detach();this.series[aj-1].shadowCanvas._elem.after(ag);this.series[aj-1].canvas._elem.after(ah)}};this.activateTheme=function(af){this.themeEngine.activate(this,af)}}H.jqplot.computeHighlightColors=function(ac){var ae;if(H.isArray(ac)){ae=[];for(var ag=0;ag<ac.length;ag++){var af=H.jqplot.getColorComponents(ac[ag]);var ab=[af[0],af[1],af[2]];var ah=ab[0]+ab[1]+ab[2];for(var ad=0;ad<3;ad++){ab[ad]=(ah>660)?ab[ad]*0.85:0.73*ab[ad]+90;ab[ad]=parseInt(ab[ad],10);(ab[ad]>255)?255:ab[ad]}ab[3]=0.3+0.35*af[3];ae.push("rgba("+ab[0]+","+ab[1]+","+ab[2]+","+ab[3]+")")}}else{var af=H.jqplot.getColorComponents(ac);var ab=[af[0],af[1],af[2]];var ah=ab[0]+ab[1]+ab[2];for(var ad=0;ad<3;ad++){ab[ad]=(ah>660)?ab[ad]*0.85:0.73*ab[ad]+90;ab[ad]=parseInt(ab[ad],10);(ab[ad]>255)?255:ab[ad]}ab[3]=0.3+0.35*af[3];ae="rgba("+ab[0]+","+ab[1]+","+ab[2]+","+ab[3]+")"}return ae};H.jqplot.ColorGenerator=function(ac){ac=ac||H.jqplot.config.defaultColors;var ab=0;this.next=function(){if(ab<ac.length){return ac[ab++]}else{ab=0;return ac[ab++]}};this.previous=function(){if(ab>0){return ac[ab--]}else{ab=ac.length-1;return ac[ab]}};this.get=function(ae){var ad=ae-ac.length*Math.floor(ae/ac.length);return ac[ad]};this.setColors=function(ad){ac=ad};this.reset=function(){ab=0};this.getIndex=function(){return ab};this.setIndex=function(ad){ab=ad}};H.jqplot.hex2rgb=function(ad,ab){ad=ad.replace("#","");if(ad.length==3){ad=ad.charAt(0)+ad.charAt(0)+ad.charAt(1)+ad.charAt(1)+ad.charAt(2)+ad.charAt(2)}var ac;ac="rgba("+parseInt(ad.slice(0,2),16)+", "+parseInt(ad.slice(2,4),16)+", "+parseInt(ad.slice(4,6),16);if(ab){ac+=", "+ab}ac+=")";return ac};H.jqplot.rgb2hex=function(ag){var ad=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var ab=ag.match(ad);var af="#";for(var ae=1;ae<4;ae++){var ac;if(ab[ae].search(/%/)!=-1){ac=parseInt(255*ab[ae]/100,10).toString(16);if(ac.length==1){ac="0"+ac}}else{ac=parseInt(ab[ae],10).toString(16);if(ac.length==1){ac="0"+ac}}af+=ac}return af};H.jqplot.normalize2rgb=function(ac,ab){if(ac.search(/^ *rgba?\(/)!=-1){return ac}else{if(ac.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return H.jqplot.hex2rgb(ac,ab)}else{throw"invalid color spec"}}};H.jqplot.getColorComponents=function(ag){ag=H.jqplot.colorKeywordMap[ag]||ag;var ae=H.jqplot.normalize2rgb(ag);var ad=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var ab=ae.match(ad);var ac=[];for(var af=1;af<4;af++){if(ab[af].search(/%/)!=-1){ac[af-1]=parseInt(255*ab[af]/100,10)}else{ac[af-1]=parseInt(ab[af],10)}}ac[3]=parseFloat(ab[4])?parseFloat(ab[4]):1;return ac};H.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};H.jqplot.AxisLabelRenderer=function(ab){H.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;H.extend(true,this,ab)};H.jqplot.AxisLabelRenderer.prototype=new H.jqplot.ElemContainer();H.jqplot.AxisLabelRenderer.prototype.constructor=H.jqplot.AxisLabelRenderer;H.jqplot.AxisLabelRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.AxisLabelRenderer.prototype.draw=function(ab,ac){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=H('<div style="position:absolute;" class="jqplot-'+this.axis+'-label"></div>');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};H.jqplot.AxisLabelRenderer.prototype.pack=function(){};H.jqplot.AxisTickRenderer=function(ab){H.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=H.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;H.extend(true,this,ab)};H.jqplot.AxisTickRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.AxisTickRenderer.prototype=new H.jqplot.ElemContainer();H.jqplot.AxisTickRenderer.prototype.constructor=H.jqplot.AxisTickRenderer;H.jqplot.AxisTickRenderer.prototype.setTick=function(ab,ad,ac){this.value=ab;this.axis=ad;if(ac){this.isMinorTick=true}return this};H.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var ac={position:"absolute"};if(Number(this.label)){ac.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=H(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(ac);for(var ab in this._styles){this._elem.css(ab,this._styles[ab])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};H.jqplot.DefaultTickFormatter=function(ab,ac){if(typeof ac=="number"){if(!ab){ab=H.jqplot.config.defaultTickFormatString}return H.jqplot.sprintf(ab,ac)}else{return String(ac)}};H.jqplot.PercentTickFormatter=function(ab,ac){if(typeof ac=="number"){ac=100*ac;if(!ab){ab=H.jqplot.config.defaultTickFormatString}return H.jqplot.sprintf(ab,ac)}else{return String(ac)}};H.jqplot.AxisTickRenderer.prototype.pack=function(){};H.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new H.jqplot.ShadowRenderer()};H.jqplot.CanvasGridRenderer.prototype.init=function(ac){this._ctx;H.extend(true,this,ac);var ab={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(ab)};H.jqplot.CanvasGridRenderer.prototype.createElement=function(ae){var ad;if(this._elem){if(H.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==r){ad=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(ad);ad=null}this._elem.emptyForce();this._elem=null}ad=ae.canvasManager.getCanvas();var ab=this._plotDimensions.width;var ac=this._plotDimensions.height;ad.width=ab;ad.height=ac;this._elem=H(ad);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});ad=ae.canvasManager.initCanvas(ad);this._top=this._offsets.top;this._bottom=ac-this._offsets.bottom;this._left=this._offsets.left;this._right=ab-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;ad=null;return this._elem};H.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var am=this._ctx;var ap=this._axes;am.save();am.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);am.fillStyle=this.backgroundColor||this.background;am.fillRect(this._left,this._top,this._width,this._height);am.save();am.lineJoin="miter";am.lineCap="butt";am.lineWidth=this.gridLineWidth;am.strokeStyle=this.gridLineColor;var at,ar,aj,ak;var ag=["xaxis","yaxis","x2axis","y2axis"];for(var aq=4;aq>0;aq--){var aw=ag[aq-1];var ab=ap[aw];var au=ab._ticks;var al=au.length;if(ab.show){if(ab.drawBaseline){var av={};if(ab.baselineWidth!==null){av.lineWidth=ab.baselineWidth}if(ab.baselineColor!==null){av.strokeStyle=ab.baselineColor}switch(aw){case"xaxis":ai(this._left,this._bottom,this._right,this._bottom,av);break;case"yaxis":ai(this._left,this._bottom,this._left,this._top,av);break;case"x2axis":ai(this._left,this._bottom,this._right,this._bottom,av);break;case"y2axis":ai(this._right,this._bottom,this._right,this._top,av);break}}for(var an=al;an>0;an--){var ah=au[an-1];if(ah.show){var ae=Math.round(ab.u2p(ah.value))+0.5;switch(aw){case"xaxis":if(ah.showGridline&&this.drawGridlines&&((!ah.isMinorTick&&ab.drawMajorGridlines)||(ah.isMinorTick&&ab.drawMinorGridlines))){ai(ae,this._top,ae,this._bottom)}if(ah.showMark&&ah.mark&&((!ah.isMinorTick&&ab.drawMajorTickMarks)||(ah.isMinorTick&&ab.drawMinorTickMarks))){aj=ah.markSize;ak=ah.mark;var ae=Math.round(ab.u2p(ah.value))+0.5;switch(ak){case"outside":at=this._bottom;ar=this._bottom+aj;break;case"inside":at=this._bottom-aj;ar=this._bottom;break;case"cross":at=this._bottom-aj;ar=this._bottom+aj;break;default:at=this._bottom;ar=this._bottom+aj;break}if(this.shadow){this.renderer.shadowRenderer.draw(am,[[ae,at],[ae,ar]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ai(ae,at,ae,ar)}break;case"yaxis":if(ah.showGridline&&this.drawGridlines&&((!ah.isMinorTick&&ab.drawMajorGridlines)||(ah.isMinorTick&&ab.drawMinorGridlines))){ai(this._right,ae,this._left,ae)}if(ah.showMark&&ah.mark&&((!ah.isMinorTick&&ab.drawMajorTickMarks)||(ah.isMinorTick&&ab.drawMinorTickMarks))){aj=ah.markSize;ak=ah.mark;var ae=Math.round(ab.u2p(ah.value))+0.5;switch(ak){case"outside":at=this._left-aj;ar=this._left;break;case"inside":at=this._left;ar=this._left+aj;break;case"cross":at=this._left-aj;ar=this._left+aj;break;default:at=this._left-aj;ar=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(am,[[at,ae],[ar,ae]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ai(at,ae,ar,ae,{strokeStyle:ab.borderColor})}break;case"x2axis":if(ah.showGridline&&this.drawGridlines&&((!ah.isMinorTick&&ab.drawMajorGridlines)||(ah.isMinorTick&&ab.drawMinorGridlines))){ai(ae,this._bottom,ae,this._top)}if(ah.showMark&&ah.mark&&((!ah.isMinorTick&&ab.drawMajorTickMarks)||(ah.isMinorTick&&ab.drawMinorTickMarks))){aj=ah.markSize;ak=ah.mark;var ae=Math.round(ab.u2p(ah.value))+0.5;switch(ak){case"outside":at=this._top-aj;ar=this._top;break;case"inside":at=this._top;ar=this._top+aj;break;case"cross":at=this._top-aj;ar=this._top+aj;break;default:at=this._top-aj;ar=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(am,[[ae,at],[ae,ar]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ai(ae,at,ae,ar)}break;case"y2axis":if(ah.showGridline&&this.drawGridlines&&((!ah.isMinorTick&&ab.drawMajorGridlines)||(ah.isMinorTick&&ab.drawMinorGridlines))){ai(this._left,ae,this._right,ae)}if(ah.showMark&&ah.mark&&((!ah.isMinorTick&&ab.drawMajorTickMarks)||(ah.isMinorTick&&ab.drawMinorTickMarks))){aj=ah.markSize;ak=ah.mark;var ae=Math.round(ab.u2p(ah.value))+0.5;switch(ak){case"outside":at=this._right;ar=this._right+aj;break;case"inside":at=this._right-aj;ar=this._right;break;case"cross":at=this._right-aj;ar=this._right+aj;break;default:at=this._right;ar=this._right+aj;break}if(this.shadow){this.renderer.shadowRenderer.draw(am,[[at,ae],[ar,ae]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ai(at,ae,ar,ae,{strokeStyle:ab.borderColor})}break;default:break}}}ah=null}ab=null;au=null}ag=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var aq=7;aq>0;aq--){var ab=ap[ag[aq-1]];var au=ab._ticks;if(ab.show){var ac=au[ab.numberTicks-1];var af=au[0];var ad=ab.getLeft();var ao=[[ad,ac.getTop()+ac.getHeight()/2],[ad,af.getTop()+af.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(am,ao,{lineCap:"butt",fill:false,closePath:false})}ai(ao[0][0],ao[0][1],ao[1][0],ao[1][1],{lineCap:"butt",strokeStyle:ab.borderColor,lineWidth:ab.borderWidth});for(var an=au.length;an>0;an--){var ah=au[an-1];aj=ah.markSize;ak=ah.mark;var ae=Math.round(ab.u2p(ah.value))+0.5;if(ah.showMark&&ah.mark){switch(ak){case"outside":at=ad;ar=ad+aj;break;case"inside":at=ad-aj;ar=ad;break;case"cross":at=ad-aj;ar=ad+aj;break;default:at=ad;ar=ad+aj;break}ao=[[at,ae],[ar,ae]];if(this.shadow){this.renderer.shadowRenderer.draw(am,ao,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ai(at,ae,ar,ae,{strokeStyle:ab.borderColor})}ah=null}af=null}ab=null;au=null}am.restore();function ai(aB,aA,ay,ax,az){am.save();az=az||{};if(az.lineWidth==null||az.lineWidth!=0){H.extend(true,am,az);am.beginPath();am.moveTo(aB,aA);am.lineTo(ay,ax);am.stroke();am.restore()}}if(this.shadow){var ao=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(am,ao)}if(this.borderWidth!=0&&this.drawBorder){ai(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:ap.x2axis.borderColor,lineWidth:ap.x2axis.borderWidth});ai(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:ap.y2axis.borderColor,lineWidth:ap.y2axis.borderWidth});ai(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:ap.xaxis.borderColor,lineWidth:ap.xaxis.borderWidth});ai(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:ap.yaxis.borderColor,lineWidth:ap.yaxis.borderWidth})}am.restore();am=null;ap=null};H.jqplot.DivTitleRenderer=function(){};H.jqplot.DivTitleRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ae=this.renderer;var ad=document.createElement("div");this._elem=H(ad);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var ab;if(this.color){ab=this.color}else{if(this.textColor){ab=this.textColor}}var ac={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ac.width=this._plotWidth+"px"}if(this.fontSize){ac.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ac.textAlign=this.textAlign}else{ac.textAlign="center"}if(ab){ac.color=ab}if(this.paddingBottom){ac.paddingBottom=this.paddingBottom}if(this.fontFamily){ac.fontFamily=this.fontFamily}this._elem.css(ac);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}ad=null;return this._elem};H.jqplot.DivTitleRenderer.prototype.pack=function(){};var o=0.1;H.jqplot.LinePattern=function(ap,ak){var aj={dotted:[o,H.jqplot.config.dotGapLength],dashed:[H.jqplot.config.dashLength,H.jqplot.config.gapLength],solid:null};if(typeof ak==="string"){if(ak[0]==="."||ak[0]==="-"){var aq=ak;ak=[];for(var ai=0,af=aq.length;ai<af;ai++){if(aq[ai]==="."){ak.push(o)}else{if(aq[ai]==="-"){ak.push(H.jqplot.config.dashLength)}else{continue}}ak.push(H.jqplot.config.gapLength)}}else{ak=aj[ak]}}if(!(ak&&ak.length)){return ap}var ae=0;var al=ak[0];var an=0;var am=0;var ah=0;var ab=0;var ao=function(ar,at){ap.moveTo(ar,at);an=ar;am=at;ah=ar;ab=at};var ad=function(ar,ay){var aw=ap.lineWidth;var au=ar-an;var at=ay-am;var av=Math.sqrt(au*au+at*at);if((av>0)&&(aw>0)){au/=av;at/=av;while(true){var ax=aw*al;if(ax<av){an+=ax*au;am+=ax*at;if((ae&1)==0){ap.lineTo(an,am)}else{ap.moveTo(an,am)}av-=ax;ae++;if(ae>=ak.length){ae=0}al=ak[ae]}else{an=ar;am=ay;if((ae&1)==0){ap.lineTo(an,am)}else{ap.moveTo(an,am)}al-=av/aw;break}}}};var ac=function(){ap.beginPath()};var ag=function(){ad(ah,ab)};return{moveTo:ao,lineTo:ad,beginPath:ac,closePath:ag}};H.jqplot.LineRenderer=function(){this.shapeRenderer=new H.jqplot.ShapeRenderer();this.shadowRenderer=new H.jqplot.ShadowRenderer()};H.jqplot.LineRenderer.prototype.init=function(ac,ah){ac=ac||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var af={highlightMouseOver:ac.highlightMouseOver,highlightMouseDown:ac.highlightMouseDown,highlightColor:ac.highlightColor};delete (ac.highlightMouseOver);delete (ac.highlightMouseDown);delete (ac.highlightColor);H.extend(true,this.renderer,ac);this.renderer.options=ac;if(this.renderer.bandData.length>1&&(!ac.bands||ac.bands.show==null)){this.renderer.bands.show=true}else{if(ac.bands&&ac.bands.show==null&&ac.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,ah)}if(this._stack){this.renderer.smooth=false}var ag={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(ag);var ad=ac.shadowOffset;if(ad==null){if(this.lineWidth>2.5){ad=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{ad=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var ab={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:ad,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(ab);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(af.highlightMouseDown&&af.highlightMouseOver==null){af.highlightMouseOver=false}H.extend(true,this,{highlightMouseOver:af.highlightMouseOver,highlightMouseDown:af.highlightMouseDown,highlightColor:af.highlightColor});if(!this.highlightColor){var ae=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=H.jqplot.computeHighlightColors(ae)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&ah){ah.plugins.lineRenderer={};ah.postInitHooks.addOnce(v);ah.postDrawHooks.addOnce(Z);ah.eventListenerHooks.addOnce("jqplotMouseMove",g);ah.eventListenerHooks.addOnce("jqplotMouseDown",d);ah.eventListenerHooks.addOnce("jqplotMouseUp",Y);ah.eventListenerHooks.addOnce("jqplotClick",f);ah.eventListenerHooks.addOnce("jqplotRightClick",p)}};H.jqplot.LineRenderer.prototype.initBands=function(ae,ao){var af=ae.bandData||[];var ah=this.renderer.bands;ah.hiData=[];ah.lowData=[];var av=this.data;ah._max=null;ah._min=null;if(af.length==2){if(H.isArray(af[0][0])){var ai;var ab=0,al=0;for(var ap=0,am=af[0].length;ap<am;ap++){ai=af[0][ap];if((ai[1]!=null&&ai[1]>ah._max)||ah._max==null){ah._max=ai[1]}if((ai[1]!=null&&ai[1]<ah._min)||ah._min==null){ah._min=ai[1]}}for(var ap=0,am=af[1].length;ap<am;ap++){ai=af[1][ap];if((ai[1]!=null&&ai[1]>ah._max)||ah._max==null){ah._max=ai[1];al=1}if((ai[1]!=null&&ai[1]<ah._min)||ah._min==null){ah._min=ai[1];ab=1}}if(al===ab){ah.show=false}ah.hiData=af[al];ah.lowData=af[ab]}else{if(af[0].length===av.length&&af[1].length===av.length){var ad=(af[0][0]>af[1][0])?0:1;var aw=(ad)?0:1;for(var ap=0,am=av.length;ap<am;ap++){ah.hiData.push([av[ap][0],af[ad][ap]]);ah.lowData.push([av[ap][0],af[aw][ap]])}}else{ah.show=false}}}else{if(af.length>2&&!H.isArray(af[0][0])){var ad=(af[0][0]>af[0][1])?0:1;var aw=(ad)?0:1;for(var ap=0,am=af.length;ap<am;ap++){ah.hiData.push([av[ap][0],af[ap][ad]]);ah.lowData.push([av[ap][0],af[ap][aw]])}}else{var ak=ah.interval;var au=null;var at=null;var ac=null;var an=null;if(H.isArray(ak)){au=ak[0];at=ak[1]}else{au=ak}if(isNaN(au)){if(au.charAt(au.length-1)==="%"){ac="multiply";au=parseFloat(au)/100+1}}else{au=parseFloat(au);ac="add"}if(at!==null&&isNaN(at)){if(at.charAt(at.length-1)==="%"){an="multiply";at=parseFloat(at)/100+1}}else{if(at!==null){at=parseFloat(at);an="add"}}if(au!==null){if(at===null){at=-au;an=ac;if(an==="multiply"){at+=2}}if(au<at){var aq=au;au=at;at=aq;aq=ac;ac=an;an=aq}for(var ap=0,am=av.length;ap<am;ap++){switch(ac){case"add":ah.hiData.push([av[ap][0],av[ap][1]+au]);break;case"multiply":ah.hiData.push([av[ap][0],av[ap][1]*au]);break}switch(an){case"add":ah.lowData.push([av[ap][0],av[ap][1]+at]);break;case"multiply":ah.lowData.push([av[ap][0],av[ap][1]*at]);break}}}else{ah.show=false}}}var ag=ah.hiData;var aj=ah.lowData;for(var ap=0,am=ag.length;ap<am;ap++){if((ag[ap][1]!=null&&ag[ap][1]>ah._max)||ah._max==null){ah._max=ag[ap][1]}}for(var ap=0,am=aj.length;ap<am;ap++){if((aj[ap][1]!=null&&aj[ap][1]<ah._min)||ah._min==null){ah._min=aj[ap][1]}}if(ah.fillColor===null){var ar=H.jqplot.getColorComponents(ah.color);ar[3]=ar[3]*0.5;ah.fillColor="rgba("+ar[0]+", "+ar[1]+", "+ar[2]+", "+ar[3]+")"}};function G(ac,ab){return(3.4182054+ab)*Math.pow(ac,-0.3534992)}function k(ad,ac){var ab=Math.sqrt(Math.pow((ac[0]-ad[0]),2)+Math.pow((ac[1]-ad[1]),2));return 5.7648*Math.log(ab)+7.4456}function w(ab){var ac=(Math.exp(2*ab)-1)/(Math.exp(2*ab)+1);return ac}function F(aD){var am=this.renderer.smooth;var ax=this.canvas.getWidth();var ah=this._xaxis.series_p2u;var aA=this._yaxis.series_p2u;var az=null;var ag=null;var at=aD.length/ax;var ad=[];var ar=[];if(!isNaN(parseFloat(am))){az=parseFloat(am)}else{az=G(at,0.5)}var ap=[];var ae=[];for(var ay=0,au=aD.length;ay<au;ay++){ap.push(aD[ay][1]);ae.push(aD[ay][0])}function ao(aE,aF){if(aE-aF==0){return Math.pow(10,10)}else{return aE-aF}}var aq,al,ak,aj;var ab=aD.length-1;for(var af=1,av=aD.length;af<av;af++){var ac=[];var an=[];for(var aw=0;aw<2;aw++){var ay=af-1+aw;if(ay==0||ay==ab){ac[aw]=Math.pow(10,10)}else{if(ap[ay+1]-ap[ay]==0||ap[ay]-ap[ay-1]==0){ac[aw]=0}else{if(((ae[ay+1]-ae[ay])/(ap[ay+1]-ap[ay])+(ae[ay]-ae[ay-1])/(ap[ay]-ap[ay-1]))==0){ac[aw]=0}else{if((ap[ay+1]-ap[ay])*(ap[ay]-ap[ay-1])<0){ac[aw]=0}else{ac[aw]=2/(ao(ae[ay+1],ae[ay])/(ap[ay+1]-ap[ay])+ao(ae[ay],ae[ay-1])/(ap[ay]-ap[ay-1]))}}}}}if(af==1){ac[0]=3/2*(ap[1]-ap[0])/ao(ae[1],ae[0])-ac[1]/2}else{if(af==ab){ac[1]=3/2*(ap[ab]-ap[ab-1])/ao(ae[ab],ae[ab-1])-ac[0]/2}}an[0]=-2*(ac[1]+2*ac[0])/ao(ae[af],ae[af-1])+6*(ap[af]-ap[af-1])/Math.pow(ao(ae[af],ae[af-1]),2);an[1]=2*(2*ac[1]+ac[0])/ao(ae[af],ae[af-1])-6*(ap[af]-ap[af-1])/Math.pow(ao(ae[af],ae[af-1]),2);aj=1/6*(an[1]-an[0])/ao(ae[af],ae[af-1]);ak=1/2*(ae[af]*an[0]-ae[af-1]*an[1])/ao(ae[af],ae[af-1]);al=(ap[af]-ap[af-1]-ak*(Math.pow(ae[af],2)-Math.pow(ae[af-1],2))-aj*(Math.pow(ae[af],3)-Math.pow(ae[af-1],3)))/ao(ae[af],ae[af-1]);aq=ap[af-1]-al*ae[af-1]-ak*Math.pow(ae[af-1],2)-aj*Math.pow(ae[af-1],3);var aC=(ae[af]-ae[af-1])/az;var aB,ai;for(var aw=0,au=az;aw<au;aw++){aB=[];ai=ae[af-1]+aw*aC;aB.push(ai);aB.push(aq+al*ai+ak*Math.pow(ai,2)+aj*Math.pow(ai,3));ad.push(aB);ar.push([ah(aB[0]),aA(aB[1])])}}ad.push(aD[ay]);ar.push([ah(aD[ay][0]),aA(aD[ay][1])]);return[ad,ar]}function B(aj){var ai=this.renderer.smooth;var aO=this.renderer.tension;var ab=this.canvas.getWidth();var aB=this._xaxis.series_p2u;var ak=this._yaxis.series_p2u;var aC=null;var aD=null;var aN=null;var aI=null;var aG=null;var am=null;var aL=null;var ag=null;var aE,aF,ax,aw,au,ar;var ae,ac,ao,an;var av,at,aH;var ap=[];var ad=[];var af=aj.length/ab;var aM,aq,az,aA,ay;var al=[];var ah=[];if(!isNaN(parseFloat(ai))){aC=parseFloat(ai)}else{aC=G(af,0.5)}if(!isNaN(parseFloat(aO))){aO=parseFloat(aO)}for(var aK=0,aJ=aj.length-1;aK<aJ;aK++){if(aO===null){am=Math.abs((aj[aK+1][1]-aj[aK][1])/(aj[aK+1][0]-aj[aK][0]));aM=0.3;aq=0.6;az=(aq-aM)/2;aA=2.5;ay=-1.4;ag=am/aA+ay;aI=az*w(ag)-az*w(ay)+aM;if(aK>0){aL=Math.abs((aj[aK][1]-aj[aK-1][1])/(aj[aK][0]-aj[aK-1][0]))}ag=aL/aA+ay;aG=az*w(ag)-az*w(ay)+aM;aN=(aI+aG)/2}else{aN=aO}for(aE=0;aE<aC;aE++){aF=aE/aC;ax=(1+2*aF)*Math.pow((1-aF),2);aw=aF*Math.pow((1-aF),2);au=Math.pow(aF,2)*(3-2*aF);ar=Math.pow(aF,2)*(aF-1);if(aj[aK-1]){ae=aN*(aj[aK+1][0]-aj[aK-1][0]);ac=aN*(aj[aK+1][1]-aj[aK-1][1])}else{ae=aN*(aj[aK+1][0]-aj[aK][0]);ac=aN*(aj[aK+1][1]-aj[aK][1])}if(aj[aK+2]){ao=aN*(aj[aK+2][0]-aj[aK][0]);an=aN*(aj[aK+2][1]-aj[aK][1])}else{ao=aN*(aj[aK+1][0]-aj[aK][0]);an=aN*(aj[aK+1][1]-aj[aK][1])}av=ax*aj[aK][0]+au*aj[aK+1][0]+aw*ae+ar*ao;at=ax*aj[aK][1]+au*aj[aK+1][1]+aw*ac+ar*an;aH=[av,at];al.push(aH);ah.push([aB(av),ak(at)])}}al.push(aj[aJ]);ah.push([aB(aj[aJ][0]),ak(aj[aJ][1])]);return[al,ah]}H.jqplot.LineRenderer.prototype.setGridData=function(aj){var af=this._xaxis.series_u2p;var ab=this._yaxis.series_u2p;var ag=this._plotData;var ak=this._prevPlotData;this.gridData=[];this._prevGridData=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var ae=this.renderer.bands;var ac=false;for(var ah=0,ad=ag.length;ah<ad;ah++){if(ag[ah][0]!=null&&ag[ah][1]!=null){this.gridData.push([af.call(this._xaxis,ag[ah][0]),ab.call(this._yaxis,ag[ah][1])])}else{if(ag[ah][0]==null){ac=true;this.gridData.push([null,ab.call(this._yaxis,ag[ah][1])])}else{if(ag[ah][1]==null){ac=true;this.gridData.push([af.call(this._xaxis,ag[ah][0]),null])}}}if(ak[ah]!=null&&ak[ah][0]!=null&&ak[ah][1]!=null){this._prevGridData.push([af.call(this._xaxis,ak[ah][0]),ab.call(this._yaxis,ak[ah][1])])}else{if(ak[ah]!=null&&ak[ah][0]==null){this._prevGridData.push([null,ab.call(this._yaxis,ak[ah][1])])}else{if(ak[ah]!=null&&ak[ah][0]!=null&&ak[ah][1]==null){this._prevGridData.push([af.call(this._xaxis,ak[ah][0]),null])}}}}if(ac){this.renderer.smooth=false;if(this._type==="line"){ae.show=false}}if(this._type==="line"&&ae.show){for(var ah=0,ad=ae.hiData.length;ah<ad;ah++){this.renderer._hiBandGridData.push([af.call(this._xaxis,ae.hiData[ah][0]),ab.call(this._yaxis,ae.hiData[ah][1])])}for(var ah=0,ad=ae.lowData.length;ah<ad;ah++){this.renderer._lowBandGridData.push([af.call(this._xaxis,ae.lowData[ah][0]),ab.call(this._yaxis,ae.lowData[ah][1])])}}if(this._type==="line"&&this.renderer.smooth&&this.gridData.length>2){var ai;if(this.renderer.constrainSmoothing){ai=F.call(this,this.gridData);this.renderer._smoothedData=ai[0];this.renderer._smoothedPlotData=ai[1];if(ae.show){ai=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ai[0];ai=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ai[0]}ai=null}else{ai=B.call(this,this.gridData);this.renderer._smoothedData=ai[0];this.renderer._smoothedPlotData=ai[1];if(ae.show){ai=B.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ai[0];ai=B.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ai[0]}ai=null}}};H.jqplot.LineRenderer.prototype.makeGridData=function(ai,ak){var ag=this._xaxis.series_u2p;var ab=this._yaxis.series_u2p;var al=[];var ad=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var af=this.renderer.bands;var ac=false;for(var ah=0;ah<ai.length;ah++){if(ai[ah][0]!=null&&ai[ah][1]!=null){al.push([ag.call(this._xaxis,ai[ah][0]),ab.call(this._yaxis,ai[ah][1])])}else{if(ai[ah][0]==null){ac=true;al.push([null,ab.call(this._yaxis,ai[ah][1])])}else{if(ai[ah][1]==null){ac=true;al.push([ag.call(this._xaxis,ai[ah][0]),null])}}}}if(ac){this.renderer.smooth=false;if(this._type==="line"){af.show=false}}if(this._type==="line"&&af.show){for(var ah=0,ae=af.hiData.length;ah<ae;ah++){this.renderer._hiBandGridData.push([ag.call(this._xaxis,af.hiData[ah][0]),ab.call(this._yaxis,af.hiData[ah][1])])}for(var ah=0,ae=af.lowData.length;ah<ae;ah++){this.renderer._lowBandGridData.push([ag.call(this._xaxis,af.lowData[ah][0]),ab.call(this._yaxis,af.lowData[ah][1])])}}if(this._type==="line"&&this.renderer.smooth&&al.length>2){var aj;if(this.renderer.constrainSmoothing){aj=F.call(this,al);this.renderer._smoothedData=aj[0];this.renderer._smoothedPlotData=aj[1];if(af.show){aj=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=aj[0];aj=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=aj[0]}aj=null}else{aj=B.call(this,al);this.renderer._smoothedData=aj[0];this.renderer._smoothedPlotData=aj[1];if(af.show){aj=B.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=aj[0];aj=B.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=aj[0]}aj=null}}return al};H.jqplot.LineRenderer.prototype.draw=function(aq,aC,ac,av){var aw;var ak=H.extend(true,{},ac);var ae=(ak.shadow!=r)?ak.shadow:this.shadow;var aD=(ak.showLine!=r)?ak.showLine:this.showLine;var au=(ak.fill!=r)?ak.fill:this.fill;var ab=(ak.fillAndStroke!=r)?ak.fillAndStroke:this.fillAndStroke;var al,ar,ao,ay;aq.save();if(aC.length){if(aD){if(au){if(this.fillToZero){var az=this.negativeColor;if(!this.useNegativeColors){az=ak.fillStyle}var ai=false;var aj=ak.fillStyle;if(ab){var aB=aC.slice(0)}if(this.index==0||!this._stack){var ap=[];var aF=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var aA=this._yaxis.series_u2p(this.fillToValue);var ad=this._xaxis.series_u2p(this.fillToValue);ak.closePath=true;if(this.fillAxis=="y"){ap.push([aC[0][0],aA]);this._areaPoints.push([aC[0][0],aA]);for(var aw=0;aw<aC.length-1;aw++){ap.push(aC[aw]);this._areaPoints.push(aC[aw]);if(aF[aw][1]*aF[aw+1][1]<0){if(aF[aw][1]<0){ai=true;ak.fillStyle=az}else{ai=false;ak.fillStyle=aj}var ah=aC[aw][0]+(aC[aw+1][0]-aC[aw][0])*(aA-aC[aw][1])/(aC[aw+1][1]-aC[aw][1]);ap.push([ah,aA]);this._areaPoints.push([ah,aA]);if(ae){this.renderer.shadowRenderer.draw(aq,ap,ak)}this.renderer.shapeRenderer.draw(aq,ap,ak);ap=[[ah,aA]]}}if(aF[aC.length-1][1]<0){ai=true;ak.fillStyle=az}else{ai=false;ak.fillStyle=aj}ap.push(aC[aC.length-1]);this._areaPoints.push(aC[aC.length-1]);ap.push([aC[aC.length-1][0],aA]);this._areaPoints.push([aC[aC.length-1][0],aA])}if(ae){this.renderer.shadowRenderer.draw(aq,ap,ak)}this.renderer.shapeRenderer.draw(aq,ap,ak)}else{var an=this._prevGridData;for(var aw=an.length;aw>0;aw--){aC.push(an[aw-1])}if(ae){this.renderer.shadowRenderer.draw(aq,aC,ak)}this._areaPoints=aC;this.renderer.shapeRenderer.draw(aq,aC,ak)}}else{if(ab){var aB=aC.slice(0)}if(this.index==0||!this._stack){var af=aq.canvas.height;aC.unshift([aC[0][0],af]);var ax=aC.length;aC.push([aC[ax-1][0],af])}else{var an=this._prevGridData;for(var aw=an.length;aw>0;aw--){aC.push(an[aw-1])}}this._areaPoints=aC;if(ae){this.renderer.shadowRenderer.draw(aq,aC,ak)}this.renderer.shapeRenderer.draw(aq,aC,ak)}if(ab){var at=H.extend(true,{},ak,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(aq,aB,at);if(this.markerRenderer.show){if(this.renderer.smooth){aB=this.gridData}for(aw=0;aw<aB.length;aw++){this.markerRenderer.draw(aB[aw][0],aB[aw][1],aq,ak.markerOptions)}}}}else{if(this.renderer.bands.show){var ag;var aE=H.extend(true,{},ak);if(this.renderer.bands.showLines){ag=(this.renderer.smooth)?this.renderer._hiBandSmoothedData:this.renderer._hiBandGridData;this.renderer.shapeRenderer.draw(aq,ag,ak);ag=(this.renderer.smooth)?this.renderer._lowBandSmoothedData:this.renderer._lowBandGridData;this.renderer.shapeRenderer.draw(aq,ag,aE)}if(this.renderer.bands.fill){if(this.renderer.smooth){ag=this.renderer._hiBandSmoothedData.concat(this.renderer._lowBandSmoothedData.reverse())}else{ag=this.renderer._hiBandGridData.concat(this.renderer._lowBandGridData.reverse())}this._areaPoints=ag;aE.closePath=true;aE.fill=true;aE.fillStyle=this.renderer.bands.fillColor;this.renderer.shapeRenderer.draw(aq,ag,aE)}}if(ae){this.renderer.shadowRenderer.draw(aq,aC,ak)}this.renderer.shapeRenderer.draw(aq,aC,ak)}}var al=ao=ar=ay=null;for(aw=0;aw<this._areaPoints.length;aw++){var am=this._areaPoints[aw];if(al>am[0]||al==null){al=am[0]}if(ay<am[1]||ay==null){ay=am[1]}if(ao<am[0]||ao==null){ao=am[0]}if(ar>am[1]||ar==null){ar=am[1]}}if(this.type==="line"&&this.renderer.bands.show){ay=this._yaxis.series_u2p(this.renderer.bands._min);ar=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[al,ay],[ao,ar]];if(this.markerRenderer.show&&!au){if(this.renderer.smooth){aC=this.gridData}for(aw=0;aw<aC.length;aw++){if(aC[aw][0]!=null&&aC[aw][1]!=null){this.markerRenderer.draw(aC[aw][0],aC[aw][1],aq,ak.markerOptions)}}}}aq.restore()};H.jqplot.LineRenderer.prototype.drawShadow=function(ab,ad,ac){};function v(ae,ad,ab){for(var ac=0;ac<this.series.length;ac++){if(this.series[ac].renderer.constructor==H.jqplot.LineRenderer){if(this.series[ac].highlightMouseOver){this.series[ac].highlightMouseDown=false}}}}function Z(){if(this.plugins.lineRenderer&&this.plugins.lineRenderer.highlightCanvas){this.plugins.lineRenderer.highlightCanvas.resetCanvas();this.plugins.lineRenderer.highlightCanvas=null}this.plugins.lineRenderer.highlightedSeriesIndex=null;this.plugins.lineRenderer.highlightCanvas=new H.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.lineRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-lineRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.lineRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(ab){V(ab.data.plot)})}function X(ah,ag,ae,ad){var ac=ah.series[ag];var ab=ah.plugins.lineRenderer.highlightCanvas;ab._ctx.clearRect(0,0,ab._ctx.canvas.width,ab._ctx.canvas.height);ac._highlightedPoint=ae;ah.plugins.lineRenderer.highlightedSeriesIndex=ag;var af={fillStyle:ac.highlightColor};if(ac.type==="line"&&ac.renderer.bands.show){af.fill=true;af.closePath=true}ac.renderer.shapeRenderer.draw(ab._ctx,ad,af);ab=null}function V(ad){var ab=ad.plugins.lineRenderer.highlightCanvas;ab._ctx.clearRect(0,0,ab._ctx.canvas.width,ab._ctx.canvas.height);for(var ac=0;ac<ad.series.length;ac++){ad.series[ac]._highlightedPoint=null}ad.plugins.lineRenderer.highlightedSeriesIndex=null;ad.target.trigger("jqplotDataUnhighlight");ab=null}function g(af,ae,ai,ah,ag){if(ah){var ad=[ah.seriesIndex,ah.pointIndex,ah.data];var ac=jQuery.Event("jqplotDataMouseOver");ac.pageX=af.pageX;ac.pageY=af.pageY;ag.target.trigger(ac,ad);if(ag.series[ad[0]].highlightMouseOver&&!(ad[0]==ag.plugins.lineRenderer.highlightedSeriesIndex)){var ab=jQuery.Event("jqplotDataHighlight");ab.which=af.which;ab.pageX=af.pageX;ab.pageY=af.pageY;ag.target.trigger(ab,ad);X(ag,ah.seriesIndex,ah.pointIndex,ah.points)}}else{if(ah==null){V(ag)}}}function d(ae,ad,ah,ag,af){if(ag){var ac=[ag.seriesIndex,ag.pointIndex,ag.data];if(af.series[ac[0]].highlightMouseDown&&!(ac[0]==af.plugins.lineRenderer.highlightedSeriesIndex)){var ab=jQuery.Event("jqplotDataHighlight");ab.which=ae.which;ab.pageX=ae.pageX;ab.pageY=ae.pageY;af.target.trigger(ab,ac);X(af,ag.seriesIndex,ag.pointIndex,ag.points)}}else{if(ag==null){V(af)}}}function Y(ad,ac,ag,af,ae){var ab=ae.plugins.lineRenderer.highlightedSeriesIndex;if(ab!=null&&ae.series[ab].highlightMouseDown){V(ae)}}function f(ae,ad,ah,ag,af){if(ag){var ac=[ag.seriesIndex,ag.pointIndex,ag.data];var ab=jQuery.Event("jqplotDataClick");ab.which=ae.which;ab.pageX=ae.pageX;ab.pageY=ae.pageY;af.target.trigger(ab,ac)}}function p(af,ae,ai,ah,ag){if(ah){var ad=[ah.seriesIndex,ah.pointIndex,ah.data];var ab=ag.plugins.lineRenderer.highlightedSeriesIndex;if(ab!=null&&ag.series[ab].highlightMouseDown){V(ag)}var ac=jQuery.Event("jqplotDataRightClick");ac.which=af.which;ac.pageX=af.pageX;ac.pageY=af.pageY;ag.target.trigger(ac,ad)}}H.jqplot.LinearAxisRenderer=function(){};H.jqplot.LinearAxisRenderer.prototype.init=function(ab){this.breakPoints=null;this.breakTickLabel="≈";this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.forceTickAt0=false;this.forceTickAt100=false;this.tickInset=0;this.minorTicks=0;this.alignTicks=false;this._autoFormatString="";this._overrideFormatString=false;this._scalefact=1;H.extend(true,this,ab);if(this.breakPoints){if(!H.isArray(this.breakPoints)){this.breakPoints=null}else{if(this.breakPoints.length<2||this.breakPoints[1]<=this.breakPoints[0]){this.breakPoints=null}}}if(this.numberTicks!=null&&this.numberTicks<2){this.numberTicks=2}this.resetDataBounds()};H.jqplot.LinearAxisRenderer.prototype.draw=function(ab,ai){if(this.show){this.renderer.createTicks.call(this,ai);var ah=0;var ac;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=H(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var ag=this._label.draw(ab,ai);ag.appendTo(this._elem);ag=null}var af=this._ticks;var ae;for(var ad=0;ad<af.length;ad++){ae=af[ad];if(ae.show&&ae.showLabel&&(!ae.isMinorTick||this.showMinorTicks)){this._elem.append(ae.draw(ab,ai))}}ae=null;af=null}return this._elem};H.jqplot.LinearAxisRenderer.prototype.reset=function(){this.min=this._options.min;this.max=this._options.max;this.tickInterval=this._options.tickInterval;this.numberTicks=this._options.numberTicks;this._autoFormatString="";if(this._overrideFormatString&&this.tickOptions&&this.tickOptions.formatString){this.tickOptions.formatString=""}};H.jqplot.LinearAxisRenderer.prototype.set=function(){var ai=0;var ad;var ac=0;var ah=0;var ab=(this._label==null)?false:this._label.show;if(this.show){var ag=this._ticks;var af;for(var ae=0;ae<ag.length;ae++){af=ag[ae];if(!af._breakTick&&af.show&&af.showLabel&&(!af.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){ad=af._elem.outerHeight(true)}else{ad=af._elem.outerWidth(true)}if(ad>ai){ai=ad}}}af=null;ag=null;if(ab){ac=this._label._elem.outerWidth(true);ah=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ai=ai+ah;this._elem.css({height:ai+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ai=ai+ah;this._elem.css({height:ai+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ai=ai+ac;this._elem.css({width:ai+"px",left:"0px",top:"0px"});if(ab&&this._label.constructor==H.jqplot.AxisLabelRenderer){this._label._elem.css("width",ac+"px")}}else{ai=ai+ac;this._elem.css({width:ai+"px",right:"0px",top:"0px"});if(ab&&this._label.constructor==H.jqplot.AxisLabelRenderer){this._label._elem.css("width",ac+"px")}}}}}};H.jqplot.LinearAxisRenderer.prototype.createTicks=function(ad){var aN=this._ticks;var aE=this.ticks;var at=this.name;var av=this._dataBounds;var ab=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var ah;var a0,aC;var aj,ai;var aY,aU;var aB=this.min;var aZ=this.max;var aQ=this.numberTicks;var a4=this.tickInterval;var ag=30;this._scalefact=(Math.max(ab,ag+1)-ag)/300;if(aE.length){for(aU=0;aU<aE.length;aU++){var aI=aE[aU];var aO=new this.tickRenderer(this.tickOptions);if(H.isArray(aI)){aO.value=aI[0];if(this.breakPoints){if(aI[0]==this.breakPoints[0]){aO.label=this.breakTickLabel;aO._breakTick=true;aO.showGridline=false;aO.showMark=false}else{if(aI[0]>this.breakPoints[0]&&aI[0]<=this.breakPoints[1]){aO.show=false;aO.showGridline=false;aO.label=aI[1]}else{aO.label=aI[1]}}}else{aO.label=aI[1]}aO.setTick(aI[0],this.name);this._ticks.push(aO)}else{if(H.isPlainObject(aI)){H.extend(true,aO,aI);aO.axis=this.name;this._ticks.push(aO)}else{aO.value=aI;if(this.breakPoints){if(aI==this.breakPoints[0]){aO.label=this.breakTickLabel;aO._breakTick=true;aO.showGridline=false;aO.showMark=false}else{if(aI>this.breakPoints[0]&&aI<=this.breakPoints[1]){aO.show=false;aO.showGridline=false}}}aO.setTick(aI,this.name);this._ticks.push(aO)}}}this.numberTicks=aE.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(at=="xaxis"||at=="x2axis"){ab=this._plotDimensions.width}else{ab=this._plotDimensions.height}var aq=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&ad.axes.xaxis.show){aq=ad.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&ad.axes.yaxis.show){aq=ad.axes.yaxis.numberTicks}}}a0=((this.min!=null)?this.min:av.min);aC=((this.max!=null)?this.max:av.max);var ao=aC-a0;var aM,ar;var am;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(a0>0){a0=0}if(aC<0){aC=0}}if(this.forceTickAt100){if(a0>100){a0=100}if(aC<100){aC=100}}var ay=false,aV=false;if(this.min!=null){ay=true}else{if(this.max!=null){aV=true}}var aJ=H.jqplot.LinearTickGenerator(a0,aC,this._scalefact,aq,ay,aV);var ap=(this.min!=null)?a0:a0+ao*(this.padMin-1);var aK=(this.max!=null)?aC:aC-ao*(this.padMax-1);if(a0<ap||aC>aK){ap=(this.min!=null)?a0:a0-ao*(this.padMin-1);aK=(this.max!=null)?aC:aC+ao*(this.padMax-1);aJ=H.jqplot.LinearTickGenerator(ap,aK,this._scalefact,aq,ay,aV)}this.min=aJ[0];this.max=aJ[1];this.numberTicks=aJ[2];this._autoFormatString=aJ[3];this.tickInterval=aJ[4]}else{if(a0==aC){var ac=0.05;if(a0>0){ac=Math.max(Math.log(a0)/Math.LN10,0.05)}a0-=ac;aC+=ac}if(this.autoscale&&this.min==null&&this.max==null){var ae,af,al;var aw=false;var aH=false;var au={min:null,max:null,average:null,stddev:null};for(var aU=0;aU<this._series.length;aU++){var aP=this._series[aU];var ax=(aP.fillAxis=="x")?aP._xaxis.name:aP._yaxis.name;if(this.name==ax){var aL=aP._plotValues[aP.fillAxis];var aA=aL[0];var aW=aL[0];for(var aT=1;aT<aL.length;aT++){if(aL[aT]<aA){aA=aL[aT]}else{if(aL[aT]>aW){aW=aL[aT]}}}var an=(aW-aA)/aW;if(aP.renderer.constructor==H.jqplot.BarRenderer){if(aA>=0&&(aP.fillToZero||an>0.1)){aw=true}else{aw=false;if(aP.fill&&aP.fillToZero&&aA<0&&aW>0){aH=true}else{aH=false}}}else{if(aP.fill){if(aA>=0&&(aP.fillToZero||an>0.1)){aw=true}else{if(aA<0&&aW>0&&aP.fillToZero){aw=false;aH=true}else{aw=false;aH=false}}}else{if(aA<0){aw=false}}}}}if(aw){this.numberTicks=2+Math.ceil((ab-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aB=0;af=aC/(this.numberTicks-1);am=Math.pow(10,Math.abs(Math.floor(Math.log(af)/Math.LN10)));if(af/am==parseInt(af/am,10)){af+=am}this.tickInterval=Math.ceil(af/am)*am;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aH){this.numberTicks=2+Math.ceil((ab-(this.tickSpacing-1))/this.tickSpacing);var aD=Math.ceil(Math.abs(a0)/ao*(this.numberTicks-1));var a3=this.numberTicks-1-aD;af=Math.max(Math.abs(a0/aD),Math.abs(aC/a3));am=Math.pow(10,Math.abs(Math.floor(Math.log(af)/Math.LN10)));this.tickInterval=Math.ceil(af/am)*am;this.max=this.tickInterval*a3;this.min=-this.tickInterval*aD}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(ao/this.tickInterval)}else{this.numberTicks=2+Math.ceil((ab-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){af=ao/(this.numberTicks-1);if(af<1){am=Math.pow(10,Math.abs(Math.floor(Math.log(af)/Math.LN10)))}else{am=1}this.tickInterval=Math.ceil(af*am*this.pad)/am}else{am=1/this.tickInterval}ae=this.tickInterval*(this.numberTicks-1);al=(ae-ao)/2;if(this.min==null){this.min=Math.floor(am*(a0-al))/am}if(this.max==null){this.max=this.min+ae}}}var az=H.jqplot.getSignificantFigures(this.tickInterval);var aG;if(az.digitsLeft>=az.significantDigits){aG="%d"}else{var am=Math.max(0,5-az.digitsLeft);am=Math.min(am,az.digitsRight);aG="%."+am+"f"}this._autoFormatString=aG}else{aM=(this.min!=null)?this.min:a0-ao*(this.padMin-1);ar=(this.max!=null)?this.max:aC+ao*(this.padMax-1);ao=ar-aM;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((ar-aM)/this.tickInterval)+1}else{if(ab>100){this.numberTicks=parseInt(3+(ab-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=ao/(this.numberTicks-1)}if(this.max==null){ar=aM+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aM=ar-this.tickInterval*(this.numberTicks-1)}var az=H.jqplot.getSignificantFigures(this.tickInterval);var aG;if(az.digitsLeft>=az.significantDigits){aG="%d"}else{var am=Math.max(0,5-az.digitsLeft);am=Math.min(am,az.digitsRight);aG="%."+am+"f"}this._autoFormatString=aG;this.min=aM;this.max=ar}if(this.renderer.constructor==H.jqplot.LinearAxisRenderer&&this._autoFormatString==""){ao=this.max-this.min;var a1=new this.tickRenderer(this.tickOptions);var aF=a1.formatString||H.jqplot.config.defaultTickFormatString;var aF=aF.match(H.jqplot.sprintf.regex)[0];var aX=0;if(aF){if(aF.search(/[fFeEgGpP]/)>-1){var aS=aF.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aS){aX=parseInt(aS[1],10)}else{aX=6}}else{if(aF.search(/[di]/)>-1){aX=0}}var ak=Math.pow(10,-aX);if(this.tickInterval<ak){if(aQ==null&&a4==null){this.tickInterval=ak;if(aZ==null&&aB==null){this.min=Math.floor(this._dataBounds.min/ak)*ak;if(this.min==this._dataBounds.min){this.min=this._dataBounds.min-this.tickInterval}this.max=Math.ceil(this._dataBounds.max/ak)*ak;if(this.max==this._dataBounds.max){this.max=this._dataBounds.max+this.tickInterval}var aR=(this.max-this.min)/this.tickInterval;aR=aR.toFixed(11);aR=Math.ceil(aR);this.numberTicks=aR+1}else{if(aZ==null){var aR=(this._dataBounds.max-this.min)/this.tickInterval;aR=aR.toFixed(11);this.numberTicks=Math.ceil(aR)+2;this.max=this.min+this.tickInterval*(this.numberTicks-1)}else{if(aB==null){var aR=(this.max-this._dataBounds.min)/this.tickInterval;aR=aR.toFixed(11);this.numberTicks=Math.ceil(aR)+2;this.min=this.max-this.tickInterval*(this.numberTicks-1)}else{this.numberTicks=Math.ceil((aZ-aB)/this.tickInterval)+1;this.min=Math.floor(aB*Math.pow(10,aX))/Math.pow(10,aX);this.max=Math.ceil(aZ*Math.pow(10,aX))/Math.pow(10,aX);this.numberTicks=Math.ceil((this.max-this.min)/this.tickInterval)+1}}}}}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var aO,a2;for(var aU=0;aU<this.numberTicks;aU++){aY=this.min+aU*this.tickInterval;aO=new this.tickRenderer(this.tickOptions);aO.setTick(aY,this.name);this._ticks.push(aO);if(aU<this.numberTicks-1){for(var aT=0;aT<this.minorTicks;aT++){aY+=this.tickInterval/(this.minorTicks+1);a2=H.extend(true,{},this.tickOptions,{name:this.name,value:aY,label:"",isMinorTick:true});aO=new this.tickRenderer(a2);this._ticks.push(aO)}}aO=null}}if(this.tickInset){this.min=this.min-this.tickInset*this.tickInterval;this.max=this.max+this.tickInset*this.tickInterval}aN=null};H.jqplot.LinearAxisRenderer.prototype.resetTickValues=function(ad){if(H.isArray(ad)&&ad.length==this._ticks.length){var ac;for(var ab=0;ab<ad.length;ab++){ac=this._ticks[ab];ac.value=ad[ab];ac.label=ac.formatter(ac.formatString,ad[ab]);ac.label=ac.prefix+ac.label;ac._elem.html(ac.label)}ac=null;this.min=H.jqplot.arrayMin(ad);this.max=H.jqplot.arrayMax(ad);this.pack()}};H.jqplot.LinearAxisRenderer.prototype.pack=function(ad,ac){ad=ad||{};ac=ac||this._offsets;var ar=this._ticks;var an=this.max;var am=this.min;var ai=ac.max;var ag=ac.min;var ak=(this._label==null)?false:this._label.show;for(var al in ad){this._elem.css(al,ad[al])}this._offsets=ac;var ae=ai-ag;var af=an-am;if(this.breakPoints){af=af-this.breakPoints[1]+this.breakPoints[0];this.p2u=function(au){return(au-ag)*af/ae+am};this.u2p=function(au){if(au>this.breakPoints[0]&&au<this.breakPoints[1]){au=this.breakPoints[0]}if(au<=this.breakPoints[0]){return(au-am)*ae/af+ag}else{return(au-this.breakPoints[1]+this.breakPoints[0]-am)*ae/af+ag}};if(this.name.charAt(0)=="x"){this.series_u2p=function(au){if(au>this.breakPoints[0]&&au<this.breakPoints[1]){au=this.breakPoints[0]}if(au<=this.breakPoints[0]){return(au-am)*ae/af}else{return(au-this.breakPoints[1]+this.breakPoints[0]-am)*ae/af}};this.series_p2u=function(au){return au*af/ae+am}}else{this.series_u2p=function(au){if(au>this.breakPoints[0]&&au<this.breakPoints[1]){au=this.breakPoints[0]}if(au>=this.breakPoints[1]){return(au-an)*ae/af}else{return(au+this.breakPoints[1]-this.breakPoints[0]-an)*ae/af}};this.series_p2u=function(au){return au*af/ae+an}}}else{this.p2u=function(au){return(au-ag)*af/ae+am};this.u2p=function(au){return(au-am)*ae/af+ag};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(au){return(au-am)*ae/af};this.series_p2u=function(au){return au*af/ae+am}}else{this.series_u2p=function(au){return(au-an)*ae/af};this.series_p2u=function(au){return au*af/ae+an}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var ao=0;ao<ar.length;ao++){var aj=ar[ao];if(aj.show&&aj.showLabel){var ab;if(aj.constructor==H.jqplot.CanvasAxisTickRenderer&&aj.angle){var aq=(this.name=="xaxis")?1:-1;switch(aj.labelPosition){case"auto":if(aq*aj.angle<0){ab=-aj.getWidth()+aj._textRenderer.height*Math.sin(-aj._textRenderer.angle)/2}else{ab=-aj._textRenderer.height*Math.sin(aj._textRenderer.angle)/2}break;case"end":ab=-aj.getWidth()+aj._textRenderer.height*Math.sin(-aj._textRenderer.angle)/2;break;case"start":ab=-aj._textRenderer.height*Math.sin(aj._textRenderer.angle)/2;break;case"middle":ab=-aj.getWidth()/2+aj._textRenderer.height*Math.sin(-aj._textRenderer.angle)/2;break;default:ab=-aj.getWidth()/2+aj._textRenderer.height*Math.sin(-aj._textRenderer.angle)/2;break}}else{ab=-aj.getWidth()/2}var at=this.u2p(aj.value)+ab+"px";aj._elem.css("left",at);aj.pack()}}if(ak){var ah=this._label._elem.outerWidth(true);this._label._elem.css("left",ag+ae/2-ah/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var ao=0;ao<ar.length;ao++){var aj=ar[ao];if(aj.show&&aj.showLabel){var ab;if(aj.constructor==H.jqplot.CanvasAxisTickRenderer&&aj.angle){var aq=(this.name=="yaxis")?1:-1;switch(aj.labelPosition){case"auto":case"end":if(aq*aj.angle<0){ab=-aj._textRenderer.height*Math.cos(-aj._textRenderer.angle)/2}else{ab=-aj.getHeight()+aj._textRenderer.height*Math.cos(aj._textRenderer.angle)/2}break;case"start":if(aj.angle>0){ab=-aj._textRenderer.height*Math.cos(-aj._textRenderer.angle)/2}else{ab=-aj.getHeight()+aj._textRenderer.height*Math.cos(aj._textRenderer.angle)/2}break;case"middle":ab=-aj.getHeight()/2;break;default:ab=-aj.getHeight()/2;break}}else{ab=-aj.getHeight()/2}var at=this.u2p(aj.value)+ab+"px";aj._elem.css("top",at);aj.pack()}}if(ak){var ap=this._label._elem.outerHeight(true);this._label._elem.css("top",ai-ae/2-ap/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ar=null};function h(ac){var ab;ac=Math.abs(ac);if(ac>=10){ab="%d"}else{if(ac>1){if(ac===parseInt(ac,10)){ab="%d"}else{ab="%.1f"}}else{var ad=-Math.floor(Math.log(ac)/Math.LN10);ab="%."+ad+"f"}}return ab}var a=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var b=function(ac){var ab=a.indexOf(ac);if(ab>0){return a[ab-1]}else{return a[a.length-1]/100}};var i=function(ac){var ab=a.indexOf(ac);if(ab<a.length-1){return a[ab+1]}else{return a[0]*100}};function c(af,an,am){var ak=Math.floor(am/2);var ac=Math.ceil(am*1.5);var ae=Number.MAX_VALUE;var ab=(an-af);var aq;var aj;var al;var ar=H.jqplot.getSignificantFigures;var ap;var ah;var ai;var ao;for(var ag=0,ad=ac-ak+1;ag<ad;ag++){ai=ak+ag;aq=ab/(ai-1);aj=ar(aq);aq=Math.abs(am-ai)+aj.digitsRight;if(aq<ae){ae=aq;al=ai;ao=aj.digitsRight}else{if(aq===ae){if(aj.digitsRight<ao){al=ai;ao=aj.digitsRight}}}}ap=Math.max(ao,Math.max(ar(af).digitsRight,ar(an).digitsRight));if(ap===0){ah="%d"}else{ah="%."+ap+"f"}aq=ab/(al-1);return[af,an,al,ah,aq]}function S(ac,af){af=af||7;var ae=ac/(af-1);var ad=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10));var ag=ae/ad;var ab;if(ad<1){if(ag>5){ab=10*ad}else{if(ag>2){ab=5*ad}else{if(ag>1){ab=2*ad}else{ab=ad}}}}else{if(ag>5){ab=10*ad}else{if(ag>4){ab=5*ad}else{if(ag>3){ab=4*ad}else{if(ag>2){ab=3*ad}else{if(ag>1){ab=2*ad}else{ab=ad}}}}}}return ab}function M(ac,ab){ab=ab||1;var ae=Math.floor(Math.log(ac)/Math.LN10);var ag=Math.pow(10,ae);var af=ac/ag;var ad;af=af/ab;if(af<=0.38){ad=0.1}else{if(af<=1.6){ad=0.2}else{if(af<=4){ad=0.5}else{if(af<=8){ad=1}else{if(af<=16){ad=2}else{ad=5}}}}}return ad*ag}function t(ad,ac){var af=Math.floor(Math.log(ad)/Math.LN10);var ah=Math.pow(10,af);var ag=ad/ah;var ab;var ae;ag=ag/ac;if(ag<=0.38){ae=0.1}else{if(ag<=1.6){ae=0.2}else{if(ag<=4){ae=0.5}else{if(ag<=8){ae=1}else{if(ag<=16){ae=2}else{ae=5}}}}}ab=ae*ah;return[ab,ae,ah]}H.jqplot.LinearTickGenerator=function(ah,ak,ad,ae,ai,al){ai=(ai===null)?false:ai;al=(al===null||ai)?false:al;if(ah===ak){ak=(ak)?0:1}ad=ad||1;if(ak<ah){var am=ak;ak=ah;ah=am}var ac=[];var ap=M(ak-ah,ad);var ao=H.jqplot.getSignificantFigures;if(ae==null){if(!ai&&!al){ac[0]=Math.floor(ah/ap)*ap;ac[1]=Math.ceil(ak/ap)*ap;ac[2]=Math.round((ac[1]-ac[0])/ap+1);ac[3]=h(ap);ac[4]=ap}else{if(ai){ac[0]=ah;ac[2]=Math.ceil((ak-ah)/ap+1);ac[1]=ah+(ac[2]-1)*ap;var an=ao(ah).digitsRight;var aj=ao(ap).digitsRight;if(an<aj){ac[3]=h(ap)}else{ac[3]="%."+an+"f"}ac[4]=ap}else{if(al){ac[1]=ak;ac[2]=Math.ceil((ak-ah)/ap+1);ac[0]=ak-(ac[2]-1)*ap;var af=ao(ak).digitsRight;var aj=ao(ap).digitsRight;if(af<aj){ac[3]=h(ap)}else{ac[3]="%."+af+"f"}ac[4]=ap}}}}else{var ag=[];ag[0]=Math.floor(ah/ap)*ap;ag[1]=Math.ceil(ak/ap)*ap;ag[2]=Math.round((ag[1]-ag[0])/ap+1);ag[3]=h(ap);ag[4]=ap;if(ag[2]===ae){ac=ag}else{var ab=S(ag[1]-ag[0],ae);ac[0]=ag[0];ac[2]=ae;ac[4]=ab;ac[3]=h(ab);ac[1]=ac[0]+(ac[2]-1)*ac[4]}}return ac};H.jqplot.LinearTickGenerator.bestLinearInterval=M;H.jqplot.LinearTickGenerator.bestInterval=S;H.jqplot.LinearTickGenerator.bestLinearComponents=t;H.jqplot.LinearTickGenerator.bestConstrainedInterval=c;H.jqplot.MarkerRenderer=function(ab){this.show=true;this.style="filledCircle";this.lineWidth=2;this.size=9;this.color="#666666";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1;this.shadowDepth=3;this.shadowAlpha="0.07";this.shadowRenderer=new H.jqplot.ShadowRenderer();this.shapeRenderer=new H.jqplot.ShapeRenderer();H.extend(true,this,ab)};H.jqplot.MarkerRenderer.prototype.init=function(ab){H.extend(true,this,ab);var ad={angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,lineWidth:this.lineWidth,depth:this.shadowDepth,closePath:true};if(this.style.indexOf("filled")!=-1){ad.fill=true}if(this.style.indexOf("ircle")!=-1){ad.isarc=true;ad.closePath=false}this.shadowRenderer.init(ad);var ac={fill:false,isarc:false,strokeStyle:this.color,fillStyle:this.color,lineWidth:this.lineWidth,closePath:true};if(this.style.indexOf("filled")!=-1){ac.fill=true}if(this.style.indexOf("ircle")!=-1){ac.isarc=true;ac.closePath=false}this.shapeRenderer.init(ac)};H.jqplot.MarkerRenderer.prototype.drawDiamond=function(ad,ac,ag,af,ai){var ab=1.2;var aj=this.size/2/ab;var ah=this.size/2*ab;var ae=[[ad-aj,ac],[ad,ac+ah],[ad+aj,ac],[ad,ac-ah]];if(this.shadow){this.shadowRenderer.draw(ag,ae)}this.shapeRenderer.draw(ag,ae,ai)};H.jqplot.MarkerRenderer.prototype.drawPlus=function(ae,ad,ah,ag,ak){var ac=1;var al=this.size/2*ac;var ai=this.size/2*ac;var aj=[[ae,ad-ai],[ae,ad+ai]];var af=[[ae+al,ad],[ae-al,ad]];var ab=H.extend(true,{},this.options,{closePath:false});if(this.shadow){this.shadowRenderer.draw(ah,aj,{closePath:false});this.shadowRenderer.draw(ah,af,{closePath:false})}this.shapeRenderer.draw(ah,aj,ab);this.shapeRenderer.draw(ah,af,ab)};H.jqplot.MarkerRenderer.prototype.drawX=function(ae,ad,ah,ag,ak){var ac=1;var al=this.size/2*ac;var ai=this.size/2*ac;var ab=H.extend(true,{},this.options,{closePath:false});var aj=[[ae-al,ad-ai],[ae+al,ad+ai]];var af=[[ae-al,ad+ai],[ae+al,ad-ai]];if(this.shadow){this.shadowRenderer.draw(ah,aj,{closePath:false});this.shadowRenderer.draw(ah,af,{closePath:false})}this.shapeRenderer.draw(ah,aj,ab);this.shapeRenderer.draw(ah,af,ab)};H.jqplot.MarkerRenderer.prototype.drawDash=function(ad,ac,ag,af,ai){var ab=1;var aj=this.size/2*ab;var ah=this.size/2*ab;var ae=[[ad-aj,ac],[ad+aj,ac]];if(this.shadow){this.shadowRenderer.draw(ag,ae)}this.shapeRenderer.draw(ag,ae,ai)};H.jqplot.MarkerRenderer.prototype.drawLine=function(ag,af,ab,ae,ac){var ad=[ag,af];if(this.shadow){this.shadowRenderer.draw(ab,ad)}this.shapeRenderer.draw(ab,ad,ac)};H.jqplot.MarkerRenderer.prototype.drawSquare=function(ad,ac,ag,af,ai){var ab=1;var aj=this.size/2/ab;var ah=this.size/2*ab;var ae=[[ad-aj,ac-ah],[ad-aj,ac+ah],[ad+aj,ac+ah],[ad+aj,ac-ah]];if(this.shadow){this.shadowRenderer.draw(ag,ae)}this.shapeRenderer.draw(ag,ae,ai)};H.jqplot.MarkerRenderer.prototype.drawCircle=function(ac,ai,ae,ah,af){var ab=this.size/2;var ad=2*Math.PI;var ag=[ac,ai,ab,0,ad,true];if(this.shadow){this.shadowRenderer.draw(ae,ag)}this.shapeRenderer.draw(ae,ag,af)};H.jqplot.MarkerRenderer.prototype.draw=function(ab,ae,ac,ad){ad=ad||{};if(ad.show==null||ad.show!=false){if(ad.color&&!ad.fillStyle){ad.fillStyle=ad.color}if(ad.color&&!ad.strokeStyle){ad.strokeStyle=ad.color}switch(this.style){case"diamond":this.drawDiamond(ab,ae,ac,false,ad);break;case"filledDiamond":this.drawDiamond(ab,ae,ac,true,ad);break;case"circle":this.drawCircle(ab,ae,ac,false,ad);break;case"filledCircle":this.drawCircle(ab,ae,ac,true,ad);break;case"square":this.drawSquare(ab,ae,ac,false,ad);break;case"filledSquare":this.drawSquare(ab,ae,ac,true,ad);break;case"x":this.drawX(ab,ae,ac,true,ad);break;case"plus":this.drawPlus(ab,ae,ac,true,ad);break;case"dash":this.drawDash(ab,ae,ac,true,ad);break;case"line":this.drawLine(ab,ae,ac,false,ad);break;default:this.drawDiamond(ab,ae,ac,false,ad);break}}};H.jqplot.ShadowRenderer=function(ab){this.angle=45;this.offset=1;this.alpha=0.07;this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.depth=3;this.strokeStyle="rgba(0,0,0,0.1)";this.isarc=false;H.extend(true,this,ab)};H.jqplot.ShadowRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.ShadowRenderer.prototype.draw=function(ao,am,aq){ao.save();var ab=(aq!=null)?aq:{};var an=(ab.fill!=null)?ab.fill:this.fill;var aj=(ab.fillRect!=null)?ab.fillRect:this.fillRect;var ai=(ab.closePath!=null)?ab.closePath:this.closePath;var af=(ab.offset!=null)?ab.offset:this.offset;var ad=(ab.alpha!=null)?ab.alpha:this.alpha;var ah=(ab.depth!=null)?ab.depth:this.depth;var ap=(ab.isarc!=null)?ab.isarc:this.isarc;var ak=(ab.linePattern!=null)?ab.linePattern:this.linePattern;ao.lineWidth=(ab.lineWidth!=null)?ab.lineWidth:this.lineWidth;ao.lineJoin=(ab.lineJoin!=null)?ab.lineJoin:this.lineJoin;ao.lineCap=(ab.lineCap!=null)?ab.lineCap:this.lineCap;ao.strokeStyle=ab.strokeStyle||this.strokeStyle||"rgba(0,0,0,"+ad+")";ao.fillStyle=ab.fillStyle||this.fillStyle||"rgba(0,0,0,"+ad+")";for(var ae=0;ae<ah;ae++){var al=H.jqplot.LinePattern(ao,ak);ao.translate(Math.cos(this.angle*Math.PI/180)*af,Math.sin(this.angle*Math.PI/180)*af);al.beginPath();if(ap){ao.arc(am[0],am[1],am[2],am[3],am[4],true)}else{if(aj){if(aj){ao.fillRect(am[0],am[1],am[2],am[3])}}else{if(am&&am.length){var ac=true;for(var ag=0;ag<am.length;ag++){if(am[ag][0]!=null&&am[ag][1]!=null){if(ac){al.moveTo(am[ag][0],am[ag][1]);ac=false}else{al.lineTo(am[ag][0],am[ag][1])}}else{ac=true}}}}}if(ai){al.closePath()}if(an){ao.fill()}else{ao.stroke()}}ao.restore()};H.jqplot.ShapeRenderer=function(ab){this.lineWidth=1.5;this.linePattern="solid";this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.isarc=false;this.fillRect=false;this.strokeRect=false;this.clearRect=false;this.strokeStyle="#999999";this.fillStyle="#999999";H.extend(true,this,ab)};H.jqplot.ShapeRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.ShapeRenderer.prototype.draw=function(am,ak,ao){am.save();var ab=(ao!=null)?ao:{};var al=(ab.fill!=null)?ab.fill:this.fill;var ag=(ab.closePath!=null)?ab.closePath:this.closePath;var ah=(ab.fillRect!=null)?ab.fillRect:this.fillRect;var ae=(ab.strokeRect!=null)?ab.strokeRect:this.strokeRect;var ac=(ab.clearRect!=null)?ab.clearRect:this.clearRect;var an=(ab.isarc!=null)?ab.isarc:this.isarc;var ai=(ab.linePattern!=null)?ab.linePattern:this.linePattern;var aj=H.jqplot.LinePattern(am,ai);am.lineWidth=ab.lineWidth||this.lineWidth;am.lineJoin=ab.lineJoin||this.lineJoin;am.lineCap=ab.lineCap||this.lineCap;am.strokeStyle=(ab.strokeStyle||ab.color)||this.strokeStyle;am.fillStyle=ab.fillStyle||this.fillStyle;am.beginPath();if(an){am.arc(ak[0],ak[1],ak[2],ak[3],ak[4],true);if(ag){am.closePath()}if(al){am.fill()}else{am.stroke()}am.restore();return}else{if(ac){am.clearRect(ak[0],ak[1],ak[2],ak[3]);am.restore();return}else{if(ah||ae){if(ah){am.fillRect(ak[0],ak[1],ak[2],ak[3])}if(ae){am.strokeRect(ak[0],ak[1],ak[2],ak[3]);am.restore();return}}else{if(ak&&ak.length){var ad=true;for(var af=0;af<ak.length;af++){if(ak[af][0]!=null&&ak[af][1]!=null){if(ad){aj.moveTo(ak[af][0],ak[af][1]);ad=false}else{aj.lineTo(ak[af][0],ak[af][1])}}else{ad=true}}if(ag){aj.closePath()}if(al){am.fill()}else{am.stroke()}}}}}am.restore()};H.jqplot.TableLegendRenderer=function(){};H.jqplot.TableLegendRenderer.prototype.init=function(ab){H.extend(true,this,ab)};H.jqplot.TableLegendRenderer.prototype.addrow=function(ak,ae,ab,ai){var af=(ab)?this.rowSpacing+"px":"0px";var aj;var ad;var ac;var ah;var ag;ac=document.createElement("tr");aj=H(ac);aj.addClass("jqplot-table-legend");ac=null;if(ai){aj.prependTo(this._elem)}else{aj.appendTo(this._elem)}if(this.showSwatches){ad=H(document.createElement("td"));ad.addClass("jqplot-table-legend jqplot-table-legend-swatch");ad.css({textAlign:"center",paddingTop:af});ah=H(document.createElement("div"));ah.addClass("jqplot-table-legend-swatch-outline");ag=H(document.createElement("div"));ag.addClass("jqplot-table-legend-swatch");ag.css({backgroundColor:ae,borderColor:ae});aj.append(ad.append(ah.append(ag)))}if(this.showLabels){ad=H(document.createElement("td"));ad.addClass("jqplot-table-legend jqplot-table-legend-label");ad.css("paddingTop",af);aj.append(ad);if(this.escapeHtml){ad.text(ak)}else{ad.html(ak)}}ad=null;ah=null;ag=null;aj=null;ac=null};H.jqplot.TableLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}if(this.show){var ag=this._series;var ac=document.createElement("table");this._elem=H(ac);this._elem.addClass("jqplot-table-legend");var al={position:"absolute"};if(this.background){al.background=this.background}if(this.border){al.border=this.border}if(this.fontSize){al.fontSize=this.fontSize}if(this.fontFamily){al.fontFamily=this.fontFamily}if(this.textColor){al.textColor=this.textColor}if(this.marginTop!=null){al.marginTop=this.marginTop}if(this.marginBottom!=null){al.marginBottom=this.marginBottom}if(this.marginLeft!=null){al.marginLeft=this.marginLeft}if(this.marginRight!=null){al.marginRight=this.marginRight}var ab=false,ai=false,ak;for(var ah=0;ah<ag.length;ah++){ak=ag[ah];if(ak._stack||ak.renderer.constructor==H.jqplot.BezierCurveRenderer){ai=true}if(ak.show&&ak.showLabel){var af=this.labels[ah]||ak.label.toString();if(af){var ad=ak.color;if(ai&&ah<ag.length-1){ab=true}else{if(ai&&ah==ag.length-1){ab=false}}this.renderer.addrow.call(this,af,ad,ab,ai);ab=true}for(var ae=0;ae<H.jqplot.addLegendRowHooks.length;ae++){var aj=H.jqplot.addLegendRowHooks[ae].call(this,ak);if(aj){this.renderer.addrow.call(this,aj.label,aj.color,ab);ab=true}}af=null}}}return this._elem};H.jqplot.TableLegendRenderer.prototype.pack=function(ad){if(this.show){if(this.placement=="insideGrid"){switch(this.location){case"nw":var ac=ad.left;var ab=ad.top;this._elem.css("left",ac);this._elem.css("top",ab);break;case"n":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;var ab=ad.top;this._elem.css("left",ac);this._elem.css("top",ab);break;case"ne":var ac=ad.right;var ab=ad.top;this._elem.css({right:ac,top:ab});break;case"e":var ac=ad.right;var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({right:ac,top:ab});break;case"se":var ac=ad.right;var ab=ad.bottom;this._elem.css({right:ac,bottom:ab});break;case"s":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;var ab=ad.bottom;this._elem.css({left:ac,bottom:ab});break;case"sw":var ac=ad.left;var ab=ad.bottom;this._elem.css({left:ac,bottom:ab});break;case"w":var ac=ad.left;var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({left:ac,top:ab});break;default:var ac=ad.right;var ab=ad.bottom;this._elem.css({right:ac,bottom:ab});break}}else{if(this.placement=="outside"){switch(this.location){case"nw":var ac=this._plotDimensions.width-ad.left;var ab=ad.top;this._elem.css("right",ac);this._elem.css("top",ab);break;case"n":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;var ab=this._plotDimensions.height-ad.top;this._elem.css("left",ac);this._elem.css("bottom",ab);break;case"ne":var ac=this._plotDimensions.width-ad.right;var ab=ad.top;this._elem.css({left:ac,top:ab});break;case"e":var ac=this._plotDimensions.width-ad.right;var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({left:ac,top:ab});break;case"se":var ac=this._plotDimensions.width-ad.right;var ab=ad.bottom;this._elem.css({left:ac,bottom:ab});break;case"s":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;var ab=this._plotDimensions.height-ad.bottom;this._elem.css({left:ac,top:ab});break;case"sw":var ac=this._plotDimensions.width-ad.left;var ab=ad.bottom;this._elem.css({right:ac,bottom:ab});break;case"w":var ac=this._plotDimensions.width-ad.left;var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({right:ac,top:ab});break;default:var ac=ad.right;var ab=ad.bottom;this._elem.css({right:ac,bottom:ab});break}}else{switch(this.location){case"nw":this._elem.css({left:0,top:ad.top});break;case"n":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;this._elem.css({left:ac,top:ad.top});break;case"ne":this._elem.css({right:0,top:ad.top});break;case"e":var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({right:ad.right,top:ab});break;case"se":this._elem.css({right:ad.right,bottom:ad.bottom});break;case"s":var ac=(ad.left+(this._plotDimensions.width-ad.right))/2-this.getWidth()/2;this._elem.css({left:ac,bottom:ad.bottom});break;case"sw":this._elem.css({left:ad.left,bottom:ad.bottom});break;case"w":var ab=(ad.top+(this._plotDimensions.height-ad.bottom))/2-this.getHeight()/2;this._elem.css({left:ad.left,top:ab});break;default:this._elem.css({right:ad.right,bottom:ad.bottom});break}}}}};H.jqplot.ThemeEngine=function(){this.themes={};this.activeTheme=null};H.jqplot.ThemeEngine.prototype.init=function(){var ae=new H.jqplot.Theme({_name:"Default"});var ah,ac,ag;for(ah in ae.target){if(ah=="textColor"){ae.target[ah]=this.target.css("color")}else{ae.target[ah]=this.target.css(ah)}}if(this.title.show&&this.title._elem){for(ah in ae.title){if(ah=="textColor"){ae.title[ah]=this.title._elem.css("color")}else{ae.title[ah]=this.title._elem.css(ah)}}}for(ah in ae.grid){ae.grid[ah]=this.grid[ah]}if(ae.grid.backgroundColor==null&&this.grid.background!=null){ae.grid.backgroundColor=this.grid.background}if(this.legend.show&&this.legend._elem){for(ah in ae.legend){if(ah=="textColor"){ae.legend[ah]=this.legend._elem.css("color")}else{ae.legend[ah]=this.legend._elem.css(ah)}}}var ad;for(ac=0;ac<this.series.length;ac++){ad=this.series[ac];if(ad.renderer.constructor==H.jqplot.LineRenderer){ae.series.push(new m())}else{if(ad.renderer.constructor==H.jqplot.BarRenderer){ae.series.push(new P())}else{if(ad.renderer.constructor==H.jqplot.PieRenderer){ae.series.push(new e())}else{if(ad.renderer.constructor==H.jqplot.DonutRenderer){ae.series.push(new C())}else{if(ad.renderer.constructor==H.jqplot.FunnelRenderer){ae.series.push(new U())}else{if(ad.renderer.constructor==H.jqplot.MeterGaugeRenderer){ae.series.push(new z())}else{ae.series.push({})}}}}}}for(ah in ae.series[ac]){ae.series[ac][ah]=ad[ah]}}var ab,af;for(ah in this.axes){af=this.axes[ah];ab=ae.axes[ah]=new L();ab.borderColor=af.borderColor;ab.borderWidth=af.borderWidth;if(af._ticks&&af._ticks[0]){for(ag in ab.ticks){if(af._ticks[0].hasOwnProperty(ag)){ab.ticks[ag]=af._ticks[0][ag]}else{if(af._ticks[0]._elem){ab.ticks[ag]=af._ticks[0]._elem.css(ag)}}}}if(af._label&&af._label.show){for(ag in ab.label){if(af._label[ag]){ab.label[ag]=af._label[ag]}else{if(af._label._elem){if(ag=="textColor"){ab.label[ag]=af._label._elem.css("color")}else{ab.label[ag]=af._label._elem.css(ag)}}}}}}this.themeEngine._add(ae);this.themeEngine.activeTheme=this.themeEngine.themes[ae._name]};H.jqplot.ThemeEngine.prototype.get=function(ab){if(!ab){return this.activeTheme}else{return this.themes[ab]}};function K(ac,ab){return ac-ab}H.jqplot.ThemeEngine.prototype.getThemeNames=function(){var ab=[];for(var ac in this.themes){ab.push(ac)}return ab.sort(K)};H.jqplot.ThemeEngine.prototype.getThemes=function(){var ac=[];var ab=[];for(var ae in this.themes){ac.push(ae)}ac.sort(K);for(var ad=0;ad<ac.length;ad++){ab.push(this.themes[ac[ad]])}return ab};H.jqplot.ThemeEngine.prototype.activate=function(ao,au){var ab=false;if(!au&&this.activeTheme&&this.activeTheme._name){au=this.activeTheme._name}if(!this.themes.hasOwnProperty(au)){throw new Error("No theme of that name")}else{var ag=this.themes[au];this.activeTheme=ag;var at,am=false,al=false;var ac=["xaxis","x2axis","yaxis","y2axis"];for(ap=0;ap<ac.length;ap++){var ah=ac[ap];if(ag.axesStyles.borderColor!=null){ao.axes[ah].borderColor=ag.axesStyles.borderColor}if(ag.axesStyles.borderWidth!=null){ao.axes[ah].borderWidth=ag.axesStyles.borderWidth}}for(var ar in ao.axes){var ae=ao.axes[ar];if(ae.show){var ak=ag.axes[ar]||{};var ai=ag.axesStyles;var af=H.jqplot.extend(true,{},ak,ai);at=(ag.axesStyles.borderColor!=null)?ag.axesStyles.borderColor:af.borderColor;if(af.borderColor!=null){ae.borderColor=af.borderColor;ab=true}at=(ag.axesStyles.borderWidth!=null)?ag.axesStyles.borderWidth:af.borderWidth;if(af.borderWidth!=null){ae.borderWidth=af.borderWidth;ab=true}if(ae._ticks&&ae._ticks[0]){for(var ad in af.ticks){at=af.ticks[ad];if(at!=null){ae.tickOptions[ad]=at;ae._ticks=[];ab=true}}}if(ae._label&&ae._label.show){for(var ad in af.label){at=af.label[ad];if(at!=null){ae.labelOptions[ad]=at;ab=true}}}}}for(var an in ag.grid){if(ag.grid[an]!=null){ao.grid[an]=ag.grid[an]}}if(!ab){ao.grid.draw()}if(ao.legend.show){for(an in ag.legend){if(ag.legend[an]!=null){ao.legend[an]=ag.legend[an]}}}if(ao.title.show){for(an in ag.title){if(ag.title[an]!=null){ao.title[an]=ag.title[an]}}}var ap;for(ap=0;ap<ag.series.length;ap++){var aj={};var aq=false;for(an in ag.series[ap]){at=(ag.seriesStyles[an]!=null)?ag.seriesStyles[an]:ag.series[ap][an];if(at!=null){aj[an]=at;if(an=="color"){ao.series[ap].renderer.shapeRenderer.fillStyle=at;ao.series[ap].renderer.shapeRenderer.strokeStyle=at;ao.series[ap][an]=at}else{if((an=="lineWidth")||(an=="linePattern")){ao.series[ap].renderer.shapeRenderer[an]=at;ao.series[ap][an]=at}else{if(an=="markerOptions"){R(ao.series[ap].markerOptions,at);R(ao.series[ap].markerRenderer,at)}else{ao.series[ap][an]=at}}}ab=true}}}if(ab){ao.target.empty();ao.draw()}for(an in ag.target){if(ag.target[an]!=null){ao.target.css(an,ag.target[an])}}}};H.jqplot.ThemeEngine.prototype._add=function(ac,ab){if(ab){ac._name=ab}if(!ac._name){ac._name=Date.parse(new Date())}if(!this.themes.hasOwnProperty(ac._name)){this.themes[ac._name]=ac}else{throw new Error("jqplot.ThemeEngine Error: Theme already in use")}};H.jqplot.ThemeEngine.prototype.remove=function(ab){if(ab=="Default"){return false}return delete this.themes[ab]};H.jqplot.ThemeEngine.prototype.newTheme=function(ab,ad){if(typeof(ab)=="object"){ad=ad||ab;ab=null}if(ad&&ad._name){ab=ad._name}else{ab=ab||Date.parse(new Date())}var ac=this.copy(this.themes.Default._name,ab);H.jqplot.extend(ac,ad);return ac};function x(ad){if(ad==null||typeof(ad)!="object"){return ad}var ab=new ad.constructor();for(var ac in ad){ab[ac]=x(ad[ac])}return ab}H.jqplot.clone=x;function R(ad,ac){if(ac==null||typeof(ac)!="object"){return}for(var ab in ac){if(ab=="highlightColors"){ad[ab]=x(ac[ab])}if(ac[ab]!=null&&typeof(ac[ab])=="object"){if(!ad.hasOwnProperty(ab)){ad[ab]={}}R(ad[ab],ac[ab])}else{ad[ab]=ac[ab]}}}H.jqplot.merge=R;H.jqplot.extend=function(){var ag=arguments[0]||{},ae=1,af=arguments.length,ab=false,ad;if(typeof ag==="boolean"){ab=ag;ag=arguments[1]||{};ae=2}if(typeof ag!=="object"&&!toString.call(ag)==="[object Function]"){ag={}}for(;ae<af;ae++){if((ad=arguments[ae])!=null){for(var ac in ad){var ah=ag[ac],ai=ad[ac];if(ag===ai){continue}if(ab&&ai&&typeof ai==="object"&&!ai.nodeType){ag[ac]=H.jqplot.extend(ab,ah||(ai.length!=null?[]:{}),ai)}else{if(ai!==r){ag[ac]=ai}}}}}return ag};H.jqplot.ThemeEngine.prototype.rename=function(ac,ab){if(ac=="Default"||ab=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot rename from/to Default")}if(this.themes.hasOwnProperty(ab)){throw new Error("jqplot.ThemeEngine Error: New name already in use.")}else{if(this.themes.hasOwnProperty(ac)){var ad=this.copy(ac,ab);this.remove(ac);return ad}}throw new Error("jqplot.ThemeEngine Error: Old name or new name invalid")};H.jqplot.ThemeEngine.prototype.copy=function(ab,ad,af){if(ad=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot copy over Default theme")}if(!this.themes.hasOwnProperty(ab)){var ac="jqplot.ThemeEngine Error: Source name invalid";throw new Error(ac)}if(this.themes.hasOwnProperty(ad)){var ac="jqplot.ThemeEngine Error: Target name invalid";throw new Error(ac)}else{var ae=x(this.themes[ab]);ae._name=ad;H.jqplot.extend(true,ae,af);this._add(ae);return ae}};H.jqplot.Theme=function(ab,ac){if(typeof(ab)=="object"){ac=ac||ab;ab=null}ab=ab||Date.parse(new Date());this._name=ab;this.target={backgroundColor:null};this.legend={textColor:null,fontFamily:null,fontSize:null,border:null,background:null};this.title={textColor:null,fontFamily:null,fontSize:null,textAlign:null};this.seriesStyles={};this.series=[];this.grid={drawGridlines:null,gridLineColor:null,gridLineWidth:null,backgroundColor:null,borderColor:null,borderWidth:null,shadow:null};this.axesStyles={label:{},ticks:{}};this.axes={};if(typeof(ac)=="string"){this._name=ac}else{if(typeof(ac)=="object"){H.jqplot.extend(true,this,ac)}}};var L=function(){this.borderColor=null;this.borderWidth=null;this.ticks=new l();this.label=new q()};var l=function(){this.show=null;this.showGridline=null;this.showLabel=null;this.showMark=null;this.size=null;this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null};var q=function(){this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null;this.fontWeight=null};var m=function(){this.color=null;this.lineWidth=null;this.linePattern=null;this.shadow=null;this.fillColor=null;this.showMarker=null;this.markerOptions=new E()};var E=function(){this.show=null;this.style=null;this.lineWidth=null;this.size=null;this.color=null;this.shadow=null};var P=function(){this.color=null;this.seriesColors=null;this.lineWidth=null;this.shadow=null;this.barPadding=null;this.barMargin=null;this.barWidth=null;this.highlightColors=null};var e=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null;this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.highlightColors=null};var C=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null;this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.innerDiameter=null;this.thickness=null;this.ringMargin=null;this.highlightColors=null};var U=function(){this.color=null;this.lineWidth=null;this.shadow=null;this.padding=null;this.sectionMargin=null;this.seriesColors=null;this.highlightColors=null};var z=function(){this.padding=null;this.backgroundColor=null;this.ringColor=null;this.tickColor=null;this.ringWidth=null;this.intervalColors=null;this.intervalInnerRadius=null;this.intervalOuterRadius=null;this.hubRadius=null;this.needleThickness=null;this.needlePad=null};H.fn.jqplotChildText=function(){return H(this).contents().filter(function(){return this.nodeType==3}).text()};H.fn.jqplotGetComputedFontStyle=function(){var ae=window.getComputedStyle?window.getComputedStyle(this[0],""):this[0].currentStyle;var ac=ae["font-style"]?["font-style","font-weight","font-size","font-family"]:["fontStyle","fontWeight","fontSize","fontFamily"];var af=[];for(var ad=0;ad<ac.length;++ad){var ab=String(ae[ac[ad]]);if(ab&&ab!="normal"){af.push(ab)}}return af.join(" ")};H.fn.jqplotToImageCanvas=function(ad){ad=ad||{};var ao=(ad.x_offset==null)?0:ad.x_offset;var aq=(ad.y_offset==null)?0:ad.y_offset;var af=(ad.backgroundColor==null)?"rgb(255,255,255)":ad.backgroundColor;if(H(this).width()==0||H(this).height()==0){return null}if(H.jqplot.use_excanvas){return null}var ah=document.createElement("canvas");var au=H(this).outerHeight(true);var am=H(this).outerWidth(true);var ag=H(this).offset();var ai=ag.left;var ak=ag.top;var an=0,al=0;var ar=["jqplot-table-legend","jqplot-xaxis-tick","jqplot-x2axis-tick","jqplot-yaxis-tick","jqplot-y2axis-tick","jqplot-y3axis-tick","jqplot-y4axis-tick","jqplot-y5axis-tick","jqplot-y6axis-tick","jqplot-y7axis-tick","jqplot-y8axis-tick","jqplot-y9axis-tick","jqplot-xaxis-label","jqplot-x2axis-label","jqplot-yaxis-label","jqplot-y2axis-label","jqplot-y3axis-label","jqplot-y4axis-label","jqplot-y5axis-label","jqplot-y6axis-label","jqplot-y7axis-label","jqplot-y8axis-label","jqplot-y9axis-label"];var aj,ab,ac,av;for(var at=0;at<ar.length;at++){H(this).find("."+ar[at]).each(function(){aj=H(this).offset().top-ak;ab=H(this).offset().left-ai;av=ab+H(this).outerWidth(true)+an;ac=aj+H(this).outerHeight(true)+al;if(ab<-an){am=am-an-ab;an=-ab}if(aj<-al){au=au-al-aj;al=-aj}if(av>am){am=av}if(ac>au){au=ac}})}ah.width=am+Number(ao);ah.height=au+Number(aq);var ae=ah.getContext("2d");ae.save();ae.fillStyle=af;ae.fillRect(0,0,ah.width,ah.height);ae.restore();ae.translate(an,al);ae.textAlign="left";ae.textBaseline="top";function aw(ay){var az=parseInt(H(ay).css("line-height"),10);if(isNaN(az)){az=parseInt(H(ay).css("font-size"),10)*1.2}return az}function ax(az,ay,aM,aA,aI,aB){var aK=aw(az);var aE=H(az).innerWidth();var aF=H(az).innerHeight();var aH=aM.split(/\s+/);var aL=aH.length;var aJ="";var aG=[];var aO=aI;var aN=aA;for(var aD=0;aD<aL;aD++){aJ+=aH[aD];if(ay.measureText(aJ).width>aE){aG.push(aD);aJ="";aD--}}if(aG.length===0){if(H(az).css("textAlign")==="center"){aN=aA+(aB-ay.measureText(aJ).width)/2-an}ay.fillText(aM,aN,aI)}else{aJ=aH.slice(0,aG[0]).join(" ");if(H(az).css("textAlign")==="center"){aN=aA+(aB-ay.measureText(aJ).width)/2-an}ay.fillText(aJ,aN,aO);aO+=aK;for(var aD=1,aC=aG.length;aD<aC;aD++){aJ=aH.slice(aG[aD-1],aG[aD]).join(" ");if(H(az).css("textAlign")==="center"){aN=aA+(aB-ay.measureText(aJ).width)/2-an}ay.fillText(aJ,aN,aO);aO+=aK}aJ=aH.slice(aG[aD-1],aH.length).join(" ");if(H(az).css("textAlign")==="center"){aN=aA+(aB-ay.measureText(aJ).width)/2-an}ay.fillText(aJ,aN,aO)}}function ap(aA,aD,ay){var aH=aA.tagName.toLowerCase();var az=H(aA).position();var aE=window.getComputedStyle?window.getComputedStyle(aA,""):aA.currentStyle;var aC=aD+az.left+parseInt(aE.marginLeft,10)+parseInt(aE.borderLeftWidth,10)+parseInt(aE.paddingLeft,10);var aF=ay+az.top+parseInt(aE.marginTop,10)+parseInt(aE.borderTopWidth,10)+parseInt(aE.paddingTop,10);var aG=ah.width;if((aH=="div"||aH=="span")&&!H(aA).hasClass("jqplot-highlighter-tooltip")){H(aA).children().each(function(){ap(this,aC,aF)});var aI=H(aA).jqplotChildText();if(aI){ae.font=H(aA).jqplotGetComputedFontStyle();ae.fillStyle=H(aA).css("color");ax(aA,ae,aI,aC,aF,aG)}}else{if(aH==="table"&&H(aA).hasClass("jqplot-table-legend")){ae.strokeStyle=H(aA).css("border-top-color");ae.fillStyle=H(aA).css("background-color");ae.fillRect(aC,aF,H(aA).innerWidth(),H(aA).innerHeight());if(parseInt(H(aA).css("border-top-width"),10)>0){ae.strokeRect(aC,aF,H(aA).innerWidth(),H(aA).innerHeight())}H(aA).find("div.jqplot-table-legend-swatch-outline").each(function(){var aO=H(this);ae.strokeStyle=aO.css("border-top-color");var aK=aC+aO.position().left;var aL=aF+aO.position().top;ae.strokeRect(aK,aL,aO.innerWidth(),aO.innerHeight());aK+=parseInt(aO.css("padding-left"),10);aL+=parseInt(aO.css("padding-top"),10);var aN=aO.innerHeight()-2*parseInt(aO.css("padding-top"),10);var aJ=aO.innerWidth()-2*parseInt(aO.css("padding-left"),10);var aM=aO.children("div.jqplot-table-legend-swatch");ae.fillStyle=aM.css("background-color");ae.fillRect(aK,aL,aJ,aN)});H(aA).find("td.jqplot-table-legend-label").each(function(){var aL=H(this);var aJ=aC+aL.position().left;var aK=aF+aL.position().top+parseInt(aL.css("padding-top"),10);ae.font=aL.jqplotGetComputedFontStyle();ae.fillStyle=aL.css("color");ax(aL,ae,aL.text(),aJ,aK,aG)});var aB=null}else{if(aH=="canvas"){ae.drawImage(aA,aC,aF)}}}}H(this).children().each(function(){ap(this,ao,aq)});return ah};H.fn.jqplotToImageStr=function(ac){var ab=H(this).jqplotToImageCanvas(ac);if(ab){return ab.toDataURL("image/png")}else{return null}};H.fn.jqplotToImageElem=function(ab){var ac=document.createElement("img");var ad=H(this).jqplotToImageStr(ab);ac.src=ad;return ac};H.fn.jqplotToImageElemStr=function(ab){var ac="<img src="+H(this).jqplotToImageStr(ab)+" />";return ac};H.fn.jqplotSaveImage=function(){var ab=H(this).jqplotToImageStr({});if(ab){window.location.href=ab.replace("image/png","image/octet-stream")}};H.fn.jqplotViewImage=function(){var ac=H(this).jqplotToImageElemStr({});var ad=H(this).jqplotToImageStr({});if(ac){var ab=window.open("");ab.document.open("image/png");ab.document.write(ac);ab.document.close();ab=null}};var aa=function(){this.syntax=aa.config.syntax;this._type="jsDate";this.proxy=new Date();this.options={};this.locale=aa.regional.getLocale();this.formatString="";this.defaultCentury=aa.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(j(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var ad=this.options=arguments[0];this.syntax=ad.syntax||this.syntax;this.defaultCentury=ad.defaultCentury||this.defaultCentury;this.proxy=aa.createDate(ad.date)}else{this.proxy=aa.createDate(arguments[0])}break;default:var ab=[];for(var ac=0;ac<arguments.length;ac++){ab.push(arguments[ac])}this.proxy=new Date();this.proxy.setFullYear.apply(this.proxy,ab.slice(0,3));if(ab.slice(3).length){this.proxy.setHours.apply(this.proxy,ab.slice(3))}break}};aa.config={defaultLocale:"en",syntax:"perl",defaultCentury:1900};aa.prototype.add=function(ad,ac){var ab=A[ac]||A.day;if(typeof ab=="number"){this.proxy.setTime(this.proxy.getTime()+(ab*ad))}else{ab.add(this,ad)}return this};aa.prototype.clone=function(){return new aa(this.proxy.getTime())};aa.prototype.getUtcOffset=function(){return this.proxy.getTimezoneOffset()*60000};aa.prototype.diff=function(ac,af,ab){ac=new aa(ac);if(ac===null){return null}var ad=A[af]||A.day;if(typeof ad=="number"){var ae=(this.proxy.getTime()-ac.proxy.getTime())/ad}else{var ae=ad.diff(this.proxy,ac.proxy)}return(ab?ae:Math[ae>0?"floor":"ceil"](ae))};aa.prototype.getAbbrDayName=function(){return aa.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};aa.prototype.getAbbrMonthName=function(){return aa.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};aa.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};aa.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};aa.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};aa.prototype.getDate=function(){return this.proxy.getDate()};aa.prototype.getDay=function(){return this.proxy.getDay()};aa.prototype.getDayOfWeek=function(){var ab=this.proxy.getDay();return ab===0?7:ab};aa.prototype.getDayOfYear=function(){var ac=this.proxy;var ab=ac-new Date(""+ac.getFullYear()+"/1/1 GMT");ab+=ac.getTimezoneOffset()*60000;ac=null;return parseInt(ab/60000/60/24,10)+1};aa.prototype.getDayName=function(){return aa.regional[this.locale]["dayNames"][this.proxy.getDay()]};aa.prototype.getFullWeekOfYear=function(){var ae=this.proxy;var ab=this.getDayOfYear();var ad=6-ae.getDay();var ac=parseInt((ab+ad)/7,10);return ac};aa.prototype.getFullYear=function(){return this.proxy.getFullYear()};aa.prototype.getGmtOffset=function(){var ab=this.proxy.getTimezoneOffset()/60;var ac=ab<0?"+":"-";ab=Math.abs(ab);return ac+J(Math.floor(ab),2)+":"+J((ab%1)*60,2)};aa.prototype.getHours=function(){return this.proxy.getHours()};aa.prototype.getHours12=function(){var ab=this.proxy.getHours();return ab>12?ab-12:(ab==0?12:ab)};aa.prototype.getIsoWeek=function(){var ae=this.proxy;var ad=ae.getWeekOfYear();var ab=(new Date(""+ae.getFullYear()+"/1/1")).getDay();var ac=ad+(ab>4||ab<=1?0:1);if(ac==53&&(new Date(""+ae.getFullYear()+"/12/31")).getDay()<4){ac=1}else{if(ac===0){ae=new aa(new Date(""+(ae.getFullYear()-1)+"/12/31"));ac=ae.getIsoWeek()}}ae=null;return ac};aa.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};aa.prototype.getMinutes=function(){return this.proxy.getMinutes()};aa.prototype.getMonth=function(){return this.proxy.getMonth()};aa.prototype.getMonthName=function(){return aa.regional[this.locale]["monthNames"][this.proxy.getMonth()]};aa.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};aa.prototype.getSeconds=function(){return this.proxy.getSeconds()};aa.prototype.getShortYear=function(){return this.proxy.getYear()%100};aa.prototype.getTime=function(){return this.proxy.getTime()};aa.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};aa.prototype.getTimezoneName=function(){var ab=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return ab[1]||ab[2]||"GMT"+this.getGmtOffset()};aa.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};aa.prototype.getWeekOfYear=function(){var ab=this.getDayOfYear();var ad=7-this.getDayOfWeek();var ac=parseInt((ab+ad)/7,10);return ac};aa.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};aa.prototype.getYear=function(){return this.proxy.getYear()};aa.prototype.next=function(ab){ab=ab||"day";return this.clone().add(1,ab)};aa.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(j(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var ad=this.options=arguments[0];this.syntax=ad.syntax||this.syntax;this.defaultCentury=ad.defaultCentury||this.defaultCentury;this.proxy=aa.createDate(ad.date)}else{this.proxy=aa.createDate(arguments[0])}break;default:var ab=[];for(var ac=0;ac<arguments.length;ac++){ab.push(arguments[ac])}this.proxy=new Date();this.proxy.setFullYear.apply(this.proxy,ab.slice(0,3));if(ab.slice(3).length){this.proxy.setHours.apply(this.proxy,ab.slice(3))}break}return this};aa.prototype.setDate=function(ab){this.proxy.setDate(ab);return this};aa.prototype.setFullYear=function(){this.proxy.setFullYear.apply(this.proxy,arguments);return this};aa.prototype.setHours=function(){this.proxy.setHours.apply(this.proxy,arguments);return this};aa.prototype.setMilliseconds=function(ab){this.proxy.setMilliseconds(ab);return this};aa.prototype.setMinutes=function(){this.proxy.setMinutes.apply(this.proxy,arguments);return this};aa.prototype.setMonth=function(){this.proxy.setMonth.apply(this.proxy,arguments);return this};aa.prototype.setSeconds=function(){this.proxy.setSeconds.apply(this.proxy,arguments);return this};aa.prototype.setTime=function(ab){this.proxy.setTime(ab);return this};aa.prototype.setYear=function(){this.proxy.setYear.apply(this.proxy,arguments);return this};aa.prototype.strftime=function(ab){ab=ab||this.formatString||aa.regional[this.locale]["formatString"];return aa.strftime(this,ab,this.syntax)};aa.prototype.toString=function(){return this.proxy.toString()};aa.prototype.toYmdInt=function(){return(this.proxy.getFullYear()*10000)+(this.getMonthNumber()*100)+this.proxy.getDate()};aa.regional={en:{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],formatString:"%Y-%m-%d %H:%M:%S"},fr:{monthNames:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthNamesShort:["Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"],dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],formatString:"%Y-%m-%d %H:%M:%S"},de:{monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],formatString:"%Y-%m-%d %H:%M:%S"},es:{monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"},ru:{monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],formatString:"%Y-%m-%d %H:%M:%S"},ar:{monthNames:["كانون الثاني","شباط","آذار","نيسان","آذار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["السبت","الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة"],dayNamesShort:["سبت","أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة"],formatString:"%Y-%m-%d %H:%M:%S"},pt:{monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"},"pt-BR":{monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"}};aa.regional["en-US"]=aa.regional["en-GB"]=aa.regional.en;aa.regional.getLocale=function(){var ab=aa.config.defaultLocale;if(document&&document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){ab=document.getElementsByTagName("html")[0].lang;if(!aa.regional.hasOwnProperty(ab)){ab=aa.config.defaultLocale}}return ab};var y=24*60*60*1000;var J=function(ab,ae){ab=String(ab);var ac=ae-ab.length;var ad=String(Math.pow(10,ac)).slice(1);return ad.concat(ab)};var A={millisecond:1,second:1000,minute:60*1000,hour:60*60*1000,day:y,week:7*y,month:{add:function(ad,ab){A.year.add(ad,Math[ab>0?"floor":"ceil"](ab/12));var ac=ad.getMonth()+(ab%12);if(ac==12){ac=0;ad.setYear(ad.getFullYear()+1)}else{if(ac==-1){ac=11;ad.setYear(ad.getFullYear()-1)}}ad.setMonth(ac)},diff:function(af,ad){var ab=af.getFullYear()-ad.getFullYear();var ac=af.getMonth()-ad.getMonth()+(ab*12);var ae=af.getDate()-ad.getDate();return ac+(ae/30)}},year:{add:function(ac,ab){ac.setYear(ac.getFullYear()+Math[ab>0?"floor":"ceil"](ab))},diff:function(ac,ab){return A.month.diff(ac,ab)/12}}};for(var T in A){if(T.substring(T.length-1)!="s"){A[T+"s"]=A[T]}}var D=function(af,ae,ac){if(aa.formats[ac]["shortcuts"][ae]){return aa.strftime(af,aa.formats[ac]["shortcuts"][ae],ac)}else{var ab=(aa.formats[ac]["codes"][ae]||"").split(".");var ad=af["get"+ab[0]]?af["get"+ab[0]]():"";if(ab[1]){ad=J(ad,ab[1])}return ad}};aa.strftime=function(ah,ae,ad,ai){var ac="perl";var ag=aa.regional.getLocale();if(ad&&aa.formats.hasOwnProperty(ad)){ac=ad}else{if(ad&&aa.regional.hasOwnProperty(ad)){ag=ad}}if(ai&&aa.formats.hasOwnProperty(ai)){ac=ai}else{if(ai&&aa.regional.hasOwnProperty(ai)){ag=ai}}if(j(ah)!="[object Object]"||ah._type!="jsDate"){ah=new aa(ah);ah.locale=ag}if(!ae){ae=ah.formatString||aa.regional[ag]["formatString"]}var ab=ae||"%Y-%m-%d",aj="",af;while(ab.length>0){if(af=ab.match(aa.formats[ac].codes.matcher)){aj+=ab.slice(0,af.index);aj+=(af[1]||"")+D(ah,af[2],ac);ab=ab.slice(af.index+af[0].length)}else{aj+=ab;ab=""}}return aj};aa.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};aa.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};aa.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};aa.createDate=function(ad){if(ad==null){return new Date()}if(ad instanceof Date){return ad}if(typeof ad=="number"){return new Date(ad)}var ai=String(ad).replace(/^\s*(.+)\s*$/g,"$1");ai=ai.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ai=ai.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var ah=ai.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(ah&&ah.length>3){var am=parseFloat(ah[3]);var ag=aa.config.defaultCentury+am;ag=String(ag);ai=ai.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,ah[1]+" "+ah[2]+" "+ag)}ah=ai.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function al(aq,ap){var aw=parseFloat(ap[1]);var av=parseFloat(ap[2]);var au=parseFloat(ap[3]);var at=aa.config.defaultCentury;var ao,an,ax,ar;if(aw>31){an=au;ax=av;ao=at+aw}else{an=av;ax=aw;ao=at+au}ar=ax+"/"+an+"/"+ao;return aq.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,ar)}if(ah&&ah.length>3){ai=al(ai,ah)}var ah=ai.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(ah&&ah.length>3){ai=al(ai,ah)}var af=0;var ac=aa.matchers.length;var ak,ab,aj=ai,ae;while(af<ac){ab=Date.parse(aj);if(!isNaN(ab)){return new Date(ab)}ak=aa.matchers[af];if(typeof ak=="function"){ae=ak.call(aa,aj);if(ae instanceof Date){return ae}}else{aj=ai.replace(ak[0],ak[1])}af++}return NaN};aa.daysInMonth=function(ab,ac){if(ac==2){return new Date(ab,1,29).getDate()==29?29:28}return[r,31,r,31,30,31,30,31,31,30,31,30,31][ac]};aa.matchers=[[/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/,"$2/$1/$3"],[/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/,"$2/$3/$1"],function(ae){var ac=ae.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i);if(ac){if(ac[1]){var ad=this.createDate(ac[1]);if(isNaN(ad)){return}}else{var ad=new Date();ad.setMilliseconds(0)}var ab=parseFloat(ac[2]);if(ac[6]){ab=ac[6].toLowerCase()=="am"?(ab==12?0:ab):(ab==12?12:ab+12)}ad.setHours(ab,parseInt(ac[3]||0,10),parseInt(ac[4]||0,10),((parseFloat(ac[5]||0))||0)*1000);return ad}else{return ae}},function(ae){var ac=ae.match(/^(?:(.+))[T|\s+]([012]\d)(?:\:(\d\d))(?:\:(\d\d))(?:\.\d+)([\+\-]\d\d\:\d\d)$/i);if(ac){if(ac[1]){var ad=this.createDate(ac[1]);if(isNaN(ad)){return}}else{var ad=new Date();ad.setMilliseconds(0)}var ab=parseFloat(ac[2]);ad.setHours(ab,parseInt(ac[3],10),parseInt(ac[4],10),parseFloat(ac[5])*1000);return ad}else{return ae}},function(af){var ad=af.match(/^([0-3]?\d)\s*[-\/.\s]{1}\s*([a-zA-Z]{3,9})\s*[-\/.\s]{1}\s*([0-3]?\d)$/);if(ad){var ae=new Date();var ag=aa.config.defaultCentury;var ai=parseFloat(ad[1]);var ah=parseFloat(ad[3]);var ac,ab,aj;if(ai>31){ab=ah;ac=ag+ai}else{ab=ai;ac=ag+ah}var aj=W(ad[2],aa.regional[aa.regional.getLocale()]["monthNamesShort"]);if(aj==-1){aj=W(ad[2],aa.regional[aa.regional.getLocale()]["monthNames"])}ae.setFullYear(ac,aj,ab);ae.setHours(0,0,0,0);return ae}else{return af}}];function W(ad,ae){if(ae.indexOf){return ae.indexOf(ad)}for(var ab=0,ac=ae.length;ab<ac;ab++){if(ae[ab]===ad){return ab}}return -1}function j(ab){if(ab===null){return"[object Null]"}return Object.prototype.toString.call(ab)}H.jsDate=aa;H.jqplot.sprintf=function(){function ah(an,aj,ak,am){var al=(an.length>=aj)?"":Array(1+aj-an.length>>>0).join(ak);return am?an+al:al+an}function ae(al){var ak=new String(al);for(var aj=10;aj>0;aj--){if(ak==(ak=ak.replace(/^(\d+)(\d{3})/,"$1"+H.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return ak}function ad(ao,an,aq,al,am,ak){var ap=al-ao.length;if(ap>0){var aj=" ";if(ak){aj=" "}if(aq||!am){ao=ah(ao,al,aj,aq)}else{ao=ao.slice(0,an.length)+ah("",ap,"0",true)+ao.slice(an.length)}}return ao}function ai(ar,ak,ap,al,aj,ao,aq,an){var am=ar>>>0;ap=ap&&am&&{"2":"0b","8":"0","16":"0x"}[ak]||"";ar=ap+ah(am.toString(ak),ao||0,"0",false);return ad(ar,ap,al,aj,aq,an)}function ab(an,ao,al,aj,am,ak){if(aj!=null){an=an.slice(0,aj)}return ad(an,"",ao,al,am,ak)}var ac=arguments,af=0,ag=ac[af++];return ag.replace(H.jqplot.sprintf.regex,function(aG,aq,ar,av,aI,aD,ao){if(aG=="%%"){return"%"}var ax=false,at="",au=false,aF=false,ap=false,an=false;for(var aC=0;ar&&aC<ar.length;aC++){switch(ar.charAt(aC)){case" ":at=" ";break;case"+":at="+";break;case"-":ax=true;break;case"0":au=true;break;case"#":aF=true;break;case"&":ap=true;break;case"'":an=true;break}}if(!av){av=0}else{if(av=="*"){av=+ac[af++]}else{if(av.charAt(0)=="*"){av=+ac[av.slice(1,-1)]}else{av=+av}}}if(av<0){av=-av;ax=true}if(!isFinite(av)){throw new Error("$.jqplot.sprintf: (minimum-)width must be finite")}if(!aD){aD="fFeE".indexOf(ao)>-1?6:(ao=="d")?0:void (0)}else{if(aD=="*"){aD=+ac[af++]}else{if(aD.charAt(0)=="*"){aD=+ac[aD.slice(1,-1)]}else{aD=+aD}}}var az=aq?ac[aq.slice(0,-1)]:ac[af++];switch(ao){case"s":if(az==null){return""}return ab(String(az),ax,av,aD,au,ap);case"c":return ab(String.fromCharCode(+az),ax,av,aD,au,ap);case"b":return ai(az,2,aF,ax,av,aD,au,ap);case"o":return ai(az,8,aF,ax,av,aD,au,ap);case"x":return ai(az,16,aF,ax,av,aD,au,ap);case"X":return ai(az,16,aF,ax,av,aD,au,ap).toUpperCase();case"u":return ai(az,10,aF,ax,av,aD,au,ap);case"i":var al=parseInt(+az,10);if(isNaN(al)){return""}var aB=al<0?"-":at;var aE=an?ae(String(Math.abs(al))):String(Math.abs(al));az=aB+ah(aE,aD,"0",false);return ad(az,aB,ax,av,au,ap);case"d":var al=Math.round(+az);if(isNaN(al)){return""}var aB=al<0?"-":at;var aE=an?ae(String(Math.abs(al))):String(Math.abs(al));az=aB+ah(aE,aD,"0",false);return ad(az,aB,ax,av,au,ap);case"e":case"E":case"f":case"F":case"g":case"G":var al=+az;if(isNaN(al)){return""}var aB=al<0?"-":at;var am=["toExponential","toFixed","toPrecision"]["efg".indexOf(ao.toLowerCase())];var aH=["toString","toUpperCase"]["eEfFgG".indexOf(ao)%2];var aE=Math.abs(al)[am](aD);aE=an?ae(aE):aE;az=aB+aE;var aw=ad(az,aB,ax,av,au,ap)[aH]();if(H.jqplot.sprintf.decimalMark!=="."&&H.jqplot.sprintf.decimalMark!==H.jqplot.sprintf.thousandsSeparator){return aw.replace(/\./,H.jqplot.sprintf.decimalMark)}else{return aw}case"p":case"P":var al=+az;if(isNaN(al)){return""}var aB=al<0?"-":at;var ay=String(Number(Math.abs(al)).toExponential()).split(/e|E/);var ak=(ay[0].indexOf(".")!=-1)?ay[0].length-1:ay[0].length;var aA=(ay[1]<0)?-ay[1]-1:0;if(Math.abs(al)<1){if(ak+aA<=aD){az=aB+Math.abs(al).toPrecision(ak)}else{if(ak<=aD-1){az=aB+Math.abs(al).toExponential(ak-1)}else{az=aB+Math.abs(al).toExponential(aD-1)}}}else{var aj=(ak<=aD)?ak:aD;az=aB+Math.abs(al).toPrecision(aj)}var aH=["toString","toUpperCase"]["pP".indexOf(ao)%2];return ad(az,aB,ax,av,au,ap)[aH]();case"n":return"";default:return aG}})};H.jqplot.sprintf.thousandsSeparator=",";H.jqplot.sprintf.decimalMark=".";H.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;H.jqplot.getSignificantFigures=function(af){var ah=String(Number(Math.abs(af)).toExponential()).split(/e|E/);var ag=(ah[0].indexOf(".")!=-1)?ah[0].length-1:ah[0].length;var ac=(ah[1]<0)?-ah[1]-1:0;var ab=parseInt(ah[1],10);var ad=(ab+1>0)?ab+1:0;var ae=(ag<=ad)?0:ag-ab-1;return{significantDigits:ag,digitsLeft:ad,digitsRight:ae,zeros:ac,exponent:ab}};H.jqplot.getPrecision=function(ab){return H.jqplot.getSignificantFigures(ab).digitsRight}})(jQuery);var backCompat=$.uiBackCompat!==false;$.jqplot.effects={effect:{}};var dataSpace="jqplot.storage.";$.extend($.jqplot.effects,{version:"1.9pre",save:function(b,c){for(var a=0;a<c.length;a++){if(c[a]!==null){b.data(dataSpace+c[a],b[0].style[c[a]])}}},restore:function(b,c){for(var a=0;a<c.length;a++){if(c[a]!==null){b.css(c[a],b.data(dataSpace+c[a]))}}},setMode:function(a,b){if(b==="toggle"){b=a.is(":hidden")?"show":"hide"}return b},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper")){return b.parent()}var c={width:b.outerWidth(true),height:b.outerHeight(true),"float":b.css("float")},e=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),a={width:b.width(),height:b.height()},d=document.activeElement;b.wrap(e);if(b[0]===d||$.contains(b[0],d)){$(d).focus()}e=b.parent();if(b.css("position")==="static"){e.css({position:"relative"});b.css({position:"relative"})}else{$.extend(c,{position:b.css("position"),zIndex:b.css("z-index")});$.each(["top","left","bottom","right"],function(f,g){c[g]=b.css(g);if(isNaN(parseInt(c[g],10))){c[g]="auto"}});b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}b.css(a);return e.css(c).show()},removeWrapper:function(a){var b=document.activeElement;if(a.parent().is(".ui-effects-wrapper")){a.parent().replaceWith(a);if(a[0]===b||$.contains(a[0],b)){$(b).focus()}}return a}});function _normalizeArguments(b,a,c,d){if($.isPlainObject(b)){return b}b={effect:b};if(a===undefined){a={}}if($.isFunction(a)){d=a;c=null;a={}}if($.type(a)==="number"||$.fx.speeds[a]){d=c;c=a;a={}}if($.isFunction(c)){d=c;c=null}if(a){$.extend(b,a)}c=c||a.duration;b.duration=$.fx.off?0:typeof c==="number"?c:c in $.fx.speeds?$.fx.speeds[c]:$.fx.speeds._default;b.complete=d||a.complete;return b}function standardSpeed(a){if(!a||typeof a==="number"||$.fx.speeds[a]){return true}if(typeof a==="string"&&!$.jqplot.effects.effect[a]){if(backCompat&&$.jqplot.effects[a]){return false}return true}return false}$.fn.extend({jqplotEffect:function(i,j,b,h){var g=_normalizeArguments.apply(this,arguments),d=g.mode,e=g.queue,f=$.jqplot.effects.effect[g.effect],a=!f&&backCompat&&$.jqplot.effects[g.effect];if($.fx.off||!(f||a)){if(d){return this[d](g.duration,g.complete)}else{return this.each(function(){if(g.complete){g.complete.call(this)}})}}function c(m){var n=$(this),l=g.complete,o=g.mode;function k(){if($.isFunction(l)){l.call(n[0])}if($.isFunction(m)){m()}}if(n.is(":hidden")?o==="hide":o==="show"){k()}else{f.call(n[0],g,k)}}if(f){return e===false?this.each(c):this.queue(e||"fx",c)}else{return a.call(this,{options:g,duration:g.duration,callback:g.complete,mode:g.mode})}}});var rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/;$.jqplot.effects.effect.blind=function(c,h){var d=$(this),k=["position","top","bottom","left","right","height","width"],i=$.jqplot.effects.setMode(d,c.mode||"hide"),m=c.direction||"up",f=rvertical.test(m),e=f?"height":"width",j=f?"top":"left",p=rpositivemotion.test(m),g={},n=i==="show",b,a,l;if(d.parent().is(".ui-effects-wrapper")){$.jqplot.effects.save(d.parent(),k)}else{$.jqplot.effects.save(d,k)}d.show();l=parseInt(d.css("top"),10);b=$.jqplot.effects.createWrapper(d).css({overflow:"hidden"});a=f?b[e]()+l:b[e]();g[e]=n?String(a):"0";if(!p){d.css(f?"bottom":"right",0).css(f?"top":"left","").css({position:"absolute"});g[j]=n?"0":String(a)}if(n){b.css(e,0);if(!p){b.css(j,a)}}b.animate(g,{duration:c.duration,easing:c.easing,queue:false,complete:function(){if(i==="hide"){d.hide()}$.jqplot.effects.restore(d,k);$.jqplot.effects.removeWrapper(d);h()}})}; \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/jquery.js b/wqflask/wqflask/static/packages/jqplot/jquery.js index 11e6d067..27914ea3 100755 --- a/wqflask/wqflask/static/packages/jqplot/jquery.js +++ b/wqflask/wqflask/static/packages/jqplot/jquery.js @@ -2110,9 +2110,9 @@ jQuery.fn.extend({ ret = elem.value; - return typeof ret === "string" ? + return typeof ret === "string" ? // handle most common string cases - ret.replace(rreturn, "") : + ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } @@ -4392,7 +4392,7 @@ var Expr = Sizzle.selectors = { text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, @@ -4508,21 +4508,21 @@ var Expr = Sizzle.selectors = { case "only": case "first": while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } - if ( type === "first" ) { - return true; + if ( type === "first" ) { + return true; } node = elem; case "last": while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } @@ -4546,7 +4546,7 @@ var Expr = Sizzle.selectors = { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } - } + } parent.sizcache = doneName; } @@ -5006,7 +5006,7 @@ if ( document.querySelectorAll ) { expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { - try { + try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); @@ -5147,7 +5147,7 @@ if ( document.documentElement.contains ) { Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) + // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; diff --git a/wqflask/wqflask/static/packages/jqplot/jquery.min.js b/wqflask/wqflask/static/packages/jqplot/jquery.min.js index 628ed9b3..b6b6e46e 100755 --- a/wqflask/wqflask/static/packages/jqplot/jquery.min.js +++ b/wqflask/wqflask/static/packages/jqplot/jquery.min.js @@ -1,4 +1,4 @@ /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */ -(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete +(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean (a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.js index 00b33815..f089a705 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { // Class: $.jqplot.BezierCurveRenderer.js @@ -37,11 +37,11 @@ $.jqplot.BezierCurveRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.BezierCurveRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.BezierCurveRenderer.prototype.constructor = $.jqplot.BezierCurveRenderer; - + // Method: setGridData // converts the user data values to grid coordinates and stores them // in the gridData array. @@ -60,9 +60,9 @@ if (data.length == 2) { if (idx == 0) { this.gridData = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])], [xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)], [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)] @@ -71,13 +71,13 @@ else { var psd = plot.series[idx-1].data; this.gridData = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])], [xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])], - [xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]), - xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), + [xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]), + xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])] ]; } @@ -85,9 +85,9 @@ else { if (idx == 0) { this.gridData = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])], [xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)], [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)] @@ -96,19 +96,19 @@ else { var psd = plot.series[idx-1].data; this.gridData = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])], [xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])], - [xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]), - xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), + [xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]), + xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])] ]; } } }; - + // Method: makeGridData // converts any arbitrary data values to grid coordinates and // returns them. This method exists so that plugins can use a series' @@ -127,9 +127,9 @@ if (data.length == 2) { if (idx == 0) { gd = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])], [xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)], [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)] @@ -138,13 +138,13 @@ else { var psd = plot.series[idx-1].data; gd = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]), xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])], [xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])], - [xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]), - xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), + [xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]), + xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])] ]; } @@ -152,9 +152,9 @@ else { if (idx == 0) { gd = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])], [xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)], [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)] @@ -163,20 +163,20 @@ else { var psd = plot.series[idx-1].data; gd = [ - [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], - [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), - xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), + [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], + [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), + xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]), xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])], [xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])], - [xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]), - xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), + [xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]), + xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]), xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])] ]; } } return gd; }; - + // called within scope of series. $.jqplot.BezierCurveRenderer.prototype.draw = function(ctx, gd, options) { @@ -202,22 +202,22 @@ ctx.restore(); } } - + ctx.restore(); - }; - + }; + $.jqplot.BezierCurveRenderer.prototype.drawShadow = function(ctx, gd, options) { // This is a no-op, shadows drawn with lines. }; - + $.jqplot.BezierAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.BezierAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.BezierAxisRenderer.prototype.constructor = $.jqplot.BezierAxisRenderer; - - + + // Axes on a plot with Bezier Curves $.jqplot.BezierAxisRenderer.prototype.init = function(options){ $.extend(true, this, options); @@ -226,9 +226,9 @@ // the min/max bounds for this axis. for (var i=0; i<this._series.length; i++) { var s = this._series[i]; - var d = s.data; + var d = s.data; if (d.length == 4) { - for (var j=0; j<d.length; j++) { + for (var j=0; j<d.length; j++) { if (this.name == 'xaxis' || this.name == 'x2axis') { if (d[j][0] < db.min || db.min == null) { db.min = d[j][0]; @@ -236,7 +236,7 @@ if (d[j][0] > db.max || db.max == null) { db.max = d[j][0]; } - } + } else { if (d[j][1] < db.min || db.min == null) { db.min = d[j][1]; @@ -244,10 +244,10 @@ if (d[j][1] > db.max || db.max == null) { db.max = d[j][1]; } - } + } } - } - else { + } + else { if (this.name == 'xaxis' || this.name == 'x2axis') { if (d[0][0] < db.min || db.min == null) { db.min = d[0][0]; @@ -263,7 +263,7 @@ db.max = d[1][j]; } } - } + } else { if (d[0][1] < db.min || db.min == null) { db.min = d[0][1]; @@ -279,11 +279,11 @@ db.max = d[1][j]; } } - } + } } } }; - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -302,12 +302,12 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.BezierAxisRenderer; } } - + $.jqplot.preInitHooks.push(preInit); - -})(jQuery); \ No newline at end of file + +})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.min.js index f68f1e6f..77ec27b9 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.BezierCurveRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(b){b.jqplot.BezierCurveRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.BezierCurveRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.BezierCurveRenderer.prototype.constructor=b.jqplot.BezierCurveRenderer;b.jqplot.BezierCurveRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var g=this._yaxis.series_u2p;var f=this.data;this.gridData=[];this._prevGridData=[];var d=this.index;if(f.length==2){if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,f[1][4]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,c[1][4]),g.call(this._yaxis,c[1][5])],[e.call(this._xaxis,c[1][2]),g.call(this._yaxis,c[1][3]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}else{if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,f[3][1]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,c[3][0]),g.call(this._yaxis,c[3][1])],[e.call(this._xaxis,c[2][0]),g.call(this._yaxis,c[2][1]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}};b.jqplot.BezierCurveRenderer.prototype.makeGridData=function(g,i){var f=this._xaxis.series_u2p;var h=this._yaxis.series_u2p;var e=[];var j=[];var d=this.index;if(g.length==2){if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,g[1][4]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,c[1][4]),h.call(this._yaxis,c[1][5])],[f.call(this._xaxis,c[1][2]),h.call(this._yaxis,c[1][3]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}else{if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,g[3][1]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,c[3][0]),h.call(this._yaxis,c[3][1])],[f.call(this._xaxis,c[2][0]),h.call(this._yaxis,c[2][1]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}return e};b.jqplot.BezierCurveRenderer.prototype.draw=function(c,g,d){var e;c.save();if(g.length){if(this.showLine){c.save();var f=(d!=null)?d:{};c.fillStyle=f.fillStyle||this.color;c.beginPath();c.moveTo(g[0][0],g[0][1]);c.bezierCurveTo(g[1][0],g[1][1],g[1][2],g[1][3],g[1][4],g[1][5]);c.lineTo(g[2][0],g[2][1]);if(g[3].length==2){c.lineTo(g[3][0],g[3][1])}else{c.bezierCurveTo(g[3][0],g[3][1],g[3][2],g[3][3],g[3][4],g[3][5])}c.closePath();c.fill();c.restore()}}c.restore()};b.jqplot.BezierCurveRenderer.prototype.drawShadow=function(c,e,d){};b.jqplot.BezierAxisRenderer=function(){b.jqplot.LinearAxisRenderer.call(this)};b.jqplot.BezierAxisRenderer.prototype=new b.jqplot.LinearAxisRenderer();b.jqplot.BezierAxisRenderer.prototype.constructor=b.jqplot.BezierAxisRenderer;b.jqplot.BezierAxisRenderer.prototype.init=function(f){b.extend(true,this,f);var c=this._dataBounds;for(var g=0;g<this._series.length;g++){var h=this._series[g];var k=h.data;if(k.length==4){for(var e=0;e<k.length;e++){if(this.name=="xaxis"||this.name=="x2axis"){if(k[e][0]<c.min||c.min==null){c.min=k[e][0]}if(k[e][0]>c.max||c.max==null){c.max=k[e][0]}}else{if(k[e][1]<c.min||c.min==null){c.min=k[e][1]}if(k[e][1]>c.max||c.max==null){c.max=k[e][1]}}}}else{if(this.name=="xaxis"||this.name=="x2axis"){if(k[0][0]<c.min||c.min==null){c.min=k[0][0]}if(k[0][0]>c.max||c.max==null){c.max=k[0][0]}for(var e=0;e<5;e+=2){if(k[1][e]<c.min||c.min==null){c.min=k[1][e]}if(k[1][e]>c.max||c.max==null){c.max=k[1][e]}}}else{if(k[0][1]<c.min||c.min==null){c.min=k[0][1]}if(k[0][1]>c.max||c.max==null){c.max=k[0][1]}for(var e=1;e<6;e+=2){if(k[1][e]<c.min||c.min==null){c.min=k[1][e]}if(k[1][e]>c.max||c.max==null){c.max=k[1][e]}}}}}};function a(g,f,d){d=d||{};d.axesDefaults=b.extend(true,{pad:0},d.axesDefaults);d.legend=b.extend(true,{placement:"outside"},d.legend);var c=false;if(d.seriesDefaults.renderer==b.jqplot.BezierCurveRenderer){c=true}else{if(d.series){for(var e=0;e<d.series.length;e++){if(d.series[e].renderer==b.jqplot.BezierCurveRenderer){c=true}}}}if(c){d.axesDefaults.renderer=b.jqplot.BezierAxisRenderer}}b.jqplot.preInitHooks.push(a)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.js index c1be235d..623e8efb 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,21 +26,21 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { - + // Class: $.jqplot.BarRenderer // A plugin renderer for jqPlot to draw a bar plot. // Draws series as a line. - + $.jqplot.BarRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.BarRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.BarRenderer.prototype.constructor = $.jqplot.BarRenderer; - + // called with scope of series. $.jqplot.BarRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -58,11 +58,11 @@ // Width of the bar in pixels (auto by devaul). null = calculated automatically. this.barWidth = null; // prop: shadowOffset - // offset of the shadow from the slice and offset of + // offset of the shadow from the slice and offset of // each succesive stroke of the shadow from the last. this.shadowOffset = 2; // prop: shadowDepth - // number of strokes to apply to the shadow, + // number of strokes to apply to the shadow, // each stroke offset shadowOffset from the last. this.shadowDepth = 5; // prop: shadowAlpha @@ -94,10 +94,10 @@ // an array of colors to use when highlighting a bar. this.highlightColors = []; // prop: transposedData - // NOT IMPLEMENTED YET. True if this is a horizontal bar plot and - // x and y values are "transposed". Tranposed, or "swapped", data is - // required prior to rev. 894 builds of jqPlot with horizontal bars. - // Allows backward compatability of bar renderer horizontal bars with + // NOT IMPLEMENTED YET. True if this is a horizontal bar plot and + // x and y values are "transposed". Tranposed, or "swapped", data is + // required prior to rev. 894 builds of jqPlot with horizontal bars. + // Allows backward compatability of bar renderer horizontal bars with // old style data sets. this.transposedData = true; this.renderer.animation = { @@ -107,17 +107,17 @@ _supported: true }; this._type = 'bar'; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } - + ////// // This is probably wrong here. // After going back and forth on wether renderer should be the thing // or extend the thing, it seems that it it best if it is a property - // on the thing. This should be something that is commonized + // on the thing. This should be something that is commonized // among series renderers in the future. ////// $.extend(true, this, options); @@ -132,12 +132,12 @@ if (this.barDirection === 'horizontal' && this.rendererOptions.animation && this.rendererOptions.animation.direction == null) { this.renderer.animation.direction = 'left'; } - + if (this.waterfall) { this.fillToZero = false; this.disableStack = true; } - + if (this.barDirection == 'vertical' ) { this._primaryAxis = '_xaxis'; this._stackAxis = 'y'; @@ -155,23 +155,23 @@ // Array of actual data colors used for each data point. this._dataColors = []; this._barPoints = []; - + // set the shape renderer options var opts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, strokeStyle:this.color, fillStyle:this.color, closePath:this.fill}; this.renderer.shapeRenderer.init(opts); // set the shadow renderer options var sopts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, closePath:this.fill}; this.renderer.shadowRenderer.init(sopts); - + plot.postInitHooks.addOnce(postInit); plot.postDrawHooks.addOnce(postPlotDraw); plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove); plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown); plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp); plot.eventListenerHooks.addOnce('jqplotClick', handleClick); - plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); + plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); }; - + // called with scope of series function barPreInit(target, data, seriesDefaults, options) { if (this.rendererOptions.barDirection == 'horizontal') { @@ -216,9 +216,9 @@ } } } - + $.jqplot.preSeriesInitHooks.push(barPreInit); - + // needs to be called with scope of series, not renderer. $.jqplot.BarRenderer.prototype.calcSeriesNumbers = function() { var nvals = 0; @@ -325,7 +325,7 @@ return start; } - + $.jqplot.BarRenderer.prototype.draw = function(ctx, gridData, options, plot) { var i; // Ughhh, have to make a copy of options b/c it may be modified later. @@ -341,17 +341,17 @@ // clear out data colors. this._dataColors = []; this._barPoints = []; - + if (this.barWidth == null) { this.renderer.setBarWidth.call(this); } - + var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this); var nvals = temp[0]; var nseries = temp[1]; var pos = temp[2]; var points = []; - + if (this._stack) { this._barNudge = 0; } @@ -367,9 +367,9 @@ } var positiveColor = opts.fillStyle; var base; - var xstart; + var xstart; var ystart; - + if (this.barDirection == 'vertical') { for (var i=0; i<gridData.length; i++) { if (!this._stack && this.data[i][1] == null) { @@ -377,7 +377,7 @@ } points = []; base = gridData[i][0] + this._barNudge; - + // stacked if (this._stack && this._prevGridData.length) { ystart = getStart(this.index, i, this._plotData[i][1], plot, 'y'); @@ -439,14 +439,14 @@ } } - if (!this.fillToZero || this._plotData[i][1] >= 0) { + if (!this.fillToZero || this._plotData[i][1] >= 0) { points.push([base-this.barWidth/2, ystart]); points.push([base-this.barWidth/2, gridData[i][1]]); points.push([base+this.barWidth/2, gridData[i][1]]); points.push([base+this.barWidth/2, ystart]); } // for negative bars make sure points are always ordered clockwise - else { + else { points.push([base-this.barWidth/2, gridData[i][1]]); points.push([base-this.barWidth/2, ystart]); points.push([base+this.barWidth/2, ystart]); @@ -463,10 +463,10 @@ } var clr = opts.fillStyle || this.color; this._dataColors.push(clr); - this.renderer.shapeRenderer.draw(ctx, points, opts); + this.renderer.shapeRenderer.draw(ctx, points, opts); } } - + else if (this.barDirection == 'horizontal'){ for (var i=0; i<gridData.length; i++) { if (!this._stack && this.data[i][0] == null) { @@ -475,7 +475,7 @@ points = []; base = gridData[i][1] - this._barNudge; xstart; - + if (this._stack && this._prevGridData.length) { xstart = getStart(this.index, i, this._plotData[i][0], plot, 'x'); } @@ -529,9 +529,9 @@ } else { opts.fillStyle = positiveColor; - } + } } - + if (!this.fillToZero || this._plotData[i][0] >= 0) { points.push([xstart, base + this.barWidth / 2]); @@ -557,14 +557,14 @@ var clr = opts.fillStyle || this.color; this._dataColors.push(clr); this.renderer.shapeRenderer.draw(ctx, points, opts); - } + } } - } - + } + if (this.highlightColors.length == 0) { this.highlightColors = $.jqplot.computeHighlightColors(this._dataColors); } - + else if (typeof(this.highlightColors) == 'string') { var temp = this.highlightColors; this.highlightColors = []; @@ -572,10 +572,10 @@ this.highlightColors.push(temp); } } - + }; - - + + // for stacked plots, shadows will be pre drawn by drawShadow. $.jqplot.BarRenderer.prototype.drawShadow = function(ctx, gridData, options, plot) { var i; @@ -588,17 +588,17 @@ var xp = this._xaxis.series_u2p; var yp = this._yaxis.series_u2p; var pointx, points, pointy, nvals, nseries, pos; - + if (this._stack && this.shadow) { if (this.barWidth == null) { this.renderer.setBarWidth.call(this); } - + var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this); nvals = temp[0]; nseries = temp[1]; pos = temp[2]; - + if (this._stack) { this._barNudge = 0; } @@ -606,7 +606,7 @@ this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding); } if (showLine) { - + if (this.barDirection == 'vertical') { for (var i=0; i<gridData.length; i++) { if (this.data[i][1] == null) { @@ -615,7 +615,7 @@ points = []; var base = gridData[i][0] + this._barNudge; var ystart; - + if (this._stack && this._prevGridData.length) { ystart = getStart(this.index, i, this._plotData[i][1], plot, 'y'); } @@ -627,7 +627,7 @@ ystart = ctx.canvas.height; } } - + points.push([base-this.barWidth/2, ystart]); points.push([base-this.barWidth/2, gridData[i][1]]); points.push([base+this.barWidth/2, gridData[i][1]]); @@ -635,7 +635,7 @@ this.renderer.shadowRenderer.draw(ctx, points, opts); } } - + else if (this.barDirection == 'horizontal'){ for (var i=0; i<gridData.length; i++) { if (this.data[i][0] == null) { @@ -644,7 +644,7 @@ points = []; var base = gridData[i][1] - this._barNudge; var xstart; - + if (this._stack && this._prevGridData.length) { xstart = getStart(this.index, i, this._plotData[i][0], plot, 'x'); } @@ -656,19 +656,19 @@ xstart = 0; } } - + points.push([xstart, base+this.barWidth/2]); points.push([gridData[i][0], base+this.barWidth/2]); points.push([gridData[i][0], base-this.barWidth/2]); points.push([xstart, base-this.barWidth/2]); this.renderer.shadowRenderer.draw(ctx, points, opts); - } + } } - } - + } + } }; - + function postInit(target, data, options) { for (var i=0; i<this.series.length; i++) { if (this.series[i].renderer.constructor == $.jqplot.BarRenderer) { @@ -679,26 +679,26 @@ } } } - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.barRenderer && this.plugins.barRenderer.highlightCanvas) { this.plugins.barRenderer.highlightCanvas.resetCanvas(); this.plugins.barRenderer.highlightCanvas = null; } - + this.plugins.barRenderer = {highlightedSeriesIndex:null}; this.plugins.barRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-barRenderer-highlight-canvas', this._plotDimensions, this)); this.plugins.barRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); - } - + } + function highlight (plot, sidx, pidx, points) { var s = plot.series[sidx]; var canvas = plot.plugins.barRenderer.highlightCanvas; @@ -709,7 +709,7 @@ s.renderer.shapeRenderer.draw(canvas._ctx, points, opts); canvas = null; } - + function unhighlight (plot) { var canvas = plot.plugins.barRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -720,8 +720,8 @@ plot.target.trigger('jqplotDataUnhighlight'); canvas = null; } - - + + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -742,7 +742,7 @@ unhighlight (plot); } } - + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -759,14 +759,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.barRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -777,7 +777,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -792,6 +792,6 @@ plot.target.trigger(evt, ins); } } - - -})(jQuery); \ No newline at end of file + + +})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.min.js index 02a32857..47f85dd8 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.barRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(d){d.jqplot.BarRenderer=function(){d.jqplot.LineRenderer.call(this)};d.jqplot.BarRenderer.prototype=new d.jqplot.LineRenderer();d.jqplot.BarRenderer.prototype.constructor=d.jqplot.BarRenderer;d.jqplot.BarRenderer.prototype.init=function(o,q){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.groups=1;this.varyBarColor=false;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.transposedData=true;this.renderer.animation={show:false,direction:"down",speed:3000,_supported:true};this._type="bar";if(o.highlightMouseDown&&o.highlightMouseOver==null){o.highlightMouseOver=false}d.extend(true,this,o);d.extend(true,this.renderer,o);this.fill=true;if(this.barDirection==="horizontal"&&this.rendererOptions.animation&&this.rendererOptions.animation.direction==null){this.renderer.animation.direction="left"}if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}this._highlightedPoint=null;this._plotSeriesInfo=null;this._dataColors=[];this._barPoints=[];var p={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(p);var n={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(n);q.postInitHooks.addOnce(h);q.postDrawHooks.addOnce(j);q.eventListenerHooks.addOnce("jqplotMouseMove",b);q.eventListenerHooks.addOnce("jqplotMouseDown",a);q.eventListenerHooks.addOnce("jqplotMouseUp",l);q.eventListenerHooks.addOnce("jqplotClick",e);q.eventListenerHooks.addOnce("jqplotRightClick",m)};function g(t,p,o,w){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=d.extend(true,[],this.data);var s=0;var u=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection==="vertical"||this.transposedData===false)?1:0;for(var q=0;q<this.data.length;q++){s+=this.data[q][u];if(q>0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q<n;q+=v){this.data.splice(q+r,0,[null,null]);this._plotData.splice(q+r,0,[null,null]);this._stackData.splice(q+r,0,[null,null]);r++}for(q=0;q<this.data.length;q++){if(this._primaryAxis=="_xaxis"){this.data[q][0]=q+1;this._plotData[q][0]=q+1;this._stackData[q][0]=q+1}else{this.data[q][1]=q+1;this._plotData[q][1]=q+1;this._stackData[q][1]=q+1}}}}d.jqplot.preSeriesInitHooks.push(g);d.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var r=0;var t=0;var q=this[this._primaryAxis];var p,o,u;for(var n=0;n<q._series.length;n++){o=q._series[n];if(o===this){u=n}if(o.renderer.constructor==d.jqplot.BarRenderer){r+=o.data.length;t+=1}}return[r,t,u]};d.jqplot.BarRenderer.prototype.setBarWidth=function(){var q;var n=0;var o=0;var t=this[this._primaryAxis];var x,r,v;var w=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);n=w[0];o=w[1];var u=t.numberTicks;var p=(u-1)/2;if(t.name=="xaxis"||t.name=="x2axis"){if(this._stack){this.barWidth=(t._offsets.max-t._offsets.min)/n*o-this.barMargin}else{this.barWidth=((t._offsets.max-t._offsets.min)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}else{if(this._stack){this.barWidth=(t._offsets.min-t._offsets.max)/n*o-this.barMargin}else{this.barWidth=((t._offsets.min-t._offsets.max)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}return[n,o]};function f(o){var q=[];for(var s=0;s<o.length;s++){var r=d.jqplot.getColorComponents(o[s]);var n=[r[0],r[1],r[2]];var t=n[0]+n[1]+n[2];for(var p=0;p<3;p++){n[p]=(t>570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);var x=N[0];var v=N[1];var s=N[2];var H=[];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(v/2-0.5)+s)*(this.barWidth+this.barPadding)}if(O){var u=new d.jqplot.ColorGenerator(this.negativeSeriesColors);var B=new d.jqplot.ColorGenerator(this.seriesColors);var M=u.get(this.index);if(!this.useNegativeColors){M=A.fillStyle}var t=A.fillStyle;var r;var P;var o;if(this.barDirection=="vertical"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][1]==null){continue}H=[];r=L[I][0]+this._barNudge;if(this._stack&&this._prevGridData.length){o=i(this.index,I,this._plotData[I][1],G,"y")}else{if(this.fillToZero){o=this._yaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){o=this.gridData[I-1][1]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{o=E.canvas.height}}}}}if((this.fillToZero&&this._plotData[I][1]<0)||(this.waterfall&&this._data[I][1]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][1]>=0){H.push([r-this.barWidth/2,o]);H.push([r-this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,o])}else{H.push([r-this.barWidth/2,L[I][1]]);H.push([r-this.barWidth/2,o]);H.push([r+this.barWidth/2,o]);H.push([r+this.barWidth/2,L[I][1]])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}else{if(this.barDirection=="horizontal"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][0]==null){continue}H=[];r=L[I][1]-this._barNudge;P;if(this._stack&&this._prevGridData.length){P=i(this.index,I,this._plotData[I][0],G,"x")}else{if(this.fillToZero){P=this._xaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){P=this.gridData[I-1][0]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=E.canvas.width}}}else{P=0}}}}}if((this.fillToZero&&this._plotData[I][1]<0)||(this.waterfall&&this._data[I][1]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][0]>=0){H.push([P,r+this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([L[I][0],r+this.barWidth/2])}else{H.push([L[I][0],r+this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([P,r+this.barWidth/2])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}}}if(this.highlightColors.length==0){this.highlightColors=d.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){var N=this.highlightColors;this.highlightColors=[];for(var I=0;I<this._dataColors.length;I++){this.highlightColors.push(N)}}}};d.jqplot.BarRenderer.prototype.drawShadow=function(z,G,p,B){var D;var w=(p!=undefined)?p:{};var t=(w.shadow!=undefined)?w.shadow:this.shadow;var I=(w.showLine!=undefined)?w.showLine:this.showLine;var A=(w.fill!=undefined)?w.fill:this.fill;var o=this.xaxis;var E=this.yaxis;var v=this._xaxis.series_u2p;var F=this._yaxis.series_u2p;var y,C,x,u,s,r;if(this._stack&&this.shadow){if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var H=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);u=H[0];s=H[1];r=H[2];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(s/2-0.5)+r)*(this.barWidth+this.barPadding)}if(I){if(this.barDirection=="vertical"){for(var D=0;D<G.length;D++){if(this.data[D][1]==null){continue}C=[];var q=G[D][0]+this._barNudge;var n;if(this._stack&&this._prevGridData.length){n=i(this.index,D,this._plotData[D][1],B,"y")}else{if(this.fillToZero){n=this._yaxis.series_u2p(0)}else{n=z.canvas.height}}C.push([q-this.barWidth/2,n]);C.push([q-this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,n]);this.renderer.shadowRenderer.draw(z,C,w)}}else{if(this.barDirection=="horizontal"){for(var D=0;D<G.length;D++){if(this.data[D][0]==null){continue}C=[];var q=G[D][1]-this._barNudge;var J;if(this._stack&&this._prevGridData.length){J=i(this.index,D,this._plotData[D][0],B,"x")}else{if(this.fillToZero){J=this._xaxis.series_u2p(0)}else{J=0}}C.push([J,q+this.barWidth/2]);C.push([G[D][0],q+this.barWidth/2]);C.push([G[D][0],q-this.barWidth/2]);C.push([J,q-this.barWidth/2]);this.renderer.shadowRenderer.draw(z,C,w)}}}}}};function h(q,p,n){for(var o=0;o<this.series.length;o++){if(this.series[o].renderer.constructor==d.jqplot.BarRenderer){if(this.series[o].highlightMouseOver){this.series[o].highlightMouseDown=false}}}}function j(){if(this.plugins.barRenderer&&this.plugins.barRenderer.highlightCanvas){this.plugins.barRenderer.highlightCanvas.resetCanvas();this.plugins.barRenderer.highlightCanvas=null}this.plugins.barRenderer={highlightedSeriesIndex:null};this.plugins.barRenderer.highlightCanvas=new d.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-barRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.barRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(n){k(n.data.plot)})}function c(u,t,q,p){var o=u.series[t];var n=u.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);o._highlightedPoint=q;u.plugins.barRenderer.highlightedSeriesIndex=t;var r={fillStyle:o.highlightColors[q]};o.renderer.shapeRenderer.draw(n._ctx,p,r);n=null}function k(p){var n=p.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);for(var o=0;o<p.series.length;o++){p.series[o]._highlightedPoint=null}p.plugins.barRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight");n=null}function b(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataMouseOver");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);if(s.series[p[0]].highlightMouseOver&&!(p[0]==s.plugins.barRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=r.which;n.pageX=r.pageX;n.pageY=r.pageY;s.target.trigger(n,p);c(s,t.seriesIndex,t.pointIndex,t.points)}}else{if(t==null){k(s)}}}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];if(r.series[o[0]].highlightMouseDown&&!(o[0]==r.plugins.barRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);c(r,s.seriesIndex,s.pointIndex,s.points)}}else{if(s==null){k(r)}}}function l(p,o,s,r,q){var n=q.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&q.series[n].highlightMouseDown){k(q)}}function e(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataClick");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function m(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var n=s.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&s.series[n].highlightMouseDown){k(s)}var o=jQuery.Event("jqplotDataRightClick");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.js index 5f2bc341..f2447058 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,35 +26,35 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** * Class: $.jqplot.BlockRenderer * Plugin renderer to draw a x-y block chart. A Block chart has data points displayed as * colored squares with a text label inside. Data must be supplied in the form: - * + * * > [[x1, y1, "label 1", {css}], [x2, y2, "label 2", {css}], ...] - * + * * The label and css object are optional. If the label is ommitted, the * box will collapse unless a css height and/or width is specified. - * - * The css object is an object specifying css properties + * + * The css object is an object specifying css properties * such as: - * + * * > {background:'#4f98a5', border:'3px solid gray', padding:'1px'} - * + * * Note that css properties specified with the data point override defaults * specified with the series. - * + * */ $.jqplot.BlockRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.BlockRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.BlockRenderer.prototype.constructor = $.jqplot.BlockRenderer; - + // called with scope of a series $.jqplot.BlockRenderer.prototype.init = function(options) { // Group: Properties @@ -91,8 +91,8 @@ this.canvas._plotDimensions = this._plotDimensions; this.shadowCanvas._plotDimensions = this._plotDimensions; this._type = 'block'; - - // group: Methods + + // group: Methods // // Method: moveBlock // Moves an individual block. More efficient than redrawing @@ -132,7 +132,7 @@ el = null; }; }; - + // called with scope of series $.jqplot.BlockRenderer.prototype.draw = function (ctx, gd, options) { if (this.plugins.pointLabels) { @@ -156,7 +156,7 @@ if (typeof d[3] == 'object') { css = d[3]; } - if (this.insertBreaks){ + if (this.insertBreaks){ t = t.replace(/ /g, '<br />'); } css = $.extend(true, {}, this.css, css); @@ -170,7 +170,7 @@ delete css.position; delete css.marginRight; delete css.marginLeft; - if (!css.background && !css.backgroundColor && !css.backgroundImage){ + if (!css.background && !css.backgroundColor && !css.backgroundImage){ css.background = colorGenerator.next(); } el.css(css); @@ -182,15 +182,15 @@ el = null; } }; - + $.jqplot.BlockCanvas = function() { $.jqplot.ElemContainer.call(this); - this._ctx; + this._ctx; }; - + $.jqplot.BlockCanvas.prototype = new $.jqplot.ElemContainer(); $.jqplot.BlockCanvas.prototype.constructor = $.jqplot.BlockCanvas; - + $.jqplot.BlockCanvas.prototype.createElement = function(offsets, clss, plotDimensions) { this._offsets = offsets; var klass = 'jqplot-blockCanvas'; @@ -209,16 +209,16 @@ if (plotDimensions != undefined) { this._plotDimensions = plotDimensions; } - + var w = this._plotDimensions.width - this._offsets.left - this._offsets.right + 'px'; var h = this._plotDimensions.height - this._offsets.top - this._offsets.bottom + 'px'; this._elem = $(elem); this._elem.css({ position: 'absolute', width:w, height:h, left: this._offsets.left, top: this._offsets.top }); - + this._elem.addClass(klass); return this._elem; }; - + $.jqplot.BlockCanvas.prototype.setContext = function() { this._ctx = { canvas:{ @@ -229,7 +229,6 @@ }; return this._ctx; }; - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.min.js index 2d5207a9..62cfd0b8 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.blockRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.BlockRenderer=function(){a.jqplot.LineRenderer.call(this)};a.jqplot.BlockRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.BlockRenderer.prototype.constructor=a.jqplot.BlockRenderer;a.jqplot.BlockRenderer.prototype.init=function(b){this.css={padding:"2px",border:"1px solid #999",textAlign:"center"};this.escapeHtml=false;this.insertBreaks=true;this.varyBlockColors=false;a.extend(true,this,b);if(this.css.backgroundColor){this.color=this.css.backgroundColor}else{if(this.css.background){this.color=this.css.background}else{if(!this.varyBlockColors){this.css.background=this.color}}}this.canvas=new a.jqplot.BlockCanvas();this.shadowCanvas=new a.jqplot.BlockCanvas();this.canvas._plotDimensions=this._plotDimensions;this.shadowCanvas._plotDimensions=this._plotDimensions;this._type="block";this.moveBlock=function(l,j,i,e){var c=this.canvas._elem.children(":eq("+l+")");this.data[l][0]=j;this.data[l][1]=i;this._plotData[l][0]=j;this._plotData[l][1]=i;this._stackData[l][0]=j;this._stackData[l][1]=i;this.gridData[l][0]=this._xaxis.series_u2p(j);this.gridData[l][1]=this._yaxis.series_u2p(i);var k=c.outerWidth();var f=c.outerHeight();var d=this.gridData[l][0]-k/2+"px";var g=this.gridData[l][1]-f/2+"px";if(e){if(parseInt(e,10)){e=parseInt(e,10)}c.animate({left:d,top:g},e)}else{c.css({left:d,top:g})}c=null}};a.jqplot.BlockRenderer.prototype.draw=function(q,o,r){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var f,c,l,o,p,k,n,g,e,m;var b=(r!=undefined)?r:{};var j=new a.jqplot.ColorGenerator(this.seriesColors);this.canvas._elem.empty();for(f=0;f<this.gridData.length;f++){l=this.data[f];o=this.gridData[f];p="";k={};if(typeof l[2]=="string"){p=l[2]}else{if(typeof l[2]=="object"){k=l[2]}}if(typeof l[3]=="object"){k=l[3]}if(this.insertBreaks){p=p.replace(/ /g,"<br />")}k=a.extend(true,{},this.css,k);c=a('<div style="position:absolute;margin-left:auto;margin-right:auto;"></div>');this.canvas._elem.append(c);this.escapeHtml?c.text(p):c.html(p);delete k.position;delete k.marginRight;delete k.marginLeft;if(!k.background&&!k.backgroundColor&&!k.backgroundImage){k.background=j.next()}c.css(k);n=c.outerWidth();g=c.outerHeight();e=o[0]-n/2+"px";m=o[1]-g/2+"px";c.css({left:e,top:m});c=null}};a.jqplot.BlockCanvas=function(){a.jqplot.ElemContainer.call(this);this._ctx};a.jqplot.BlockCanvas.prototype=new a.jqplot.ElemContainer();a.jqplot.BlockCanvas.prototype.constructor=a.jqplot.BlockCanvas;a.jqplot.BlockCanvas.prototype.createElement=function(i,e,c){this._offsets=i;var b="jqplot-blockCanvas";if(e!=undefined){b=e}var g;if(this._elem){g=this._elem.get(0)}else{g=document.createElement("div")}if(c!=undefined){this._plotDimensions=c}var d=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var f=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=a(g);this._elem.css({position:"absolute",width:d,height:f,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(b);return this._elem};a.jqplot.BlockCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.js index d46f7b77..3793d6de 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { var arrayMax = function( array ){ @@ -41,30 +41,30 @@ * Plugin renderer to draw a bubble chart. A Bubble chart has data points displayed as * colored circles with an optional text label inside. To use * the bubble renderer, you must include the bubble renderer like: - * + * * > <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.bubbleRenderer.js"></script> - * - * Data must be supplied in + * + * Data must be supplied in * the form: - * + * * > [[x1, y1, r1, <label or {label:'text', color:color}>], ...] - * - * where the label or options - * object is optional. - * + * + * where the label or options + * object is optional. + * * Note that all bubble colors will be the same * unless the "varyBubbleColors" option is set to true. Colors can be specified in the data array * or in the seriesColors array option on the series. If no colors are defined, the default jqPlot * series of 16 colors are used. Colors are automatically cycled around again if there are more * bubbles than colors. - * - * Bubbles are autoscaled by default to fit within the chart area while maintaining + * + * Bubbles are autoscaled by default to fit within the chart area while maintaining * relative sizes. If the "autoscaleBubbles" option is set to false, the r(adius) values * in the data array a treated as literal pixel values for the radii of the bubbles. - * + * * Properties are passed into the bubble renderer in the rendererOptions object of * the series options like: - * + * * > seriesDefaults: { * > renderer: $.jqplot.BubbleRenderer, * > rendererOptions: { @@ -72,15 +72,15 @@ * > varyBubbleColors: false * > } * > } - * + * */ $.jqplot.BubbleRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.BubbleRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.BubbleRenderer.prototype.constructor = $.jqplot.BubbleRenderer; - + // called with scope of a series $.jqplot.BubbleRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -135,7 +135,7 @@ // prop: showLabels // True to show labels on bubbles (if any), false to not show. this.showLabels = true; - // array of [point index, radius] which will be sorted in descending order to plot + // array of [point index, radius] which will be sorted in descending order to plot // largest points below smaller points. this.radii = []; this.maxRadius = 0; @@ -145,26 +145,26 @@ this.labels = []; this.bubbleCanvases = []; this._type = 'bubble'; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } - + $.extend(true, this, options); - + if (this.highlightAlpha == null) { this.highlightAlpha = this.bubbleAlpha; if (this.bubbleGradients) { this.highlightAlpha = 0.35; } } - + this.autoscaleMultiplier = this.autoscaleMultiplier * Math.pow(this.data.length, this.autoscalePointsFactor); - + // index of the currenty highlighted point, if any this._highlightedPoint = null; - + // adjust the series colors for options colors passed in with data or for alpha. // note, this can leave undefined holes in the seriesColors array. var comps; @@ -177,29 +177,29 @@ color = d[3]['color']; } } - + if (color == null) { if (this.seriesColors[i] != null) { color = this.seriesColors[i]; } } - + if (color && this.bubbleAlpha < 1.0) { comps = $.jqplot.getColorComponents(color); color = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', '+this.bubbleAlpha+')'; } - + if (color) { this.seriesColors[i] = color; } } - + if (!this.varyBubbleColors) { this.seriesColors = [this.color]; } - + this.colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors); - + // set highlight colors if none provided if (this.highlightColors.length == 0) { for (var i=0; i<this.seriesColors.length; i++){ @@ -214,25 +214,25 @@ this.highlightColors.push('rgba('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+', '+this.highlightAlpha+')'); } } - + this.highlightColorGenerator = new $.jqplot.ColorGenerator(this.highlightColors); - + var sopts = {fill:true, isarc:true, angle:this.shadowAngle, alpha:this.shadowAlpha, closePath:true}; - + this.renderer.shadowRenderer.init(sopts); - + this.canvas = new $.jqplot.DivCanvas(); this.canvas._plotDimensions = this._plotDimensions; - + plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove); plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown); plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp); plot.eventListenerHooks.addOnce('jqplotClick', handleClick); plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); plot.postDrawHooks.addOnce(postPlotDraw); - + }; - + // converts the user data values to grid coordinates and stores them // in the gridData array. @@ -262,10 +262,10 @@ this.gridData[i][2] = r * val; } } - + this.radii.sort(function(a, b) { return b[1] - a[1]; }); }; - + // converts any arbitrary data values to grid coordinates and // returns them. This method exists so that plugins can use a series' // linerenderer to generate grid data points without overwriting the @@ -298,7 +298,7 @@ this.radii.sort(function(a, b) { return b[1] - a[1]; }); return gd; }; - + // called with scope of series $.jqplot.BubbleRenderer.prototype.draw = function (ctx, gd, options) { if (this.plugins.pointLabels) { @@ -323,10 +323,10 @@ t = d[3]; } } - + // color = (this.varyBubbleColors) ? this.colorGenerator.get(idx) : this.color; color = this.colorGenerator.get(idx); - + // If we're drawing a shadow, expand the canvas dimensions to accomodate. var canvasRadius = gd[2]; var offset, depth; @@ -345,7 +345,7 @@ this.renderer.shadowRenderer.draw(ctx, [x, y, gd[2], 0, 2*Math.PI], {offset: offset, depth: depth}); } this.bubbleCanvases[idx].draw(gd[2], color, this.bubbleGradients, this.shadowAngle/180*Math.PI); - + // now draw label. if (t && this.showLabels) { tel = $('<div style="position:absolute;" class="jqplot-bubble-label"></div>'); @@ -366,15 +366,15 @@ } }; - + $.jqplot.DivCanvas = function() { $.jqplot.ElemContainer.call(this); - this._ctx; + this._ctx; }; - + $.jqplot.DivCanvas.prototype = new $.jqplot.ElemContainer(); $.jqplot.DivCanvas.prototype.constructor = $.jqplot.DivCanvas; - + $.jqplot.DivCanvas.prototype.createElement = function(offsets, clss, plotDimensions) { this._offsets = offsets; var klass = 'jqplot-DivCanvas'; @@ -393,16 +393,16 @@ if (plotDimensions != undefined) { this._plotDimensions = plotDimensions; } - + var w = this._plotDimensions.width - this._offsets.left - this._offsets.right + 'px'; var h = this._plotDimensions.height - this._offsets.top - this._offsets.bottom + 'px'; this._elem = $(elem); this._elem.css({ position: 'absolute', width:w, height:h, left: this._offsets.left, top: this._offsets.top }); - + this._elem.addClass(klass); return this._elem; }; - + $.jqplot.DivCanvas.prototype.setContext = function() { this._ctx = { canvas:{ @@ -413,17 +413,17 @@ }; return this._ctx; }; - + $.jqplot.BubbleCanvas = function() { $.jqplot.ElemContainer.call(this); this._ctx; }; - + $.jqplot.BubbleCanvas.prototype = new $.jqplot.ElemContainer(); $.jqplot.BubbleCanvas.prototype.constructor = $.jqplot.BubbleCanvas; - + // initialize with the x,y pont of bubble center and the bubble radius. - $.jqplot.BubbleCanvas.prototype.createElement = function(x, y, r) { + $.jqplot.BubbleCanvas.prototype.createElement = function(x, y, r) { var klass = 'jqplot-bubble-point'; var elem; @@ -434,23 +434,23 @@ else { elem = document.createElement('canvas'); } - + elem.width = (r != null) ? 2*r : elem.width; elem.height = (r != null) ? 2*r : elem.height; this._elem = $(elem); var l = (x != null && r != null) ? x - r : this._elem.css('left'); var t = (y != null && r != null) ? y - r : this._elem.css('top'); this._elem.css({ position: 'absolute', left: l, top: t }); - + this._elem.addClass(klass); if ($.jqplot.use_excanvas) { window.G_vmlCanvasManager.init_(document); elem = window.G_vmlCanvasManager.initElement(elem); } - + return this._elem; }; - + $.jqplot.BubbleCanvas.prototype.draw = function(r, color, gradients, angle) { var ctx = this._ctx; // r = Math.floor(r*1.04); @@ -491,19 +491,19 @@ } ctx.restore(); }; - + $.jqplot.BubbleCanvas.prototype.setContext = function() { this._ctx = this._elem.get(0).getContext("2d"); return this._ctx; }; - + $.jqplot.BubbleAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.BubbleAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.BubbleAxisRenderer.prototype.constructor = $.jqplot.BubbleAxisRenderer; - + // called with scope of axis object. $.jqplot.BubbleAxisRenderer.prototype.init = function(options){ $.extend(true, this, options); @@ -523,8 +523,8 @@ for (var i=0; i<this._series.length; i++) { var s = this._series[i]; var d = s._plotData; - - for (var j=0; j<d.length; j++) { + + for (var j=0; j<d.length; j++) { if (this.name == 'xaxis' || this.name == 'x2axis') { if (d[j][0] < db.min || db.min == null) { db.min = d[j][0]; @@ -542,7 +542,7 @@ maxMaxRadius = s.maxRadius; maxMult = s.autoscaleMultiplier; } - } + } else { if (d[j][1] < db.min || db.min == null) { db.min = d[j][1]; @@ -560,24 +560,24 @@ maxMaxRadius = s.maxRadius; maxMult = s.autoscaleMultiplier; } - } + } } } - + var minRatio = minr/minMaxRadius; var maxRatio = maxr/maxMaxRadius; - + // need to estimate the effect of the radius on total axis span and adjust axis accordingly. var span = db.max - db.min; // var dim = (this.name == 'xaxis' || this.name == 'x2axis') ? this._plotDimensions.width : this._plotDimensions.height; var dim = Math.min(this._plotDimensions.width, this._plotDimensions.height); - + var minfact = minRatio * minMult/3 * span; var maxfact = maxRatio * maxMult/3 * span; db.max += maxfact; db.min -= minfact; }; - + function highlight (plot, sidx, pidx) { plot.plugins.bubbleRenderer.highlightLabelCanvas.empty(); var s = plot.series[sidx]; @@ -586,7 +586,7 @@ ctx.clearRect(0,0,ctx.canvas.width, ctx.canvas.height); s._highlightedPoint = pidx; plot.plugins.bubbleRenderer.highlightedSeriesIndex = sidx; - + var color = s.highlightColorGenerator.get(pidx); var x = s.gridData[pidx][0], y = s.gridData[pidx][1], @@ -599,7 +599,7 @@ ctx.arc(x, y, r, 0, 2*Math.PI, 0); ctx.closePath(); ctx.fill(); - ctx.restore(); + ctx.restore(); // bring label to front if (s.labels[pidx]) { plot.plugins.bubbleRenderer.highlightLabel = s.labels[pidx].clone(); @@ -607,7 +607,7 @@ plot.plugins.bubbleRenderer.highlightLabel.addClass('jqplot-bubble-label-highlight'); } } - + function unhighlight (plot) { var canvas = plot.plugins.bubbleRenderer.highlightCanvas; var sidx = plot.plugins.bubbleRenderer.highlightedSeriesIndex; @@ -619,8 +619,8 @@ plot.plugins.bubbleRenderer.highlightedSeriesIndex = null; plot.target.trigger('jqplotDataUnhighlight'); } - - + + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var si = neighbor.seriesIndex; @@ -642,8 +642,8 @@ else if (neighbor == null) { unhighlight (plot); } - } - + } + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var si = neighbor.seriesIndex; @@ -662,14 +662,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var si = neighbor.seriesIndex; @@ -682,7 +682,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var si = neighbor.seriesIndex; @@ -699,17 +699,17 @@ plot.target.trigger(evt, ins); } } - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.bubbleRenderer && this.plugins.bubbleRenderer.highlightCanvas) { this.plugins.bubbleRenderer.highlightCanvas.resetCanvas(); this.plugins.bubbleRenderer.highlightCanvas = null; } - + this.plugins.bubbleRenderer = {highlightedSeriesIndex:null}; this.plugins.bubbleRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); this.plugins.bubbleRenderer.highlightLabel = null; @@ -722,11 +722,11 @@ this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-bubbleRenderer-highlight-canvas', this._plotDimensions, this)); this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightLabelCanvas); - + var hctx = this.plugins.bubbleRenderer.highlightCanvas.setContext(); } - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -745,15 +745,14 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.BubbleAxisRenderer; options.sortData = false; } } - + $.jqplot.preInitHooks.push(preInit); - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.min.js index 295e4399..288dfafc 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.bubbleRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(f){var d=function(m){return Math.max.apply(Math,m)};var j=function(m){return Math.min.apply(Math,m)};f.jqplot.BubbleRenderer=function(){f.jqplot.LineRenderer.call(this)};f.jqplot.BubbleRenderer.prototype=new f.jqplot.LineRenderer();f.jqplot.BubbleRenderer.prototype.constructor=f.jqplot.BubbleRenderer;f.jqplot.BubbleRenderer.prototype.init=function(w,t){this.varyBubbleColors=true;this.autoscaleBubbles=true;this.autoscaleMultiplier=1;this.autoscalePointsFactor=-0.07;this.escapeHtml=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.bubbleAlpha=1;this.highlightAlpha=null;this.bubbleGradients=false;this.showLabels=true;this.radii=[];this.maxRadius=0;this._highlightedPoint=null;this.labels=[];this.bubbleCanvases=[];this._type="bubble";if(w.highlightMouseDown&&w.highlightMouseOver==null){w.highlightMouseOver=false}f.extend(true,this,w);if(this.highlightAlpha==null){this.highlightAlpha=this.bubbleAlpha;if(this.bubbleGradients){this.highlightAlpha=0.35}}this.autoscaleMultiplier=this.autoscaleMultiplier*Math.pow(this.data.length,this.autoscalePointsFactor);this._highlightedPoint=null;var n;for(var r=0;r<this.data.length;r++){var p=null;var v=this.data[r];this.maxRadius=Math.max(this.maxRadius,v[2]);if(v[3]){if(typeof(v[3])=="object"){p=v[3]["color"]}}if(p==null){if(this.seriesColors[r]!=null){p=this.seriesColors[r]}}if(p&&this.bubbleAlpha<1){n=f.jqplot.getColorComponents(p);p="rgba("+n[0]+", "+n[1]+", "+n[2]+", "+this.bubbleAlpha+")"}if(p){this.seriesColors[r]=p}}if(!this.varyBubbleColors){this.seriesColors=[this.color]}this.colorGenerator=new f.jqplot.ColorGenerator(this.seriesColors);if(this.highlightColors.length==0){for(var r=0;r<this.seriesColors.length;r++){var o=f.jqplot.getColorComponents(this.seriesColors[r]);var u=[o[0],o[1],o[2]];var s=u[0]+u[1]+u[2];for(var q=0;q<3;q++){u[q]=(s>570)?u[q]*0.8:u[q]+0.3*(255-u[q]);u[q]=parseInt(u[q],10)}this.highlightColors.push("rgba("+u[0]+","+u[1]+","+u[2]+", "+this.highlightAlpha+")")}}this.highlightColorGenerator=new f.jqplot.ColorGenerator(this.highlightColors);var m={fill:true,isarc:true,angle:this.shadowAngle,alpha:this.shadowAlpha,closePath:true};this.renderer.shadowRenderer.init(m);this.canvas=new f.jqplot.DivCanvas();this.canvas._plotDimensions=this._plotDimensions;t.eventListenerHooks.addOnce("jqplotMouseMove",a);t.eventListenerHooks.addOnce("jqplotMouseDown",b);t.eventListenerHooks.addOnce("jqplotMouseUp",k);t.eventListenerHooks.addOnce("jqplotClick",g);t.eventListenerHooks.addOnce("jqplotRightClick",l);t.postDrawHooks.addOnce(h)};f.jqplot.BubbleRenderer.prototype.setGridData=function(w){var q=this._xaxis.series_u2p;var m=this._yaxis.series_u2p;var t=this._plotData;this.gridData=[];var s=[];this.radii=[];var v=Math.min(w._height,w._width);for(var u=0;u<this.data.length;u++){if(t[u]!=null){this.gridData.push([q.call(this._xaxis,t[u][0]),m.call(this._yaxis,t[u][1]),t[u][2]]);this.radii.push([u,t[u][2]]);s.push(t[u][2])}}var n,o,x=this.maxRadius=d(s);var p=this.gridData.length;if(this.autoscaleBubbles){for(var u=0;u<p;u++){o=s[u]/x;n=this.autoscaleMultiplier*v/6;this.gridData[u][2]=n*o}}this.radii.sort(function(y,r){return r[1]-y[1]})};f.jqplot.BubbleRenderer.prototype.makeGridData=function(t,w){var q=this._xaxis.series_u2p;var n=this._yaxis.series_u2p;var x=[];var s=[];this.radii=[];var v=Math.min(w._height,w._width);for(var u=0;u<t.length;u++){if(t[u]!=null){x.push([q.call(this._xaxis,t[u][0]),n.call(this._yaxis,t[u][1]),t[u][2]]);s.push(t[u][2]);this.radii.push([u,t[u][2]])}}var m,o,y=this.maxRadius=d(s);var p=this.gridData.length;if(this.autoscaleBubbles){for(var u=0;u<p;u++){o=s[u]/y;m=this.autoscaleMultiplier*v/6;x[u][2]=m*o}}this.radii.sort(function(z,r){return r[1]-z[1]});return x};f.jqplot.BubbleRenderer.prototype.draw=function(D,J,n){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var A=(n!=undefined)?n:{};var r=(A.shadow!=undefined)?A.shadow:this.shadow;this.canvas._elem.empty();for(var G=0;G<this.radii.length;G++){var C=this.radii[G][0];var z=null;var F=null;var m=null;var p=null;var I=this.data[C];var J=this.gridData[C];if(I[3]){if(typeof(I[3])=="object"){z=I[3]["label"]}else{if(typeof(I[3])=="string"){z=I[3]}}}F=this.colorGenerator.get(C);var E=J[2];var q,K;if(this.shadow){q=(0.7+J[2]/40).toFixed(1);K=1+Math.ceil(J[2]/15);E+=q*K}this.bubbleCanvases[C]=new f.jqplot.BubbleCanvas();this.canvas._elem.append(this.bubbleCanvases[C].createElement(J[0],J[1],E));this.bubbleCanvases[C].setContext();var D=this.bubbleCanvases[C]._ctx;var u=D.canvas.width/2;var s=D.canvas.height/2;if(this.shadow){this.renderer.shadowRenderer.draw(D,[u,s,J[2],0,2*Math.PI],{offset:q,depth:K})}this.bubbleCanvases[C].draw(J[2],F,this.bubbleGradients,this.shadowAngle/180*Math.PI);if(z&&this.showLabels){p=f('<div style="position:absolute;" class="jqplot-bubble-label"></div>');if(this.escapeHtml){p.text(z)}else{p.html(z)}this.canvas._elem.append(p);var H=f(p).outerHeight();var v=f(p).outerWidth();var B=J[1]-0.5*H;var o=J[0]-0.5*v;p.css({top:B,left:o});this.labels[C]=f(p)}}};f.jqplot.DivCanvas=function(){f.jqplot.ElemContainer.call(this);this._ctx};f.jqplot.DivCanvas.prototype=new f.jqplot.ElemContainer();f.jqplot.DivCanvas.prototype.constructor=f.jqplot.DivCanvas;f.jqplot.DivCanvas.prototype.createElement=function(s,p,n){this._offsets=s;var m="jqplot-DivCanvas";if(p!=undefined){m=p}var r;if(this._elem){r=this._elem.get(0)}else{r=document.createElement("div")}if(n!=undefined){this._plotDimensions=n}var o=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var q=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=f(r);this._elem.css({position:"absolute",width:o,height:q,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(m);return this._elem};f.jqplot.DivCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx};f.jqplot.BubbleCanvas=function(){f.jqplot.ElemContainer.call(this);this._ctx};f.jqplot.BubbleCanvas.prototype=new f.jqplot.ElemContainer();f.jqplot.BubbleCanvas.prototype.constructor=f.jqplot.BubbleCanvas;f.jqplot.BubbleCanvas.prototype.createElement=function(n,u,s){var m="jqplot-bubble-point";var q;if(this._elem){q=this._elem.get(0)}else{q=document.createElement("canvas")}q.width=(s!=null)?2*s:q.width;q.height=(s!=null)?2*s:q.height;this._elem=f(q);var o=(n!=null&&s!=null)?n-s:this._elem.css("left");var p=(u!=null&&s!=null)?u-s:this._elem.css("top");this._elem.css({position:"absolute",left:o,top:p});this._elem.addClass(m);if(f.jqplot.use_excanvas){window.G_vmlCanvasManager.init_(document);q=window.G_vmlCanvasManager.initElement(q)}return this._elem};f.jqplot.BubbleCanvas.prototype.draw=function(m,s,v,p){var D=this._ctx;var B=D.canvas.width/2;var z=D.canvas.height/2;D.save();if(v&&!f.jqplot.use_excanvas){m=m*1.04;var o=f.jqplot.getColorComponents(s);var u="rgba("+Math.round(o[0]+0.8*(255-o[0]))+", "+Math.round(o[1]+0.8*(255-o[1]))+", "+Math.round(o[2]+0.8*(255-o[2]))+", "+o[3]+")";var t="rgba("+o[0]+", "+o[1]+", "+o[2]+", 0)";var C=0.35*m;var A=B-Math.cos(p)*0.33*m;var n=z-Math.sin(p)*0.33*m;var w=D.createRadialGradient(A,n,C,B,z,m);w.addColorStop(0,u);w.addColorStop(0.93,s);w.addColorStop(0.96,t);w.addColorStop(1,t);D.fillStyle=w;D.fillRect(0,0,D.canvas.width,D.canvas.height)}else{D.fillStyle=s;D.strokeStyle=s;D.lineWidth=1;D.beginPath();var q=2*Math.PI;D.arc(B,z,m,0,q,0);D.closePath();D.fill()}D.restore()};f.jqplot.BubbleCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};f.jqplot.BubbleAxisRenderer=function(){f.jqplot.LinearAxisRenderer.call(this)};f.jqplot.BubbleAxisRenderer.prototype=new f.jqplot.LinearAxisRenderer();f.jqplot.BubbleAxisRenderer.prototype.constructor=f.jqplot.BubbleAxisRenderer;f.jqplot.BubbleAxisRenderer.prototype.init=function(n){f.extend(true,this,n);var I=this._dataBounds;var H=0,v=0,m=0,y=0,q=0,r=0,D=0,t=0,F=0,z=0;for(var E=0;E<this._series.length;E++){var x=this._series[E];var G=x._plotData;for(var B=0;B<G.length;B++){if(this.name=="xaxis"||this.name=="x2axis"){if(G[B][0]<I.min||I.min==null){I.min=G[B][0];H=E;v=B;r=G[B][2];D=x.maxRadius;z=x.autoscaleMultiplier}if(G[B][0]>I.max||I.max==null){I.max=G[B][0];m=E;y=B;q=G[B][2];t=x.maxRadius;F=x.autoscaleMultiplier}}else{if(G[B][1]<I.min||I.min==null){I.min=G[B][1];H=E;v=B;r=G[B][2];D=x.maxRadius;z=x.autoscaleMultiplier}if(G[B][1]>I.max||I.max==null){I.max=G[B][1];m=E;y=B;q=G[B][2];t=x.maxRadius;F=x.autoscaleMultiplier}}}}var o=r/D;var w=q/t;var C=I.max-I.min;var A=Math.min(this._plotDimensions.width,this._plotDimensions.height);var p=o*z/3*C;var u=w*F/3*C;I.max+=u;I.min-=p};function e(p,v,q){p.plugins.bubbleRenderer.highlightLabelCanvas.empty();var z=p.series[v];var n=p.plugins.bubbleRenderer.highlightCanvas;var w=n._ctx;w.clearRect(0,0,w.canvas.width,w.canvas.height);z._highlightedPoint=q;p.plugins.bubbleRenderer.highlightedSeriesIndex=v;var o=z.highlightColorGenerator.get(q);var u=z.gridData[q][0],t=z.gridData[q][1],m=z.gridData[q][2];w.save();w.fillStyle=o;w.strokeStyle=o;w.lineWidth=1;w.beginPath();w.arc(u,t,m,0,2*Math.PI,0);w.closePath();w.fill();w.restore();if(z.labels[q]){p.plugins.bubbleRenderer.highlightLabel=z.labels[q].clone();p.plugins.bubbleRenderer.highlightLabel.appendTo(p.plugins.bubbleRenderer.highlightLabelCanvas);p.plugins.bubbleRenderer.highlightLabel.addClass("jqplot-bubble-label-highlight")}}function i(p){var m=p.plugins.bubbleRenderer.highlightCanvas;var o=p.plugins.bubbleRenderer.highlightedSeriesIndex;p.plugins.bubbleRenderer.highlightLabelCanvas.empty();m._ctx.clearRect(0,0,m._ctx.canvas.width,m._ctx.canvas.height);for(var n=0;n<p.series.length;n++){p.series[n]._highlightedPoint=null}p.plugins.bubbleRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight")}function a(s,p,m,v,r){if(v){var n=v.seriesIndex;var o=v.pointIndex;var q=[n,o,v.data,r.series[n].gridData[o][2]];var t=jQuery.Event("jqplotDataMouseOver");t.pageX=s.pageX;t.pageY=s.pageY;r.target.trigger(t,q);if(r.series[q[0]].highlightMouseOver&&!(q[0]==r.plugins.bubbleRenderer.highlightedSeriesIndex&&q[1]==r.series[q[0]]._highlightedPoint)){var u=jQuery.Event("jqplotDataHighlight");u.which=s.which;u.pageX=s.pageX;u.pageY=s.pageY;r.target.trigger(u,q);e(r,q[0],q[1])}}else{if(v==null){i(r)}}}function b(s,p,m,u,r){if(u){var n=u.seriesIndex;var o=u.pointIndex;var q=[n,o,u.data,r.series[n].gridData[o][2]];if(r.series[q[0]].highlightMouseDown&&!(q[0]==r.plugins.bubbleRenderer.highlightedSeriesIndex&&q[1]==r.series[q[0]]._highlightedPoint)){var t=jQuery.Event("jqplotDataHighlight");t.which=s.which;t.pageX=s.pageX;t.pageY=s.pageY;r.target.trigger(t,q);e(r,q[0],q[1])}}else{if(u==null){i(r)}}}function k(o,n,r,q,p){var m=p.plugins.bubbleRenderer.highlightedSeriesIndex;if(m!=null&&p.series[m].highlightMouseDown){i(p)}}function g(s,p,m,u,r){if(u){var n=u.seriesIndex;var o=u.pointIndex;var q=[n,o,u.data,r.series[n].gridData[o][2]];var t=jQuery.Event("jqplotDataClick");t.which=s.which;t.pageX=s.pageX;t.pageY=s.pageY;r.target.trigger(t,q)}}function l(s,p,m,v,r){if(v){var n=v.seriesIndex;var o=v.pointIndex;var q=[n,o,v.data,r.series[n].gridData[o][2]];var t=r.plugins.bubbleRenderer.highlightedSeriesIndex;if(t!=null&&r.series[t].highlightMouseDown){i(r)}var u=jQuery.Event("jqplotDataRightClick");u.which=s.which;u.pageX=s.pageX;u.pageY=s.pageY;r.target.trigger(u,q)}}function h(){if(this.plugins.bubbleRenderer&&this.plugins.bubbleRenderer.highlightCanvas){this.plugins.bubbleRenderer.highlightCanvas.resetCanvas();this.plugins.bubbleRenderer.highlightCanvas=null}this.plugins.bubbleRenderer={highlightedSeriesIndex:null};this.plugins.bubbleRenderer.highlightCanvas=new f.jqplot.GenericCanvas();this.plugins.bubbleRenderer.highlightLabel=null;this.plugins.bubbleRenderer.highlightLabelCanvas=f('<div style="position:absolute;"></div>');var q=this._gridPadding.top;var p=this._gridPadding.left;var n=this._plotDimensions.width-this._gridPadding.left-this._gridPadding.right;var m=this._plotDimensions.height-this._gridPadding.top-this._gridPadding.bottom;this.plugins.bubbleRenderer.highlightLabelCanvas.css({top:q,left:p,width:n+"px",height:m+"px"});this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-bubbleRenderer-highlight-canvas",this._plotDimensions,this));this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightLabelCanvas);var o=this.plugins.bubbleRenderer.highlightCanvas.setContext()}function c(q,p,n){n=n||{};n.axesDefaults=n.axesDefaults||{};n.seriesDefaults=n.seriesDefaults||{};var m=false;if(n.seriesDefaults.renderer==f.jqplot.BubbleRenderer){m=true}else{if(n.series){for(var o=0;o<n.series.length;o++){if(n.series[o].renderer==f.jqplot.BubbleRenderer){m=true}}}}if(m){n.axesDefaults.renderer=f.jqplot.BubbleAxisRenderer;n.sortData=false}}f.jqplot.preInitHooks.push(c)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js index 18404399..22f0bb79 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -36,16 +36,16 @@ * to draw the text on the canvas. Two modes of rendering the text are available. * If the browser has native font support for canvas fonts (currently Mozila 3.5 * and Safari 4), you can enable text rendering with the canvas fillText method. - * You do so by setting the "enableFontSupport" option to true. - * + * You do so by setting the "enableFontSupport" option to true. + * * Browsers lacking native font support will have the text drawn on the canvas * using the Hershey font metrics. Even if the "enableFontSupport" option is true * non-supporting browsers will still render with the Hershey font. - * + * */ $.jqplot.CanvasAxisLabelRenderer = function(options) { // Group: Properties - + // prop: angle // angle of text, measured clockwise from x axis. this.angle = 0; @@ -72,7 +72,7 @@ // CSS spec for fontWeight: normal, bold, bolder, lighter or a number 100 - 900 this.fontWeight = 'normal'; // prop: fontStretch - // Multiplier to condense or expand font width. + // Multiplier to condense or expand font width. // Applies only to browsers which don't support canvas native font rendering. this.fontStretch = 1.0; // prop: textColor @@ -85,49 +85,49 @@ this.enableFontSupport = true; // prop: pt2px // Point to pixel scaling factor, used for computing height of bounding box - // around a label. The labels text renderer has a default setting of 1.4, which + // around a label. The labels text renderer has a default setting of 1.4, which // should be suitable for most fonts. Leave as null to use default. If tops of // letters appear clipped, increase this. If bounding box seems too big, decrease. // This is an issue only with the native font renderering capabilities of Mozilla // 3.5 and Safari 4 since they do not provide a method to determine the font height. this.pt2px = null; - + this._elem; this._ctx; this._plotWidth; this._plotHeight; this._plotDimensions = {height:null, width:null}; - + $.extend(true, this, options); - + if (options.angle == null && this.axis != 'xaxis' && this.axis != 'x2axis') { this.angle = -90; } - + var ropts = {fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily}; if (this.pt2px) { ropts.pt2px = this.pt2px; } - + if (this.enableFontSupport) { if ($.jqplot.support_canvas_text()) { this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts); } - + else { - this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); + this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); } } else { - this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); + this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); } }; - + $.jqplot.CanvasAxisLabelRenderer.prototype.init = function(options) { $.extend(true, this, options); this._textRenderer.init({fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily}); }; - + // return width along the x axis // will check first to see if an element exists. // if not, will return the computed text box width. @@ -143,7 +143,7 @@ return w; } }; - + // return height along the y axis. $.jqplot.CanvasAxisLabelRenderer.prototype.getHeight = function(ctx) { if (this._elem) { @@ -157,19 +157,19 @@ return w; } }; - + $.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad = function() { var a = this.angle * Math.PI/180; return a; }; - + $.jqplot.CanvasAxisLabelRenderer.prototype.draw = function(ctx, plot) { // Memory Leaks patch if (this._elem) { if ($.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== undefined) { window.G_vmlCanvasManager.uninitElement(this._elem.get(0)); } - + this._elem.emptyForce(); this._elem = null; } @@ -185,19 +185,19 @@ elem.height = h; elem.style.width = w; elem.style.height = h; - + elem = plot.canvasManager.initCanvas(elem); this._elem = $(elem); this._elem.css({ position: 'absolute'}); this._elem.addClass('jqplot-'+this.axis+'-label'); - + elem = null; return this._elem; }; - + $.jqplot.CanvasAxisLabelRenderer.prototype.pack = function() { this._textRenderer.draw(this._elem.get(0).getContext("2d"), this.label); }; - + })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js index 2b71c097..dee778f9 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.CanvasAxisLabelRenderer=function(b){this.angle=0;this.axis;this.show=true;this.showLabel=true;this.label="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);if(b.angle==null&&this.axis!="xaxis"&&this.axis!="x2axis"){this.angle=-90}var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisLabelRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisLabelRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisLabelRenderer.prototype.draw=function(c,f){if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css({position:"absolute"});this._elem.addClass("jqplot-"+this.axis+"-label");e=null;return this._elem};a.jqplot.CanvasAxisLabelRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.js index 1550c7d0..bb1731d6 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -36,15 +36,15 @@ * to draw the text on the canvas. Two modes of rendering the text are available. * If the browser has native font support for canvas fonts (currently Mozila 3.5 * and Safari 4), you can enable text rendering with the canvas fillText method. - * You do so by setting the "enableFontSupport" option to true. - * + * You do so by setting the "enableFontSupport" option to true. + * * Browsers lacking native font support will have the text drawn on the canvas * using the Hershey font metrics. Even if the "enableFontSupport" option is true * non-supporting browsers will still render with the Hershey font. */ $.jqplot.CanvasAxisTickRenderer = function(options) { // Group: Properties - + // prop: mark // tick mark on the axis. One of 'inside', 'outside', 'cross', '' or null. this.mark = 'outside'; @@ -99,7 +99,7 @@ // CSS spec for fontWeight this.fontWeight = 'normal'; // prop: fontStretch - // Multiplier to condense or expand font width. + // Multiplier to condense or expand font width. // Applies only to browsers which don't support canvas native font rendering. this.fontStretch = 1.0; // prop: textColor @@ -112,45 +112,45 @@ this.enableFontSupport = true; // prop: pt2px // Point to pixel scaling factor, used for computing height of bounding box - // around a label. The labels text renderer has a default setting of 1.4, which + // around a label. The labels text renderer has a default setting of 1.4, which // should be suitable for most fonts. Leave as null to use default. If tops of // letters appear clipped, increase this. If bounding box seems too big, decrease. // This is an issue only with the native font renderering capabilities of Mozilla // 3.5 and Safari 4 since they do not provide a method to determine the font height. this.pt2px = null; - + this._elem; this._ctx; this._plotWidth; this._plotHeight; this._plotDimensions = {height:null, width:null}; - + $.extend(true, this, options); - + var ropts = {fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily}; if (this.pt2px) { ropts.pt2px = this.pt2px; } - + if (this.enableFontSupport) { if ($.jqplot.support_canvas_text()) { this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts); } - + else { - this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); + this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); } } else { - this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); + this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts); } }; - + $.jqplot.CanvasAxisTickRenderer.prototype.init = function(options) { $.extend(true, this, options); this._textRenderer.init({fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily}); }; - + // return width along the x axis // will check first to see if an element exists. // if not, will return the computed text box width. @@ -166,7 +166,7 @@ return w; } }; - + // return height along the y axis. $.jqplot.CanvasAxisTickRenderer.prototype.getHeight = function(ctx) { if (this._elem) { @@ -180,13 +180,13 @@ return w; } }; - + $.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad = function() { var a = this.angle * Math.PI/180; return a; }; - - + + $.jqplot.CanvasAxisTickRenderer.prototype.setTick = function(value, axisName, isMinor) { this.value = value; if (isMinor) { @@ -194,18 +194,18 @@ } return this; }; - + $.jqplot.CanvasAxisTickRenderer.prototype.draw = function(ctx, plot) { if (!this.label) { this.label = this.prefix + this.formatter(this.formatString, this.value); } - + // Memory Leaks patch if (this._elem) { if ($.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== undefined) { window.G_vmlCanvasManager.uninitElement(this._elem.get(0)); } - + this._elem.emptyForce(); this._elem = null; } @@ -235,9 +235,9 @@ elem = null; return this._elem; }; - + $.jqplot.CanvasAxisTickRenderer.prototype.pack = function() { this._textRenderer.draw(this._elem.get(0).getContext("2d"), this.label); }; - + })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js index 54d028d1..f80e02b2 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.CanvasAxisTickRenderer=function(b){this.mark="outside";this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.angle=0;this.markSize=4;this.show=true;this.showLabel=true;this.labelPosition="auto";this.label="";this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.formatString="";this.prefix="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="10pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisTickRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisTickRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;if(c){this.isMinorTick=true}return this};a.jqplot.CanvasAxisTickRenderer.prototype.draw=function(c,f){if(!this.label){this.label=this.prefix+this.formatter(this.formatString,this.value)}if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e.style.textAlign="left";e.style.position="absolute";e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css(this._styles);this._elem.addClass("jqplot-"+this.axis+"-tick");e=null;return this._elem};a.jqplot.CanvasAxisTickRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js index 03766206..bc72bc5a 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { var objCounter = 0; @@ -69,17 +69,17 @@ default: break; } - } + } } } $.extend(true, this.options, options); }; - + // called with scope of a plot object $.jqplot.CanvasOverlay.postPlotInit = function (target, data, opts) { var options = opts || {}; // add a canvasOverlay attribute to the plot - this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay); + this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay); }; @@ -89,7 +89,7 @@ this.gridStart = null; this.gridStop = null; this.tooltipWidthFactor = 0; - this.options = { + this.options = { // prop: name // Optional name for the overlay object. // Can be later used to retrieve the object by name. @@ -198,7 +198,7 @@ // x value for the end of the line, null to scale to axis max. xmax: null, // prop xOffset - // offset ends of the line inside the grid. Number + // offset ends of the line inside the grid. Number xOffset: '6px', // number or string. Number interpreted as units, string as pixels. xminOffset: null, xmaxOffset: null @@ -212,7 +212,7 @@ HorizontalLine.prototype = new LineBase(); HorizontalLine.prototype.constructor = HorizontalLine; - + /** * Class: DashedHorizontalLine @@ -243,7 +243,7 @@ DashedHorizontalLine.prototype = new LineBase(); DashedHorizontalLine.prototype.constructor = DashedHorizontalLine; - + /** * Class: VerticalLine @@ -269,7 +269,7 @@ VerticalLine.prototype = new LineBase(); VerticalLine.prototype.constructor = VerticalLine; - + /** * Class: DashedVerticalLine @@ -302,42 +302,42 @@ DashedVerticalLine.prototype = new LineBase(); DashedVerticalLine.prototype.constructor = DashedVerticalLine; - + $.jqplot.CanvasOverlay.prototype.addLine = function(opts) { var line = new Line(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addHorizontalLine = function(opts) { var line = new HorizontalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addDashedHorizontalLine = function(opts) { var line = new DashedHorizontalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addVerticalLine = function(opts) { var line = new VerticalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addDashedVerticalLine = function(opts) { var line = new DashedVerticalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.removeObject = function(idx) { // check if integer, remove by index if ($.type(idx) == 'number') { @@ -353,7 +353,7 @@ } } }; - + $.jqplot.CanvasOverlay.prototype.getObject = function(idx) { // check if integer, remove by index if ($.type(idx) == 'number') { @@ -367,16 +367,16 @@ } } }; - + // Set get as alias for getObject. $.jqplot.CanvasOverlay.prototype.get = $.jqplot.CanvasOverlay.prototype.getObject; - + $.jqplot.CanvasOverlay.prototype.clear = function(plot) { this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(), this.canvas.getHeight()); }; - + $.jqplot.CanvasOverlay.prototype.draw = function(plot) { - var obj, + var obj, objs = this.objects, mr = this.markerRenderer, start, @@ -404,7 +404,7 @@ mr.draw(start, stop, this.canvas._ctx, opts); break; case 'horizontalLine': - + // style and shadow properties should be set before // every draw of marker renderer. if (obj.options.y != null) { @@ -447,7 +447,7 @@ break; case 'dashedHorizontalLine': - + var dashPat = obj.options.dashPattern; var dashPatLen = 0; for (var i=0; i<dashPat.length; i++) { @@ -507,7 +507,7 @@ break; case 'verticalLine': - + // style and shadow properties should be set before // every draw of marker renderer. if (obj.options.x != null) { @@ -550,7 +550,7 @@ break; case 'dashedVerticalLine': - + var dashPat = obj.options.dashPattern; var dashPatLen = 0; for (var i=0; i<dashPat.length; i++) { @@ -629,19 +629,19 @@ } } }; - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. $.jqplot.CanvasOverlay.postPlotDraw = function() { var co = this.plugins.canvasOverlay; - // Memory Leaks patch + // Memory Leaks patch if (co && co.highlightCanvas) { co.highlightCanvas.resetCanvas(); co.highlightCanvas = null; } co.canvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(co.canvas.createElement(this._gridPadding, 'jqplot-overlayCanvas-canvas', this._plotDimensions, this)); co.canvas.setContext(); if (!co.deferDraw) { @@ -653,7 +653,7 @@ elem = null; co._tooltipElem.addClass('jqplot-canvasOverlay-tooltip'); co._tooltipElem.css({position:'absolute', display:'none'}); - + this.eventCanvas._elem.before(co._tooltipElem); this.eventCanvas._elem.bind('mouseleave', { elem: co._tooltipElem }, function (ev) { ev.data.elem.hide(); }); @@ -668,7 +668,7 @@ var opts = obj.options, x, y; elem.html($.jqplot.sprintf(opts.tooltipFormatString, datapos[0], datapos[1])); - + switch (opts.tooltipLocation) { case 'nw': x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset; @@ -777,7 +777,7 @@ break; default: break; - } + } co.highlightObjectIndex = i; haveHighlight = true; break; @@ -857,7 +857,7 @@ co.highlightObjectIndex = null; } } - + $.jqplot.postInitHooks.push($.jqplot.CanvasOverlay.postPlotInit); $.jqplot.postDrawHooks.push($.jqplot.CanvasOverlay.postPlotDraw); $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]); diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.min.js index b33a9da1..3d3c9fad 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(d){var f=0;d.jqplot.CanvasOverlay=function(o){var l=o||{};this.options={show:d.jqplot.config.enablePlugins,deferDraw:false};this.objects=[];this.objectNames=[];this.canvas=null;this.markerRenderer=new d.jqplot.MarkerRenderer({style:"line"});this.markerRenderer.init();this.highlightObjectIndex=null;if(l.objects){var q=l.objects,p;for(var m=0;m<q.length;m++){p=q[m];for(var r in p){switch(r){case"line":this.addLine(p[r]);break;case"horizontalLine":this.addHorizontalLine(p[r]);break;case"dashedHorizontalLine":this.addDashedHorizontalLine(p[r]);break;case"verticalLine":this.addVerticalLine(p[r]);break;case"dashedVerticalLine":this.addDashedVerticalLine(p[r]);break;default:break}}}}d.extend(true,this.options,l)};d.jqplot.CanvasOverlay.postPlotInit=function(o,n,m){var l=m||{};this.plugins.canvasOverlay=new d.jqplot.CanvasOverlay(l.canvasOverlay)};function h(){this.uid=null;this.type=null;this.gridStart=null;this.gridStop=null;this.tooltipWidthFactor=0;this.options={name:null,show:true,lineWidth:2,lineCap:"round",color:"#666666",shadow:true,shadowAngle:45,shadowOffset:1,shadowDepth:3,shadowAlpha:"0.07",xaxis:"xaxis",yaxis:"yaxis",showTooltip:false,showTooltipPrecision:0.6,tooltipLocation:"nw",fadeTooltip:true,tooltipFadeSpeed:"fast",tooltipOffset:4,tooltipFormatString:"%d, %d"}}function b(l){h.call(this);this.type="line";var m={start:[],stop:[]};d.extend(true,this.options,m,l);if(this.options.showTooltipPrecision<0.01){this.options.showTooltipPrecision=0.01}}b.prototype=new h();b.prototype.constructor=b;function e(l){h.call(this);this.type="horizontalLine";var m={y:null,xmin:null,xmax:null,xOffset:"6px",xminOffset:null,xmaxOffset:null};d.extend(true,this.options,m,l);if(this.options.showTooltipPrecision<0.01){this.options.showTooltipPrecision=0.01}}e.prototype=new h();e.prototype.constructor=e;function i(l){h.call(this);this.type="dashedHorizontalLine";var m={y:null,xmin:null,xmax:null,xOffset:"6px",xminOffset:null,xmaxOffset:null,dashPattern:[8,8]};d.extend(true,this.options,m,l);if(this.options.showTooltipPrecision<0.01){this.options.showTooltipPrecision=0.01}}i.prototype=new h();i.prototype.constructor=i;function c(l){h.call(this);this.type="verticalLine";var m={x:null,ymin:null,ymax:null,yOffset:"6px",yminOffset:null,ymaxOffset:null};d.extend(true,this.options,m,l);if(this.options.showTooltipPrecision<0.01){this.options.showTooltipPrecision=0.01}}c.prototype=new h();c.prototype.constructor=c;function k(l){h.call(this);this.type="dashedVerticalLine";this.start=null;this.stop=null;var m={x:null,ymin:null,ymax:null,yOffset:"6px",yminOffset:null,ymaxOffset:null,dashPattern:[8,8]};d.extend(true,this.options,m,l);if(this.options.showTooltipPrecision<0.01){this.options.showTooltipPrecision=0.01}}k.prototype=new h();k.prototype.constructor=k;d.jqplot.CanvasOverlay.prototype.addLine=function(m){var l=new b(m);l.uid=f++;this.objects.push(l);this.objectNames.push(l.options.name)};d.jqplot.CanvasOverlay.prototype.addHorizontalLine=function(m){var l=new e(m);l.uid=f++;this.objects.push(l);this.objectNames.push(l.options.name)};d.jqplot.CanvasOverlay.prototype.addDashedHorizontalLine=function(m){var l=new i(m);l.uid=f++;this.objects.push(l);this.objectNames.push(l.options.name)};d.jqplot.CanvasOverlay.prototype.addVerticalLine=function(m){var l=new c(m);l.uid=f++;this.objects.push(l);this.objectNames.push(l.options.name)};d.jqplot.CanvasOverlay.prototype.addDashedVerticalLine=function(m){var l=new k(m);l.uid=f++;this.objects.push(l);this.objectNames.push(l.options.name)};d.jqplot.CanvasOverlay.prototype.removeObject=function(l){if(d.type(l)=="number"){this.objects.splice(l,1);this.objectNames.splice(l,1)}else{var m=d.inArray(l,this.objectNames);if(m!=-1){this.objects.splice(m,1);this.objectNames.splice(m,1)}}};d.jqplot.CanvasOverlay.prototype.getObject=function(l){if(d.type(l)=="number"){return this.objects[l]}else{var m=d.inArray(l,this.objectNames);if(m!=-1){return this.objects[m]}}};d.jqplot.CanvasOverlay.prototype.get=d.jqplot.CanvasOverlay.prototype.getObject;d.jqplot.CanvasOverlay.prototype.clear=function(l){this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(),this.canvas.getHeight())};d.jqplot.CanvasOverlay.prototype.draw=function(I){var w,t=this.objects,D=this.markerRenderer,q,E;if(this.options.show){this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(),this.canvas.getHeight());for(var F=0;F<t.length;F++){w=t[F];var z=d.extend(true,{},w.options);if(w.options.show){D.shadow=w.options.shadow;w.tooltipWidthFactor=w.options.lineWidth/w.options.showTooltipPrecision;switch(w.type){case"line":D.style="line";z.closePath=false;q=[I.axes[w.options.xaxis].series_u2p(w.options.start[0]),I.axes[w.options.yaxis].series_u2p(w.options.start[1])];E=[I.axes[w.options.xaxis].series_u2p(w.options.stop[0]),I.axes[w.options.yaxis].series_u2p(w.options.stop[1])];w.gridStart=q;w.gridStop=E;D.draw(q,E,this.canvas._ctx,z);break;case"horizontalLine":if(w.options.y!=null){D.style="line";z.closePath=false;var n=I.axes[w.options.xaxis],Q,J,u=I.axes[w.options.yaxis].series_u2p(w.options.y),G=w.options.xminOffset||w.options.xOffset,r=w.options.xmaxOffset||w.options.xOffset;if(w.options.xmin!=null){Q=n.series_u2p(w.options.xmin)}else{if(G!=null){if(d.type(G)=="number"){Q=n.series_u2p(n.min+G)}else{if(d.type(G)=="string"){Q=n.series_u2p(n.min)+parseFloat(G)}}}}if(w.options.xmax!=null){J=n.series_u2p(w.options.xmax)}else{if(r!=null){if(d.type(r)=="number"){J=n.series_u2p(n.max-r)}else{if(d.type(r)=="string"){J=n.series_u2p(n.max)-parseFloat(r)}}}}if(J!=null&&Q!=null){w.gridStart=[Q,u];w.gridStop=[J,u];D.draw([Q,u],[J,u],this.canvas._ctx,z)}}break;case"dashedHorizontalLine":var m=w.options.dashPattern;var C=0;for(var K=0;K<m.length;K++){C+=m[K]}if(w.options.y!=null){D.style="line";z.closePath=false;var n=I.axes[w.options.xaxis],Q,J,u=I.axes[w.options.yaxis].series_u2p(w.options.y),G=w.options.xminOffset||w.options.xOffset,r=w.options.xmaxOffset||w.options.xOffset;if(w.options.xmin!=null){Q=n.series_u2p(w.options.xmin)}else{if(G!=null){if(d.type(G)=="number"){Q=n.series_u2p(n.min+G)}else{if(d.type(G)=="string"){Q=n.series_u2p(n.min)+parseFloat(G)}}}}if(w.options.xmax!=null){J=n.series_u2p(w.options.xmax)}else{if(r!=null){if(d.type(r)=="number"){J=n.series_u2p(n.max-r)}else{if(d.type(r)=="string"){J=n.series_u2p(n.max)-parseFloat(r)}}}}if(J!=null&&Q!=null){w.gridStart=[Q,u];w.gridStop=[J,u];var p=Math.ceil((J-Q)/C);var O=Q,M;for(var K=0;K<p;K++){for(var H=0;H<m.length;H+=2){M=O+m[H];D.draw([O,u],[M,u],this.canvas._ctx,z);O+=m[H];if(H<m.length-1){O+=m[H+1]}}}}}break;case"verticalLine":if(w.options.x!=null){D.style="line";z.closePath=false;var L=I.axes[w.options.yaxis],l,s,v=I.axes[w.options.xaxis].series_u2p(w.options.x),B=w.options.yminOffset||w.options.yOffset,o=w.options.ymaxOffset||w.options.yOffset;if(w.options.ymin!=null){l=L.series_u2p(w.options.ymin)}else{if(B!=null){if(d.type(B)=="number"){l=L.series_u2p(L.min-B)}else{if(d.type(B)=="string"){l=L.series_u2p(L.min)-parseFloat(B)}}}}if(w.options.ymax!=null){s=L.series_u2p(w.options.ymax)}else{if(o!=null){if(d.type(o)=="number"){s=L.series_u2p(L.max+o)}else{if(d.type(o)=="string"){s=L.series_u2p(L.max)+parseFloat(o)}}}}if(s!=null&&l!=null){w.gridStart=[v,l];w.gridStop=[v,s];D.draw([v,l],[v,s],this.canvas._ctx,z)}}break;case"dashedVerticalLine":var m=w.options.dashPattern;var C=0;for(var K=0;K<m.length;K++){C+=m[K]}if(w.options.x!=null){D.style="line";z.closePath=false;var L=I.axes[w.options.yaxis],l,s,v=I.axes[w.options.xaxis].series_u2p(w.options.x),B=w.options.yminOffset||w.options.yOffset,o=w.options.ymaxOffset||w.options.yOffset;if(w.options.ymin!=null){l=L.series_u2p(w.options.ymin)}else{if(B!=null){if(d.type(B)=="number"){l=L.series_u2p(L.min-B)}else{if(d.type(B)=="string"){l=L.series_u2p(L.min)-parseFloat(B)}}}}if(w.options.ymax!=null){s=L.series_u2p(w.options.ymax)}else{if(o!=null){if(d.type(o)=="number"){s=L.series_u2p(L.max+o)}else{if(d.type(o)=="string"){s=L.series_u2p(L.max)+parseFloat(o)}}}}if(s!=null&&l!=null){w.gridStart=[v,l];w.gridStop=[v,s];var p=Math.ceil((l-s)/C);var A=((p*C)-(l-s))/2;var O=l,M,N,P;for(var K=0;K<p;K++){for(var H=0;H<m.length;H+=2){M=O-m[H];if(M<s){M=s}if(O<s){O=s}D.draw([v,O],[v,M],this.canvas._ctx,z);O-=m[H];if(H<m.length-1){O-=m[H+1]}}}}}break;default:break}}}}};d.jqplot.CanvasOverlay.postPlotDraw=function(){var m=this.plugins.canvasOverlay;if(m&&m.highlightCanvas){m.highlightCanvas.resetCanvas();m.highlightCanvas=null}m.canvas=new d.jqplot.GenericCanvas();this.eventCanvas._elem.before(m.canvas.createElement(this._gridPadding,"jqplot-overlayCanvas-canvas",this._plotDimensions,this));m.canvas.setContext();if(!m.deferDraw){m.draw(this)}var l=document.createElement("div");m._tooltipElem=d(l);l=null;m._tooltipElem.addClass("jqplot-canvasOverlay-tooltip");m._tooltipElem.css({position:"absolute",display:"none"});this.eventCanvas._elem.before(m._tooltipElem);this.eventCanvas._elem.bind("mouseleave",{elem:m._tooltipElem},function(n){n.data.elem.hide()});var m=null};function j(q,o,p,n){var s=q.plugins.canvasOverlay;var m=s._tooltipElem;var l=o.options,t,r;m.html(d.jqplot.sprintf(l.tooltipFormatString,n[0],n[1]));switch(l.tooltipLocation){case"nw":t=p[0]+q._gridPadding.left-m.outerWidth(true)-l.tooltipOffset;r=p[1]+q._gridPadding.top-l.tooltipOffset-m.outerHeight(true);break;case"n":t=p[0]+q._gridPadding.left-m.outerWidth(true)/2;r=p[1]+q._gridPadding.top-l.tooltipOffset-m.outerHeight(true);break;case"ne":t=p[0]+q._gridPadding.left+l.tooltipOffset;r=p[1]+q._gridPadding.top-l.tooltipOffset-m.outerHeight(true);break;case"e":t=p[0]+q._gridPadding.left+l.tooltipOffset;r=p[1]+q._gridPadding.top-m.outerHeight(true)/2;break;case"se":t=p[0]+q._gridPadding.left+l.tooltipOffset;r=p[1]+q._gridPadding.top+l.tooltipOffset;break;case"s":t=p[0]+q._gridPadding.left-m.outerWidth(true)/2;r=p[1]+q._gridPadding.top+l.tooltipOffset;break;case"sw":t=p[0]+q._gridPadding.left-m.outerWidth(true)-l.tooltipOffset;r=p[1]+q._gridPadding.top+l.tooltipOffset;break;case"w":t=p[0]+q._gridPadding.left-m.outerWidth(true)-l.tooltipOffset;r=p[1]+q._gridPadding.top-m.outerHeight(true)/2;break;default:t=p[0]+q._gridPadding.left-m.outerWidth(true)-l.tooltipOffset;r=p[1]+q._gridPadding.top-l.tooltipOffset-m.outerHeight(true);break}m.css("left",t);m.css("top",r);if(l.fadeTooltip){m.stop(true,true).fadeIn(l.tooltipFadeSpeed)}else{m.show()}m=null}function g(y,p,r,o){var n=y[0];var m=y[1];var x=Math.round(r[0]);var w=Math.round(r[1]);var t=Math.round(p[0]);var s=Math.round(p[1]);var q=Math.sqrt(Math.pow(x-t,2)+Math.pow(w-s,2));var z=o*q;var v=Math.abs((t-x)*(m-w)-(s-w)*(n-x));var u=(v<z)?true:false;return u}function a(y,v,q,z,w){var x=w.plugins.canvasOverlay;var u=x.objects;var r=u.length;var t,m=false;var p;for(var s=0;s<r;s++){t=u[s];if(t.options.showTooltip){var o=g([v.x,v.y],t.gridStart,t.gridStop,t.tooltipWidthFactor);q=[w.axes[t.options.xaxis].series_p2u(v.x),w.axes[t.options.yaxis].series_p2u(v.y)];if(o&&x.highlightObjectIndex==null){switch(t.type){case"line":j(w,t,[v.x,v.y],q);break;case"horizontalLine":case"dashedHorizontalLine":j(w,t,[v.x,t.gridStart[1]],[q[0],t.options.y]);break;case"verticalLine":case"dashedVerticalLine":j(w,t,[t.gridStart[0],v.y],[t.options.x,q[1]]);break;default:break}x.highlightObjectIndex=s;m=true;break}else{if(o&&x.highlightObjectIndex!==s){p=x._tooltipElem;if(t.fadeTooltip){p.fadeOut(t.tooltipFadeSpeed)}else{p.hide()}switch(t.type){case"line":j(w,t,[v.x,v.y],q);break;case"horizontalLine":case"dashedHorizontalLine":j(w,t,[v.x,t.gridStart[1]],[q[0],t.options.y]);break;case"verticalLine":case"dashedVerticalLine":j(w,t,[t.gridStart[0],v.y],[t.options.x,q[1]]);break;default:break}x.highlightObjectIndex=s;m=true;break}else{if(o){switch(t.type){case"line":j(w,t,[v.x,v.y],q);break;case"horizontalLine":case"dashedHorizontalLine":j(w,t,[v.x,t.gridStart[1]],[q[0],t.options.y]);break;case"verticalLine":case"dashedVerticalLine":j(w,t,[t.gridStart[0],v.y],[t.options.x,q[1]]);break;default:break}m=true;break}}}}}if(!m&&x.highlightObjectIndex!==null){p=x._tooltipElem;t=x.getObject(x.highlightObjectIndex);if(t.fadeTooltip){p.fadeOut(t.tooltipFadeSpeed)}else{p.hide()}x.highlightObjectIndex=null}}d.jqplot.postInitHooks.push(d.jqplot.CanvasOverlay.postPlotInit);d.jqplot.postDrawHooks.push(d.jqplot.CanvasOverlay.postPlotDraw);d.jqplot.eventListenerHooks.push(["jqplotMouseMove",a])})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.js index 53f25305..693d2ff9 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -31,18 +31,18 @@ * * Copyright (c) 2010-2012 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -52,11 +52,11 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ -(function($) { +(function($) { // This code is a modified version of the canvastext.js code, copyright below: // // This code is released to the public domain by Jim Studt, 2007. @@ -66,7 +66,7 @@ this.fontStyle = 'normal'; // normal, italic, oblique [not implemented] this.fontVariant = 'normal'; // normal, small caps [not implemented] this.fontWeight = 'normal'; // normal, bold, bolder, lighter, 100 - 900 - this.fontSize = '10px'; + this.fontSize = '10px'; this.fontFamily = 'sans-serif'; this.fontStretch = 1.0; this.fillStyle = '#666666'; @@ -82,13 +82,13 @@ this.normalizedFontSize = this.normalizeFontSize(this.fontSize); this.setHeight(); }; - + $.jqplot.CanvasTextRenderer.prototype.init = function(options) { $.extend(true, this, options); this.normalizedFontSize = this.normalizeFontSize(this.fontSize); this.setHeight(); }; - + // convert css spec into point size // returns float $.jqplot.CanvasTextRenderer.prototype.normalizeFontSize = function(sz) { @@ -111,8 +111,8 @@ return n/this.pt2px; } }; - - + + $.jqplot.CanvasTextRenderer.prototype.fontWeight2Float = function(w) { // w = normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 // return values adjusted for Hershey font. @@ -136,39 +136,39 @@ default: return 1; break; - } + } } }; - + $.jqplot.CanvasTextRenderer.prototype.getText = function() { return this.text; }; - + $.jqplot.CanvasTextRenderer.prototype.setText = function(t, ctx) { this.text = t; this.setWidth(ctx); return this; }; - + $.jqplot.CanvasTextRenderer.prototype.getWidth = function(ctx) { return this.width; }; - + $.jqplot.CanvasTextRenderer.prototype.setWidth = function(ctx, w) { if (!w) { this.width = this.measure(ctx, this.text); } else { - this.width = w; + this.width = w; } return this; }; - + // return height in pixels. $.jqplot.CanvasTextRenderer.prototype.getHeight = function(ctx) { return this.height; }; - + // w - height in pt // set heigh in px $.jqplot.CanvasTextRenderer.prototype.setHeight = function(w) { @@ -177,7 +177,7 @@ this.height = this.normalizedFontSize * this.pt2px; } else { - this.height = w; + this.height = w; } return this; }; @@ -201,7 +201,7 @@ { var total = 0; var len = str.length; - + for (var i = 0; i < len; i++) { var c = this.letter(str.charAt(i)); if (c) { @@ -222,7 +222,7 @@ ctx.save(); var tx, ty; - + // 1st quadrant if ((-Math.PI/2 <= this.angle && this.angle <= 0) || (Math.PI*3/2 <= this.angle && this.angle <= Math.PI*2)) { tx = 0; @@ -243,7 +243,7 @@ tx = Math.sin(this.angle) * this.height - Math.cos(this.angle)*this.width; ty = -Math.cos(this.angle) * this.height; } - + ctx.strokeStyle = this.fillStyle; ctx.fillStyle = this.fillStyle; ctx.translate(tx, ty); @@ -252,7 +252,7 @@ // multiplier was 2.0 var fact = (this.normalizedFontSize > 30) ? 2.0 : 2 + (30 - this.normalizedFontSize)/20; ctx.lineWidth = fact * mag * this.fontWeight2Float(this.fontWeight); - + for ( var i = 0; i < len; i++) { var c = this.letter( str.charAt(i)); if ( !c) { @@ -380,7 +380,7 @@ '}': { width: 14, points: [[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]] }, '~': { width: 24, points: [[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]] } }; - + $.jqplot.CanvasFontRenderer = function(options) { options = options || {}; if (!options.pt2px) { @@ -388,7 +388,7 @@ } $.jqplot.CanvasTextRenderer.call(this, options); }; - + $.jqplot.CanvasFontRenderer.prototype = new $.jqplot.CanvasTextRenderer({}); $.jqplot.CanvasFontRenderer.prototype.constructor = $.jqplot.CanvasFontRenderer; @@ -412,7 +412,7 @@ ctx.save(); var tx, ty; - + // 1st quadrant if ((-Math.PI/2 <= this.angle && this.angle <= 0) || (Math.PI*3/2 <= this.angle && this.angle <= Math.PI*2)) { tx = 0; @@ -445,5 +445,5 @@ ctx.restore(); }; - + })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.min.js index 451e6c64..4a3fb652 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasTextRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.CanvasTextRenderer=function(b){this.fontStyle="normal";this.fontVariant="normal";this.fontWeight="normal";this.fontSize="10px";this.fontFamily="sans-serif";this.fontStretch=1;this.fillStyle="#666666";this.angle=0;this.textAlign="start";this.textBaseline="alphabetic";this.text;this.width;this.height;this.pt2px=1.28;a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize);this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.init=function(b){a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize);this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.normalizeFontSize=function(b){b=String(b);var c=parseFloat(b);if(b.indexOf("px")>-1){return c/this.pt2px}else{if(b.indexOf("pt")>-1){return c}else{if(b.indexOf("em")>-1){return c*12}else{if(b.indexOf("%")>-1){return c*12/100}else{return c/this.pt2px}}}}};a.jqplot.CanvasTextRenderer.prototype.fontWeight2Float=function(b){if(Number(b)){return b/400}else{switch(b){case"normal":return 1;break;case"bold":return 1.75;break;case"bolder":return 2.25;break;case"lighter":return 0.75;break;default:return 1;break}}};a.jqplot.CanvasTextRenderer.prototype.getText=function(){return this.text};a.jqplot.CanvasTextRenderer.prototype.setText=function(c,b){this.text=c;this.setWidth(b);return this};a.jqplot.CanvasTextRenderer.prototype.getWidth=function(b){return this.width};a.jqplot.CanvasTextRenderer.prototype.setWidth=function(c,b){if(!b){this.width=this.measure(c,this.text)}else{this.width=b}return this};a.jqplot.CanvasTextRenderer.prototype.getHeight=function(b){return this.height};a.jqplot.CanvasTextRenderer.prototype.setHeight=function(b){if(!b){this.height=this.normalizedFontSize*this.pt2px}else{this.height=b}return this};a.jqplot.CanvasTextRenderer.prototype.letter=function(b){return this.letters[b]};a.jqplot.CanvasTextRenderer.prototype.ascent=function(){return this.normalizedFontSize};a.jqplot.CanvasTextRenderer.prototype.descent=function(){return 7*this.normalizedFontSize/25};a.jqplot.CanvasTextRenderer.prototype.measure=function(d,g){var f=0;var b=g.length;for(var e=0;e<b;e++){var h=this.letter(g.charAt(e));if(h){f+=h.width*this.normalizedFontSize/25*this.fontStretch}}return f};a.jqplot.CanvasTextRenderer.prototype.draw=function(s,n){var r=0;var o=this.height*0.72;var p=0;var l=n.length;var k=this.normalizedFontSize/25;s.save();var h,f;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){h=0;f=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){h=Math.sin(this.angle)*this.height;f=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){h=-Math.cos(this.angle)*this.width;f=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height}else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){h=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;f=-Math.cos(this.angle)*this.height}}}}s.strokeStyle=this.fillStyle;s.fillStyle=this.fillStyle;s.translate(h,f);s.rotate(this.angle);s.lineCap="round";var t=(this.normalizedFontSize>30)?2:2+(30-this.normalizedFontSize)/20;s.lineWidth=t*k*this.fontWeight2Float(this.fontWeight);for(var g=0;g<l;g++){var m=this.letter(n.charAt(g));if(!m){continue}s.beginPath();var e=1;var b=0;for(var d=0;d<m.points.length;d++){var q=m.points[d];if(q[0]==-1&&q[1]==-1){e=1;continue}if(e){s.moveTo(r+q[0]*k*this.fontStretch,o-q[1]*k);e=false}else{s.lineTo(r+q[0]*k*this.fontStretch,o-q[1]*k)}}s.stroke();r+=m.width*k*this.fontStretch}s.restore();return p};a.jqplot.CanvasTextRenderer.prototype.letters={" ":{width:16,points:[]},"!":{width:10,points:[[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},'"':{width:16,points:[[4,21],[4,14],[-1,-1],[12,21],[12,14]]},"#":{width:21,points:[[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]]},"$":{width:20,points:[[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},"%":{width:24,points:[[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]]},"&":{width:26,points:[[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]]},"'":{width:10,points:[[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]]},"(":{width:14,points:[[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]]},")":{width:14,points:[[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]]},"*":{width:16,points:[[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]]},"+":{width:26,points:[[13,18],[13,0],[-1,-1],[4,9],[22,9]]},",":{width:10,points:[[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"-":{width:18,points:[[6,9],[12,9]]},".":{width:10,points:[[5,2],[4,1],[5,0],[6,1],[5,2]]},"/":{width:22,points:[[20,25],[2,-7]]},"0":{width:20,points:[[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]]},"1":{width:20,points:[[6,17],[8,18],[11,21],[11,0]]},"2":{width:20,points:[[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]]},"3":{width:20,points:[[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"4":{width:20,points:[[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]]},"5":{width:20,points:[[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"6":{width:20,points:[[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]]},"7":{width:20,points:[[17,21],[7,0],[-1,-1],[3,21],[17,21]]},"8":{width:20,points:[[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]]},"9":{width:20,points:[[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]]},":":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},";":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"<":{width:24,points:[[20,18],[4,9],[20,0]]},"=":{width:26,points:[[4,12],[22,12],[-1,-1],[4,6],[22,6]]},">":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};a.jqplot.CanvasFontRenderer=function(b){b=b||{};if(!b.pt2px){b.pt2px=1.5}a.jqplot.CanvasTextRenderer.call(this,b)};a.jqplot.CanvasFontRenderer.prototype=new a.jqplot.CanvasTextRenderer({});a.jqplot.CanvasFontRenderer.prototype.constructor=a.jqplot.CanvasFontRenderer;a.jqplot.CanvasFontRenderer.prototype.measure=function(c,e){var d=this.fontSize+" "+this.fontFamily;c.save();c.font=d;var b=c.measureText(e).width;c.restore();return b};a.jqplot.CanvasFontRenderer.prototype.draw=function(e,g){var c=0;var h=this.height*0.72;e.save();var d,b;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){d=0;b=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){d=Math.sin(this.angle)*this.height;b=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){d=-Math.cos(this.angle)*this.width;b=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height}else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){d=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;b=-Math.cos(this.angle)*this.height}}}}e.strokeStyle=this.fillStyle;e.fillStyle=this.fillStyle;var f=this.fontSize+" "+this.fontFamily;e.font=f;e.translate(d,b);e.rotate(this.angle);e.fillText(g,c,h);e.restore()}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.js index 4cea2de6..070801cb 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,18 +26,18 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ -(function($) { +(function($) { /** * class: $.jqplot.CategoryAxisRenderer * A plugin for jqPlot to render a category style axis, with equal pixel spacing between y data values of a series. - * + * * To use this renderer, include the plugin in your source * > <script type="text/javascript" language="javascript" src="plugins/jqplot.categoryAxisRenderer.js"></script> - * + * * and supply the appropriate options to your plot - * + * * > {axes:{xaxis:{renderer:$.jqplot.CategoryAxisRenderer}}} **/ $.jqplot.CategoryAxisRenderer = function(options) { @@ -55,15 +55,15 @@ // With sortMergedLabels set to false, tick labels will be: // > [2006, 2008, 2009, 2007] // - // Note, this property is specified on the renderOptions for the + // Note, this property is specified on the renderOptions for the // axes when creating a plot: // > axes:{xaxis:{renderer:$.jqplot.CategoryAxisRenderer, rendererOptions:{sortMergedLabels:true}}} this.sortMergedLabels = false; }; - + $.jqplot.CategoryAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.CategoryAxisRenderer.prototype.constructor = $.jqplot.CategoryAxisRenderer; - + $.jqplot.CategoryAxisRenderer.prototype.init = function(options){ this.groups = 1; this.groupLabels = []; @@ -72,7 +72,7 @@ this._barsPerGroup = null; this.reverse = false; // prop: tickRenderer - // A class of a rendering engine for creating the ticks labels displayed on the plot, + // A class of a rendering engine for creating the ticks labels displayed on the plot, // See <$.jqplot.AxisTickRenderer>. // this.tickRenderer = $.jqplot.AxisTickRenderer; // this.labelRenderer = $.jqplot.AxisLabelRenderer; @@ -86,8 +86,8 @@ this.groups = s.groups; } var d = s.data; - - for (var j=0; j<d.length; j++) { + + for (var j=0; j<d.length; j++) { if (this.name == 'xaxis' || this.name == 'x2axis') { if (d[j][0] < db.min || db.min == null) { db.min = d[j][0]; @@ -95,7 +95,7 @@ if (d[j][0] > db.max || db.max == null) { db.max = d[j][0]; } - } + } else { if (d[j][1] < db.min || db.min == null) { db.min = d[j][1]; @@ -103,15 +103,15 @@ if (d[j][1] > db.max || db.max == null) { db.max = d[j][1]; } - } + } } } - + if (this.groupLabels.length) { this.groups = this.groupLabels.length; } }; - + $.jqplot.CategoryAxisRenderer.prototype.createTicks = function() { // we're are operating on an axis here @@ -174,19 +174,19 @@ else { dim = this._plotDimensions.height; } - + // if min, max and number of ticks specified, user can't specify interval. if (this.min != null && this.max != null && this.numberTicks != null) { this.tickInterval = null; } - + // if max, min, and interval specified and interval won't fit, ignore interval. if (this.min != null && this.max != null && this.tickInterval != null) { if (parseInt((this.max-this.min)/this.tickInterval, 10) != (this.max-this.min)/this.tickInterval) { this.tickInterval = null; } } - + // find out how many categories are in the lines and collect labels var labels = []; var numcats = 0; @@ -204,19 +204,19 @@ } if ($.inArray(val, labels) == -1) { isMerged = true; - numcats += 1; + numcats += 1; labels.push(val); } } } - + if (isMerged && this.sortMergedLabels) { labels.sort(function(a,b) { return a - b; }); } - + // keep a reference to these tick labels to use for redrawing plot (see bug #57) this.ticks = labels; - + // now bin the data values to the right lables. for (var i=0; i<this._series.length; i++) { var s = this._series[i]; @@ -238,7 +238,7 @@ } } } - + // adjust with blanks if we have groups if (this.groups > 1 && !this._grouped) { var l = labels.length; @@ -249,7 +249,7 @@ } this._grouped = true; } - + max = numcats + 0.5; if (this.numberTicks == null) { this.numberTicks = 2*numcats + 1; @@ -259,7 +259,7 @@ this.min = min; this.max = max; var track = 0; - + // todo: adjust this so more ticks displayed. var maxVisibleTicks = parseInt(3+dim/10, 10); var skip = parseInt(numcats/maxVisibleTicks, 10); @@ -286,7 +286,7 @@ else { t.showLabel = true; track = 0; - } + } t.label = t.formatter(t.formatString, labels[(i-1)/2]); t.showMark = false; t.showGridline = false; @@ -295,9 +295,9 @@ this._ticks.push(t); } } - + }; - + // called with scope of axis $.jqplot.CategoryAxisRenderer.prototype.draw = function(ctx, plot) { if (this.show) { @@ -318,14 +318,14 @@ } this._elem = this._elem || $('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>'); - + if (this.name == 'xaxis' || this.name == 'x2axis') { this._elem.width(this._plotDimensions.width); } else { this._elem.height(this._plotDimensions.height); } - + // create a _label object. this.labelOptions.axis = this.name; this._label = new this.labelRenderer(this.labelOptions); @@ -333,7 +333,7 @@ var elem = this._label.draw(ctx, plot); elem.appendTo(this._elem); } - + var t = this._ticks; for (var i=0; i<t.length; i++) { var tick = t[i]; @@ -342,7 +342,7 @@ elem.appendTo(this._elem); } } - + this._groupLabels = []; // now make group labels for (var i=0; i<this.groupLabels.length; i++) @@ -355,9 +355,9 @@ } return this._elem; }; - + // called with scope of axis - $.jqplot.CategoryAxisRenderer.prototype.set = function() { + $.jqplot.CategoryAxisRenderer.prototype.set = function() { var dim = 0; var temp; var w = 0; @@ -379,7 +379,7 @@ } } } - + var dim2 = 0; for (var i=0; i<this._groupLabels.length; i++) { var l = this._groupLabels[i]; @@ -393,10 +393,10 @@ dim2 = temp; } } - + if (lshow) { w = this._label._elem.outerWidth(true); - h = this._label._elem.outerHeight(true); + h = this._label._elem.outerHeight(true); } if (this.name == 'xaxis') { dim += dim2 + h; @@ -420,9 +420,9 @@ this._label._elem.css('width', w+'px'); } } - } + } }; - + // called with scope of axis $.jqplot.CategoryAxisRenderer.prototype.pack = function(pos, offsets) { var ticks = this._ticks; @@ -436,15 +436,15 @@ for (var p in pos) { this._elem.css(p, pos[p]); } - + this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; - + if (!this.reverse) { // point to unit and unit to point conversions references to Plot DOM element top left corner. - + this.u2p = function(u){ return (u - min) * pixellength / unitlength + offmin; }; @@ -452,7 +452,7 @@ this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (u - min) * pixellength / unitlength; @@ -461,7 +461,7 @@ return p * unitlength / pixellength + min; }; } - + else { this.series_u2p = function(u){ return (u - max) * pixellength / unitlength; @@ -474,7 +474,7 @@ else { // point to unit and unit to point conversions references to Plot DOM element top left corner. - + this.u2p = function(u){ return offmin + (max - u) * pixellength / unitlength; }; @@ -482,7 +482,7 @@ this.p2u = function(p){ return min + (p - offmin) * unitlength / pixellength; }; - + if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (max - u) * pixellength / unitlength; @@ -491,7 +491,7 @@ return p * unitlength / pixellength + max; }; } - + else { this.series_u2p = function(u){ return (min - u) * pixellength / unitlength; @@ -502,15 +502,15 @@ } } - - + + if (this.show) { if (this.name == 'xaxis' || this.name == 'x2axis') { for (i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; - + if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. var temp = (this.name == 'xaxis') ? 1 : -1; @@ -547,7 +547,7 @@ t.pack(); } } - + var labeledge=['bottom', 0]; if (lshow) { var w = this._label._elem.outerWidth(true); @@ -562,7 +562,7 @@ } this._label.pack(); } - + // draw the group labels var step = parseInt(this._ticks.length/this.groups, 10); for (i=0; i<this._groupLabels.length; i++) { @@ -584,7 +584,7 @@ else { for (i=0; i<ticks.length; i++) { var t = ticks[i]; - if (t.show && t.showLabel) { + if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. @@ -625,13 +625,13 @@ else { shim = -t.getHeight()/2; } - + var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); } } - + var labeledge=['left', 0]; if (lshow) { var h = this._label._elem.outerHeight(true); @@ -643,10 +643,10 @@ else { this._label._elem.css('right', '0px'); labeledge = ['right', this._label._elem.outerWidth(true)]; - } + } this._label.pack(); } - + // draw the group labels, position top here, do left after label position. var step = parseInt(this._ticks.length/this.groups, 10); for (i=0; i<this._groupLabels.length; i++) { @@ -663,11 +663,11 @@ mid = mid/count; this._groupLabels[i].css({'top':mid - this._groupLabels[i].outerHeight()/2}); this._groupLabels[i].css(labeledge[0], labeledge[1]); - + } } } - }; - - + }; + + })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.min.js index f3d7ee1f..7cff1591 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.categoryAxisRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.CategoryAxisRenderer=function(b){a.jqplot.LinearAxisRenderer.call(this);this.sortMergedLabels=false};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){this.groups=1;this.groupLabels=[];this._groupLabels=[];this._grouped=false;this._barsPerGroup=null;this.reverse=false;a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];if(g.groups){this.groups=g.groups}var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}if(this.groupLabels.length){this.groups=this.groupLabels.length}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var D=this._ticks;var z=this.ticks;var F=this.name;var C=this._dataBounds;var v,A;var q,w;var d,c;var b,x;if(z.length){if(this.groups>1&&!this._grouped){var r=z.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p){z.splice(x+e,0," ");e++}this._grouped=true}this.min=0.5;this.max=z.length+0.5;var m=this.max-this.min;this.numberTicks=2*z.length+1;for(x=0;x<z.length;x++){b=this.min+2*x*m/(this.numberTicks-1);var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b,this.name);this._ticks.push(h);var h=new this.tickRenderer(this.tickOptions);h.label=z[x];h.showMark=false;h.showGridline=false;h.setTick(b+0.5,this.name);this._ticks.push(h)}var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b+1,this.name);this._ticks.push(h)}else{if(F=="xaxis"||F=="x2axis"){v=this._plotDimensions.width}else{v=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var y=[];var B=0;var q=0.5;var w,E;var f=false;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}if(a.inArray(E,y)==-1){f=true;B+=1;y.push(E)}}}if(f&&this.sortMergedLabels){y.sort(function(j,i){return j-i})}this.ticks=y;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}var n=a.inArray(E,y)+1;if(this.name=="xaxis"||this.name=="x2axis"){k.data[u][0]=n}else{k.data[u][1]=n}}}if(this.groups>1&&!this._grouped){var r=y.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p+1){y[x]=" "}this._grouped=true}w=B+0.5;if(this.numberTicks==null){this.numberTicks=2*B+1}var m=w-q;this.min=q;this.max=w;var o=0;var g=parseInt(3+v/10,10);var p=parseInt(B/g,10);if(this.tickInterval==null){this.tickInterval=m/(this.numberTicks-1)}for(var x=0;x<this.numberTicks;x++){b=this.min+x*this.tickInterval;var h=new this.tickRenderer(this.tickOptions);if(x/2==parseInt(x/2,10)){h.showLabel=false;h.showMark=true}else{if(p>0&&o<p){h.showLabel=false;o+=1}else{h.showLabel=true;o=0}h.label=h.formatter(h.formatString,y[(x-1)/2]);h.showMark=false;h.showGridline=false}h.setTick(b,this.name);this._ticks.push(h)}}};a.jqplot.CategoryAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this);var h=0;var c;if(this._elem){this._elem.emptyForce()}this._elem=this._elem||a('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem)}var f=this._ticks;for(var e=0;e<f.length;e++){var d=f[e];if(d.showLabel&&(!d.isMinorTick||this.showMinorTicks)){var g=d.draw(b,j);g.appendTo(this._elem)}}this._groupLabels=[];for(var e=0;e<this.groupLabels.length;e++){var g=a('<div style="position:absolute;" class="jqplot-'+this.name+'-groupLabel"></div>');g.html(this.groupLabels[e]);this._groupLabels.push(g);g.appendTo(this._elem)}}return this._elem};a.jqplot.CategoryAxisRenderer.prototype.set=function(){var e=0;var m;var k=0;var f=0;var d=(this._label==null)?false:this._label.show;if(this.show){var n=this._ticks;for(var c=0;c<n.length;c++){var g=n[c];if(g.showLabel&&(!g.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){m=g._elem.outerHeight(true)}else{m=g._elem.outerWidth(true)}if(m>e){e=m}}}var j=0;for(var c=0;c<this._groupLabels.length;c++){var b=this._groupLabels[c];if(this.name=="xaxis"||this.name=="x2axis"){m=b.outerHeight(true)}else{m=b.outerWidth(true)}if(m>j){j=m}}if(d){k=this._label._elem.outerWidth(true);f=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){e+=j+k;this._elem.css({width:e+"px",left:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}else{e+=j+k;this._elem.css({width:e+"px",right:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}}}}};a.jqplot.CategoryAxisRenderer.prototype.pack=function(e,c){var C=this._ticks;var v=this.max;var s=this.min;var n=c.max;var l=c.min;var q=(this._label==null)?false:this._label.show;var x;for(var r in e){this._elem.css(r,e[r])}this._offsets=c;var g=n-l;var k=v-s;if(!this.reverse){this.u2p=function(h){return(h-s)*g/k+l};this.p2u=function(h){return(h-l)*k/g+s};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(h-s)*g/k};this.series_p2u=function(h){return h*k/g+s}}else{this.series_u2p=function(h){return(h-v)*g/k};this.series_p2u=function(h){return h*k/g+v}}}else{this.u2p=function(h){return l+(v-h)*g/k};this.p2u=function(h){return s+(h-l)*k/g};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v-h)*g/k};this.series_p2u=function(h){return h*k/g+v}}else{this.series_u2p=function(h){return(s-h)*g/k};this.series_p2u=function(h){return h*k/g+s}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="xaxis")?1:-1;switch(o.labelPosition){case"auto":if(A*o.angle<0){b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2}else{b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2}break;case"end":b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;case"start":b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2;break;case"middle":b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;default:b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break}}else{b=-o.getWidth()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("left",D);o.pack()}}var z=["bottom",0];if(q){var m=this._label._elem.outerWidth(true);this._label._elem.css("left",l+g/2-m/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px");z=["bottom",this._label._elem.outerHeight(true)]}else{this._label._elem.css("top","0px");z=["top",this._label._elem.outerHeight(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10);for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<=(x+1)*d;u++){if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.left+o.outerWidth(true)/2;f++}}B=B/f;this._groupLabels[x].css({left:(B-this._groupLabels[x].outerWidth(true)/2)});this._groupLabels[x].css(z[0],z[1])}}else{for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="yaxis")?1:-1;switch(o.labelPosition){case"auto":case"end":if(A*o.angle<0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"start":if(o.angle>0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"middle":b=-o.getHeight()/2;break;default:b=-o.getHeight()/2;break}}else{b=-o.getHeight()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("top",D);o.pack()}}var z=["left",0];if(q){var y=this._label._elem.outerHeight(true);this._label._elem.css("top",n-g/2-y/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px");z=["left",this._label._elem.outerWidth(true)]}else{this._label._elem.css("right","0px");z=["right",this._label._elem.outerWidth(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10);for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<=(x+1)*d;u++){if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.top+o.outerHeight()/2;f++}}B=B/f;this._groupLabels[x].css({top:B-this._groupLabels[x].outerHeight()/2});this._groupLabels[x].css(z[0],z[1])}}}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.js index 22401dc7..0c579e00 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,41 +26,41 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** * Class: $.jqplot.ciParser * Data Renderer function which converts a custom JSON data object into jqPlot data format. * Set this as a callable on the jqplot dataRenderer plot option: - * + * * > plot = $.jqplot('mychart', [data], { dataRenderer: $.jqplot.ciParser, ... }); - * + * * Where data is an object in JSON format or a JSON encoded string conforming to the * City Index API spec. - * + * * Note that calling the renderer function is handled internally by jqPlot. The * user does not have to call the function. The parameters described below will * automatically be passed to the ciParser function. - * + * * Parameters: * data - JSON encoded string or object. * plot - reference to jqPlot Plot object. - * + * * Returns: * data array in jqPlot format. - * + * */ $.jqplot.ciParser = function (data, plot) { var ret = [], line, temp, i, j, k, kk; - + if (typeof(data) == "string") { data = $.jqplot.JSON.parse(data, handleStrings); } - + else if (typeof(data) == "object") { for (k in data) { for (i=0; i<data[k].length; i++) { @@ -70,16 +70,16 @@ } } } - + else { return null; } - + // function handleStrings // Checks any JSON encoded strings to see if they are // encoded dates. If so, pull out the timestamp. // Expects dates to be represented by js timestamps. - + function handleStrings(key, value) { var a; if (value != null) { @@ -93,7 +93,7 @@ return value; } } - + for (var prop in data) { line = []; temp = data[prop]; diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.min.js index 165d4b5c..7ca91780 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ciParser.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.ciParser=function(g,l){var m=[],o,n,h,f,e,c;if(typeof(g)=="string"){g=a.jqplot.JSON.parse(g,d)}else{if(typeof(g)=="object"){for(e in g){for(h=0;h<g[e].length;h++){for(c in g[e][h]){g[e][h][c]=d(c,g[e][h][c])}}}}else{return null}}function d(j,k){var i;if(k!=null){if(k.toString().indexOf("Date")>=0){i=/^\/Date\((-?[0-9]+)\)\/$/.exec(k);if(i){return parseInt(i[1],10)}}return k}}for(var b in g){o=[];n=g[b];switch(b){case"PriceTicks":for(h=0;h<n.length;h++){o.push([n[h]["TickDate"],n[h]["Price"]])}break;case"PriceBars":for(h=0;h<n.length;h++){o.push([n[h]["BarDate"],n[h]["Open"],n[h]["High"],n[h]["Low"],n[h]["Close"]])}break}m.push(o)}return m}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.js index 0e583682..ab8b8868 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,10 +26,10 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { - + /** * Class: $.jqplot.Cursor * Plugin class representing the cursor as displayed on the plot. @@ -89,7 +89,7 @@ // prop: zoom // Enable plot zooming. this.zoom = false; - // zoomProxy and zoomTarget properties are not directly set by user. + // zoomProxy and zoomTarget properties are not directly set by user. // They Will be set through call to zoomProxy method. this.zoomProxy = false; this.zoomTarget = false; @@ -147,9 +147,9 @@ this.onGrid = false; $.extend(true, this, options); }; - + $.jqplot.Cursor.cursorLegendFormatString = '%s x:%s, y:%s'; - + // called with scope of plot $.jqplot.Cursor.init = function (target, data, opts){ // add a cursor attribute to the plot @@ -161,26 +161,26 @@ $.jqplot.eventListenerHooks.push(['jqplotMouseEnter', handleMouseEnter]); $.jqplot.eventListenerHooks.push(['jqplotMouseLeave', handleMouseLeave]); $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMouseMove]); - - if (c.showCursorLegend) { + + if (c.showCursorLegend) { opts.legend = opts.legend || {}; opts.legend.renderer = $.jqplot.CursorLegendRenderer; opts.legend.formatString = this.plugins.cursor.cursorLegendFormatString; opts.legend.show = true; } - + if (c.zoom) { $.jqplot.eventListenerHooks.push(['jqplotMouseDown', handleMouseDown]); - + if (c.clickReset) { $.jqplot.eventListenerHooks.push(['jqplotClick', handleClick]); } - + if (c.dblClickReset) { $.jqplot.eventListenerHooks.push(['jqplotDblClick', handleDblClick]); - } + } } - + this.resetZoom = function() { var axes = this.axes; if (!c.zoomProxy) { @@ -203,7 +203,7 @@ this.plugins.cursor._zoom.isZoomed = false; this.target.trigger('jqplotResetZoom', [this, this.plugins.cursor]); }; - + if (c.showTooltipDataPosition) { c.showTooltipUnitPosition = false; @@ -214,28 +214,28 @@ } } }; - + // called with context of plot $.jqplot.Cursor.postDraw = function() { var c = this.plugins.cursor; - + // Memory Leaks patch if (c.zoomCanvas) { c.zoomCanvas.resetCanvas(); c.zoomCanvas = null; } - + if (c.cursorCanvas) { c.cursorCanvas.resetCanvas(); c.cursorCanvas = null; } - + if (c._tooltipElem) { c._tooltipElem.emptyForce(); c._tooltipElem = null; } - + if (c.zoom) { c.zoomCanvas = new $.jqplot.GenericCanvas(); this.eventCanvas._elem.before(c.zoomCanvas.createElement(this._gridPadding, 'jqplot-zoom-canvas', this._plotDimensions, this)); @@ -247,8 +247,8 @@ elem = null; c._tooltipElem.addClass('jqplot-cursor-tooltip'); c._tooltipElem.css({position:'absolute', display:'none'}); - - + + if (c.zoomCanvas) { c.zoomCanvas._elem.before(c._tooltipElem); } @@ -283,7 +283,7 @@ } } }; - + // Group: methods // // method: $.jqplot.Cursor.zoomProxy @@ -301,19 +301,19 @@ tc.dblClickReset = false; cc.zoom = true; cc.zoomProxy = true; - + controllerPlot.target.bind('jqplotZoom', plotZoom); controllerPlot.target.bind('jqplotResetZoom', plotReset); function plotZoom(ev, gridpos, datapos, plot, cursor) { tc.doZoom(gridpos, datapos, targetPlot, cursor); - } + } function plotReset(ev, plot, cursor) { targetPlot.resetZoom(); } }; - + $.jqplot.Cursor.prototype.resetZoom = function(plot, cursor) { var axes = plot.axes; var cax = cursor._zoom.axes; @@ -322,7 +322,7 @@ // axes[ax]._ticks = []; // axes[ax].min = cax[ax].min; // axes[ax].max = cax[ax].max; - // axes[ax].numberTicks = cax[ax].numberTicks; + // axes[ax].numberTicks = cax[ax].numberTicks; // axes[ax].tickInterval = cax[ax].tickInterval; // // for date axes // axes[ax].daTickInterval = cax[ax].daTickInterval; @@ -342,11 +342,11 @@ } plot.target.trigger('jqplotResetZoom', [plot, cursor]); }; - + $.jqplot.Cursor.resetZoom = function(plot) { plot.resetZoom(); }; - + $.jqplot.Cursor.prototype.doZoom = function (gridpos, datapos, plot, cursor) { var c = cursor; var axes = plot.axes; @@ -373,10 +373,10 @@ } - if ((c.constrainZoomTo == 'none') || (c.constrainZoomTo == 'x' && ax.charAt(0) == 'x') || (c.constrainZoomTo == 'y' && ax.charAt(0) == 'y')) { + if ((c.constrainZoomTo == 'none') || (c.constrainZoomTo == 'x' && ax.charAt(0) == 'x') || (c.constrainZoomTo == 'y' && ax.charAt(0) == 'y')) { dp = datapos[ax]; - if (dp != null) { - if (dp > start[ax]) { + if (dp != null) { + if (dp > start[ax]) { newmin = start[ax]; newmax = dp; } @@ -400,7 +400,7 @@ _numberTicks = plot.axes.yaxis.numberTicks; } } - + if (this.looseZoom && (axes[ax].renderer.constructor === $.jqplot.LinearAxisRenderer || axes[ax].renderer.constructor === $.jqplot.LogAxisRenderer )) { //} || axes[ax].renderer.constructor === $.jqplot.DateAxisRenderer)) { ret = $.jqplot.LinearTickGenerator(newmin, newmax, curax._scalefact, _numberTicks); @@ -444,7 +444,7 @@ axes[ax]._ticks = []; } } - + // if ((c.constrainZoomTo == 'x' && ax.charAt(0) == 'y' && c.autoscaleConstraint) || (c.constrainZoomTo == 'y' && ax.charAt(0) == 'x' && c.autoscaleConstraint)) { // dp = datapos[ax]; // if (dp != null) { @@ -461,10 +461,10 @@ plot.target.trigger('jqplotZoom', [gridpos, datapos, plot, cursor]); } }; - + $.jqplot.preInitHooks.push($.jqplot.Cursor.init); $.jqplot.postDrawHooks.push($.jqplot.Cursor.postDraw); - + function updateTooltip(gridpos, datapos, plot) { var c = plot.plugins.cursor; var s = ''; @@ -496,12 +496,12 @@ addbr = true; } } - + if (c.showTooltipDataPosition) { - var series = plot.series; + var series = plot.series; var ret = getIntersectingPoints(plot, gridpos.x, gridpos.y); var addbr = false; - + for (var i = 0; i< series.length; i++) { if (series[i].show) { var idx = series[i].index; @@ -531,11 +531,11 @@ } } } - + } c._tooltipElem.html(s); } - + function moveLine(gridpos, plot) { var c = plot.plugins.cursor; var ctx = c.cursorCanvas._ctx; @@ -577,11 +577,11 @@ else { $(cells[i]).html($.jqplot.sprintf(c.cursorLegendFormatString, label, sx, sy)); } - } + } } ctx = null; } - + function getIntersectingPoints(plot, x, y) { var ret = {indices:[], data:[]}; var s, i, d0, d, j, r, p; @@ -604,14 +604,14 @@ ret.data.push({seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]}); } } - } + } } } return ret; } - + function moveTooltip(gridpos, plot) { - var c = plot.plugins.cursor; + var c = plot.plugins.cursor; var elem = c._tooltipElem; switch (c.tooltipLocation) { case 'nw': @@ -651,17 +651,17 @@ var y = gridpos.y + plot._gridPadding.top + c.tooltipOffset; break; } - + elem.css('left', x); elem.css('top', y); elem = null; } - - function positionTooltip(plot) { + + function positionTooltip(plot) { // fake a grid for positioning - var grid = plot._gridPadding; + var grid = plot._gridPadding; var c = plot.plugins.cursor; - var elem = c._tooltipElem; + var elem = c._tooltipElem; switch (c.tooltipLocation) { case 'nw': var a = grid.left + c.tooltipOffset; @@ -713,7 +713,7 @@ } elem = null; } - + function handleClick (ev, gridpos, datapos, neighbor, plot) { ev.preventDefault(); ev.stopImmediatePropagation(); @@ -731,7 +731,7 @@ } return false; } - + function handleDblClick (ev, gridpos, datapos, neighbor, plot) { ev.preventDefault(); ev.stopImmediatePropagation(); @@ -749,7 +749,7 @@ } return false; } - + function handleMouseLeave(ev, gridpos, datapos, neighbor, plot) { var c = plot.plugins.cursor; c.onGrid = false; @@ -780,12 +780,12 @@ else { $(cells[i]).html($.jqplot.sprintf(c.cursorLegendFormatString, label, undefined, undefined)); } - - } + + } } } } - + function handleMouseEnter(ev, gridpos, datapos, neighbor, plot) { var c = plot.plugins.cursor; c.onGrid = true; @@ -807,8 +807,8 @@ } } - } - + } + function handleMouseMove(ev, gridpos, datapos, neighbor, plot) { var c = plot.plugins.cursor; if (c.show) { @@ -823,7 +823,7 @@ } } } - + function getEventPosition(ev) { var plot = ev.data.plot; var go = plot.eventCanvas._elem.offset(); @@ -843,8 +843,8 @@ } return {offsets:go, gridPos:gridPos, dataPos:dataPos}; - } - + } + function handleZoomMove(ev) { var plot = ev.data.plot; var c = plot.plugins.cursor; @@ -889,7 +889,7 @@ ctx = null; } } - + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { var c = plot.plugins.cursor; if(plot.plugins.mobile){ @@ -929,16 +929,16 @@ for (var ax in datapos) { // get zoom starting position. c._zoom.axes.start[ax] = datapos[ax]; - } + } if(plot.plugins.mobile){ - $(document).bind('vmousemove.jqplotCursor', {plot:plot}, handleZoomMove); + $(document).bind('vmousemove.jqplotCursor', {plot:plot}, handleZoomMove); } else { - $(document).bind('mousemove.jqplotCursor', {plot:plot}, handleZoomMove); + $(document).bind('mousemove.jqplotCursor', {plot:plot}, handleZoomMove); } } } - + function handleMouseUp(ev) { var plot = ev.data.plot; var c = plot.plugins.cursor; @@ -949,13 +949,13 @@ var height = c.zoomCanvas._ctx.canvas.height; var width = c.zoomCanvas._ctx.canvas.width; var axes = plot.axes; - + if (c.constrainOutsideZoom && !c.onGrid) { if (xpos < 0) { xpos = 0; } else if (xpos > width) { xpos = width; } if (ypos < 0) { ypos = 0; } else if (ypos > height) { ypos = height; } - + for (var axis in datapos) { if (datapos[axis]) { if (axis.charAt(0) == 'x') { @@ -967,7 +967,7 @@ } } } - + if (c.constrainZoomTo == 'x') { ypos = height; } @@ -976,14 +976,14 @@ } c._zoom.end = [xpos, ypos]; c._zoom.gridpos = {x:xpos, y:ypos}; - + c.doZoom(c._zoom.gridpos, datapos, plot, c); } c._zoom.started = false; c._zoom.zooming = false; - + $(document).unbind('mousemove.jqplotCursor', handleZoomMove); - + if (document.onselectstart != undefined && c._oldHandlers.onselectstart != null){ document.onselectstart = c._oldHandlers.onselectstart; c._oldHandlers.onselectstart = null; @@ -998,7 +998,7 @@ } } - + function drawZoomBox() { var start = this._zoom.start; var end = this._zoom.end; @@ -1030,15 +1030,15 @@ ctx.strokeRect(l,t,w,h); ctx = null; } - + $.jqplot.CursorLegendRenderer = function(options) { $.jqplot.TableLegendRenderer.call(this, options); this.formatString = '%s'; }; - + $.jqplot.CursorLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.CursorLegendRenderer.prototype.constructor = $.jqplot.CursorLegendRenderer; - + // called in context of a Legend $.jqplot.CursorLegendRenderer.prototype.draw = function() { if (this._elem) { @@ -1053,7 +1053,7 @@ elem = null; this._elem.addClass('jqplot-legend jqplot-cursor-legend'); this._elem.css('position', 'absolute'); - + var pad = false; for (var i = 0; i< series.length; i++) { s = series[i]; @@ -1073,7 +1073,7 @@ if (item) { addrow.call(this, item.label, item.color, pad); pad = true; - } + } } } } @@ -1081,7 +1081,7 @@ delete series; delete s; } - + function addrow(label, color, pad, idx) { var rs = (pad) ? this.rowSpacing : '0'; var tr = $('<tr class="jqplot-legend jqplot-cursor-legend"></tr>').appendTo(this._elem); @@ -1104,5 +1104,5 @@ } return this._elem; }; - + })(jQuery); diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.min.js index 0de0ca14..b782ece4 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.cursor.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(j){j.jqplot.Cursor=function(q){this.style="crosshair";this.previousCursor="auto";this.show=j.jqplot.config.enablePlugins;this.showTooltip=true;this.followMouse=false;this.tooltipLocation="se";this.tooltipOffset=6;this.showTooltipGridPosition=false;this.showTooltipUnitPosition=true;this.showTooltipDataPosition=false;this.tooltipFormatString="%.4P, %.4P";this.useAxesFormatters=true;this.tooltipAxisGroups=[];this.zoom=false;this.zoomProxy=false;this.zoomTarget=false;this.looseZoom=true;this.clickReset=false;this.dblClickReset=true;this.showVerticalLine=false;this.showHorizontalLine=false;this.constrainZoomTo="none";this.shapeRenderer=new j.jqplot.ShapeRenderer();this._zoom={start:[],end:[],started:false,zooming:false,isZoomed:false,axes:{start:{},end:{}},gridpos:{},datapos:{}};this._tooltipElem;this.zoomCanvas;this.cursorCanvas;this.intersectionThreshold=2;this.showCursorLegend=false;this.cursorLegendFormatString=j.jqplot.Cursor.cursorLegendFormatString;this._oldHandlers={onselectstart:null,ondrag:null,onmousedown:null};this.constrainOutsideZoom=true;this.showTooltipOutsideZoom=false;this.onGrid=false;j.extend(true,this,q)};j.jqplot.Cursor.cursorLegendFormatString="%s x:%s, y:%s";j.jqplot.Cursor.init=function(t,s,r){var q=r||{};this.plugins.cursor=new j.jqplot.Cursor(q.cursor);var u=this.plugins.cursor;if(u.show){j.jqplot.eventListenerHooks.push(["jqplotMouseEnter",b]);j.jqplot.eventListenerHooks.push(["jqplotMouseLeave",f]);j.jqplot.eventListenerHooks.push(["jqplotMouseMove",i]);if(u.showCursorLegend){r.legend=r.legend||{};r.legend.renderer=j.jqplot.CursorLegendRenderer;r.legend.formatString=this.plugins.cursor.cursorLegendFormatString;r.legend.show=true}if(u.zoom){j.jqplot.eventListenerHooks.push(["jqplotMouseDown",a]);if(u.clickReset){j.jqplot.eventListenerHooks.push(["jqplotClick",k])}if(u.dblClickReset){j.jqplot.eventListenerHooks.push(["jqplotDblClick",c])}}this.resetZoom=function(){var x=this.axes;if(!u.zoomProxy){for(var w in x){x[w].reset();x[w]._ticks=[];if(u._zoom.axes[w]!==undefined){x[w]._autoFormatString=u._zoom.axes[w].tickFormatString}}this.redraw()}else{var v=this.plugins.cursor.zoomCanvas._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);v=null}this.plugins.cursor._zoom.isZoomed=false;this.target.trigger("jqplotResetZoom",[this,this.plugins.cursor])};if(u.showTooltipDataPosition){u.showTooltipUnitPosition=false;u.showTooltipGridPosition=false;if(q.cursor.tooltipFormatString==undefined){u.tooltipFormatString=j.jqplot.Cursor.cursorLegendFormatString}}}};j.jqplot.Cursor.postDraw=function(){var x=this.plugins.cursor;if(x.zoomCanvas){x.zoomCanvas.resetCanvas();x.zoomCanvas=null}if(x.cursorCanvas){x.cursorCanvas.resetCanvas();x.cursorCanvas=null}if(x._tooltipElem){x._tooltipElem.emptyForce();x._tooltipElem=null}if(x.zoom){x.zoomCanvas=new j.jqplot.GenericCanvas();this.eventCanvas._elem.before(x.zoomCanvas.createElement(this._gridPadding,"jqplot-zoom-canvas",this._plotDimensions,this));x.zoomCanvas.setContext()}var v=document.createElement("div");x._tooltipElem=j(v);v=null;x._tooltipElem.addClass("jqplot-cursor-tooltip");x._tooltipElem.css({position:"absolute",display:"none"});if(x.zoomCanvas){x.zoomCanvas._elem.before(x._tooltipElem)}else{this.eventCanvas._elem.before(x._tooltipElem)}if(x.showVerticalLine||x.showHorizontalLine){x.cursorCanvas=new j.jqplot.GenericCanvas();this.eventCanvas._elem.before(x.cursorCanvas.createElement(this._gridPadding,"jqplot-cursor-canvas",this._plotDimensions,this));x.cursorCanvas.setContext()}if(x.showTooltipUnitPosition){if(x.tooltipAxisGroups.length===0){var t=this.series;var u;var q=[];for(var r=0;r<t.length;r++){u=t[r];var w=u.xaxis+","+u.yaxis;if(j.inArray(w,q)==-1){q.push(w)}}for(var r=0;r<q.length;r++){x.tooltipAxisGroups.push(q[r].split(","))}}}};j.jqplot.Cursor.zoomProxy=function(v,r){var q=v.plugins.cursor;var u=r.plugins.cursor;q.zoomTarget=true;q.zoom=true;q.style="auto";q.dblClickReset=false;u.zoom=true;u.zoomProxy=true;r.target.bind("jqplotZoom",t);r.target.bind("jqplotResetZoom",s);function t(x,w,z,y,A){q.doZoom(w,z,v,A)}function s(w,x,y){v.resetZoom()}};j.jqplot.Cursor.prototype.resetZoom=function(u,v){var t=u.axes;var s=v._zoom.axes;if(!u.plugins.cursor.zoomProxy&&v._zoom.isZoomed){for(var r in t){t[r].reset();t[r]._ticks=[];t[r]._autoFormatString=s[r].tickFormatString}u.redraw();v._zoom.isZoomed=false}else{var q=v.zoomCanvas._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);q=null}u.target.trigger("jqplotResetZoom",[u,v])};j.jqplot.Cursor.resetZoom=function(q){q.resetZoom()};j.jqplot.Cursor.prototype.doZoom=function(G,t,C,u){var I=u;var F=C.axes;var r=I._zoom.axes;var w=r.start;var s=r.end;var B,E,z,D,v,x,q,H,J;var A=C.plugins.cursor.zoomCanvas._ctx;if((I.constrainZoomTo=="none"&&Math.abs(G.x-I._zoom.start[0])>6&&Math.abs(G.y-I._zoom.start[1])>6)||(I.constrainZoomTo=="x"&&Math.abs(G.x-I._zoom.start[0])>6)||(I.constrainZoomTo=="y"&&Math.abs(G.y-I._zoom.start[1])>6)){if(!C.plugins.cursor.zoomProxy){for(var y in t){if(I._zoom.axes[y]==undefined){I._zoom.axes[y]={};I._zoom.axes[y].numberTicks=F[y].numberTicks;I._zoom.axes[y].tickInterval=F[y].tickInterval;I._zoom.axes[y].daTickInterval=F[y].daTickInterval;I._zoom.axes[y].min=F[y].min;I._zoom.axes[y].max=F[y].max;I._zoom.axes[y].tickFormatString=(F[y].tickOptions!=null)?F[y].tickOptions.formatString:""}if((I.constrainZoomTo=="none")||(I.constrainZoomTo=="x"&&y.charAt(0)=="x")||(I.constrainZoomTo=="y"&&y.charAt(0)=="y")){z=t[y];if(z!=null){if(z>w[y]){v=w[y];x=z}else{D=w[y]-z;v=z;x=w[y]}q=F[y];H=null;if(q.alignTicks){if(q.name==="x2axis"&&C.axes.xaxis.show){H=C.axes.xaxis.numberTicks}else{if(q.name.charAt(0)==="y"&&q.name!=="yaxis"&&q.name!=="yMidAxis"&&C.axes.yaxis.show){H=C.axes.yaxis.numberTicks}}}if(this.looseZoom&&(F[y].renderer.constructor===j.jqplot.LinearAxisRenderer||F[y].renderer.constructor===j.jqplot.LogAxisRenderer)){J=j.jqplot.LinearTickGenerator(v,x,q._scalefact,H);if(F[y].tickInset&&J[0]<F[y].min+F[y].tickInset*F[y].tickInterval){J[0]+=J[4];J[2]-=1}if(F[y].tickInset&&J[1]>F[y].max-F[y].tickInset*F[y].tickInterval){J[1]-=J[4];J[2]-=1}if(F[y].renderer.constructor===j.jqplot.LogAxisRenderer&&J[0]<F[y].min){J[0]+=J[4];J[2]-=1}F[y].min=J[0];F[y].max=J[1];F[y]._autoFormatString=J[3];F[y].numberTicks=J[2];F[y].tickInterval=J[4];F[y].daTickInterval=[J[4]/1000,"seconds"]}else{F[y].min=v;F[y].max=x;F[y].tickInterval=null;F[y].numberTicks=null;F[y].daTickInterval=null}F[y]._ticks=[]}}}A.clearRect(0,0,A.canvas.width,A.canvas.height);C.redraw();I._zoom.isZoomed=true;A=null}C.target.trigger("jqplotZoom",[G,t,C,u])}};j.jqplot.preInitHooks.push(j.jqplot.Cursor.init);j.jqplot.postDrawHooks.push(j.jqplot.Cursor.postDraw);function e(G,r,C){var J=C.plugins.cursor;var w="";var N=false;if(J.showTooltipGridPosition){w=G.x+", "+G.y;N=true}if(J.showTooltipUnitPosition){var F;for(var E=0;E<J.tooltipAxisGroups.length;E++){F=J.tooltipAxisGroups[E];if(N){w+="<br />"}if(J.useAxesFormatters){for(var D=0;D<F.length;D++){if(D){w+=", "}var H=C.axes[F[D]]._ticks[0].formatter;var B=C.axes[F[D]]._ticks[0].formatString;w+=H(B,r[F[D]])}}else{w+=j.jqplot.sprintf(J.tooltipFormatString,r[F[0]],r[F[1]])}N=true}}if(J.showTooltipDataPosition){var u=C.series;var M=d(C,G.x,G.y);var N=false;for(var E=0;E<u.length;E++){if(u[E].show){var y=u[E].index;var t=u[E].label.toString();var I=j.inArray(y,M.indices);var z=undefined;var x=undefined;if(I!=-1){var L=M.data[I].data;if(J.useAxesFormatters){var A=u[E]._xaxis._ticks[0].formatter;var q=u[E]._yaxis._ticks[0].formatter;var K=u[E]._xaxis._ticks[0].formatString;var v=u[E]._yaxis._ticks[0].formatString;z=A(K,L[0]);x=q(v,L[1])}else{z=L[0];x=L[1]}if(N){w+="<br />"}w+=j.jqplot.sprintf(J.tooltipFormatString,t,z,x);N=true}}}}J._tooltipElem.html(w)}function g(C,A){var E=A.plugins.cursor;var z=E.cursorCanvas._ctx;z.clearRect(0,0,z.canvas.width,z.canvas.height);if(E.showVerticalLine){E.shapeRenderer.draw(z,[[C.x,0],[C.x,z.canvas.height]])}if(E.showHorizontalLine){E.shapeRenderer.draw(z,[[0,C.y],[z.canvas.width,C.y]])}var G=d(A,C.x,C.y);if(E.showCursorLegend){var r=j(A.targetId+" td.jqplot-cursor-legend-label");for(var B=0;B<r.length;B++){var v=j(r[B]).data("seriesIndex");var t=A.series[v];var s=t.label.toString();var D=j.inArray(v,G.indices);var x=undefined;var w=undefined;if(D!=-1){var H=G.data[D].data;if(E.useAxesFormatters){var y=t._xaxis._ticks[0].formatter;var q=t._yaxis._ticks[0].formatter;var F=t._xaxis._ticks[0].formatString;var u=t._yaxis._ticks[0].formatString;x=y(F,H[0]);w=q(u,H[1])}else{x=H[0];w=H[1]}}if(A.legend.escapeHtml){j(r[B]).text(j.jqplot.sprintf(E.cursorLegendFormatString,s,x,w))}else{j(r[B]).html(j.jqplot.sprintf(E.cursorLegendFormatString,s,x,w))}}}z=null}function d(A,F,E){var B={indices:[],data:[]};var G,w,u,C,v,q,t;var z;var D=A.plugins.cursor;for(var w=0;w<A.series.length;w++){G=A.series[w];q=G.renderer;if(G.show){z=D.intersectionThreshold;if(G.showMarker){z+=G.markerRenderer.size/2}for(var v=0;v<G.gridData.length;v++){t=G.gridData[v];if(D.showVerticalLine){if(Math.abs(F-t[0])<=z){B.indices.push(w);B.data.push({seriesIndex:w,pointIndex:v,gridData:t,data:G.data[v]})}}}}}return B}function n(r,t){var v=t.plugins.cursor;var s=v._tooltipElem;switch(v.tooltipLocation){case"nw":var q=r.x+t._gridPadding.left-s.outerWidth(true)-v.tooltipOffset;var u=r.y+t._gridPadding.top-v.tooltipOffset-s.outerHeight(true);break;case"n":var q=r.x+t._gridPadding.left-s.outerWidth(true)/2;var u=r.y+t._gridPadding.top-v.tooltipOffset-s.outerHeight(true);break;case"ne":var q=r.x+t._gridPadding.left+v.tooltipOffset;var u=r.y+t._gridPadding.top-v.tooltipOffset-s.outerHeight(true);break;case"e":var q=r.x+t._gridPadding.left+v.tooltipOffset;var u=r.y+t._gridPadding.top-s.outerHeight(true)/2;break;case"se":var q=r.x+t._gridPadding.left+v.tooltipOffset;var u=r.y+t._gridPadding.top+v.tooltipOffset;break;case"s":var q=r.x+t._gridPadding.left-s.outerWidth(true)/2;var u=r.y+t._gridPadding.top+v.tooltipOffset;break;case"sw":var q=r.x+t._gridPadding.left-s.outerWidth(true)-v.tooltipOffset;var u=r.y+t._gridPadding.top+v.tooltipOffset;break;case"w":var q=r.x+t._gridPadding.left-s.outerWidth(true)-v.tooltipOffset;var u=r.y+t._gridPadding.top-s.outerHeight(true)/2;break;default:var q=r.x+t._gridPadding.left+v.tooltipOffset;var u=r.y+t._gridPadding.top+v.tooltipOffset;break}s.css("left",q);s.css("top",u);s=null}function m(u){var s=u._gridPadding;var v=u.plugins.cursor;var t=v._tooltipElem;switch(v.tooltipLocation){case"nw":var r=s.left+v.tooltipOffset;var q=s.top+v.tooltipOffset;t.css("left",r);t.css("top",q);break;case"n":var r=(s.left+(u._plotDimensions.width-s.right))/2-t.outerWidth(true)/2;var q=s.top+v.tooltipOffset;t.css("left",r);t.css("top",q);break;case"ne":var r=s.right+v.tooltipOffset;var q=s.top+v.tooltipOffset;t.css({right:r,top:q});break;case"e":var r=s.right+v.tooltipOffset;var q=(s.top+(u._plotDimensions.height-s.bottom))/2-t.outerHeight(true)/2;t.css({right:r,top:q});break;case"se":var r=s.right+v.tooltipOffset;var q=s.bottom+v.tooltipOffset;t.css({right:r,bottom:q});break;case"s":var r=(s.left+(u._plotDimensions.width-s.right))/2-t.outerWidth(true)/2;var q=s.bottom+v.tooltipOffset;t.css({left:r,bottom:q});break;case"sw":var r=s.left+v.tooltipOffset;var q=s.bottom+v.tooltipOffset;t.css({left:r,bottom:q});break;case"w":var r=s.left+v.tooltipOffset;var q=(s.top+(u._plotDimensions.height-s.bottom))/2-t.outerHeight(true)/2;t.css({left:r,top:q});break;default:var r=s.right-v.tooltipOffset;var q=s.bottom+v.tooltipOffset;t.css({right:r,bottom:q});break}t=null}function k(r,q,v,u,t){r.preventDefault();r.stopImmediatePropagation();var w=t.plugins.cursor;if(w.clickReset){w.resetZoom(t,w)}var s=window.getSelection;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(s&&!s().isCollapsed){s().collapse()}}return false}function c(r,q,v,u,t){r.preventDefault();r.stopImmediatePropagation();var w=t.plugins.cursor;if(w.dblClickReset){w.resetZoom(t,w)}var s=window.getSelection;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(s&&!s().isCollapsed){s().collapse()}}return false}function f(w,t,q,z,u){var v=u.plugins.cursor;v.onGrid=false;if(v.show){j(w.target).css("cursor",v.previousCursor);if(v.showTooltip&&!(v._zoom.zooming&&v.showTooltipOutsideZoom&&!v.constrainOutsideZoom)){v._tooltipElem.empty();v._tooltipElem.hide()}if(v.zoom){v._zoom.gridpos=t;v._zoom.datapos=q}if(v.showVerticalLine||v.showHorizontalLine){var B=v.cursorCanvas._ctx;B.clearRect(0,0,B.canvas.width,B.canvas.height);B=null}if(v.showCursorLegend){var A=j(u.targetId+" td.jqplot-cursor-legend-label");for(var s=0;s<A.length;s++){var y=j(A[s]).data("seriesIndex");var r=u.series[y];var x=r.label.toString();if(u.legend.escapeHtml){j(A[s]).text(j.jqplot.sprintf(v.cursorLegendFormatString,x,undefined,undefined))}else{j(A[s]).html(j.jqplot.sprintf(v.cursorLegendFormatString,x,undefined,undefined))}}}}}function b(r,q,u,t,s){var v=s.plugins.cursor;v.onGrid=true;if(v.show){v.previousCursor=r.target.style.cursor;r.target.style.cursor=v.style;if(v.showTooltip){e(q,u,s);if(v.followMouse){n(q,s)}else{m(s)}v._tooltipElem.show()}if(v.showVerticalLine||v.showHorizontalLine){g(q,s)}}}function i(r,q,u,t,s){var v=s.plugins.cursor;if(v.show){if(v.showTooltip){e(q,u,s);if(v.followMouse){n(q,s)}}if(v.showVerticalLine||v.showHorizontalLine){g(q,s)}}}function o(y){var x=y.data.plot;var t=x.eventCanvas._elem.offset();var w={x:y.pageX-t.left,y:y.pageY-t.top};var u={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var v=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var q=x.axes;var r,s;for(r=11;r>0;r--){s=v[r-1];if(q[s].show){u[s]=q[s].series_p2u(w[s.charAt(0)])}}return{offsets:t,gridPos:w,dataPos:u}}function h(z){var x=z.data.plot;var y=x.plugins.cursor;if(y.show&&y.zoom&&y._zoom.started&&!y.zoomTarget){z.preventDefault();var B=y.zoomCanvas._ctx;var v=o(z);var w=v.gridPos;var t=v.dataPos;y._zoom.gridpos=w;y._zoom.datapos=t;y._zoom.zooming=true;var u=w.x;var s=w.y;var A=B.canvas.height;var q=B.canvas.width;if(y.showTooltip&&!y.onGrid&&y.showTooltipOutsideZoom){e(w,t,x);if(y.followMouse){n(w,x)}}if(y.constrainZoomTo=="x"){y._zoom.end=[u,A]}else{if(y.constrainZoomTo=="y"){y._zoom.end=[q,s]}else{y._zoom.end=[u,s]}}var r=window.getSelection;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(r&&!r().isCollapsed){r().collapse()}}l.call(y);B=null}}function a(w,s,r,x,t){var v=t.plugins.cursor;if(t.plugins.mobile){j(document).one("vmouseup.jqplot_cursor",{plot:t},p)}else{j(document).one("mouseup.jqplot_cursor",{plot:t},p)}var u=t.axes;if(document.onselectstart!=undefined){v._oldHandlers.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!=undefined){v._oldHandlers.ondrag=document.ondrag;document.ondrag=function(){return false}}if(document.onmousedown!=undefined){v._oldHandlers.onmousedown=document.onmousedown;document.onmousedown=function(){return false}}if(v.zoom){if(!v.zoomProxy){var y=v.zoomCanvas._ctx;y.clearRect(0,0,y.canvas.width,y.canvas.height);y=null}if(v.constrainZoomTo=="x"){v._zoom.start=[s.x,0]}else{if(v.constrainZoomTo=="y"){v._zoom.start=[0,s.y]}else{v._zoom.start=[s.x,s.y]}}v._zoom.started=true;for(var q in r){v._zoom.axes.start[q]=r[q]}if(t.plugins.mobile){j(document).bind("vmousemove.jqplotCursor",{plot:t},h)}else{j(document).bind("mousemove.jqplotCursor",{plot:t},h)}}}function p(y){var v=y.data.plot;var x=v.plugins.cursor;if(x.zoom&&x._zoom.zooming&&!x.zoomTarget){var u=x._zoom.gridpos.x;var r=x._zoom.gridpos.y;var t=x._zoom.datapos;var z=x.zoomCanvas._ctx.canvas.height;var q=x.zoomCanvas._ctx.canvas.width;var w=v.axes;if(x.constrainOutsideZoom&&!x.onGrid){if(u<0){u=0}else{if(u>q){u=q}}if(r<0){r=0}else{if(r>z){r=z}}for(var s in t){if(t[s]){if(s.charAt(0)=="x"){t[s]=w[s].series_p2u(u)}else{t[s]=w[s].series_p2u(r)}}}}if(x.constrainZoomTo=="x"){r=z}else{if(x.constrainZoomTo=="y"){u=q}}x._zoom.end=[u,r];x._zoom.gridpos={x:u,y:r};x.doZoom(x._zoom.gridpos,t,v,x)}x._zoom.started=false;x._zoom.zooming=false;j(document).unbind("mousemove.jqplotCursor",h);if(document.onselectstart!=undefined&&x._oldHandlers.onselectstart!=null){document.onselectstart=x._oldHandlers.onselectstart;x._oldHandlers.onselectstart=null}if(document.ondrag!=undefined&&x._oldHandlers.ondrag!=null){document.ondrag=x._oldHandlers.ondrag;x._oldHandlers.ondrag=null}if(document.onmousedown!=undefined&&x._oldHandlers.onmousedown!=null){document.onmousedown=x._oldHandlers.onmousedown;x._oldHandlers.onmousedown=null}}function l(){var y=this._zoom.start;var u=this._zoom.end;var s=this.zoomCanvas._ctx;var r,v,x,q;if(u[0]>y[0]){r=y[0];q=u[0]-y[0]}else{r=u[0];q=y[0]-u[0]}if(u[1]>y[1]){v=y[1];x=u[1]-y[1]}else{v=u[1];x=y[1]-u[1]}s.fillStyle="rgba(0,0,0,0.2)";s.strokeStyle="#999999";s.lineWidth=1;s.clearRect(0,0,s.canvas.width,s.canvas.height);s.fillRect(0,0,s.canvas.width,s.canvas.height);s.clearRect(r,v,q,x);s.strokeRect(r,v,q,x);s=null}j.jqplot.CursorLegendRenderer=function(q){j.jqplot.TableLegendRenderer.call(this,q);this.formatString="%s"};j.jqplot.CursorLegendRenderer.prototype=new j.jqplot.TableLegendRenderer();j.jqplot.CursorLegendRenderer.prototype.constructor=j.jqplot.CursorLegendRenderer;j.jqplot.CursorLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}if(this.show){var w=this._series,A;var r=document.createElement("div");this._elem=j(r);r=null;this._elem.addClass("jqplot-legend jqplot-cursor-legend");this._elem.css("position","absolute");var q=false;for(var x=0;x<w.length;x++){A=w[x];if(A.show&&A.showLabel){var v=j.jqplot.sprintf(this.formatString,A.label.toString());if(v){var t=A.color;if(A._stack&&!A.fill){t=""}z.call(this,v,t,q,x);q=true}for(var u=0;u<j.jqplot.addLegendRowHooks.length;u++){var y=j.jqplot.addLegendRowHooks[u].call(this,A);if(y){z.call(this,y.label,y.color,q);q=true}}}}w=A=null;delete w;delete A}function z(D,C,F,s){var B=(F)?this.rowSpacing:"0";var E=j('<tr class="jqplot-legend jqplot-cursor-legend"></tr>').appendTo(this._elem);E.data("seriesIndex",s);j('<td class="jqplot-legend jqplot-cursor-legend-swatch" style="padding-top:'+B+';"><div style="border:1px solid #cccccc;padding:0.2em;"><div class="jqplot-cursor-legend-swatch" style="background-color:'+C+';"></div></div></td>').appendTo(E);var G=j('<td class="jqplot-legend jqplot-cursor-legend-label" style="vertical-align:middle;padding-top:'+B+';"></td>');G.appendTo(E);G.data("seriesIndex",s);if(this.escapeHtml){G.text(D)}else{G.html(D)}E=null;G=null}return this._elem}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.js index ec4211d4..b97336fa 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,33 +26,33 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ -(function($) { +(function($) { /** * Class: $.jqplot.DateAxisRenderer * A plugin for a jqPlot to render an axis as a series of date values. * This renderer has no options beyond those supplied by the <Axis> class. * It supplies it's own tick formatter, so the tickOptions.formatter option * should not be overridden. - * + * * Thanks to Ken Synder for his enhanced Date instance methods which are * included with this code <http://kendsnyder.com/sandbox/date/>. - * + * * To use this renderer, include the plugin in your source * > <script type="text/javascript" language="javascript" src="plugins/jqplot.dateAxisRenderer.js"></script> - * + * * and supply the appropriate options to your plot - * + * * > {axes:{xaxis:{renderer:$.jqplot.DateAxisRenderer}}} - * - * Dates can be passed into the axis in almost any recognizable value and + * + * Dates can be passed into the axis in almost any recognizable value and * will be parsed. They will be rendered on the axis in the format * specified by tickOptions.formatString. e.g. tickOptions.formatString = '%Y-%m-%d'. - * - * Accecptable format codes + * + * Accecptable format codes * are: - * + * * > Code Result Description * > == Years == * > %Y 2008 Four-digit year @@ -103,7 +103,7 @@ * > == Characters == * > %n \n Newline * > %t \t Tab - * > %% % Percent Symbol + * > %% % Percent Symbol */ $.jqplot.DateAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); @@ -143,26 +143,26 @@ return [bestTi, bestfmt]; } - + $.jqplot.DateAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.DateAxisRenderer.prototype.constructor = $.jqplot.DateAxisRenderer; - + $.jqplot.DateTickFormatter = function(format, val) { if (!format) { format = '%Y/%m/%d'; } return $.jsDate.strftime(val, format); }; - + $.jqplot.DateAxisRenderer.prototype.init = function(options){ // prop: tickRenderer - // A class of a rendering engine for creating the ticks labels displayed on the plot, + // A class of a rendering engine for creating the ticks labels displayed on the plot, // See <$.jqplot.AxisTickRenderer>. // this.tickRenderer = $.jqplot.AxisTickRenderer; // this.labelRenderer = $.jqplot.AxisLabelRenderer; this.tickOptions.formatter = $.jqplot.DateTickFormatter; // prop: tickInset - // Controls the amount to inset the first and last ticks from + // Controls the amount to inset the first and last ticks from // the edges of the grid, in multiples of the tick interval. // 0 is no inset, 0.5 is one half a tick interval, 1 is a full // tick interval, etc. @@ -178,18 +178,18 @@ this.baselineColor = null; this.daTickInterval = null; this._daTickInterval = null; - + $.extend(true, this, options); - + var db = this._dataBounds, - stats, + stats, sum, s, d, pd, sd, intv; - + // Go through all the series attached to this axis and find // the min/max bounds for this axis. for (var i=0; i<this._series.length; i++) { @@ -200,8 +200,8 @@ pd = s._plotData; sd = s._stackData; intv = 0; - - for (var j=0; j<d.length; j++) { + + for (var j=0; j<d.length; j++) { if (this.name == 'xaxis' || this.name == 'x2axis') { d[j][0] = new $.jsDate(d[j][0]).getTime(); pd[j][0] = new $.jsDate(d[j][0]).getTime(); @@ -223,8 +223,8 @@ } } sum += intv; - - } + + } else { d[j][1] = new $.jsDate(d[j][1]).getTime(); pd[j][1] = new $.jsDate(d[j][1]).getTime(); @@ -246,7 +246,7 @@ } } } - sum += intv; + sum += intv; } if (s.renderer.bands) { @@ -257,8 +257,8 @@ bd[j][0] = new $.jsDate(bd[j][0]).getTime(); if ((bd[j][0] != null && bd[j][0] > db.max) || db.max == null) { db.max = bd[j][0]; - } - } + } + } else { bd[j][1] = new $.jsDate(bd[j][1]).getTime(); if ((bd[j][1] != null && bd[j][1] > db.max) || db.max == null) { @@ -274,8 +274,8 @@ bd[j][0] = new $.jsDate(bd[j][0]).getTime(); if ((bd[j][0] != null && bd[j][0] < db.min) || db.min == null) { db.min = bd[j][0]; - } - } + } + } else { bd[j][1] = new $.jsDate(bd[j][1]).getTime(); if ((bd[j][1] != null && bd[j][1] < db.min) || db.min == null) { @@ -285,7 +285,7 @@ } } } - + var tempf = 0, tempn=0; for (var n in stats.frequencies) { @@ -294,7 +294,7 @@ stats.sortedIntervals.sort(function(a, b){ return b.frequency - a.frequency; }); - + stats.min = $.jqplot.arrayMin(stats.intervals); stats.max = $.jqplot.arrayMax(stats.intervals); stats.mean = sum/d.length; @@ -302,9 +302,9 @@ stats = sum = s = d = pd = sd = null; } db = null; - + }; - + // called with scope of an axis $.jqplot.DateAxisRenderer.prototype.reset = function() { this.min = this._options.min; @@ -318,7 +318,7 @@ this.daTickInterval = this._daTickInterval; // this._ticks = this.__ticks; }; - + $.jqplot.DateAxisRenderer.prototype.createTicks = function(plot) { // we're are operating on an axis here var ticks = this._ticks; @@ -336,10 +336,10 @@ var insetMult = 1; var tickInterval = this.tickInterval; - + // if we already have ticks, use them. // ticks must be in order of increasing value. - + min = ((this.min != null) ? new $.jsDate(this.min).getTime() : db.min); max = ((this.max != null) ? new $.jsDate(this.max).getTime() : db.max); @@ -358,7 +358,7 @@ if (this.tickOptions == null || !this.tickOptions.formatString) { this._overrideFormatString = true; } - + if (userTicks.length) { // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed for (i=0; i<userTicks.length; i++){ @@ -377,7 +377,7 @@ t.setTick(t.value, this.name); this._ticks.push(t); } - + else { t.value = new $.jsDate(ut).getTime(); if (!this.showTicks) { @@ -431,14 +431,14 @@ } if(this.showTickMarks) { this._ticks[1].showTickMarks = true; - } + } } // if user specified min and max are null, we set those to make best ticks. else if (this.min == null && this.max == null) { var opts = $.extend(true, {}, this.tickOptions, {name: this.name, value: null}); - // want to find a nice interval + // want to find a nice interval var nttarget, titarget; @@ -499,7 +499,7 @@ for (var i=0; i<nttarget; i++) { opts.value = this.min + i * tempti; t = new this.tickRenderer(opts); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -557,7 +557,7 @@ opts.value = mstart.add(intv, 'month').getTime(); } t = new this.tickRenderer(opts); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -605,7 +605,7 @@ opts.value = mstart.add(intv, 'year').getTime(); } t = new this.tickRenderer(opts); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -626,20 +626,20 @@ //////// // Some option(s) specified, work around that. //////// - - else { + + else { if (name == 'xaxis' || name == 'x2axis') { dim = this._plotDimensions.width; } else { dim = this._plotDimensions.height; } - + // if min, max and number of ticks specified, user can't specify interval. if (this.min != null && this.max != null && this.numberTicks != null) { this.tickInterval = null; } - + // if user specified a tick interval, convert to usable. if (this.tickInterval != null) { @@ -659,7 +659,7 @@ } } } - + // if min and max are same, space them out a bit if (min == max) { var adj = 24*60*60*500; // 1/2 day @@ -668,18 +668,18 @@ } range = max - min; - + var optNumTicks = 2 + parseInt(Math.max(0, dim-100)/100, 10); - - + + var rmin, rmax; - + rmin = (this.min != null) ? new $.jsDate(this.min).getTime() : min - range/2*(this.padMin - 1); rmax = (this.max != null) ? new $.jsDate(this.max).getTime() : max + range/2*(this.padMax - 1); this.min = rmin; this.max = rmax; range = this.max - this.min; - + if (this.numberTicks == null){ // if tickInterval is specified by user, we will ignore computed maximum. // max will be equal or greater to fit even # of ticks. @@ -696,7 +696,7 @@ this.numberTicks = 2; } } - + insetMult = range / (this.numberTicks-1)/1000; if (this.daTickInterval == null) { @@ -727,11 +727,11 @@ } if (this._daTickInterval == null) { - this._daTickInterval = this.daTickInterval; + this._daTickInterval = this.daTickInterval; } ticks = null; }; - + })(jQuery); diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.min.js index 756f5095..f8532fe1 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dateAxisRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(h){h.jqplot.DateAxisRenderer=function(){h.jqplot.LinearAxisRenderer.call(this);this.date=new h.jsDate()};var c=1000;var e=60*c;var f=60*e;var l=24*f;var b=7*l;var j=30.4368499*l;var k=365.242199*l;var g=[31,28,31,30,31,30,31,30,31,30,31,30];var i=["%M:%S.%#N","%M:%S.%#N","%M:%S.%#N","%M:%S","%M:%S","%M:%S","%M:%S","%H:%M:%S","%H:%M:%S","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%H:%M","%a %H:%M","%a %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%b %e %H:%M","%v","%v","%v","%v","%v","%v","%v"];var m=[0.1*c,0.2*c,0.5*c,c,2*c,5*c,10*c,15*c,30*c,e,2*e,5*e,10*e,15*e,30*e,f,2*f,4*f,6*f,8*f,12*f,l,2*l,3*l,4*l,5*l,b,2*b];var d=[];function a(p,s,t){var o=Number.MAX_VALUE;var u,r,v;for(var q=0,n=m.length;q<n;q++){u=Math.abs(t-m[q]);if(u<o){o=u;r=m[q];v=i[q]}}return[r,v]}h.jqplot.DateAxisRenderer.prototype=new h.jqplot.LinearAxisRenderer();h.jqplot.DateAxisRenderer.prototype.constructor=h.jqplot.DateAxisRenderer;h.jqplot.DateTickFormatter=function(n,o){if(!n){n="%Y/%m/%d"}return h.jsDate.strftime(o,n)};h.jqplot.DateAxisRenderer.prototype.init=function(E){this.tickOptions.formatter=h.jqplot.DateTickFormatter;this.tickInset=0;this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.daTickInterval=null;this._daTickInterval=null;h.extend(true,this,E);var C=this._dataBounds,u,x,D,y,A,z,o;for(var t=0;t<this._series.length;t++){u={intervals:[],frequencies:{},sortedIntervals:[],min:null,max:null,mean:null};x=0;D=this._series[t];y=D.data;A=D._plotData;z=D._stackData;o=0;for(var r=0;r<y.length;r++){if(this.name=="xaxis"||this.name=="x2axis"){y[r][0]=new h.jsDate(y[r][0]).getTime();A[r][0]=new h.jsDate(y[r][0]).getTime();z[r][0]=new h.jsDate(y[r][0]).getTime();if((y[r][0]!=null&&y[r][0]<C.min)||C.min==null){C.min=y[r][0]}if((y[r][0]!=null&&y[r][0]>C.max)||C.max==null){C.max=y[r][0]}if(r>0){o=Math.abs(y[r][0]-y[r-1][0]);u.intervals.push(o);if(u.frequencies.hasOwnProperty(o)){u.frequencies[o]+=1}else{u.frequencies[o]=1}}x+=o}else{y[r][1]=new h.jsDate(y[r][1]).getTime();A[r][1]=new h.jsDate(y[r][1]).getTime();z[r][1]=new h.jsDate(y[r][1]).getTime();if((y[r][1]!=null&&y[r][1]<C.min)||C.min==null){C.min=y[r][1]}if((y[r][1]!=null&&y[r][1]>C.max)||C.max==null){C.max=y[r][1]}if(r>0){o=Math.abs(y[r][1]-y[r-1][1]);u.intervals.push(o);if(u.frequencies.hasOwnProperty(o)){u.frequencies[o]+=1}else{u.frequencies[o]=1}}}x+=o}if(D.renderer.bands){if(D.renderer.bands.hiData.length){var w=D.renderer.bands.hiData;for(var r=0,q=w.length;r<q;r++){if(this.name==="xaxis"||this.name==="x2axis"){w[r][0]=new h.jsDate(w[r][0]).getTime();if((w[r][0]!=null&&w[r][0]>C.max)||C.max==null){C.max=w[r][0]}}else{w[r][1]=new h.jsDate(w[r][1]).getTime();if((w[r][1]!=null&&w[r][1]>C.max)||C.max==null){C.max=w[r][1]}}}}if(D.renderer.bands.lowData.length){var w=D.renderer.bands.lowData;for(var r=0,q=w.length;r<q;r++){if(this.name==="xaxis"||this.name==="x2axis"){w[r][0]=new h.jsDate(w[r][0]).getTime();if((w[r][0]!=null&&w[r][0]<C.min)||C.min==null){C.min=w[r][0]}}else{w[r][1]=new h.jsDate(w[r][1]).getTime();if((w[r][1]!=null&&w[r][1]<C.min)||C.min==null){C.min=w[r][1]}}}}}var B=0,v=0;for(var p in u.frequencies){u.sortedIntervals.push({interval:p,frequency:u.frequencies[p]})}u.sortedIntervals.sort(function(s,n){return n.frequency-s.frequency});u.min=h.jqplot.arrayMin(u.intervals);u.max=h.jqplot.arrayMax(u.intervals);u.mean=x/y.length;this._intervalStats.push(u);u=x=D=y=A=z=null}C=null};h.jqplot.DateAxisRenderer.prototype.reset=function(){this.min=this._options.min;this.max=this._options.max;this.tickInterval=this._options.tickInterval;this.numberTicks=this._options.numberTicks;this._autoFormatString="";if(this._overrideFormatString&&this.tickOptions&&this.tickOptions.formatString){this.tickOptions.formatString=""}this.daTickInterval=this._daTickInterval};h.jqplot.DateAxisRenderer.prototype.createTicks=function(p){var W=this._ticks;var L=this.ticks;var F=this.name;var H=this._dataBounds;var M=this._intervalStats;var n=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var w;var ad,J;var y,x;var ac,Z;var s=30;var O=1;var v=this.tickInterval;ad=((this.min!=null)?new h.jsDate(this.min).getTime():H.min);J=((this.max!=null)?new h.jsDate(this.max).getTime():H.max);var A=p.plugins.cursor;if(A&&A._zoom&&A._zoom.zooming){this.min=null;this.max=null}var B=J-ad;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(L.length){for(Z=0;Z<L.length;Z++){var P=L[Z];var X=new this.tickRenderer(this.tickOptions);if(P.constructor==Array){X.value=new h.jsDate(P[0]).getTime();X.label=P[1];if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}X.setTick(X.value,this.name);this._ticks.push(X)}else{X.value=new h.jsDate(P).getTime();if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}X.setTick(X.value,this.name);this._ticks.push(X)}}this.numberTicks=L.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.daTickInterval=[(this.max-this.min)/(this.numberTicks-1)/1000,"seconds"]}else{if(this.min==null&&this.max==null&&H.min==H.max){var E=h.extend(true,{},this.tickOptions,{name:this.name,value:null});var S=300000;this.min=H.min-S;this.max=H.max+S;this.numberTicks=3;for(var Z=this.min;Z<=this.max;Z+=S){E.value=Z;var X=new this.tickRenderer(E);if(this._overrideFormatString&&this._autoFormatString!=""){X.formatString=this._autoFormatString}X.showLabel=false;X.showMark=false;this._ticks.push(X)}if(this.showTicks){this._ticks[1].showLabel=true}if(this.showTickMarks){this._ticks[1].showTickMarks=true}}else{if(this.min==null&&this.max==null){var N=h.extend(true,{},this.tickOptions,{name:this.name,value:null});var ab,I;if(!this.tickInterval&&!this.numberTicks){var R=Math.max(n,s+1);var Y=115;if(this.tickRenderer===h.jqplot.CanvasAxisTickRenderer&&this.tickOptions.angle){Y=115-40*Math.abs(Math.sin(this.tickOptions.angle/180*Math.PI))}ab=Math.ceil((R-s)/Y+1);I=(J-ad)/(ab-1)}else{if(this.tickInterval){I=this.tickInterval}else{if(this.numberTicks){ab=this.numberTicks;I=(J-ad)/(ab-1)}}}if(I<=19*l){var Q=a(ad,J,I);var r=Q[0];this._autoFormatString=Q[1];ad=Math.floor(ad/r)*r;ad=new h.jsDate(ad);ad=ad.getTime()+ad.getUtcOffset();ab=Math.ceil((J-ad)/r)+1;this.min=ad;this.max=ad+(ab-1)*r;if(this.max<J){this.max+=r;ab+=1}this.tickInterval=r;this.numberTicks=ab;for(var Z=0;Z<ab;Z++){N.value=this.min+Z*r;X=new this.tickRenderer(N);if(this._overrideFormatString&&this._autoFormatString!=""){X.formatString=this._autoFormatString}if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}this._ticks.push(X)}O=this.tickInterval}else{if(I<=9*j){this._autoFormatString="%v";var D=Math.round(I/j);if(D<1){D=1}else{if(D>6){D=6}}var U=new h.jsDate(ad).setDate(1).setHours(0,0,0,0);var q=new h.jsDate(J);var z=new h.jsDate(J).setDate(1).setHours(0,0,0,0);if(q.getTime()!==z.getTime()){z=z.add(1,"month")}var T=z.diff(U,"month");ab=Math.ceil(T/D)+1;this.min=U.getTime();this.max=U.clone().add((ab-1)*D,"month").getTime();this.numberTicks=ab;for(var Z=0;Z<ab;Z++){if(Z===0){N.value=U.getTime()}else{N.value=U.add(D,"month").getTime()}X=new this.tickRenderer(N);if(this._overrideFormatString&&this._autoFormatString!=""){X.formatString=this._autoFormatString}if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}this._ticks.push(X)}O=D*j}else{this._autoFormatString="%v";var D=Math.round(I/k);if(D<1){D=1}var U=new h.jsDate(ad).setMonth(0,1).setHours(0,0,0,0);var z=new h.jsDate(J).add(1,"year").setMonth(0,1).setHours(0,0,0,0);var K=z.diff(U,"year");ab=Math.ceil(K/D)+1;this.min=U.getTime();this.max=U.clone().add((ab-1)*D,"year").getTime();this.numberTicks=ab;for(var Z=0;Z<ab;Z++){if(Z===0){N.value=U.getTime()}else{N.value=U.add(D,"year").getTime()}X=new this.tickRenderer(N);if(this._overrideFormatString&&this._autoFormatString!=""){X.formatString=this._autoFormatString}if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}this._ticks.push(X)}O=D*k}}}else{if(F=="xaxis"||F=="x2axis"){n=this._plotDimensions.width}else{n=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.tickInterval!=null){if(Number(this.tickInterval)){this.daTickInterval=[Number(this.tickInterval),"seconds"]}else{if(typeof this.tickInterval=="string"){var aa=this.tickInterval.split(" ");if(aa.length==1){this.daTickInterval=[1,aa[0]]}else{if(aa.length==2){this.daTickInterval=[aa[0],aa[1]]}}}}}if(ad==J){var o=24*60*60*500;ad-=o;J+=o}B=J-ad;var G=2+parseInt(Math.max(0,n-100)/100,10);var V,C;V=(this.min!=null)?new h.jsDate(this.min).getTime():ad-B/2*(this.padMin-1);C=(this.max!=null)?new h.jsDate(this.max).getTime():J+B/2*(this.padMax-1);this.min=V;this.max=C;B=this.max-this.min;if(this.numberTicks==null){if(this.daTickInterval!=null){var u=new h.jsDate(this.max).diff(this.min,this.daTickInterval[1],true);this.numberTicks=Math.ceil(u/this.daTickInterval[0])+1;this.max=new h.jsDate(this.min).add((this.numberTicks-1)*this.daTickInterval[0],this.daTickInterval[1]).getTime()}else{if(n>200){this.numberTicks=parseInt(3+(n-200)/100,10)}else{this.numberTicks=2}}}O=B/(this.numberTicks-1)/1000;if(this.daTickInterval==null){this.daTickInterval=[O,"seconds"]}for(var Z=0;Z<this.numberTicks;Z++){var ad=new h.jsDate(this.min);ac=ad.add(Z*this.daTickInterval[0],this.daTickInterval[1]).getTime();var X=new this.tickRenderer(this.tickOptions);if(!this.showTicks){X.showLabel=false;X.showMark=false}else{if(!this.showTickMarks){X.showMark=false}}X.setTick(ac,this.name);this._ticks.push(X)}}}}if(this.tickInset){this.min=this.min-this.tickInset*O;this.max=this.max+this.tickInset*O}if(this._daTickInterval==null){this._daTickInterval=this.daTickInterval}W=null}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.js index 621b92ec..eeda6ef9 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -34,15 +34,15 @@ * Plugin renderer to draw a donut chart. * x values, if present, will be used as slice labels. * y values give slice size. - * - * To use this renderer, you need to include the + * + * To use this renderer, you need to include the * donut renderer plugin, for example: - * + * * > <script type="text/javascript" src="plugins/jqplot.donutRenderer.js"></script> - * + * * Properties described here are passed into the $.jqplot function * as options on the series renderer. For example: - * + * * > plot2 = $.jqplot('chart2', [s1, s2], { * > seriesDefaults: { * > renderer:$.jqplot.DonutRenderer, @@ -53,12 +53,12 @@ * > } * > } * > }); - * + * * A donut plot will trigger events on the plot target * according to user interaction. All events return the event object, - * the series index, the point (slice) index, and the point data for + * the series index, the point (slice) index, and the point data for * the appropriate slice. - * + * * 'jqplotDataMouseOver' - triggered when user mouseing over a slice. * 'jqplotDataHighlight' - triggered the first time user mouses over a slice, * if highlighting is enabled. @@ -71,10 +71,10 @@ $.jqplot.DonutRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.DonutRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.DonutRenderer.prototype.constructor = $.jqplot.DonutRenderer; - + // called with scope of a series $.jqplot.DonutRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -104,14 +104,14 @@ // true or false, wether to fil the slices. this.fill = true; // prop: shadowOffset - // offset of the shadow from the slice and offset of + // offset of the shadow from the slice and offset of // each succesive stroke of the shadow from the last. this.shadowOffset = 2; // prop: shadowAlpha // transparency of the shadow (0 = transparent, 1 = opaque) this.shadowAlpha = 0.07; // prop: shadowDepth - // number of strokes to apply to the shadow, + // number of strokes to apply to the shadow, // each stroke offset shadowOffset from the last. this.shadowDepth = 5; // prop: highlightMouseOver @@ -147,7 +147,7 @@ // Number of pixels to slide the label away from (+) or toward (-) the center of the pie. this.dataLabelNudge = 0; // prop: startAngle - // Angle to start drawing donut in degrees. + // Angle to start drawing donut in degrees. // According to orientation of canvas coordinate system: // 0 = on the positive x axis // -90 = on the positive y axis. @@ -158,12 +158,12 @@ // Used as check for conditions where donut shouldn't be drawn. this._drawData = true; this._type = 'donut'; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } - + $.extend(true, this, options); if (this.diameter != null) { this.diameter = this.diameter - this.sliceMargin; @@ -181,7 +181,7 @@ this._sliceAngles = []; // index of the currenty highlighted point, if any this._highlightedPoint = null; - + // set highlight colors if none provided if (this.highlightColors.length == 0) { for (var i=0; i<this.seriesColors.length; i++){ @@ -196,7 +196,7 @@ this.highlightColors.push('rgb('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+')'); } } - + plot.postParseOptionsHooks.addOnce(postParseOptions); plot.postInitHooks.addOnce(postInit); plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove); @@ -205,10 +205,10 @@ plot.eventListenerHooks.addOnce('jqplotClick', handleClick); plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); plot.postDrawHooks.addOnce(postPlotDraw); - - + + }; - + $.jqplot.DonutRenderer.prototype.setGridData = function(plot) { // set gridData property. This will hold angle in radians of each data point. var stack = []; @@ -230,14 +230,14 @@ tot += this.data[i][1]; } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; td[i][2] = this.data[i][1]/tot; } this.gridData = td; }; - + $.jqplot.DonutRenderer.prototype.makeGridData = function(data, plot) { var stack = []; var td = []; @@ -258,14 +258,14 @@ tot += data[i][1]; } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; td[i][2] = data[i][1]/tot; } return td; }; - + $.jqplot.DonutRenderer.prototype.drawSlice = function (ctx, ang1, ang2, color, isShadow) { var r = this._diameter / 2; var ri = r - this._thickness; @@ -274,7 +274,7 @@ ctx.save(); ctx.translate(this._center[0], this._center[1]); // ctx.translate(this.sliceMargin*Math.cos((ang1+ang2)/2), this.sliceMargin*Math.sin((ang1+ang2)/2)); - + if (isShadow) { for (var i=0; i<this.shadowDepth; i++) { ctx.save(); @@ -282,11 +282,11 @@ doDraw(); } } - + else { doDraw(); } - + function doDraw () { // Fix for IE and Chrome that can't seem to draw circles correctly. // ang2 should always be <= 2 pi since that is the way the data is converted. @@ -301,7 +301,7 @@ if (ang1 >= ang2) { return; } - ctx.beginPath(); + ctx.beginPath(); ctx.fillStyle = color; ctx.strokeStyle = color; // ctx.lineWidth = lineWidth; @@ -316,16 +316,16 @@ ctx.stroke(); } } - + if (isShadow) { for (var i=0; i<this.shadowDepth; i++) { ctx.restore(); } } - + ctx.restore(); }; - + // called with scope of series $.jqplot.DonutRenderer.prototype.draw = function (ctx, gd, options, plot) { var i; @@ -370,7 +370,7 @@ break; } } - + var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow; var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine; var fill = (opts.fill != undefined) ? opts.fill : this.fill; @@ -381,7 +381,7 @@ var mindim = Math.min(w,h); var d = mindim; var ringmargin = (this.ringMargin == null) ? this.sliceMargin * 2.0 : this.ringMargin; - + for (var i=0; i<this._previousSeries.length; i++) { d -= 2.0 * this._previousSeries[i]._thickness + 2.0 * ringmargin; } @@ -398,7 +398,7 @@ this._innerRadius = this._radius - this._thickness; var sa = this.startAngle / 180 * Math.PI; this._center = [(cw - trans * offx)/2 + trans * offx, (ch - trans*offy)/2 + trans * offy]; - + if (this.shadow) { var shadowColor = 'rgba(0,0,0,'+this.shadowAlpha+')'; for (var i=0; i<gd.length; i++) { @@ -407,7 +407,7 @@ ang1 += this.sliceMargin/180*Math.PI; this.renderer.drawSlice.call (this, ctx, ang1, gd[i][1]+sa, shadowColor, true); } - + } for (var i=0; i<gd.length; i++) { var ang1 = (i == 0) ? sa : gd[i-1][1] + sa; @@ -416,10 +416,10 @@ var ang2 = gd[i][1] + sa; this._sliceAngles.push([ang1, ang2]); this.renderer.drawSlice.call (this, ctx, ang1, ang2, this.seriesColors[i], false); - + if (this.showDataLabels && gd[i][2]*100 >= this.dataLabelThreshold) { var fstr, avgang = (ang1+ang2)/2, label; - + if (this.dataLabels == 'label') { fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, gd[i][0]); @@ -436,12 +436,12 @@ fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, this.dataLabels[i]); } - + var fact = this._innerRadius + this._thickness * this.dataLabelPositionFactor + this.sliceMargin + this.dataLabelNudge; - + var x = this._center[0] + Math.cos(avgang) * fact + this.canvas._offsets.left; var y = this._center[1] + Math.sin(avgang) * fact + this.canvas._offsets.top; - + var labelelem = $('<span class="jqplot-donut-series jqplot-data-label" style="position:absolute;">' + label + '</span>').insertBefore(plot.eventCanvas._elem); x -= labelelem.width()/2; y -= labelelem.height()/2; @@ -450,17 +450,17 @@ labelelem.css({left: x, top: y}); } } - + }; - + $.jqplot.DonutAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.DonutAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.DonutAxisRenderer.prototype.constructor = $.jqplot.DonutAxisRenderer; - - + + // There are no traditional axes on a donut chart. We just need to provide // dummy objects with properties so the plot will render. // called with scope of axis object. @@ -479,19 +479,19 @@ this.showTicks = false; this.ticks = []; this.showMark = false; - this.show = false; + this.show = false; }; - - - - + + + + $.jqplot.DonutLegendRenderer = function(){ $.jqplot.TableLegendRenderer.call(this); }; - + $.jqplot.DonutLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.DonutLegendRenderer.prototype.constructor = $.jqplot.DonutLegendRenderer; - + /** * Class: $.jqplot.DonutLegendRenderer * Legend Renderer specific to donut plots. Set by default @@ -508,7 +508,7 @@ this.numberColumns = null; $.extend(true, this, options); }; - + // called with context of legend $.jqplot.DonutLegendRenderer.prototype.draw = function() { var legend = this; @@ -527,13 +527,13 @@ this._elem = $('<table class="jqplot-table-legend" style="'+ss+'"></table>'); // Donut charts legends don't go by number of series, but by number of data points // in the series. Refactor things here for that. - - var pad = false, + + var pad = false, reverse = false, nr, nc; var s = series[0]; var colorGenerator = new $.jqplot.ColorGenerator(s.seriesColors); - + if (s.show) { var pd = s.data; if (this.numberRows) { @@ -553,10 +553,10 @@ nr = pd.length; nc = 1; } - + var i, j, tr, td1, td2, lt, rs, color; - var idx = 0; - + var idx = 0; + for (i=0; i<nr; i++) { if (reverse){ tr = $('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem); @@ -585,7 +585,7 @@ } } rs = (pad) ? this.rowSpacing : '0'; - + td1 = $('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+rs+';">'+ '<div><div class="jqplot-table-legend-swatch" style="border-color:'+color+';"></div>'+ '</div></td>'); @@ -607,13 +607,13 @@ pad = true; } idx++; - } + } } } } - return this._elem; + return this._elem; }; - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -633,7 +633,7 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.DonutAxisRenderer; options.legend.renderer = $.jqplot.DonutLegendRenderer; @@ -641,7 +641,7 @@ options.seriesDefaults.pointLabels = {show: false}; } } - + // called with scope of plot. function postInit(target, data, options) { // if multiple series, add a reference to the previous one so that @@ -665,7 +665,7 @@ } } } - + var postParseOptionsRun = false; // called with scope of plot function postParseOptions(options) { @@ -674,7 +674,7 @@ this.series[i].colorGenerator = $.jqplot.colorGenerator; } } - + function highlight (plot, sidx, pidx) { var s = plot.series[sidx]; var canvas = plot.plugins.donutRenderer.highlightCanvas; @@ -683,7 +683,7 @@ plot.plugins.donutRenderer.highlightedSeriesIndex = sidx; s.renderer.drawSlice.call(s, canvas._ctx, s._sliceAngles[pidx][0], s._sliceAngles[pidx][1], s.highlightColors[pidx], false); } - + function unhighlight (plot) { var canvas = plot.plugins.donutRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -693,7 +693,7 @@ plot.plugins.donutRenderer.highlightedSeriesIndex = null; plot.target.trigger('jqplotDataUnhighlight'); } - + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -713,8 +713,8 @@ else if (neighbor == null) { unhighlight (plot); } - } - + } + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -731,14 +731,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.donutRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -749,7 +749,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -763,13 +763,13 @@ evt.pageY = ev.pageY; plot.target.trigger(evt, ins); } - } - + } + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.donutRenderer && this.plugins.donutRenderer.highlightCanvas) { this.plugins.donutRenderer.highlightCanvas.resetCanvas(); this.plugins.donutRenderer.highlightCanvas = null; @@ -790,16 +790,15 @@ var hctx = this.plugins.donutRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); } - + $.jqplot.preInitHooks.push(preInit); - + $.jqplot.DonutTickRenderer = function() { $.jqplot.AxisTickRenderer.call(this); }; - + $.jqplot.DonutTickRenderer.prototype = new $.jqplot.AxisTickRenderer(); $.jqplot.DonutTickRenderer.prototype.constructor = $.jqplot.DonutTickRenderer; - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.min.js index 4af54c75..13c20acb 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.donutRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(e){e.jqplot.DonutRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.DonutRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.DonutRenderer.prototype.constructor=e.jqplot.DonutRenderer;e.jqplot.DonutRenderer.prototype.init=function(p,t){this.diameter=null;this.innerDiameter=null;this.thickness=null;this.padding=20;this.sliceMargin=0;this.ringMargin=null;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.4;this.dataLabelNudge=0;this.startAngle=0;this.tickRenderer=e.jqplot.DonutTickRenderer;this._drawData=true;this._type="donut";if(p.highlightMouseDown&&p.highlightMouseOver==null){p.highlightMouseOver=false}e.extend(true,this,p);if(this.diameter!=null){this.diameter=this.diameter-this.sliceMargin}this._diameter=null;this._innerDiameter=null;this._radius=null;this._innerRadius=null;this._thickness=null;this._previousSeries=[];this._numberSeries=1;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var r=0;r<this.seriesColors.length;r++){var q=e.jqplot.getColorComponents(this.seriesColors[r]);var n=[q[0],q[1],q[2]];var s=n[0]+n[1]+n[2];for(var o=0;o<3;o++){n[o]=(s>570)?n[o]*0.8:n[o]+0.3*(255-n[o]);n[o]=parseInt(n[o],10)}this.highlightColors.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}}t.postParseOptionsHooks.addOnce(l);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",b);t.eventListenerHooks.addOnce("jqplotMouseDown",a);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",m);t.postDrawHooks.addOnce(h)};e.jqplot.DonutRenderer.prototype.setGridData=function(s){var o=[];var t=[];var n=this.startAngle/180*Math.PI;var r=0;this._drawData=false;for(var q=0;q<this.data.length;q++){if(this.data[q][1]!=0){this._drawData=true}o.push(this.data[q][1]);t.push([this.data[q][0]]);if(q>0){o[q]+=o[q-1]}r+=this.data[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q<o.length;q++){t[q][1]=o[q]*p;t[q][2]=this.data[q][1]/r}this.gridData=t};e.jqplot.DonutRenderer.prototype.makeGridData=function(s,t){var o=[];var u=[];var r=0;var n=this.startAngle/180*Math.PI;this._drawData=false;for(var q=0;q<s.length;q++){if(this.data[q][1]!=0){this._drawData=true}o.push(s[q][1]);u.push([s[q][0]]);if(q>0){o[q]+=o[q-1]}r+=s[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q<o.length;q++){u[q][1]=o[q]*p;u[q][2]=s[q][1]/r}return u};e.jqplot.DonutRenderer.prototype.drawSlice=function(x,u,t,p,s){var n=this._diameter/2;var v=n-this._thickness;var w=this.fill;x.save();x.translate(this._center[0],this._center[1]);if(s){for(var q=0;q<this.shadowDepth;q++){x.save();x.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));o()}}else{o()}function o(){if(t>6.282+this.startAngle){t=6.282+this.startAngle;if(u>t){u=6.281+this.startAngle}}if(u>=t){return}x.beginPath();x.fillStyle=p;x.strokeStyle=p;x.arc(0,0,n,u,t,false);x.lineTo(v*Math.cos(t),v*Math.sin(t));x.arc(0,0,v,t,u,true);x.closePath();if(w){x.fill()}else{x.stroke()}}if(s){for(var q=0;q<this.shadowDepth;q++){x.restore()}}x.restore()};e.jqplot.DonutRenderer.prototype.draw=function(N,V,t,P){var Q;var J=(t!=undefined)?t:{};var q=0;var p=0;var u=1;if(t.legendInfo&&t.legendInfo.placement=="insideGrid"){var I=t.legendInfo;switch(I.location){case"nw":q=I.width+I.xoffset;break;case"w":q=I.width+I.xoffset;break;case"sw":q=I.width+I.xoffset;break;case"ne":q=I.width+I.xoffset;u=-1;break;case"e":q=I.width+I.xoffset;u=-1;break;case"se":q=I.width+I.xoffset;u=-1;break;case"n":p=I.height+I.yoffset;break;case"s":p=I.height+I.yoffset;u=-1;break;default:break}}var B=(J.shadow!=undefined)?J.shadow:this.shadow;var W=(J.showLine!=undefined)?J.showLine:this.showLine;var O=(J.fill!=undefined)?J.fill:this.fill;var s=N.canvas.width;var H=N.canvas.height;var G=s-q-2*this.padding;var R=H-p-2*this.padding;var v=Math.min(G,R);var T=v;var X=(this.ringMargin==null)?this.sliceMargin*2:this.ringMargin;for(var Q=0;Q<this._previousSeries.length;Q++){T-=2*this._previousSeries[Q]._thickness+2*X}this._diameter=this.diameter||T;if(this.innerDiameter!=null){var M=(this._numberSeries>1&&this.index>0)?this._previousSeries[0]._diameter:this._diameter;this._thickness=this.thickness||(M-this.innerDiameter-2*X*this._numberSeries)/this._numberSeries/2}else{this._thickness=this.thickness||v/2/(this._numberSeries+1)*0.85}var K=this._radius=this._diameter/2;this._innerRadius=this._radius-this._thickness;var o=this.startAngle/180*Math.PI;this._center=[(s-u*q)/2+u*q,(H-u*p)/2+u*p];if(this.shadow){var L="rgba(0,0,0,"+this.shadowAlpha+")";for(var Q=0;Q<V.length;Q++){var A=(Q==0)?o:V[Q-1][1]+o;A+=this.sliceMargin/180*Math.PI;this.renderer.drawSlice.call(this,N,A,V[Q][1]+o,L,true)}}for(var Q=0;Q<V.length;Q++){var A=(Q==0)?o:V[Q-1][1]+o;A+=this.sliceMargin/180*Math.PI;var z=V[Q][1]+o;this._sliceAngles.push([A,z]);this.renderer.drawSlice.call(this,N,A,z,this.seriesColors[Q],false);if(this.showDataLabels&&V[Q][2]*100>=this.dataLabelThreshold){var S,U=(A+z)/2,C;if(this.dataLabels=="label"){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,V[Q][0])}else{if(this.dataLabels=="value"){S=this.dataLabelFormatString||"%d";C=e.jqplot.sprintf(S,this.data[Q][1])}else{if(this.dataLabels=="percent"){S=this.dataLabelFormatString||"%d%%";C=e.jqplot.sprintf(S,V[Q][2]*100)}else{if(this.dataLabels.constructor==Array){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,this.dataLabels[Q])}}}}var n=this._innerRadius+this._thickness*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var F=this._center[0]+Math.cos(U)*n+this.canvas._offsets.left;var E=this._center[1]+Math.sin(U)*n+this.canvas._offsets.top;var D=e('<span class="jqplot-donut-series jqplot-data-label" style="position:absolute;">'+C+"</span>").insertBefore(P.eventCanvas._elem);F-=D.width()/2;E-=D.height()/2;F=Math.round(F);E=Math.round(E);D.css({left:F,top:E})}}};e.jqplot.DonutAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.DonutAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.DonutAxisRenderer.prototype.constructor=e.jqplot.DonutAxisRenderer;e.jqplot.DonutAxisRenderer.prototype.init=function(n){this.tickRenderer=e.jqplot.DonutTickRenderer;e.extend(true,this,n);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.DonutLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.DonutLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.DonutLegendRenderer.prototype.constructor=e.jqplot.DonutLegendRenderer;e.jqplot.DonutLegendRenderer.prototype.init=function(n){this.numberRows=null;this.numberColumns=null;e.extend(true,this,n)};e.jqplot.DonutLegendRenderer.prototype.draw=function(){var q=this;if(this.show){var y=this._series;var B="position:absolute;";B+=(this.background)?"background:"+this.background+";":"";B+=(this.border)?"border:"+this.border+";":"";B+=(this.fontSize)?"font-size:"+this.fontSize+";":"";B+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";B+=(this.textColor)?"color:"+this.textColor+";":"";B+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";B+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";B+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";B+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('<table class="jqplot-table-legend" style="'+B+'"></table>');var F=false,x=false,n,v;var z=y[0];var o=new e.jqplot.ColorGenerator(z.seriesColors);if(z.show){var G=z.data;if(this.numberRows){n=this.numberRows;if(!this.numberColumns){v=Math.ceil(G.length/n)}else{v=this.numberColumns}}else{if(this.numberColumns){v=this.numberColumns;n=Math.ceil(G.length/this.numberColumns)}else{n=G.length;v=1}}var E,D,p,t,r,u,w,C;var A=0;for(E=0;E<n;E++){if(x){p=e('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem)}else{p=e('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem)}for(D=0;D<v;D++){if(A<G.length){u=this.labels[A]||G[A][0].toString();C=o.next();if(!x){if(E>0){F=true}else{F=false}}else{if(E==n-1){F=false}else{F=true}}w=(F)?this.rowSpacing:"0";t=e('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+w+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+C+';"></div></div></td>');r=e('<td class="jqplot-table-legend" style="padding-top:'+w+';"></td>');if(this.escapeHtml){r.text(u)}else{r.html(u)}if(x){r.prependTo(p);t.prependTo(p)}else{t.appendTo(p);r.appendTo(p)}F=true}A++}}}}return this._elem};function c(r,q,o){o=o||{};o.axesDefaults=o.axesDefaults||{};o.legend=o.legend||{};o.seriesDefaults=o.seriesDefaults||{};var n=false;if(o.seriesDefaults.renderer==e.jqplot.DonutRenderer){n=true}else{if(o.series){for(var p=0;p<o.series.length;p++){if(o.series[p].renderer==e.jqplot.DonutRenderer){n=true}}}}if(n){o.axesDefaults.renderer=e.jqplot.DonutAxisRenderer;o.legend.renderer=e.jqplot.DonutLegendRenderer;o.legend.preDraw=true;o.seriesDefaults.pointLabels={show:false}}}function g(r,q,o){for(var p=1;p<this.series.length;p++){if(!this.series[p]._previousSeries.length){for(var n=0;n<p;n++){if(this.series[p].renderer.constructor==e.jqplot.DonutRenderer&&this.series[n].renderer.constructor==e.jqplot.DonutRenderer){this.series[p]._previousSeries.push(this.series[n])}}}}for(p=0;p<this.series.length;p++){if(this.series[p].renderer.constructor==e.jqplot.DonutRenderer){this.series[p]._numberSeries=this.series.length;if(this.series[p].highlightMouseOver){this.series[p].highlightMouseDown=false}}}}var k=false;function l(n){for(var o=0;o<this.series.length;o++){this.series[o].seriesColors=this.seriesColors;this.series[o].colorGenerator=e.jqplot.colorGenerator}}function d(r,q,p){var o=r.series[q];var n=r.plugins.donutRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);o._highlightedPoint=p;r.plugins.donutRenderer.highlightedSeriesIndex=q;o.renderer.drawSlice.call(o,n._ctx,o._sliceAngles[p][0],o._sliceAngles[p][1],o.highlightColors[p],false)}function i(p){var n=p.plugins.donutRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);for(var o=0;o<p.series.length;o++){p.series[o]._highlightedPoint=null}p.plugins.donutRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight")}function b(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataMouseOver");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);if(s.series[p[0]].highlightMouseOver&&!(p[0]==s.plugins.donutRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=r.which;n.pageX=r.pageX;n.pageY=r.pageY;s.target.trigger(n,p);d(s,p[0],p[1])}}else{if(t==null){i(s)}}}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];if(r.series[o[0]].highlightMouseDown&&!(o[0]==r.plugins.donutRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);d(r,o[0],o[1])}}else{if(s==null){i(r)}}}function j(p,o,s,r,q){var n=q.plugins.donutRenderer.highlightedSeriesIndex;if(n!=null&&q.series[n].highlightMouseDown){i(q)}}function f(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataClick");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function m(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var n=s.plugins.donutRenderer.highlightedSeriesIndex;if(n!=null&&s.series[n].highlightMouseDown){i(s)}var o=jQuery.Event("jqplotDataRightClick");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}function h(){if(this.plugins.donutRenderer&&this.plugins.donutRenderer.highlightCanvas){this.plugins.donutRenderer.highlightCanvas.resetCanvas();this.plugins.donutRenderer.highlightCanvas=null}this.plugins.donutRenderer={highlightedSeriesIndex:null};this.plugins.donutRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var o=e(this.targetId+" .jqplot-data-label");if(o.length){e(o[0]).before(this.plugins.donutRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-donutRenderer-highlight-canvas",this._plotDimensions,this))}else{this.eventCanvas._elem.before(this.plugins.donutRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-donutRenderer-highlight-canvas",this._plotDimensions,this))}var n=this.plugins.donutRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(p){i(p.data.plot)})}e.jqplot.preInitHooks.push(c);e.jqplot.DonutTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.DonutTickRenderer.prototype=new e.jqplot.AxisTickRenderer();e.jqplot.DonutTickRenderer.prototype.constructor=e.jqplot.DonutTickRenderer})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.js index 00419518..9dcd892c 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,10 +26,10 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { - + /** * Class: $.jqplot.Dragable * Plugin to make plotted points dragable by the user. @@ -53,7 +53,7 @@ this.constrainTo = 'none'; // 'x', 'y', or 'none'; $.extend(true, this, options); }; - + function DragCanvas() { $.jqplot.GenericCanvas.call(this); this.isDragging = false; @@ -61,11 +61,11 @@ this._neighbor; this._cursors = []; } - + DragCanvas.prototype = new $.jqplot.GenericCanvas(); DragCanvas.prototype.constructor = DragCanvas; - - + + // called within scope of series $.jqplot.Dragable.parseOptions = function (defaults, opts) { var options = opts || {}; @@ -74,13 +74,13 @@ // we can set this here and it will be overridden if needed. this.isDragable = $.jqplot.config.enablePlugins; }; - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. // add a new DragCanvas object to the plot plugins to handle drawing on this new canvas. $.jqplot.Dragable.postPlotDraw = function() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.dragable && this.plugins.dragable.highlightCanvas) { this.plugins.dragable.highlightCanvas.resetCanvas(); this.plugins.dragable.highlightCanvas = null; @@ -88,11 +88,11 @@ this.plugins.dragable = {previousCursor:'auto', isOver:false}; this.plugins.dragable.dragCanvas = new DragCanvas(); - + this.eventCanvas._elem.before(this.plugins.dragable.dragCanvas.createElement(this._gridPadding, 'jqplot-dragable-canvas', this._plotDimensions, this)); var dctx = this.plugins.dragable.dragCanvas.setContext(); }; - + //$.jqplot.preInitHooks.push($.jqplot.Dragable.init); $.jqplot.preParseSeriesOptionsHooks.push($.jqplot.Dragable.parseOptions); $.jqplot.postDrawHooks.push($.jqplot.Dragable.postPlotDraw); @@ -100,11 +100,11 @@ $.jqplot.eventListenerHooks.push(['jqplotMouseDown', handleDown]); $.jqplot.eventListenerHooks.push(['jqplotMouseUp', handleUp]); - + function initDragPoint(plot, neighbor) { var s = plot.series[neighbor.seriesIndex]; var drag = s.plugins.dragable; - + // first, init the mark renderer for the dragged point var smr = s.markerRenderer; var mr = drag.markerRenderer; @@ -124,7 +124,7 @@ var end = neighbor.pointIndex+2; drag._gridData = s.gridData.slice(start, end); } - + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (plot.plugins.dragable.dragCanvas.isDragging) { var dc = plot.plugins.dragable.dragCanvas; @@ -132,19 +132,19 @@ var s = plot.series[dp.seriesIndex]; var drag = s.plugins.dragable; var gd = s.gridData; - + // compute the new grid position with any constraints. var x = (drag.constrainTo == 'y') ? dp.gridData[0] : gridpos.x; var y = (drag.constrainTo == 'x') ? dp.gridData[1] : gridpos.y; - + // compute data values for any listeners. var xu = s._xaxis.series_p2u(x); var yu = s._yaxis.series_p2u(y); - + // clear the canvas then redraw effect at new position. var ctx = dc._ctx; ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); - + // adjust our gridData for the new mouse position if (dp.pointIndex > 0) { drag._gridData[1] = [x, y]; @@ -174,7 +174,7 @@ } } } - + function handleDown(ev, gridpos, datapos, neighbor, plot) { var dc = plot.plugins.dragable.dragCanvas; dc._cursors.push(ev.target.style.cursor); @@ -197,7 +197,7 @@ dc.isDragging = false; } } - + function handleUp(ev, gridpos, datapos, neighbor, plot) { if (plot.plugins.dragable.dragCanvas.isDragging) { var dc = plot.plugins.dragable.dragCanvas; diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.min.js index 97b0e567..fc561ced 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.dragable.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(d){d.jqplot.Dragable=function(g){this.markerRenderer=new d.jqplot.MarkerRenderer({shadow:false});this.shapeRenderer=new d.jqplot.ShapeRenderer();this.isDragging=false;this.isOver=false;this._ctx;this._elem;this._point;this._gridData;this.color;this.constrainTo="none";d.extend(true,this,g)};function b(){d.jqplot.GenericCanvas.call(this);this.isDragging=false;this.isOver=false;this._neighbor;this._cursors=[]}b.prototype=new d.jqplot.GenericCanvas();b.prototype.constructor=b;d.jqplot.Dragable.parseOptions=function(i,h){var g=h||{};this.plugins.dragable=new d.jqplot.Dragable(g.dragable);this.isDragable=d.jqplot.config.enablePlugins};d.jqplot.Dragable.postPlotDraw=function(){if(this.plugins.dragable&&this.plugins.dragable.highlightCanvas){this.plugins.dragable.highlightCanvas.resetCanvas();this.plugins.dragable.highlightCanvas=null}this.plugins.dragable={previousCursor:"auto",isOver:false};this.plugins.dragable.dragCanvas=new b();this.eventCanvas._elem.before(this.plugins.dragable.dragCanvas.createElement(this._gridPadding,"jqplot-dragable-canvas",this._plotDimensions,this));var g=this.plugins.dragable.dragCanvas.setContext()};d.jqplot.preParseSeriesOptionsHooks.push(d.jqplot.Dragable.parseOptions);d.jqplot.postDrawHooks.push(d.jqplot.Dragable.postPlotDraw);d.jqplot.eventListenerHooks.push(["jqplotMouseMove",e]);d.jqplot.eventListenerHooks.push(["jqplotMouseDown",c]);d.jqplot.eventListenerHooks.push(["jqplotMouseUp",a]);function f(n,p){var q=n.series[p.seriesIndex];var m=q.plugins.dragable;var h=q.markerRenderer;var i=m.markerRenderer;i.style=h.style;i.lineWidth=h.lineWidth+2.5;i.size=h.size+5;if(!m.color){var l=d.jqplot.getColorComponents(h.color);var o=[l[0],l[1],l[2]];var k=(l[3]>=0.6)?l[3]*0.6:l[3]*(2-l[3]);m.color="rgba("+o[0]+","+o[1]+","+o[2]+","+k+")"}i.color=m.color;i.init();var g=(p.pointIndex>0)?p.pointIndex-1:0;var j=p.pointIndex+2;m._gridData=q.gridData.slice(g,j)}function e(o,l,h,t,m){if(m.plugins.dragable.dragCanvas.isDragging){var u=m.plugins.dragable.dragCanvas;var i=u._neighbor;var w=m.series[i.seriesIndex];var k=w.plugins.dragable;var r=w.gridData;var p=(k.constrainTo=="y")?i.gridData[0]:l.x;var n=(k.constrainTo=="x")?i.gridData[1]:l.y;var g=w._xaxis.series_p2u(p);var q=w._yaxis.series_p2u(n);var v=u._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);if(i.pointIndex>0){k._gridData[1]=[p,n]}else{k._gridData[0]=[p,n]}m.series[i.seriesIndex].draw(u._ctx,{gridData:k._gridData,shadow:false,preventJqPlotSeriesDrawTrigger:true,color:k.color,markerOptions:{color:k.color,shadow:false},trendline:{show:false}});m.target.trigger("jqplotSeriesPointChange",[i.seriesIndex,i.pointIndex,[g,q],[p,n]])}else{if(t!=null){var j=m.series[t.seriesIndex];if(j.isDragable){var u=m.plugins.dragable.dragCanvas;if(!u.isOver){u._cursors.push(o.target.style.cursor);o.target.style.cursor="pointer"}u.isOver=true}}else{if(t==null){var u=m.plugins.dragable.dragCanvas;if(u.isOver){o.target.style.cursor=u._cursors.pop();u.isOver=false}}}}}function c(k,i,g,l,j){var m=j.plugins.dragable.dragCanvas;m._cursors.push(k.target.style.cursor);if(l!=null){var o=j.series[l.seriesIndex];var h=o.plugins.dragable;if(o.isDragable&&!m.isDragging){m._neighbor=l;m.isDragging=true;f(j,l);h.markerRenderer.draw(o.gridData[l.pointIndex][0],o.gridData[l.pointIndex][1],m._ctx);k.target.style.cursor="move";j.target.trigger("jqplotDragStart",[l.seriesIndex,l.pointIndex,i,g])}}else{var n=m._ctx;n.clearRect(0,0,n.canvas.width,n.canvas.height);m.isDragging=false}}function a(m,j,g,o,k){if(k.plugins.dragable.dragCanvas.isDragging){var p=k.plugins.dragable.dragCanvas;var q=p._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);p.isDragging=false;var h=p._neighbor;var r=k.series[h.seriesIndex];var i=r.plugins.dragable;var n=(i.constrainTo=="y")?h.data[0]:g[r.xaxis];var l=(i.constrainTo=="x")?h.data[1]:g[r.yaxis];r.data[h.pointIndex][0]=n;r.data[h.pointIndex][1]=l;k.drawSeries({preventJqPlotSeriesDrawTrigger:true},h.seriesIndex);p._neighbor=null;m.target.style.cursor=p._cursors.pop();k.target.trigger("jqplotDragStop",[j,g])}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.js index effa111a..a01770de 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { // class $.jqplot.EnhancedLegendRenderer @@ -34,10 +34,10 @@ $.jqplot.EnhancedLegendRenderer = function(){ $.jqplot.TableLegendRenderer.call(this); }; - + $.jqplot.EnhancedLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.EnhancedLegendRenderer.prototype.constructor = $.jqplot.EnhancedLegendRenderer; - + // called with scope of legend. $.jqplot.EnhancedLegendRenderer.prototype.init = function(options) { // prop: numberRows @@ -48,7 +48,7 @@ this.numberColumns = null; // prop: seriesToggle // false to not enable series on/off toggling on the legend. - // true or a fadein/fadeout speed (number of milliseconds or 'fast', 'normal', 'slow') + // true or a fadein/fadeout speed (number of milliseconds or 'fast', 'normal', 'slow') // to enable show/hide of series on click of legend item. this.seriesToggle = 'normal'; // prop: seriesToggleReplot @@ -58,16 +58,16 @@ // Set to an options object (e.g. {resetAxes: true}) for replot options. this.seriesToggleReplot = false; // prop: disableIEFading - // true to toggle series with a show/hide method only and not allow fading in/out. + // true to toggle series with a show/hide method only and not allow fading in/out. // This is to overcome poor performance of fade in some versions of IE. this.disableIEFading = true; $.extend(true, this, options); - + if (this.seriesToggle) { $.jqplot.postDrawHooks.push(postDraw); } }; - + // called with scope of legend $.jqplot.EnhancedLegendRenderer.prototype.draw = function(offsets, plot) { var legend = this; @@ -88,8 +88,8 @@ if (this.seriesToggle) { this._elem.css('z-index', '3'); } - - var pad = false, + + var pad = false, reverse = false, nr, nc; if (this.numberRows) { @@ -109,7 +109,7 @@ nr = series.length; nc = 1; } - + var i, j, tr, td1, td2, lt, rs, div, div0, div1; var idx = 0; // check to see if we need to reverse @@ -117,8 +117,8 @@ if (nc == 1 && series[i]._stack || series[i].renderer.constructor == $.jqplot.BezierCurveRenderer){ reverse = true; } - } - + } + for (i=0; i<nr; i++) { tr = $(document.createElement('tr')); tr.addClass('jqplot-table-legend'); @@ -167,7 +167,7 @@ td2 = $(document.createElement('td')); td2.addClass('jqplot-table-legend jqplot-table-legend-label'); td2.css('paddingTop', rs); - + // td1 = $('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+rs+';">'+ // '<div><div class="jqplot-table-legend-swatch" style="background-color:'+color+';border-color:'+color+';"></div>'+ // '</div></td>'); @@ -186,7 +186,7 @@ if (this.showSwatches) {td1.appendTo(tr);} if (this.showLabels) {td2.appendTo(tr);} } - + if (this.seriesToggle) { // add an overlay for clicking series on/off @@ -200,7 +200,7 @@ if (!$.jqplot.use_excanvas || !this.disableIEFading) { speed = this.seriesToggle; } - } + } if (this.showSwatches) { td1.bind('click', {series:s, speed:speed, plot: plot, replot:this.seriesToggleReplot}, handleToggle); td1.addClass('jqplot-seriesToggle'); @@ -216,14 +216,14 @@ td2.addClass('jqplot-series-hidden'); } } - + pad = true; } } idx++; } - - td1 = td2 = div0 = div1 = null; + + td1 = td2 = div0 = div1 = null; } } return this._elem; @@ -294,7 +294,7 @@ s.toggleDisplay(ev, doLegendToggle); }; - + // called with scope of plot. var postDraw = function () { if (this.legend.renderer.constructor == $.jqplot.EnhancedLegendRenderer && this.legend.seriesToggle){ diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js index 73dc9fa1..029844e7 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(c){c.jqplot.EnhancedLegendRenderer=function(){c.jqplot.TableLegendRenderer.call(this)};c.jqplot.EnhancedLegendRenderer.prototype=new c.jqplot.TableLegendRenderer();c.jqplot.EnhancedLegendRenderer.prototype.constructor=c.jqplot.EnhancedLegendRenderer;c.jqplot.EnhancedLegendRenderer.prototype.init=function(d){this.numberRows=null;this.numberColumns=null;this.seriesToggle="normal";this.seriesToggleReplot=false;this.disableIEFading=true;c.extend(true,this,d);if(this.seriesToggle){c.jqplot.postDrawHooks.push(b)}};c.jqplot.EnhancedLegendRenderer.prototype.draw=function(m,y){var f=this;if(this.show){var r=this._series;var u;var w="position:absolute;";w+=(this.background)?"background:"+this.background+";":"";w+=(this.border)?"border:"+this.border+";":"";w+=(this.fontSize)?"font-size:"+this.fontSize+";":"";w+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";w+=(this.textColor)?"color:"+this.textColor+";":"";w+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";w+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";w+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";w+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=c('<table class="jqplot-table-legend" style="'+w+'"></table>');if(this.seriesToggle){this._elem.css("z-index","3")}var C=false,q=false,d,o;if(this.numberRows){d=this.numberRows;if(!this.numberColumns){o=Math.ceil(r.length/d)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;d=Math.ceil(r.length/this.numberColumns)}else{d=r.length;o=1}}var B,z,e,l,k,n,p,t,h,g;var v=0;for(B=r.length-1;B>=0;B--){if(o==1&&r[B]._stack||r[B].renderer.constructor==c.jqplot.BezierCurveRenderer){q=true}}for(B=0;B<d;B++){e=c(document.createElement("tr"));e.addClass("jqplot-table-legend");if(q){e.prependTo(this._elem)}else{e.appendTo(this._elem)}for(z=0;z<o;z++){if(v<r.length&&(r[v].show||r[v].showLabel)){u=r[v];n=this.labels[v]||u.label.toString();if(n){var x=u.color;if(!q){if(B>0){C=true}else{C=false}}else{if(B==d-1){C=false}else{C=true}}p=(C)?this.rowSpacing:"0";l=c(document.createElement("td"));l.addClass("jqplot-table-legend jqplot-table-legend-swatch");l.css({textAlign:"center",paddingTop:p});h=c(document.createElement("div"));h.addClass("jqplot-table-legend-swatch-outline");g=c(document.createElement("div"));g.addClass("jqplot-table-legend-swatch");g.css({backgroundColor:x,borderColor:x});l.append(h.append(g));k=c(document.createElement("td"));k.addClass("jqplot-table-legend jqplot-table-legend-label");k.css("paddingTop",p);if(this.escapeHtml){k.text(n)}else{k.html(n)}if(q){if(this.showLabels){k.prependTo(e)}if(this.showSwatches){l.prependTo(e)}}else{if(this.showSwatches){l.appendTo(e)}if(this.showLabels){k.appendTo(e)}}if(this.seriesToggle){var A;if(typeof(this.seriesToggle)==="string"||typeof(this.seriesToggle)==="number"){if(!c.jqplot.use_excanvas||!this.disableIEFading){A=this.seriesToggle}}if(this.showSwatches){l.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);l.addClass("jqplot-seriesToggle")}if(this.showLabels){k.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);k.addClass("jqplot-seriesToggle")}if(!u.show&&u.showLabel){l.addClass("jqplot-series-hidden");k.addClass("jqplot-series-hidden")}}C=true}}v++}l=k=h=g=null}}return this._elem};var a=function(j){var i=j.data,m=i.series,k=i.replot,h=i.plot,f=i.speed,l=m.index,g=false;if(m.canvas._elem.is(":hidden")||!m.show){g=true}var e=function(){if(k){var n={};if(c.isPlainObject(k)){c.extend(true,n,k)}h.replot(n);if(g&&f){var d=h.series[l];if(d.shadowCanvas._elem){d.shadowCanvas._elem.hide().fadeIn(f)}d.canvas._elem.hide().fadeIn(f);d.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+d.index).hide().fadeIn(f)}}else{var d=h.series[l];if(d.canvas._elem.is(":hidden")||!d.show){if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).addClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).addClass("jqplot-series-hidden")}}else{if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).removeClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).removeClass("jqplot-series-hidden")}}}};m.toggleDisplay(j,e)};var b=function(){if(this.legend.renderer.constructor==c.jqplot.EnhancedLegendRenderer&&this.legend.seriesToggle){var d=this.legend._elem.detach();this.eventCanvas._elem.after(d)}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.js index c72660cc..e79bf887 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -34,18 +34,18 @@ * Plugin renderer to draw a funnel chart. * x values, if present, will be used as labels. * y values give area size. - * + * * Funnel charts will draw a single series * only. - * - * To use this renderer, you need to include the + * + * To use this renderer, you need to include the * funnel renderer plugin, for example: - * + * * > <script type="text/javascript" src="plugins/jqplot.funnelRenderer.js"></script> - * + * * Properties described here are passed into the $.jqplot function * as options on the series renderer. For example: - * + * * > plot2 = $.jqplot('chart2', [s1, s2], { * > seriesDefaults: { * > renderer:$.jqplot.FunnelRenderer, @@ -55,26 +55,26 @@ * > } * > } * > }); - * + * * IMPORTANT - * + * * *The funnel renderer will reorder data in descending order* so the largest value in * the data set is first and displayed on top of the funnel. Data will then * be displayed in descending order down the funnel. The area of each funnel * section will correspond to the value of each data point relative to the sum - * of all values. That is section area is proportional to section value divided by + * of all values. That is section area is proportional to section value divided by * sum of all section values. - * + * * If your data is not in descending order when passed into the plot, *it will be * reordered* when stored in the series.data property. A copy of the unordered * data is kept in the series._unorderedData property. - * + * * A funnel plot will trigger events on the plot target * according to user interaction. All events return the event object, - * the series index, the point (section) index, and the point data for + * the series index, the point (section) index, and the point data for * the appropriate section. *Note* the point index will referr to the ordered * data, not the original unordered data. - * + * * 'jqplotDataMouseOver' - triggered when mousing over a section. * 'jqplotDataHighlight' - triggered the first time user mouses over a section, * if highlighting is enabled. @@ -87,10 +87,10 @@ $.jqplot.FunnelRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.FunnelRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.FunnelRenderer.prototype.constructor = $.jqplot.FunnelRenderer; - + // called with scope of a series $.jqplot.FunnelRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -105,14 +105,14 @@ // true or false, wether to fill the areas. this.fill = true; // prop: shadowOffset - // offset of the shadow from the area and offset of + // offset of the shadow from the area and offset of // each succesive stroke of the shadow from the last. this.shadowOffset = 2; // prop: shadowAlpha // transparency of the shadow (0 = transparent, 1 = opaque) this.shadowAlpha = 0.07; // prop: shadowDepth - // number of strokes to apply to the shadow, + // number of strokes to apply to the shadow, // each stroke offset shadowOffset from the last. this.shadowDepth = 5; // prop: highlightMouseOver @@ -128,7 +128,7 @@ this.highlightColors = []; // prop: widthRatio // The ratio of the width of the top of the funnel to the bottom. - // a ratio of 0 will make an upside down pyramid. + // a ratio of 0 will make an upside down pyramid. this.widthRatio = 0.2; // prop: lineWidth // width of line if areas are stroked and not filled. @@ -148,19 +148,19 @@ // This applies to all label types, not just to percentage labels. this.dataLabelThreshold = 3; this._type = 'funnel'; - + this.tickRenderer = $.jqplot.FunnelTickRenderer; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } - + $.extend(true, this, options); - + // index of the currenty highlighted point, if any this._highlightedPoint = null; - + // lengths of bases, or horizontal sides of areas of trapezoid. this._bases = []; // total area @@ -172,7 +172,7 @@ // angle of the funnel to vertical. this._angle; this._dataIndices = []; - + // sort data this._unorderedData = $.extend(true, [], this.data); var idxs = $.extend(true, [], this.data); @@ -184,7 +184,7 @@ for (var i=0; i<idxs.length; i++) { this._dataIndices.push(idxs[i][2]); } - + // set highlight colors if none provided if (this.highlightColors.length == 0) { for (var i=0; i<this.seriesColors.length; i++){ @@ -207,10 +207,10 @@ plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp); plot.eventListenerHooks.addOnce('jqplotClick', handleClick); plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); - plot.postDrawHooks.addOnce(postPlotDraw); - + plot.postDrawHooks.addOnce(postPlotDraw); + }; - + // gridData will be of form [label, percentage of total] $.jqplot.FunnelRenderer.prototype.setGridData = function(plot) { // set gridData property. This will hold angle in radians of each data point. @@ -220,18 +220,18 @@ sum += this.data[i][1]; td.push([this.data[i][0], this.data[i][1]]); } - + // normalize y values, so areas are proportional. for (var i=0; i<td.length; i++) { td[i][1] = td[i][1]/sum; } - + this._bases = new Array(td.length + 1); this._lengths = new Array(td.length); - + this.gridData = td; }; - + $.jqplot.FunnelRenderer.prototype.makeGridData = function(data, plot) { // set gridData property. This will hold angle in radians of each data point. var sum = 0; @@ -240,23 +240,23 @@ sum += this.data[i][1]; td.push([this.data[i][0], this.data[i][1]]); } - + // normalize y values, so areas are proportional. for (var i=0; i<td.length; i++) { td[i][1] = td[i][1]/sum; } - + this._bases = new Array(td.length + 1); this._lengths = new Array(td.length); - + return td; }; - + $.jqplot.FunnelRenderer.prototype.drawSection = function (ctx, vertices, color, isShadow) { var fill = this.fill; var lineWidth = this.lineWidth; ctx.save(); - + if (isShadow) { for (var i=0; i<this.shadowDepth; i++) { ctx.save(); @@ -264,13 +264,13 @@ doDraw(); } } - + else { doDraw(); } - + function doDraw () { - ctx.beginPath(); + ctx.beginPath(); ctx.fillStyle = color; ctx.strokeStyle = color; ctx.lineWidth = lineWidth; @@ -286,16 +286,16 @@ ctx.stroke(); } } - + if (isShadow) { for (var i=0; i<this.shadowDepth; i++) { ctx.restore(); } } - + ctx.restore(); }; - + // called with scope of series $.jqplot.FunnelRenderer.prototype.draw = function (ctx, gd, options, plot) { var i; @@ -341,12 +341,12 @@ break; } } - + var loff = (trans==1) ? this.padding.left + offx : this.padding.left; var toff = (trans==1) ? this.padding.top + offy : this.padding.top; var roff = (trans==-1) ? this.padding.right + offx : this.padding.right; var boff = (trans==-1) ? this.padding.bottom + offy : this.padding.bottom; - + var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow; var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine; var fill = (opts.fill != undefined) ? opts.fill : this.fill; @@ -364,7 +364,7 @@ this._areas.push(gd[i][1] * this._atot); } - + var guess, err, count, lsum=0; var tolerance = 0.0001; @@ -382,36 +382,36 @@ } lsum += this._lengths[i]; } - + // figure out vertices of each section this._vertices = new Array(gd.length); - + // these are 4 coners of entire trapezoid var p0 = [loff, toff], p1 = [loff+this._bases[0], toff], p2 = [loff + (this._bases[0] - this._bases[this._bases.length-1])/2, toff + this._length], p3 = [p2[0] + this._bases[this._bases.length-1], p2[1]]; - + // equations of right and left sides, returns x, y values given height of section (y value) function findleft (l) { var m = (p0[1] - p2[1])/(p0[0] - p2[0]); var b = p0[1] - m*p0[0]; var y = l + p0[1]; - + return [(y - b)/m, y]; } - + function findright (l) { var m = (p1[1] - p3[1])/(p1[0] - p3[0]); var b = p1[1] - m*p1[0]; var y = l + p1[1]; - + return [(y - b)/m, y]; } - + var x = offx, y = offy; var h=0, adj=0; - + for (i=0; i<gd.length; i++) { this._vertices[i] = new Array(); var v = this._vertices[i]; @@ -442,7 +442,7 @@ } v.push(findright(h+adj)); v.push(findleft(h+adj)); - + } if (this.shadow) { @@ -450,15 +450,15 @@ for (var i=0; i<gd.length; i++) { this.renderer.drawSection.call (this, ctx, this._vertices[i], shadowColor, true); } - + } for (var i=0; i<gd.length; i++) { var v = this._vertices[i]; this.renderer.drawSection.call (this, ctx, v, this.seriesColors[i]); - + if (this.showDataLabels && gd[i][1]*100 >= this.dataLabelThreshold) { var fstr, label; - + if (this.dataLabels == 'label') { fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, gd[i][0]); @@ -475,12 +475,12 @@ fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, this.dataLabels[this._dataIndices[i]]); } - + var fact = (this._radius ) * this.dataLabelPositionFactor + this.sliceMargin + this.dataLabelNudge; - + var x = (v[0][0] + v[1][0])/2 + this.canvas._offsets.left; var y = (v[1][1] + v[2][1])/2 + this.canvas._offsets.top; - + var labelelem = $('<span class="jqplot-funnel-series jqplot-data-label" style="position:absolute;">' + label + '</span>').insertBefore(plot.eventCanvas._elem); x -= labelelem.width()/2; y -= labelelem.height()/2; @@ -488,19 +488,19 @@ y = Math.round(y); labelelem.css({left: x, top: y}); } - + } - + }; - + $.jqplot.FunnelAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.FunnelAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.FunnelAxisRenderer.prototype.constructor = $.jqplot.FunnelAxisRenderer; - - + + // There are no traditional axes on a funnel chart. We just need to provide // dummy objects with properties so the plot will render. // called with scope of axis object. @@ -519,11 +519,11 @@ this.showTicks = false; this.ticks = []; this.showMark = false; - this.show = false; + this.show = false; }; - - - + + + /** * Class: $.jqplot.FunnelLegendRenderer * Legend Renderer specific to funnel plots. Set by default @@ -532,10 +532,10 @@ $.jqplot.FunnelLegendRenderer = function(){ $.jqplot.TableLegendRenderer.call(this); }; - + $.jqplot.FunnelLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.FunnelLegendRenderer.prototype.constructor = $.jqplot.FunnelLegendRenderer; - + $.jqplot.FunnelLegendRenderer.prototype.init = function(options) { // Group: Properties // @@ -547,7 +547,7 @@ this.numberColumns = null; $.extend(true, this, options); }; - + // called with context of legend $.jqplot.FunnelLegendRenderer.prototype.draw = function() { var legend = this; @@ -566,13 +566,13 @@ this._elem = $('<table class="jqplot-table-legend" style="'+ss+'"></table>'); // Funnel charts legends don't go by number of series, but by number of data points // in the series. Refactor things here for that. - - var pad = false, + + var pad = false, reverse = false, nr, nc; var s = series[0]; var colorGenerator = new $.jqplot.ColorGenerator(s.seriesColors); - + if (s.show) { var pd = s.data; if (this.numberRows) { @@ -592,10 +592,10 @@ nr = pd.length; nc = 1; } - + var i, j, tr, td1, td2, lt, rs, color; - var idx = 0; - + var idx = 0; + for (i=0; i<nr; i++) { if (reverse){ tr = $('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem); @@ -624,7 +624,7 @@ } } rs = (pad) ? this.rowSpacing : '0'; - + td1 = $('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+rs+';">'+ '<div><div class="jqplot-table-legend-swatch" style="border-color:'+color+';"></div>'+ '</div></td>'); @@ -646,17 +646,17 @@ pad = true; } idx++; - } + } } } } - return this._elem; + return this._elem; }; - + // $.jqplot.FunnelLegendRenderer.prototype.pack = function(offsets) { // if (this.show) { // // fake a grid for positioning - // var grid = {_top:offsets.top, _left:offsets.left, _right:offsets.right, _bottom:this._plotDimensions.height - offsets.bottom}; + // var grid = {_top:offsets.top, _left:offsets.left, _right:offsets.right, _bottom:this._plotDimensions.height - offsets.bottom}; // if (this.placement == 'insideGrid') { // switch (this.location) { // case 'nw': @@ -707,7 +707,7 @@ // this._elem.css({right:a, bottom:b}); // break; // } - // + // // } // else { // switch (this.location) { @@ -760,9 +760,9 @@ // break; // } // } - // } + // } // }; - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -782,7 +782,7 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.FunnelAxisRenderer; options.legend.renderer = $.jqplot.FunnelLegendRenderer; @@ -791,7 +791,7 @@ options.seriesDefaults.pointLabels = {show: false}; } } - + function postInit(target, data, options) { // if multiple series, add a reference to the previous one so that // funnel rings can nest. @@ -804,7 +804,7 @@ } } } - + // called with scope of plot function postParseOptions(options) { for (var i=0; i<this.series.length; i++) { @@ -812,7 +812,7 @@ this.series[i].colorGenerator = $.jqplot.colorGenerator; } } - + function highlight (plot, sidx, pidx) { var s = plot.series[sidx]; var canvas = plot.plugins.funnelRenderer.highlightCanvas; @@ -821,7 +821,7 @@ plot.plugins.funnelRenderer.highlightedSeriesIndex = sidx; s.renderer.drawSection.call(s, canvas._ctx, s._vertices[pidx], s.highlightColors[pidx], false); } - + function unhighlight (plot) { var canvas = plot.plugins.funnelRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -831,7 +831,7 @@ plot.plugins.funnelRenderer.highlightedSeriesIndex = null; plot.target.trigger('jqplotDataUnhighlight'); } - + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -852,7 +852,7 @@ unhighlight (plot); } } - + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -869,14 +869,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.funnelRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -887,7 +887,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -902,12 +902,12 @@ plot.target.trigger(evt, ins); } } - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.funnelRenderer && this.plugins.funnelRenderer.highlightCanvas) { this.plugins.funnelRenderer.highlightCanvas.resetCanvas(); this.plugins.funnelRenderer.highlightCanvas = null; @@ -915,7 +915,7 @@ this.plugins.funnelRenderer = {}; this.plugins.funnelRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); - + // do we have any data labels? if so, put highlight canvas before those var labels = $(this.targetId+' .jqplot-data-label'); if (labels.length) { @@ -928,16 +928,15 @@ var hctx = this.plugins.funnelRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); } - + $.jqplot.preInitHooks.push(preInit); - + $.jqplot.FunnelTickRenderer = function() { $.jqplot.AxisTickRenderer.call(this); }; - + $.jqplot.FunnelTickRenderer.prototype = new $.jqplot.AxisTickRenderer(); $.jqplot.FunnelTickRenderer.prototype.constructor = $.jqplot.FunnelTickRenderer; - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.min.js index c44e1b13..4261ce02 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.funnelRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(e){e.jqplot.FunnelRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.FunnelRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.FunnelRenderer.prototype.constructor=e.jqplot.FunnelRenderer;e.jqplot.FunnelRenderer.prototype.init=function(p,t){this.padding={top:20,right:20,bottom:20,left:20};this.sectionMargin=6;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.widthRatio=0.2;this.lineWidth=2;this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this._type="funnel";this.tickRenderer=e.jqplot.FunnelTickRenderer;if(p.highlightMouseDown&&p.highlightMouseOver==null){p.highlightMouseOver=false}e.extend(true,this,p);this._highlightedPoint=null;this._bases=[];this._atot;this._areas=[];this._lengths=[];this._angle;this._dataIndices=[];this._unorderedData=e.extend(true,[],this.data);var o=e.extend(true,[],this.data);for(var r=0;r<o.length;r++){o[r].push(r)}this.data.sort(function(v,u){return u[1]-v[1]});o.sort(function(v,u){return u[1]-v[1]});for(var r=0;r<o.length;r++){this._dataIndices.push(o[r][2])}if(this.highlightColors.length==0){for(var r=0;r<this.seriesColors.length;r++){var q=e.jqplot.getColorComponents(this.seriesColors[r]);var m=[q[0],q[1],q[2]];var s=m[0]+m[1]+m[2];for(var n=0;n<3;n++){m[n]=(s>570)?m[n]*0.8:m[n]+0.4*(255-m[n]);m[n]=parseInt(m[n],10)}this.highlightColors.push("rgb("+m[0]+","+m[1]+","+m[2]+")")}}t.postParseOptionsHooks.addOnce(k);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",a);t.eventListenerHooks.addOnce("jqplotMouseDown",b);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",l);t.postDrawHooks.addOnce(h)};e.jqplot.FunnelRenderer.prototype.setGridData=function(o){var n=0;var p=[];for(var m=0;m<this.data.length;m++){n+=this.data[m][1];p.push([this.data[m][0],this.data[m][1]])}for(var m=0;m<p.length;m++){p[m][1]=p[m][1]/n}this._bases=new Array(p.length+1);this._lengths=new Array(p.length);this.gridData=p};e.jqplot.FunnelRenderer.prototype.makeGridData=function(o,p){var n=0;var q=[];for(var m=0;m<this.data.length;m++){n+=this.data[m][1];q.push([this.data[m][0],this.data[m][1]])}for(var m=0;m<q.length;m++){q[m][1]=q[m][1]/n}this._bases=new Array(q.length+1);this._lengths=new Array(q.length);return q};e.jqplot.FunnelRenderer.prototype.drawSection=function(n,p,o,s){var t=this.fill;var m=this.lineWidth;n.save();if(s){for(var r=0;r<this.shadowDepth;r++){n.save();n.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));q()}}else{q()}function q(){n.beginPath();n.fillStyle=o;n.strokeStyle=o;n.lineWidth=m;n.moveTo(p[0][0],p[0][1]);for(var u=1;u<4;u++){n.lineTo(p[u][0],p[u][1])}n.closePath();if(t){n.fill()}else{n.stroke()}}if(s){for(var r=0;r<this.shadowDepth;r++){n.restore()}}n.restore()};e.jqplot.FunnelRenderer.prototype.draw=function(G,B,J,p){var Y;var L=(J!=undefined)?J:{};var w=0;var u=0;var R=1;this._areas=[];if(J.legendInfo&&J.legendInfo.placement=="insideGrid"){var O=J.legendInfo;switch(O.location){case"nw":w=O.width+O.xoffset;break;case"w":w=O.width+O.xoffset;break;case"sw":w=O.width+O.xoffset;break;case"ne":w=O.width+O.xoffset;R=-1;break;case"e":w=O.width+O.xoffset;R=-1;break;case"se":w=O.width+O.xoffset;R=-1;break;case"n":u=O.height+O.yoffset;break;case"s":u=O.height+O.yoffset;R=-1;break;default:break}}var t=(R==1)?this.padding.left+w:this.padding.left;var F=(R==1)?this.padding.top+u:this.padding.top;var M=(R==-1)?this.padding.right+w:this.padding.right;var o=(R==-1)?this.padding.bottom+u:this.padding.bottom;var P=(L.shadow!=undefined)?L.shadow:this.shadow;var q=(L.showLine!=undefined)?L.showLine:this.showLine;var C=(L.fill!=undefined)?L.fill:this.fill;var H=G.canvas.width;var N=G.canvas.height;this._bases[0]=H-t-M;var I=this._length=N-F-o;var r=this._bases[0]*this.widthRatio;this._atot=I/2*(this._bases[0]+this._bases[0]*this.widthRatio);this._angle=Math.atan((this._bases[0]-r)/2/I);for(Y=0;Y<B.length;Y++){this._areas.push(B[Y][1]*this._atot)}var E,aa,W,Q=0;var n=0.0001;for(Y=0;Y<this._areas.length;Y++){E=this._areas[Y]/this._bases[Y];aa=999999;this._lengths[Y]=E;W=0;while(aa>this._lengths[Y]*n&&W<100){this._lengths[Y]=this._areas[Y]/(this._bases[Y]-this._lengths[Y]*Math.tan(this._angle));aa=Math.abs(this._lengths[Y]-E);this._bases[Y+1]=this._bases[Y]-(2*this._lengths[Y]*Math.tan(this._angle));E=this._lengths[Y];W++}Q+=this._lengths[Y]}this._vertices=new Array(B.length);var ae=[t,F],ad=[t+this._bases[0],F],ac=[t+(this._bases[0]-this._bases[this._bases.length-1])/2,F+this._length],ab=[ac[0]+this._bases[this._bases.length-1],ac[1]];function V(ag){var x=(ae[1]-ac[1])/(ae[0]-ac[0]);var v=ae[1]-x*ae[0];var ah=ag+ae[1];return[(ah-v)/x,ah]}function D(ag){var x=(ad[1]-ab[1])/(ad[0]-ab[0]);var v=ad[1]-x*ad[0];var ah=ag+ad[1];return[(ah-v)/x,ah]}var T=w,S=u;var Z=0,m=0;for(Y=0;Y<B.length;Y++){this._vertices[Y]=new Array();var U=this._vertices[Y];var A=this.sectionMargin;if(Y==0){m=0}if(Y==1){m=A/3}else{if(Y>0&&Y<B.length-1){m=A/2}else{if(Y==B.length-1){m=2*A/3}}}U.push(V(Z+m));U.push(D(Z+m));Z+=this._lengths[Y];if(Y==0){m=-2*A/3}else{if(Y>0&&Y<B.length-1){m=-A/2}else{if(Y==B.length-1){m=0}}}U.push(D(Z+m));U.push(V(Z+m))}if(this.shadow){var af="rgba(0,0,0,"+this.shadowAlpha+")";for(var Y=0;Y<B.length;Y++){this.renderer.drawSection.call(this,G,this._vertices[Y],af,true)}}for(var Y=0;Y<B.length;Y++){var U=this._vertices[Y];this.renderer.drawSection.call(this,G,U,this.seriesColors[Y]);if(this.showDataLabels&&B[Y][1]*100>=this.dataLabelThreshold){var K,X;if(this.dataLabels=="label"){K=this.dataLabelFormatString||"%s";X=e.jqplot.sprintf(K,B[Y][0])}else{if(this.dataLabels=="value"){K=this.dataLabelFormatString||"%d";X=e.jqplot.sprintf(K,this.data[Y][1])}else{if(this.dataLabels=="percent"){K=this.dataLabelFormatString||"%d%%";X=e.jqplot.sprintf(K,B[Y][1]*100)}else{if(this.dataLabels.constructor==Array){K=this.dataLabelFormatString||"%s";X=e.jqplot.sprintf(K,this.dataLabels[this._dataIndices[Y]])}}}}var s=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var T=(U[0][0]+U[1][0])/2+this.canvas._offsets.left;var S=(U[1][1]+U[2][1])/2+this.canvas._offsets.top;var z=e('<span class="jqplot-funnel-series jqplot-data-label" style="position:absolute;">'+X+"</span>").insertBefore(p.eventCanvas._elem);T-=z.width()/2;S-=z.height()/2;T=Math.round(T);S=Math.round(S);z.css({left:T,top:S})}}};e.jqplot.FunnelAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.FunnelAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.FunnelAxisRenderer.prototype.constructor=e.jqplot.FunnelAxisRenderer;e.jqplot.FunnelAxisRenderer.prototype.init=function(m){this.tickRenderer=e.jqplot.FunnelTickRenderer;e.extend(true,this,m);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.FunnelLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.FunnelLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.FunnelLegendRenderer.prototype.constructor=e.jqplot.FunnelLegendRenderer;e.jqplot.FunnelLegendRenderer.prototype.init=function(m){this.numberRows=null;this.numberColumns=null;e.extend(true,this,m)};e.jqplot.FunnelLegendRenderer.prototype.draw=function(){var p=this;if(this.show){var x=this._series;var A="position:absolute;";A+=(this.background)?"background:"+this.background+";":"";A+=(this.border)?"border:"+this.border+";":"";A+=(this.fontSize)?"font-size:"+this.fontSize+";":"";A+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";A+=(this.textColor)?"color:"+this.textColor+";":"";A+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";A+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";A+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";A+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('<table class="jqplot-table-legend" style="'+A+'"></table>');var E=false,w=false,m,u;var y=x[0];var n=new e.jqplot.ColorGenerator(y.seriesColors);if(y.show){var F=y.data;if(this.numberRows){m=this.numberRows;if(!this.numberColumns){u=Math.ceil(F.length/m)}else{u=this.numberColumns}}else{if(this.numberColumns){u=this.numberColumns;m=Math.ceil(F.length/this.numberColumns)}else{m=F.length;u=1}}var D,C,o,r,q,t,v,B;var z=0;for(D=0;D<m;D++){if(w){o=e('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem)}else{o=e('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem)}for(C=0;C<u;C++){if(z<F.length){t=this.labels[z]||F[z][0].toString();B=n.next();if(!w){if(D>0){E=true}else{E=false}}else{if(D==m-1){E=false}else{E=true}}v=(E)?this.rowSpacing:"0";r=e('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+v+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+B+';"></div></div></td>');q=e('<td class="jqplot-table-legend" style="padding-top:'+v+';"></td>');if(this.escapeHtml){q.text(t)}else{q.html(t)}if(w){q.prependTo(o);r.prependTo(o)}else{r.appendTo(o);q.appendTo(o)}E=true}z++}}}}return this._elem};function c(q,p,n){n=n||{};n.axesDefaults=n.axesDefaults||{};n.legend=n.legend||{};n.seriesDefaults=n.seriesDefaults||{};var m=false;if(n.seriesDefaults.renderer==e.jqplot.FunnelRenderer){m=true}else{if(n.series){for(var o=0;o<n.series.length;o++){if(n.series[o].renderer==e.jqplot.FunnelRenderer){m=true}}}}if(m){n.axesDefaults.renderer=e.jqplot.FunnelAxisRenderer;n.legend.renderer=e.jqplot.FunnelLegendRenderer;n.legend.preDraw=true;n.sortData=false;n.seriesDefaults.pointLabels={show:false}}}function g(p,o,m){for(var n=0;n<this.series.length;n++){if(this.series[n].renderer.constructor==e.jqplot.FunnelRenderer){if(this.series[n].highlightMouseOver){this.series[n].highlightMouseDown=false}}}}function k(m){for(var n=0;n<this.series.length;n++){this.series[n].seriesColors=this.seriesColors;this.series[n].colorGenerator=e.jqplot.colorGenerator}}function d(q,p,o){var n=q.series[p];var m=q.plugins.funnelRenderer.highlightCanvas;m._ctx.clearRect(0,0,m._ctx.canvas.width,m._ctx.canvas.height);n._highlightedPoint=o;q.plugins.funnelRenderer.highlightedSeriesIndex=p;n.renderer.drawSection.call(n,m._ctx,n._vertices[o],n.highlightColors[o],false)}function i(o){var m=o.plugins.funnelRenderer.highlightCanvas;m._ctx.clearRect(0,0,m._ctx.canvas.width,m._ctx.canvas.height);for(var n=0;n<o.series.length;n++){o.series[n]._highlightedPoint=null}o.plugins.funnelRenderer.highlightedSeriesIndex=null;o.target.trigger("jqplotDataUnhighlight")}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataMouseOver");n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.funnelRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var m=jQuery.Event("jqplotDataHighlight");m.which=q.which;m.pageX=q.pageX;m.pageY=q.pageY;r.target.trigger(m,o);d(r,o[0],o[1])}}else{if(s==null){i(r)}}}function b(p,o,s,r,q){if(r){var n=[r.seriesIndex,r.pointIndex,r.data];if(q.series[n[0]].highlightMouseDown&&!(n[0]==q.plugins.funnelRenderer.highlightedSeriesIndex&&n[1]==q.series[n[0]]._highlightedPoint)){var m=jQuery.Event("jqplotDataHighlight");m.which=p.which;m.pageX=p.pageX;m.pageY=p.pageY;q.target.trigger(m,n);d(q,n[0],n[1])}}else{if(r==null){i(q)}}}function j(o,n,r,q,p){var m=p.plugins.funnelRenderer.highlightedSeriesIndex;if(m!=null&&p.series[m].highlightMouseDown){i(p)}}function f(p,o,s,r,q){if(r){var n=[r.seriesIndex,r.pointIndex,r.data];var m=jQuery.Event("jqplotDataClick");m.which=p.which;m.pageX=p.pageX;m.pageY=p.pageY;q.target.trigger(m,n)}}function l(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var m=r.plugins.funnelRenderer.highlightedSeriesIndex;if(m!=null&&r.series[m].highlightMouseDown){i(r)}var n=jQuery.Event("jqplotDataRightClick");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function h(){if(this.plugins.funnelRenderer&&this.plugins.funnelRenderer.highlightCanvas){this.plugins.funnelRenderer.highlightCanvas.resetCanvas();this.plugins.funnelRenderer.highlightCanvas=null}this.plugins.funnelRenderer={};this.plugins.funnelRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var n=e(this.targetId+" .jqplot-data-label");if(n.length){e(n[0]).before(this.plugins.funnelRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-funnelRenderer-highlight-canvas",this._plotDimensions,this))}else{this.eventCanvas._elem.before(this.plugins.funnelRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-funnelRenderer-highlight-canvas",this._plotDimensions,this))}var m=this.plugins.funnelRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(o){i(o.data.plot)})}e.jqplot.preInitHooks.push(c);e.jqplot.FunnelTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.FunnelTickRenderer.prototype=new e.jqplot.AxisTickRenderer();e.jqplot.FunnelTickRenderer.prototype.constructor=e.jqplot.FunnelTickRenderer})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.js index 2e8c5da9..e1ef02fb 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,42 +26,42 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]); - + /** * Class: $.jqplot.Highlighter * Plugin which will highlight data points when they are moused over. - * + * * To use this plugin, include the js * file in your source: - * + * * > <script type="text/javascript" src="plugins/jqplot.highlighter.js"></script> - * + * * A tooltip providing information about the data point is enabled by default. * To disable the tooltip, set "showTooltip" to false. - * + * * You can control what data is displayed in the tooltip with various * options. The "tooltipAxes" option controls wether the x, y or both * data values are displayed. - * + * * Some chart types (e.g. hi-low-close) have more than one y value per * data point. To display the additional values in the tooltip, set the * "yvalues" option to the desired number of y values present (3 for a hlc chart). - * + * * By default, data values will be formatted with the same formatting * specifiers as used to format the axis ticks. A custom format code - * can be supplied with the tooltipFormatString option. This will apply - * to all values in the tooltip. - * + * can be supplied with the tooltipFormatString option. This will apply + * to all values in the tooltip. + * * For more complete control, the "formatString" option can be set. This * Allows conplete control over tooltip formatting. Values are passed to * the format string in an order determined by the "tooltipAxes" and "yvalues" - * options. So, if you have a hi-low-close chart and you just want to display + * options. So, if you have a hi-low-close chart and you just want to display * the hi-low-close values in the tooltip, you could set a formatString like: - * + * * > highlighter: { * > tooltipAxes: 'y', * > yvalues: 3, @@ -70,7 +70,7 @@ * > <tr><td>low:</td><td>%s</td></tr> * > <tr><td>close:</td><td>%s</td></tr></table>' * > } - * + * */ $.jqplot.Highlighter = function(options) { // Group: Properties @@ -137,7 +137,7 @@ // indicated by tooltipAxes option. So, you could have a tooltip like: // 'Date: %s, number of cats: %d' to format the whole tooltip at one go. // If useAxesFormatters is true, values will be formatted according to - // Axes formatters and you can populate your tooltip string with + // Axes formatters and you can populate your tooltip string with // %s placeholders. this.formatString = null; // prop: yvalues @@ -156,32 +156,32 @@ $.extend(true, this, options); }; - + var locations = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w']; var locationIndicies = {'nw':0, 'n':1, 'ne':2, 'e':3, 'se':4, 's':5, 'sw':6, 'w':7}; var oppositeLocations = ['se', 's', 'sw', 'w', 'nw', 'n', 'ne', 'e']; - + // axis.renderer.tickrenderer.formatter - + // called with scope of plot $.jqplot.Highlighter.init = function (target, data, opts){ var options = opts || {}; // add a highlighter attribute to the plot this.plugins.highlighter = new $.jqplot.Highlighter(options.highlighter); }; - + // called within scope of series $.jqplot.Highlighter.parseOptions = function (defaults, options) { - // Add a showHighlight option to the series + // Add a showHighlight option to the series // and set it to true by default. this.showHighlight = true; }; - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. $.jqplot.Highlighter.postPlotDraw = function() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.highlighter && this.plugins.highlighter.highlightCanvas) { this.plugins.highlighter.highlightCanvas.resetCanvas(); this.plugins.highlighter.highlightCanvas = null; @@ -193,7 +193,7 @@ } this.plugins.highlighter.highlightCanvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(this.plugins.highlighter.highlightCanvas.createElement(this._gridPadding, 'jqplot-highlight-canvas', this._plotDimensions, this)); this.plugins.highlighter.highlightCanvas.setContext(); @@ -202,14 +202,14 @@ elem = null; this.plugins.highlighter._tooltipElem.addClass('jqplot-highlighter-tooltip'); this.plugins.highlighter._tooltipElem.css({position:'absolute', display:'none'}); - + this.eventCanvas._elem.before(this.plugins.highlighter._tooltipElem); }; - + $.jqplot.preInitHooks.push($.jqplot.Highlighter.init); $.jqplot.preParseSeriesOptionsHooks.push($.jqplot.Highlighter.parseOptions); $.jqplot.postDrawHooks.push($.jqplot.Highlighter.postPlotDraw); - + function draw(plot, neighbor) { var hl = plot.plugins.highlighter; var s = plot.series[neighbor.seriesIndex]; @@ -225,7 +225,7 @@ mr.init(); mr.draw(s.gridData[neighbor.pointIndex][0], s.gridData[neighbor.pointIndex][1], hl.highlightCanvas._ctx); } - + function showTooltip(plot, series, neighbor) { // neighbor looks like: {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]} // gridData should be x,y pixel coords on the grid. @@ -272,7 +272,7 @@ ystrs.unshift(opts.formatString); str = $.jqplot.sprintf.apply($.jqplot.sprintf, ystrs); break; - } + } } else { switch (opts.tooltipAxes) { @@ -302,8 +302,8 @@ str += opts.tooltipSeparator + ystrs[i]; } break; - - } + + } } } else { @@ -324,7 +324,7 @@ } else if (opts.tooltipAxes == 'y') { str = $.jqplot.sprintf(opts.tooltipFormatString, neighbor.data[1]); - } + } } } if ($.isFunction(opts.tooltipContentEditor)) { @@ -336,7 +336,7 @@ var gridpos = {x:neighbor.gridData[0], y:neighbor.gridData[1]}; var ms = 0; var fact = 0.707; - if (series.markerRenderer.show == true) { + if (series.markerRenderer.show == true) { ms = (series.markerRenderer.size + opts.sizeAdjust)/2; } @@ -393,9 +393,9 @@ elem.show(); } elem = null; - + } - + function handleMove(ev, gridpos, datapos, neighbor, plot) { var hl = plot.plugins.highlighter; var c = plot.plugins.cursor; @@ -457,8 +457,8 @@ } if (hl.bringSeriesToFront) { plot.moveSeriesToFront(neighbor.seriesIndex); - } - } + } + } } } } diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.min.js index 42ad7c02..a67ebe3a 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.highlighter.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(d){d.jqplot.eventListenerHooks.push(["jqplotMouseMove",f]);d.jqplot.Highlighter=function(h){this.show=d.jqplot.config.enablePlugins;this.markerRenderer=new d.jqplot.MarkerRenderer({shadow:false});this.showMarker=true;this.lineWidthAdjust=2.5;this.sizeAdjust=5;this.showTooltip=true;this.tooltipLocation="nw";this.fadeTooltip=true;this.tooltipFadeSpeed="fast";this.tooltipOffset=2;this.tooltipAxes="both";this.tooltipSeparator=", ";this.tooltipContentEditor=null;this.useAxesFormatters=true;this.tooltipFormatString="%.5P";this.formatString=null;this.yvalues=1;this.bringSeriesToFront=false;this._tooltipElem;this.isHighlighting=false;this.currentNeighbor=null;d.extend(true,this,h)};var b=["nw","n","ne","e","se","s","sw","w"];var e={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var c=["se","s","sw","w","nw","n","ne","e"];d.jqplot.Highlighter.init=function(k,j,i){var h=i||{};this.plugins.highlighter=new d.jqplot.Highlighter(h.highlighter)};d.jqplot.Highlighter.parseOptions=function(i,h){this.showHighlight=true};d.jqplot.Highlighter.postPlotDraw=function(){if(this.plugins.highlighter&&this.plugins.highlighter.highlightCanvas){this.plugins.highlighter.highlightCanvas.resetCanvas();this.plugins.highlighter.highlightCanvas=null}if(this.plugins.highlighter&&this.plugins.highlighter._tooltipElem){this.plugins.highlighter._tooltipElem.emptyForce();this.plugins.highlighter._tooltipElem=null}this.plugins.highlighter.highlightCanvas=new d.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.highlighter.highlightCanvas.createElement(this._gridPadding,"jqplot-highlight-canvas",this._plotDimensions,this));this.plugins.highlighter.highlightCanvas.setContext();var h=document.createElement("div");this.plugins.highlighter._tooltipElem=d(h);h=null;this.plugins.highlighter._tooltipElem.addClass("jqplot-highlighter-tooltip");this.plugins.highlighter._tooltipElem.css({position:"absolute",display:"none"});this.eventCanvas._elem.before(this.plugins.highlighter._tooltipElem)};d.jqplot.preInitHooks.push(d.jqplot.Highlighter.init);d.jqplot.preParseSeriesOptionsHooks.push(d.jqplot.Highlighter.parseOptions);d.jqplot.postDrawHooks.push(d.jqplot.Highlighter.postPlotDraw);function a(m,o){var j=m.plugins.highlighter;var p=m.series[o.seriesIndex];var h=p.markerRenderer;var i=j.markerRenderer;i.style=h.style;i.lineWidth=h.lineWidth+j.lineWidthAdjust;i.size=h.size+j.sizeAdjust;var l=d.jqplot.getColorComponents(h.color);var n=[l[0],l[1],l[2]];var k=(l[3]>=0.6)?l[3]*0.6:l[3]*(2-l[3]);i.color="rgba("+n[0]+","+n[1]+","+n[2]+","+k+")";i.init();i.draw(p.gridData[o.pointIndex][0],p.gridData[o.pointIndex][1],j.highlightCanvas._ctx)}function g(A,q,m){var k=A.plugins.highlighter;var D=k._tooltipElem;var r=q.highlighter||{};var t=d.extend(true,{},k,r);if(t.useAxesFormatters){var w=q._xaxis._ticks[0].formatter;var h=q._yaxis._ticks[0].formatter;var E=q._xaxis._ticks[0].formatString;var s=q._yaxis._ticks[0].formatString;var z;var u=w(E,m.data[0]);var l=[];for(var B=1;B<t.yvalues+1;B++){l.push(h(s,m.data[B]))}if(typeof t.formatString==="string"){switch(t.tooltipAxes){case"both":case"xy":l.unshift(u);l.unshift(t.formatString);z=d.jqplot.sprintf.apply(d.jqplot.sprintf,l);break;case"yx":l.push(u);l.unshift(t.formatString);z=d.jqplot.sprintf.apply(d.jqplot.sprintf,l);break;case"x":z=d.jqplot.sprintf.apply(d.jqplot.sprintf,[t.formatString,u]);break;case"y":l.unshift(t.formatString);z=d.jqplot.sprintf.apply(d.jqplot.sprintf,l);break;default:l.unshift(u);l.unshift(t.formatString);z=d.jqplot.sprintf.apply(d.jqplot.sprintf,l);break}}else{switch(t.tooltipAxes){case"both":case"xy":z=u;for(var B=0;B<l.length;B++){z+=t.tooltipSeparator+l[B]}break;case"yx":z="";for(var B=0;B<l.length;B++){z+=l[B]+t.tooltipSeparator}z+=u;break;case"x":z=u;break;case"y":z=l.join(t.tooltipSeparator);break;default:z=u;for(var B=0;B<l.length;B++){z+=t.tooltipSeparator+l[B]}break}}}else{var z;if(typeof t.formatString==="string"){z=d.jqplot.sprintf.apply(d.jqplot.sprintf,[t.formatString].concat(m.data))}else{if(t.tooltipAxes=="both"||t.tooltipAxes=="xy"){z=d.jqplot.sprintf(t.tooltipFormatString,m.data[0])+t.tooltipSeparator+d.jqplot.sprintf(t.tooltipFormatString,m.data[1])}else{if(t.tooltipAxes=="yx"){z=d.jqplot.sprintf(t.tooltipFormatString,m.data[1])+t.tooltipSeparator+d.jqplot.sprintf(t.tooltipFormatString,m.data[0])}else{if(t.tooltipAxes=="x"){z=d.jqplot.sprintf(t.tooltipFormatString,m.data[0])}else{if(t.tooltipAxes=="y"){z=d.jqplot.sprintf(t.tooltipFormatString,m.data[1])}}}}}}if(d.isFunction(t.tooltipContentEditor)){z=t.tooltipContentEditor(z,m.seriesIndex,m.pointIndex,A)}D.html(z);var C={x:m.gridData[0],y:m.gridData[1]};var v=0;var j=0.707;if(q.markerRenderer.show==true){v=(q.markerRenderer.size+t.sizeAdjust)/2}var o=b;if(q.fillToZero&&q.fill&&m.data[1]<0){o=c}switch(o[e[t.tooltipLocation]]){case"nw":var p=C.x+A._gridPadding.left-D.outerWidth(true)-t.tooltipOffset-j*v;var n=C.y+A._gridPadding.top-t.tooltipOffset-D.outerHeight(true)-j*v;break;case"n":var p=C.x+A._gridPadding.left-D.outerWidth(true)/2;var n=C.y+A._gridPadding.top-t.tooltipOffset-D.outerHeight(true)-v;break;case"ne":var p=C.x+A._gridPadding.left+t.tooltipOffset+j*v;var n=C.y+A._gridPadding.top-t.tooltipOffset-D.outerHeight(true)-j*v;break;case"e":var p=C.x+A._gridPadding.left+t.tooltipOffset+v;var n=C.y+A._gridPadding.top-D.outerHeight(true)/2;break;case"se":var p=C.x+A._gridPadding.left+t.tooltipOffset+j*v;var n=C.y+A._gridPadding.top+t.tooltipOffset+j*v;break;case"s":var p=C.x+A._gridPadding.left-D.outerWidth(true)/2;var n=C.y+A._gridPadding.top+t.tooltipOffset+v;break;case"sw":var p=C.x+A._gridPadding.left-D.outerWidth(true)-t.tooltipOffset-j*v;var n=C.y+A._gridPadding.top+t.tooltipOffset+j*v;break;case"w":var p=C.x+A._gridPadding.left-D.outerWidth(true)-t.tooltipOffset-v;var n=C.y+A._gridPadding.top-D.outerHeight(true)/2;break;default:var p=C.x+A._gridPadding.left-D.outerWidth(true)-t.tooltipOffset-j*v;var n=C.y+A._gridPadding.top-t.tooltipOffset-D.outerHeight(true)-j*v;break}D.css("left",p);D.css("top",n);if(t.fadeTooltip){D.stop(true,true).fadeIn(t.tooltipFadeSpeed)}else{D.show()}D=null}function f(n,j,i,p,l){var h=l.plugins.highlighter;var m=l.plugins.cursor;if(h.show){if(p==null&&h.isHighlighting){var o=jQuery.Event("jqplotHighlighterUnhighlight");l.target.trigger(o);var q=h.highlightCanvas._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);if(h.fadeTooltip){h._tooltipElem.fadeOut(h.tooltipFadeSpeed)}else{h._tooltipElem.hide()}if(h.bringSeriesToFront){l.restorePreviousSeriesOrder()}h.isHighlighting=false;h.currentNeighbor=null;q=null}else{if(p!=null&&l.series[p.seriesIndex].showHighlight&&!h.isHighlighting){var o=jQuery.Event("jqplotHighlighterHighlight");o.which=n.which;o.pageX=n.pageX;o.pageY=n.pageY;var k=[p.seriesIndex,p.pointIndex,p.data,l];l.target.trigger(o,k);h.isHighlighting=true;h.currentNeighbor=p;if(h.showMarker){a(l,p)}if(h.showTooltip&&(!m||!m._zoom.started)){g(l,l.series[p.seriesIndex],p)}if(h.bringSeriesToFront){l.moveSeriesToFront(p.seriesIndex)}}else{if(p!=null&&h.isHighlighting&&h.currentNeighbor!=p){if(l.series[p.seriesIndex].showHighlight){var q=h.highlightCanvas._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);h.isHighlighting=true;h.currentNeighbor=p;if(h.showMarker){a(l,p)}if(h.showTooltip&&(!m||!m._zoom.started)){g(l,l.series[p.seriesIndex],p)}if(h.bringSeriesToFront){l.moveSeriesToFront(p.seriesIndex)}}}}}}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.js index 46fb942b..c4767b2a 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.js @@ -1,14 +1,14 @@ /* 2010-11-01 Chris Leonello - + Slightly modified version of the original json2.js to put JSON functions under the $.jqplot namespace. - + licensing and orignal comments follow: - + http://www.JSON.org/json2.js 2010-08-25 - + Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. @@ -160,7 +160,7 @@ if (!window.JSON) { $.jqplot.JSON = {}; } - + function f(n) { // Format integers to have at least two digits. return n < 10 ? '0' + n : n; diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.min.js index 7343b559..f6cc1928 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.json2.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function($){$.jqplot.JSON=window.JSON;if(!window.JSON){$.jqplot.JSON={}}function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof $.jqplot.JSON.stringify!=="function"){$.jqplot.JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("$.jqplot.JSON.stringify")}return str("",{"":value})}}if(typeof $.jqplot.JSON.parse!=="function"){$.jqplot.JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("$.jqplot.JSON.parse")}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.js index 8d358ec7..5ab51eae 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,20 +26,20 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** * class: $.jqplot.LogAxisRenderer * A plugin for a jqPlot to render a logarithmic axis. - * + * * To use this renderer, include the plugin in your source * > <script type="text/javascript" language="javascript" src="plugins/jqplot.logAxisRenderer.js"></script> - * + * * and supply the appropriate options to your plot - * + * * > {axes:{xaxis:{renderer:$.jqplot.LogAxisRenderer}}} - **/ + **/ $.jqplot.LogAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); // prop: axisDefaults @@ -57,10 +57,10 @@ tickDistribution :'power' }; }; - + $.jqplot.LogAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.LogAxisRenderer.prototype.constructor = $.jqplot.LogAxisRenderer; - + $.jqplot.LogAxisRenderer.prototype.init = function(options) { // prop: drawBaseline // True to draw the axis baseline. @@ -85,7 +85,7 @@ this.resetDataBounds(); }; - + $.jqplot.LogAxisRenderer.prototype.createTicks = function(plot) { // we're are operating on an axis here var ticks = this._ticks; @@ -128,7 +128,7 @@ t.axis = this.name; this._ticks.push(t); } - + else { t.value = ut; if (!this.showTicks) { @@ -146,19 +146,19 @@ this.min = this._ticks[0].value; this.max = this._ticks[this.numberTicks-1].value; } - + // we don't have any ticks yet, let's make some! else if (this.min == null && this.max == null) { min = db.min * (2 - this.padMin); max = db.max * this.padMax; - + // if min and max are same, space them out a bit if (min == max) { var adj = 0.05; min = min*(1-adj); max = max*(1+adj); } - + // perform some checks if (this.min != null && this.min <= 0) { throw('log axis minimum must be greater than 0'); @@ -200,7 +200,7 @@ this.min = rmin; this.max = rmax; - var range = this.max - this.min; + var range = this.max - this.min; var minorTicks = (this.minorTicks === 'auto') ? 0 : this.minorTicks; var numberTicks; @@ -265,11 +265,11 @@ tt = Math.pow(this.base, i - numberTicks + 1) * this.max; t = new this.tickRenderer(this.tickOptions); - + if (this._overrideFormatString) { t.formatString = this._autoFormatString; } - + if (!this.showTicks) { t.showLabel = false; t.showMark = false; @@ -287,7 +287,7 @@ for (var j=minorTicks-1; j>=0; j--) { val = tt1-interval*(j+1); t = new this.tickRenderer(this.tickOptions); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -301,8 +301,8 @@ t.setTick(val, this.name); this._ticks.push(t); } - } - } + } + } } // min and max are set as would be the case with zooming @@ -325,7 +325,7 @@ for (var i=0; i<nt; i++) { opts.value = this.min + i * ti; t = new this.tickRenderer(opts); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -346,7 +346,7 @@ for (var i=0; i<nt; i++) { opts.value = this.min + i * this.tickInterval; t = new this.tickRenderer(opts); - + if (this._overrideFormatString && this._autoFormatString != '') { t.formatString = this._autoFormatString; } @@ -362,7 +362,7 @@ } } }; - + $.jqplot.LogAxisRenderer.prototype.pack = function(pos, offsets) { var lb = parseInt(this.base, 10); var ticks = this._ticks; @@ -373,25 +373,25 @@ var offmax = offsets.max; var offmin = offsets.min; var lshow = (this._label == null) ? false : this._label.show; - + for (var p in pos) { this._elem.css(p, pos[p]); } - + this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; - + // point to unit and unit to point conversions references to Plot DOM element top left corner. this.p2u = function(p){ return invtrans((p - offmin) * unitlength / pixellength + min); }; - + this.u2p = function(u){ return (trans(u) - min) * pixellength / unitlength + offmin; }; - + if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (trans(u) - min) * pixellength / unitlength; @@ -409,14 +409,14 @@ return invtrans(p * unitlength / pixellength + max); }; } - + if (this.show) { if (this.name == 'xaxis' || this.name == 'x2axis') { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; - + if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { switch (t.labelPosition) { case 'auto': @@ -467,7 +467,7 @@ else { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; - if (t.show && t.showLabel) { + if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { switch (t.labelPosition) { @@ -506,7 +506,7 @@ else { shim = -t.getHeight()/2; } - + var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); @@ -520,10 +520,10 @@ } else { this._label._elem.css('right', '0px'); - } + } this._label.pack(); } } - } + } }; })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.min.js index 6661212e..64dc40eb 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.logAxisRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.LogAxisRenderer=function(){a.jqplot.LinearAxisRenderer.call(this);this.axisDefaults={base:10,tickDistribution:"power"}};a.jqplot.LogAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.LogAxisRenderer.prototype.constructor=a.jqplot.LogAxisRenderer;a.jqplot.LogAxisRenderer.prototype.init=function(b){this.drawBaseline=true;this.minorTicks="auto";this._scalefact=1;a.extend(true,this,b);this._autoFormatString="%d";this._overrideFormatString=false;for(var c in this.renderer.axisDefaults){if(this[c]==null){this[c]=this.renderer.axisDefaults[c]}}this.resetDataBounds()};a.jqplot.LogAxisRenderer.prototype.createTicks=function(d){var G=this._ticks;var w=this.ticks;var s=this.name;var u=this._dataBounds;var b=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var k;var N,v;var m,l;var M,K;var g=30;this._scalefact=(Math.max(b,g+1)-g)/300;if(w.length){for(K=0;K<w.length;K++){var A=w[K];var H=new this.tickRenderer(this.tickOptions);if(A.constructor==Array){H.value=A[0];H.label=A[1];if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}H.setTick(A[0],this.name);this._ticks.push(H)}else{if(a.isPlainObject(A)){a.extend(true,H,A);H.axis=this.name;this._ticks.push(H)}else{H.value=A;if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}H.setTick(A,this.name);this._ticks.push(H)}}}this.numberTicks=w.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value}else{if(this.min==null&&this.max==null){N=u.min*(2-this.padMin);v=u.max*this.padMax;if(N==v){var c=0.05;N=N*(1-c);v=v*(1+c)}if(this.min!=null&&this.min<=0){throw ("log axis minimum must be greater than 0")}if(this.max!=null&&this.max<=0){throw ("log axis maximum must be greater than 0")}function f(j){var i=Math.pow(10,Math.floor(Math.log(j)/Math.LN10));return Math.ceil(j/i)*i}function x(j){var i=Math.pow(10,Math.floor(Math.log(j)/Math.LN10));return Math.floor(j/i)*i}var F,r;F=Math.pow(this.base,Math.floor(Math.log(N)/Math.log(this.base)));r=Math.pow(this.base,Math.ceil(Math.log(v)/Math.log(this.base)));var E=Math.round(Math.log(F)/Math.LN10);if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}this.min=F;this.max=r;var q=this.max-this.min;var C=(this.minorTicks==="auto")?0:this.minorTicks;var h;if(this.numberTicks==null){if(b>140){h=Math.round(Math.log(this.max/this.min)/Math.log(this.base)+1);if(h<2){h=2}if(C===0){var o=b/(h-1);if(o<100){C=0}else{if(o<190){C=1}else{if(o<250){C=3}else{if(o<600){C=4}else{C=9}}}}}}else{h=2;if(C===0){C=1}C=0}}else{h=this.numberTicks}if(E>=0&&C!==3){this._autoFormatString="%d"}else{if(E<=0&&C===3){var o=-(E-1);this._autoFormatString="%."+Math.abs(E-1)+"f"}else{if(E<0){var o=-E;this._autoFormatString="%."+Math.abs(E)+"f"}else{this._autoFormatString="%d"}}}var O,H,z,p,n,k;for(var K=0;K<h;K++){M=Math.pow(this.base,K-h+1)*this.max;H=new this.tickRenderer(this.tickOptions);if(this._overrideFormatString){H.formatString=this._autoFormatString}if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}H.setTick(M,this.name);this._ticks.push(H);if(C&&K<h-1){p=Math.pow(this.base,K-h+2)*this.max;n=p-M;k=p/(C+1);for(var J=C-1;J>=0;J--){z=p-k*(J+1);H=new this.tickRenderer(this.tickOptions);if(this._overrideFormatString&&this._autoFormatString!=""){H.formatString=this._autoFormatString}if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}H.setTick(z,this.name);this._ticks.push(H)}}}}else{if(this.min!=null&&this.max!=null){var y=a.extend(true,{},this.tickOptions,{name:this.name,value:null});var I,e;if(this.numberTicks==null&&this.tickInterval==null){var D=Math.max(b,g+1);var L=Math.ceil((D-g)/35+1);var B=a.jqplot.LinearTickGenerator.bestConstrainedInterval(this.min,this.max,L);this._autoFormatString=B[3];I=B[2];e=B[4];for(var K=0;K<I;K++){y.value=this.min+K*e;H=new this.tickRenderer(y);if(this._overrideFormatString&&this._autoFormatString!=""){H.formatString=this._autoFormatString}if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}this._ticks.push(H)}}else{if(this.numberTicks!=null&&this.tickInterval!=null){I=this.numberTicks;for(var K=0;K<I;K++){y.value=this.min+K*this.tickInterval;H=new this.tickRenderer(y);if(this._overrideFormatString&&this._autoFormatString!=""){H.formatString=this._autoFormatString}if(!this.showTicks){H.showLabel=false;H.showMark=false}else{if(!this.showTickMarks){H.showMark=false}}this._ticks.push(H)}}}}}}};a.jqplot.LogAxisRenderer.prototype.pack=function(f,e){var r=parseInt(this.base,10);var y=this._ticks;var d=function(h){return Math.log(h)/Math.log(r)};var b=function(h){return Math.pow(Math.E,(Math.log(r)*h))};var u=d(this.max);var s=d(this.min);var m=e.max;var k=e.min;var o=(this._label==null)?false:this._label.show;for(var q in f){this._elem.css(q,f[q])}this._offsets=e;var g=m-k;var j=u-s;this.p2u=function(h){return b((h-k)*j/g+s)};this.u2p=function(h){return(d(h)-s)*g/j+k};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(d(h)-s)*g/j};this.series_p2u=function(h){return b(h*j/g+s)}}else{this.series_u2p=function(h){return(d(h)-u)*g/j};this.series_p2u=function(h){return b(h*j/g+u)}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var v=0;v<y.length;v++){var n=y[v];if(n.show&&n.showLabel){var c;if(n.constructor==a.jqplot.CanvasAxisTickRenderer&&n.angle){switch(n.labelPosition){case"auto":if(n.angle<0){c=-n.getWidth()+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2}else{c=-n._textRenderer.height*Math.sin(n._textRenderer.angle)/2}break;case"end":c=-n.getWidth()+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break;case"start":c=-n._textRenderer.height*Math.sin(n._textRenderer.angle)/2;break;case"middle":c=-n.getWidth()/2+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break;default:c=-n.getWidth()/2+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break}}else{c=-n.getWidth()/2}var z=this.u2p(n.value)+c+"px";n._elem.css("left",z);n.pack()}}if(o){var l=this._label._elem.outerWidth(true);this._label._elem.css("left",k+g/2-l/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var v=0;v<y.length;v++){var n=y[v];if(n.show&&n.showLabel){var c;if(n.constructor==a.jqplot.CanvasAxisTickRenderer&&n.angle){switch(n.labelPosition){case"auto":case"end":if(n.angle<0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"start":if(n.angle>0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"middle":c=-n.getHeight()/2;break;default:c=-n.getHeight()/2;break}}else{c=-n.getHeight()/2}var z=this.u2p(n.value)+c+"px";n._elem.css("top",z);n.pack()}}if(o){var x=this._label._elem.outerHeight(true);this._label._elem.css("top",m-g/2-x/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.js index 694de41d..74297685 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { // class: $.jqplot.MekkoAxisRenderer @@ -36,12 +36,12 @@ // for each series scaled to the sum of all the y values. $.jqplot.MekkoAxisRenderer = function() { }; - + // called with scope of axis object. $.jqplot.MekkoAxisRenderer.prototype.init = function(options){ // prop: tickMode // How to space the ticks on the axis. - // 'bar' will place a tick at the width of each bar. + // 'bar' will place a tick at the width of each bar. // This is the default for the x axis. // 'even' will place ticks at even intervals. This is // the default for x2 axis and y axis. y axis cannot be changed. @@ -82,7 +82,7 @@ } } }; - + // called with scope of axis $.jqplot.MekkoAxisRenderer.prototype.draw = function(ctx, plot) { if (this.show) { @@ -95,20 +95,20 @@ // position it and the labels correctly on the plot. var dim=0; var temp; - + var elem = document.createElement('div'); this._elem = $(elem); this._elem.addClass('jqplot-axis jqplot-'+this.name); this._elem.css('position', 'absolute'); elem = null; - + if (this.name == 'xaxis' || this.name == 'x2axis') { this._elem.width(this._plotDimensions.width); } else { this._elem.height(this._plotDimensions.height); } - + // draw the axis label // create a _label object. this.labelOptions.axis = this.name; @@ -116,7 +116,7 @@ if (this._label.show) { this._elem.append(this._label.draw(ctx)); } - + var t, tick, elem; if (this.showTicks) { t = this._ticks; @@ -127,7 +127,7 @@ } } } - + // draw the series labels for (i=0; i<this.barLabels.length; i++) { this.barLabelOptions.axis = this.name; @@ -143,13 +143,13 @@ elem.addClass('jqplot-mekko-barLabel'); elem.appendTo(this._elem); elem = null; - } + } } - + } return this._elem; }; - + // called with scope of an axis $.jqplot.MekkoAxisRenderer.prototype.reset = function() { this.min = this._min; @@ -158,9 +158,9 @@ this.numberTicks = this._numberTicks; // this._ticks = this.__ticks; }; - + // called with scope of axis - $.jqplot.MekkoAxisRenderer.prototype.set = function() { + $.jqplot.MekkoAxisRenderer.prototype.set = function() { var dim = 0; var temp; var w = 0; @@ -182,10 +182,10 @@ } } } - + if (lshow) { w = this._label._elem.outerWidth(true); - h = this._label._elem.outerHeight(true); + h = this._label._elem.outerHeight(true); } if (this.name == 'xaxis') { dim = dim + h; @@ -209,9 +209,9 @@ this._label._elem.css('width', w+'px'); } } - } - }; - + } + }; + // called with scope of axis $.jqplot.MekkoAxisRenderer.prototype.createTicks = function() { // we're are operating on an axis here @@ -224,10 +224,10 @@ var min, max; var pos1, pos2; var t, tt, i, j; - + // if we already have ticks, use them. // ticks must be in order of increasing value. - + if (userTicks.length) { // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed for (i=0; i<userTicks.length; i++){ @@ -246,7 +246,7 @@ t.setTick(ut[0], this.name); this._ticks.push(t); } - + else { t.value = ut; if (!this.showTicks) { @@ -265,7 +265,7 @@ this.max = this._ticks[this.numberTicks-1].value; this.tickInterval = (this.max - this.min) / (this.numberTicks - 1); } - + // we don't have any ticks yet, let's make some! else { if (name == 'xaxis' || name == 'x2axis') { @@ -274,15 +274,15 @@ else { dim = this._plotDimensions.height; } - + // if min, max and number of ticks specified, user can't specify interval. if (this.min != null && this.max != null && this.numberTicks != null) { this.tickInterval = null; } - + min = (this.min != null) ? this.min : db.min; max = (this.max != null) ? this.max : db.max; - + // if min and max are same, space them out a bit.+ if (min == max) { var adj = 0.05; @@ -297,11 +297,11 @@ var rmin, rmax; var temp, prev, curr; var ynumticks = [3,5,6,11,21]; - + // yaxis divide ticks in nice intervals from 0 to 1. - if (this.name == 'yaxis' || this.name == 'y2axis') { + if (this.name == 'yaxis' || this.name == 'y2axis') { this.min = 0; - this.max = 100; + this.max = 100; // user didn't specify number of ticks. if (!this.numberTicks){ if (this.tickInterval) { @@ -337,7 +337,7 @@ this.tickInterval = range / (this.numberTicks - 1); } } - + // user did specify number of ticks. else { this.tickInterval = range / (this.numberTicks - 1); @@ -358,7 +358,7 @@ this._ticks.push(t); } } - + // for x axes, have number ot ticks equal to number of series and ticks placed // at sum of y values for each series. else if (this.tickMode == 'bar') { @@ -374,7 +374,7 @@ } t.setTick(0, this.name); this._ticks.push(t); - + temp = 0; for (i=1; i<this.numberTicks; i++){ @@ -391,7 +391,7 @@ this._ticks.push(t); } this.max = this.max || temp; - + // if user specified a max and it is greater than sum, add a tick if (this.max > temp) { t = new this.tickRenderer(this.tickOptions); @@ -404,10 +404,10 @@ } t.setTick(this.max, this.name); this._ticks.push(t); - + } } - + else if (this.tickMode == 'even') { this.min = 0; this.max = this.max || db.max; @@ -431,11 +431,11 @@ t.setTick(tt, this.name); this._ticks.push(t); } - + } } }; - + // called with scope of axis $.jqplot.MekkoAxisRenderer.prototype.pack = function(pos, offsets) { var ticks = this._ticks; @@ -444,25 +444,25 @@ var offmax = offsets.max; var offmin = offsets.min; var lshow = (this._label == null) ? false : this._label.show; - + for (var p in pos) { this._elem.css(p, pos[p]); } - + this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; - + // point to unit and unit to point conversions references to Plot DOM element top left corner. this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + this.u2p = function(u){ return (u - min) * pixellength / unitlength + offmin; }; - + if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (u - min) * pixellength / unitlength; @@ -471,7 +471,7 @@ return p * unitlength / pixellength + min; }; } - + else { this.series_u2p = function(u){ return (u - max) * pixellength / unitlength; @@ -480,14 +480,14 @@ return p * unitlength / pixellength + max; }; } - + if (this.show) { if (this.name == 'xaxis' || this.name == 'x2axis') { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; - + if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. var temp = (this.name == 'xaxis') ? 1 : -1; @@ -553,7 +553,7 @@ else { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; - if (t.show && t.showLabel) { + if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. @@ -588,7 +588,7 @@ else { shim = -t.getHeight()/2; } - + var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); @@ -602,7 +602,7 @@ } else { this._label._elem.css('right', '0px'); - } + } this._label.pack(); } } diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js index 6be9164e..c3bb45bd 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.MekkoAxisRenderer=function(){};a.jqplot.MekkoAxisRenderer.prototype.init=function(c){this.tickMode;this.barLabelRenderer=a.jqplot.AxisLabelRenderer;this.barLabels=this.barLabels||[];this.barLabelOptions={};this.tickOptions=a.extend(true,{showGridline:false},this.tickOptions);this._barLabels=[];a.extend(true,this,c);if(this.name=="yaxis"){this.tickOptions.formatString=this.tickOptions.formatString||"%d%"}var b=this._dataBounds;b.min=0;if(this.name=="yaxis"||this.name=="y2axis"){b.max=100;this.tickMode="even"}else{if(this.name=="xaxis"){this.tickMode=(this.tickMode==null)?"bar":this.tickMode;for(var d=0;d<this._series.length;d++){b.max+=this._series[d]._sumy}}else{if(this.name=="x2axis"){this.tickMode=(this.tickMode==null)?"even":this.tickMode;for(var d=0;d<this._series.length;d++){b.max+=this._series[d]._sumy}}}}};a.jqplot.MekkoAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this);var h=0;var c;var g=document.createElement("div");this._elem=a(g);this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");g=null;if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){this._elem.append(this._label.draw(b))}var f,e,g;if(this.showTicks){f=this._ticks;for(var d=0;d<f.length;d++){e=f[d];if(e.showLabel&&(!e.isMinorTick||this.showMinorTicks)){this._elem.append(e.draw(b))}}}for(d=0;d<this.barLabels.length;d++){this.barLabelOptions.axis=this.name;this.barLabelOptions.label=this.barLabels[d];this._barLabels.push(new this.barLabelRenderer(this.barLabelOptions));if(this.tickMode!="bar"){this._barLabels[d].show=false}if(this._barLabels[d].show){var g=this._barLabels[d].draw(b,j);g.removeClass("jqplot-"+this.name+"-label");g.addClass("jqplot-"+this.name+"-tick");g.addClass("jqplot-mekko-barLabel");g.appendTo(this._elem);g=null}}}return this._elem};a.jqplot.MekkoAxisRenderer.prototype.reset=function(){this.min=this._min;this.max=this._max;this.tickInterval=this._tickInterval;this.numberTicks=this._numberTicks};a.jqplot.MekkoAxisRenderer.prototype.set=function(){var k=0;var d;var c=0;var j=0;var b=(this._label==null)?false:this._label.show;if(this.show&&this.showTicks){var g=this._ticks;for(var f=0;f<g.length;f++){var e=g[f];if(e.showLabel&&(!e.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){d=e._elem.outerHeight(true)}else{d=e._elem.outerWidth(true)}if(d>k){k=d}}}if(b){c=this._label._elem.outerWidth(true);j=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){k=k+j;this._elem.css({height:k+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){k=k+j;this._elem.css({height:k+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){k=k+c;this._elem.css({width:k+"px",left:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}else{k=k+c;this._elem.css({width:k+"px",right:"0px",top:"0px"});if(b&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",c+"px")}}}}}};a.jqplot.MekkoAxisRenderer.prototype.createTicks=function(){var z=this._ticks;var w=this.ticks;var B=this.name;var y=this._dataBounds;var p,x;var n,r;var d,c;var h,b,s,q;if(w.length){for(s=0;s<w.length;s++){var e=w[s];var h=new this.tickRenderer(this.tickOptions);if(e.constructor==Array){h.value=e[0];h.label=e[1];if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(e[0],this.name);this._ticks.push(h)}else{h.value=e;if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(e,this.name);this._ticks.push(h)}}this.numberTicks=w.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(B=="xaxis"||B=="x2axis"){p=this._plotDimensions.width}else{p=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}n=(this.min!=null)?this.min:y.min;r=(this.max!=null)?this.max:y.max;if(n==r){var g=0.05;if(n>0){g=Math.max(Math.log(n)/Math.LN10,0.05)}n-=g;r+=g}var k=r-n;var m,o;var v,l,u;var f=[3,5,6,11,21];if(this.name=="yaxis"||this.name=="y2axis"){this.min=0;this.max=100;if(!this.numberTicks){if(this.tickInterval){this.numberTicks=3+Math.ceil(k/this.tickInterval)}else{v=2+Math.ceil((p-(this.tickSpacing-1))/this.tickSpacing);for(s=0;s<f.length;s++){u=v/f[s];if(u==1){this.numberTicks=f[s];break}else{if(u>1){l=u;continue}else{if(u<1){if(Math.abs(l-1)<Math.abs(u-1)){this.numberTicks=f[s-1];break}else{this.numberTicks=f[s];break}}else{if(s==f.length-1){this.numberTicks=f[s]}}}}}this.tickInterval=k/(this.numberTicks-1)}}else{this.tickInterval=k/(this.numberTicks-1)}for(var s=0;s<this.numberTicks;s++){b=this.min+s*this.tickInterval;h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(b,this.name);this._ticks.push(h)}}else{if(this.tickMode=="bar"){this.min=0;this.numberTicks=this._series.length+1;h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(0,this.name);this._ticks.push(h);v=0;for(s=1;s<this.numberTicks;s++){v+=this._series[s-1]._sumy;h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(v,this.name);this._ticks.push(h)}this.max=this.max||v;if(this.max>v){h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(this.max,this.name);this._ticks.push(h)}}else{if(this.tickMode=="even"){this.min=0;this.max=this.max||y.max;var A=2+Math.ceil((p-(this.tickSpacing-1))/this.tickSpacing);k=this.max-this.min;this.numberTicks=A;this.tickInterval=k/(this.numberTicks-1);for(s=0;s<this.numberTicks;s++){b=this.min+s*this.tickInterval;h=new this.tickRenderer(this.tickOptions);if(!this.showTicks){h.showLabel=false;h.showMark=false}else{if(!this.showTickMarks){h.showMark=false}}h.setTick(b,this.name);this._ticks.push(h)}}}}}};a.jqplot.MekkoAxisRenderer.prototype.pack=function(e,d){var C=this._ticks;var x=this.max;var v=this.min;var m=d.max;var j=d.min;var o=(this._label==null)?false:this._label.show;for(var s in e){this._elem.css(s,e[s])}this._offsets=d;var f=m-j;var g=x-v;this.p2u=function(b){return(b-j)*g/f+v};this.u2p=function(b){return(b-v)*f/g+j};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(b){return(b-v)*f/g};this.series_p2u=function(b){return b*g/f+v}}else{this.series_u2p=function(b){return(b-x)*f/g};this.series_p2u=function(b){return b*g/f+x}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var y=0;y<C.length;y++){var n=C[y];if(n.show&&n.showLabel){var c;if(n.constructor==a.jqplot.CanvasAxisTickRenderer&&n.angle){var A=(this.name=="xaxis")?1:-1;switch(n.labelPosition){case"auto":if(A*n.angle<0){c=-n.getWidth()+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2}else{c=-n._textRenderer.height*Math.sin(n._textRenderer.angle)/2}break;case"end":c=-n.getWidth()+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break;case"start":c=-n._textRenderer.height*Math.sin(n._textRenderer.angle)/2;break;case"middle":c=-n.getWidth()/2+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break;default:c=-n.getWidth()/2+n._textRenderer.height*Math.sin(-n._textRenderer.angle)/2;break}}else{c=-n.getWidth()/2}var D=this.u2p(n.value)+c+"px";n._elem.css("left",D);n.pack()}}var k;if(o){k=this._label._elem.outerWidth(true);this._label._elem.css("left",j+f/2-k/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}var B,u,q;for(var y=0;y<this.barLabels.length;y++){B=this._barLabels[y];if(B.show){k=B.getWidth();u=this._ticks[y].getLeft()+this._ticks[y].getWidth();q=this._ticks[y+1].getLeft();B._elem.css("left",(q+u-k)/2+"px");B._elem.css("top",this._ticks[y]._elem.css("top"));B.pack()}}}else{for(var y=0;y<C.length;y++){var n=C[y];if(n.show&&n.showLabel){var c;if(n.constructor==a.jqplot.CanvasAxisTickRenderer&&n.angle){var A=(this.name=="yaxis")?1:-1;switch(n.labelPosition){case"auto":case"end":if(A*n.angle<0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"start":if(n.angle>0){c=-n._textRenderer.height*Math.cos(-n._textRenderer.angle)/2}else{c=-n.getHeight()+n._textRenderer.height*Math.cos(n._textRenderer.angle)/2}break;case"middle":c=-n.getHeight()/2;break;default:c=-n.getHeight()/2;break}}else{c=-n.getHeight()/2}var D=this.u2p(n.value)+c+"px";n._elem.css("top",D);n.pack()}}if(o){var z=this._label._elem.outerHeight(true);this._label._elem.css("top",m-f/2-z/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.js index 893e2b98..85d661d0 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -35,24 +35,24 @@ * the <$.jqplot.MekkoAxisRenderer> should be used with mekko charts. The mekko renderer * overrides the default legend renderer with it's own $.jqplot.MekkoLegendRenderer * which allows more flexibility to specify number of rows and columns in the legend. - * - * Data is specified per bar in the chart. You can specify data as an array of y values, or as - * an array of [label, value] pairs. Note that labels are used only on the first series. + * + * Data is specified per bar in the chart. You can specify data as an array of y values, or as + * an array of [label, value] pairs. Note that labels are used only on the first series. * Labels on subsequent series are ignored: - * + * * > bar1 = [['shirts', 8],['hats', 14],['shoes', 6],['gloves', 16],['dolls', 12]]; * > bar2 = [15,6,9,13,6]; * > bar3 = [['grumpy',4],['sneezy',2],['happy',7],['sleepy',9],['doc',7]]; - * - * If you want to place labels for each bar under the axis, you use the barLabels option on + * + * If you want to place labels for each bar under the axis, you use the barLabels option on * the axes. The bar labels can be styled with the ".jqplot-mekko-barLabel" css class. - * + * * > barLabels = ['Mickey Mouse', 'Donald Duck', 'Goofy']; * > axes:{xaxis:{barLabels:barLabels}} - * + * */ - - + + $.jqplot.MekkoRenderer = function(){ this.shapeRenderer = new $.jqplot.ShapeRenderer(); // prop: borderColor @@ -63,7 +63,7 @@ // False will draw borders lines with the same color as the area. this.showBorders = true; }; - + // called with scope of series. $.jqplot.MekkoRenderer.prototype.init = function(options, plot) { this.fill = false; @@ -80,7 +80,7 @@ plot.axes.x2axis._series.push(this); this._type = 'mekko'; }; - + // Method: setGridData // converts the user data values to grid coordinates and stores them // in the gridData array. Will convert user data into appropriate @@ -111,7 +111,7 @@ } } }; - + // Method: makeGridData // converts any arbitrary data values to grid coordinates and // returns them. This method exists so that plugins can use a series' @@ -137,7 +137,7 @@ } return gd; }; - + // called within scope of series. $.jqplot.MekkoRenderer.prototype.draw = function(ctx, gd, options) { @@ -160,25 +160,25 @@ } } } - + ctx.restore(); - }; - + }; + $.jqplot.MekkoRenderer.prototype.drawShadow = function(ctx, gd, options) { // This is a no-op, no shadows on mekko charts. }; - + /** * Class: $.jqplot.MekkoLegendRenderer - * Legend renderer used by mekko charts with options for + * Legend renderer used by mekko charts with options for * controlling number or rows and columns as well as placement * outside of plot area. - * + * */ $.jqplot.MekkoLegendRenderer = function(){ // }; - + $.jqplot.MekkoLegendRenderer.prototype.init = function(options) { // prop: numberRows // Maximum number of rows in the legend. 0 or null for unlimited. @@ -190,7 +190,7 @@ this.placement = "outside"; $.extend(true, this, options); }; - + // called with scope of legend $.jqplot.MekkoLegendRenderer.prototype.draw = function() { var legend = this; @@ -205,13 +205,13 @@ this._elem = $('<table class="jqplot-table-legend" style="'+ss+'"></table>'); // Mekko charts legends don't go by number of series, but by number of data points // in the series. Refactor things here for that. - - var pad = false, + + var pad = false, reverse = true, // mekko charts are always stacked, so reverse nr, nc; var s = series[0]; var colorGenerator = new $.jqplot.ColorGenerator(s.seriesColors); - + if (s.show) { var pd = s.data; if (this.numberRows) { @@ -231,10 +231,10 @@ nr = pd.length; nc = 1; } - + var i, j, tr, td1, td2, lt, rs, color; - var idx = 0; - + var idx = 0; + for (i=0; i<nr; i++) { if (reverse){ tr = $('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem); @@ -263,7 +263,7 @@ } } rs = (pad) ? this.rowSpacing : '0'; - + td1 = $('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+rs+';">'+ '<div><div class="jqplot-table-legend-swatch" style="border-color:'+color+';"></div>'+ '</div></td>'); @@ -285,7 +285,7 @@ pad = true; } idx++; - } + } } tr = null; @@ -295,11 +295,11 @@ } return this._elem; }; - + $.jqplot.MekkoLegendRenderer.prototype.pack = function(offsets) { if (this.show) { // fake a grid for positioning - var grid = {_top:offsets.top, _left:offsets.left, _right:offsets.right, _bottom:this._plotDimensions.height - offsets.bottom}; + var grid = {_top:offsets.top, _left:offsets.left, _right:offsets.right, _bottom:this._plotDimensions.height - offsets.bottom}; if (this.placement == 'insideGrid') { switch (this.location) { case 'nw': @@ -350,7 +350,7 @@ this._elem.css({right:a, bottom:b}); break; } - + } else { switch (this.location) { @@ -403,9 +403,9 @@ break; } } - } + } }; - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -424,14 +424,14 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.MekkoAxisRenderer; options.legend.renderer = $.jqplot.MekkoLegendRenderer; options.legend.preDraw = true; } } - + $.jqplot.preInitHooks.push(preInit); - -})(jQuery); \ No newline at end of file + +})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.min.js index f7e36817..b9131d2c 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mekkoRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(b){b.jqplot.MekkoRenderer=function(){this.shapeRenderer=new b.jqplot.ShapeRenderer();this.borderColor=null;this.showBorders=true};b.jqplot.MekkoRenderer.prototype.init=function(c,e){this.fill=false;this.fillRect=true;this.strokeRect=true;this.shadow=false;this._xwidth=0;this._xstart=0;b.extend(true,this.renderer,c);var d={lineJoin:"miter",lineCap:"butt",isarc:false,fillRect:this.fillRect,strokeRect:this.strokeRect};this.renderer.shapeRenderer.init(d);e.axes.x2axis._series.push(this);this._type="mekko"};b.jqplot.MekkoRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var c=this._yaxis.series_u2p;var g=this._plotData;this.gridData=[];this._xwidth=e(this._sumy)-e(0);if(this.index>0){this._xstart=h.series[this.index-1]._xstart+h.series[this.index-1]._xwidth}var l=this.canvas.getHeight();var d=0;var k;var j;for(var f=0;f<g.length;f++){if(g[f]!=null){d+=g[f][1];k=l-(d/this._sumy*l);j=g[f][1]/this._sumy*l;this.gridData.push([this._xstart,k,this._xwidth,j])}}};b.jqplot.MekkoRenderer.prototype.makeGridData=function(f,g){var d=this._xaxis.series_u2p;var l=this.canvas.getHeight();var c=0;var j;var h;var k=[];for(var e=0;e<f.length;e++){if(f[e]!=null){c+=f[e][1];j=l-(c/this._sumy*l);h=f[e][1]/this._sumy*l;k.push([this._xstart,j,this._xwidth,h])}}return k};b.jqplot.MekkoRenderer.prototype.draw=function(c,h,d){var e;var g=(d!=undefined)?d:{};var f=(g.showLine!=undefined)?g.showLine:this.showLine;var j=new b.jqplot.ColorGenerator(this.seriesColors);c.save();if(h.length){if(f){for(e=0;e<h.length;e++){g.fillStyle=j.next();if(this.renderer.showBorders){g.strokeStyle=this.renderer.borderColor}else{g.strokeStyle=g.fillStyle}this.renderer.shapeRenderer.draw(c,h[e],g)}}}c.restore()};b.jqplot.MekkoRenderer.prototype.drawShadow=function(c,e,d){};b.jqplot.MekkoLegendRenderer=function(){};b.jqplot.MekkoLegendRenderer.prototype.init=function(c){this.numberRows=null;this.numberColumns=null;this.placement="outside";b.extend(true,this,c)};b.jqplot.MekkoLegendRenderer.prototype.draw=function(){var f=this;if(this.show){var o=this._series;var r="position:absolute;";r+=(this.background)?"background:"+this.background+";":"";r+=(this.border)?"border:"+this.border+";":"";r+=(this.fontSize)?"font-size:"+this.fontSize+";":"";r+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";r+=(this.textColor)?"color:"+this.textColor+";":"";this._elem=b('<table class="jqplot-table-legend" style="'+r+'"></table>');var w=false,n=true,c,l;var p=o[0];var d=new b.jqplot.ColorGenerator(p.seriesColors);if(p.show){var x=p.data;if(this.numberRows){c=this.numberRows;if(!this.numberColumns){l=Math.ceil(x.length/c)}else{l=this.numberColumns}}else{if(this.numberColumns){l=this.numberColumns;c=Math.ceil(x.length/this.numberColumns)}else{c=x.length;l=1}}var v,u,e,h,g,k,m,t;var q=0;for(v=0;v<c;v++){if(n){e=b('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem)}else{e=b('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem)}for(u=0;u<l;u++){if(q<x.length){k=this.labels[q]||x[q][0].toString();t=d.next();if(!n){if(v>0){w=true}else{w=false}}else{if(v==c-1){w=false}else{w=true}}m=(w)?this.rowSpacing:"0";h=b('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+m+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+t+';"></div></div></td>');g=b('<td class="jqplot-table-legend" style="padding-top:'+m+';"></td>');if(this.escapeHtml){g.text(k)}else{g.html(k)}if(n){g.prependTo(e);h.prependTo(e)}else{h.appendTo(e);g.appendTo(e)}w=true}q++}}e=null;h=null;g=null}}return this._elem};b.jqplot.MekkoLegendRenderer.prototype.pack=function(f){if(this.show){var e={_top:f.top,_left:f.left,_right:f.right,_bottom:this._plotDimensions.height-f.bottom};if(this.placement=="insideGrid"){switch(this.location){case"nw":var d=e._left+this.xoffset;var c=e._top+this.yoffset;this._elem.css("left",d);this._elem.css("top",c);break;case"n":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=e._top+this.yoffset;this._elem.css("left",d);this._elem.css("top",c);break;case"ne":var d=f.right+this.xoffset;var c=e._top+this.yoffset;this._elem.css({right:d,top:c});break;case"e":var d=f.right+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;case"se":var d=f.right+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({right:d,bottom:c});break;case"s":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"sw":var d=e._left+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"w":var d=e._left+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({left:d,top:c});break;default:var d=e._right-this.xoffset;var c=e._bottom+this.yoffset;this._elem.css({right:d,bottom:c});break}}else{switch(this.location){case"nw":var d=this._plotDimensions.width-e._left+this.xoffset;var c=e._top+this.yoffset;this._elem.css("right",d);this._elem.css("top",c);break;case"n":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-e._top+this.yoffset;this._elem.css("left",d);this._elem.css("bottom",c);break;case"ne":var d=this._plotDimensions.width-f.right+this.xoffset;var c=e._top+this.yoffset;this._elem.css({left:d,top:c});break;case"e":var d=this._plotDimensions.width-f.right+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({left:d,top:c});break;case"se":var d=this._plotDimensions.width-f.right+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({left:d,bottom:c});break;case"s":var d=(f.left+(this._plotDimensions.width-f.right))/2-this.getWidth()/2;var c=this._plotDimensions.height-f.bottom+this.yoffset;this._elem.css({left:d,top:c});break;case"sw":var d=this._plotDimensions.width-e._left+this.xoffset;var c=f.bottom+this.yoffset;this._elem.css({right:d,bottom:c});break;case"w":var d=this._plotDimensions.width-e._left+this.xoffset;var c=(f.top+(this._plotDimensions.height-f.bottom))/2-this.getHeight()/2;this._elem.css({right:d,top:c});break;default:var d=e._right-this.xoffset;var c=e._bottom+this.yoffset;this._elem.css({right:d,bottom:c});break}}}};function a(g,f,d){d=d||{};d.axesDefaults=d.axesDefaults||{};d.legend=d.legend||{};d.seriesDefaults=d.seriesDefaults||{};var c=false;if(d.seriesDefaults.renderer==b.jqplot.MekkoRenderer){c=true}else{if(d.series){for(var e=0;e<d.series.length;e++){if(d.series[e].renderer==b.jqplot.MekkoRenderer){c=true}}}}if(c){d.axesDefaults.renderer=b.jqplot.MekkoAxisRenderer;d.legend.renderer=b.jqplot.MekkoLegendRenderer;d.legend.preDraw=true}}b.jqplot.preInitHooks.push(a)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.js index 10a40949..43a4c10f 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,23 +26,23 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** * Class: $.jqplot.MeterGaugeRenderer * Plugin renderer to draw a meter gauge chart. - * + * * Data consists of a single series with 1 data point to position the gauge needle. - * - * To use this renderer, you need to include the + * + * To use this renderer, you need to include the * meter gauge renderer plugin, for example: - * + * * > <script type="text/javascript" src="plugins/jqplot.meterGaugeRenderer.js"></script> - * + * * Properties described here are passed into the $.jqplot function * as options on the series renderer. For example: - * + * * > plot0 = $.jqplot('chart0',[[18]],{ * > title: 'Network Speed', * > seriesDefaults: { @@ -52,16 +52,16 @@ * > } * > } * > }); - * + * * A meterGauge plot does not support events. */ $.jqplot.MeterGaugeRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.MeterGaugeRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.MeterGaugeRenderer.prototype.constructor = $.jqplot.MeterGaugeRenderer; - + // called with scope of a series $.jqplot.MeterGaugeRenderer.prototype.init = function(options) { // Group: Properties @@ -74,14 +74,14 @@ // calculated by default. this.padding = null; // prop: shadowOffset - // offset of the shadow from the gauge ring and offset of + // offset of the shadow from the gauge ring and offset of // each succesive stroke of the shadow from the last. this.shadowOffset = 2; // prop: shadowAlpha // transparency of the shadow (0 = transparent, 1 = opaque) this.shadowAlpha = 0.07; // prop: shadowDepth - // number of strokes to apply to the shadow, + // number of strokes to apply to the shadow, // each stroke offset shadowOffset from the last. this.shadowDepth = 4; // prop: background @@ -141,7 +141,7 @@ // ticks spaced every 1, 2, 2.5, 5, 10, 20, .1, .2, .25, .5, etc. this.tickPositions = [1, 2, 2.5, 5, 10]; // prop: tickSpacing - // Degrees between ticks. This is a target number, if + // Degrees between ticks. This is a target number, if // incompatible span and ticks are supplied, a suitable // spacing close to this value will be computed. this.tickSpacing = 30; @@ -165,12 +165,12 @@ // as if the meter is "pegged". this.pegNeedle = true; this._type = 'meterGauge'; - + $.extend(true, this, options); this.type = null; this.numberTicks = null; this.tickInterval = null; - // span, the sweep (in degrees) from min to max. This gauge is + // span, the sweep (in degrees) from min to max. This gauge is // a semi-circle. this.span = 180; // get rid of this nonsense @@ -187,14 +187,14 @@ this._tickPoints = []; // reference to label element. this._labelElem = null; - + // start the gauge at the beginning of the span this.startAngle = (90 + (360 - this.span)/2) * Math.PI/180; this.endAngle = (90 - (360 - this.span)/2) * Math.PI/180; - + this.setmin = !!(this.min == null); this.setmax = !!(this.max == null); - + // if given intervals and is an array of values, create labels and colors. if (this.intervals.length) { if (this.intervals[0].length == null || this.intervals.length == 1) { @@ -208,7 +208,7 @@ } } } - + // compute min, max and ticks if not supplied: if (this.ticks.length) { if (this.ticks[0].length == null || this.ticks[0].length == 1) { @@ -232,7 +232,7 @@ this.numberMinorTicks = 1; } } - + else if (this.intervals.length) { this.min = (this.min == null) ? 0 : this.min; this.setmin = false; @@ -246,7 +246,7 @@ this.setmax = false; } } - + else { // no ticks and no intervals supplied, put needle in middle this.min = (this.min == null) ? 0 : this.min; @@ -260,7 +260,7 @@ } } }; - + $.jqplot.MeterGaugeRenderer.prototype.setGridData = function(plot) { // set gridData property. This will hold angle in radians of each data point. var stack = []; @@ -274,13 +274,13 @@ } } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; } this.gridData = td; }; - + $.jqplot.MeterGaugeRenderer.prototype.makeGridData = function(data, plot) { var stack = []; var td = []; @@ -293,14 +293,14 @@ } } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; } return td; }; - + function getnmt(pos, interval, fact) { var temp; for (var i=pos.length-1; i>=0; i--) { @@ -311,7 +311,7 @@ } return null; } - + // called with scope of series $.jqplot.MeterGaugeRenderer.prototype.draw = function (ctx, gd, options) { var i; @@ -355,15 +355,15 @@ break; } } - - - + + + // pre-draw so can get it's dimensions. if (this.label) { this._labelElem = $('<div class="jqplot-meterGauge-label" style="position:absolute;">'+this.label+'</div>'); this.canvas._elem.after(this._labelElem); } - + var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow; var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine; var fill = (opts.fill != undefined) ? opts.fill : this.fill; @@ -379,7 +379,7 @@ } var mindim = Math.min(w,h); var d = mindim; - + if (!this.diameter) { if (this.semiCircular) { if ( w >= 2*h) { @@ -415,26 +415,26 @@ } } - + if (this._labelElem && this.labelPosition == 'bottom') { this._center[1] -= this._labelElem.outerHeight(true); } - + this._radius = this.diameter/2; - + this.tickSpacing = 6000/this.diameter; - + if (!this.hubRadius) { this.hubRadius = this.diameter/18; } - + this.shadowOffset = 0.5 + this.ringWidth/9; this.shadowWidth = this.ringWidth*1; - + this.tickPadding = 3 + Math.pow(this.diameter/20, 0.7); this.tickOuterRadius = this._radius - this.ringWidth/2 - this.tickPadding; this.tickLength = (this.showTicks) ? this._radius/13 : 0; - + if (this.ticks.length == 0) { // no ticks, lets make some. var max = this.max, @@ -447,21 +447,21 @@ (tp > 2 && tp <= 2.5) ? tp = 2.5 : tp = Math.ceil(tp); var t = this.tickPositions; var tpindex, nt; - + for (i=0; i<t.length; i++) { - if (tp == t[i] || i && t[i-1] < tp && tp < t[i]) { + if (tp == t[i] || i && t[i-1] < tp && tp < t[i]) { ti = t[i]*Math.pow(10, tf); tpindex = i; } } - + for (i=0; i<t.length; i++) { - if (tp == t[i] || i && t[i-1] < tp && tp < t[i]) { + if (tp == t[i] || i && t[i-1] < tp && tp < t[i]) { ti = t[i]*Math.pow(10, tf); nt = Math.ceil((max - min) / ti); } } - + // both max and min are free if (setmax && setmin) { var tmin = (min > 0) ? min - min % ti : min - min % ti - ti; @@ -490,17 +490,17 @@ } nt += 1; var tmax = min + (nt - 1) * ti; - if (max >= tmax) { + if (max >= tmax) { tmax += ti; nt += 1; } // now tmax should always be mroe than dataMax - if (tmax - max < 0.23*ti) { + if (tmax - max < 0.23*ti) { tmax += ti; nt += 1; } this.max = max = tmax; - this.min = min; + this.min = min; this.tickInterval = ti; this.numberTicks = nt; @@ -510,12 +510,12 @@ this.ticks.push([it, it]); } this.max = this.ticks[nt-1][1]; - - this.tickFactor = tf; + + this.tickFactor = tf; // determine number of minor ticks - this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor); - + this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor); + if (!this.numberMinorTicks) { this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor-1); } @@ -539,16 +539,16 @@ this.ticks.push([it, it]); } this.max = this.ticks[this.numberTicks-1][1]; - + this.tickFactor = tf; // determine number of minor ticks this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor); - + if (!this.numberMinorTicks) { this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor-1); } } - + // not setting max or min if (!setmax && !setmin) { var range = this.max - this.min; @@ -579,11 +579,11 @@ } // determine number of minor ticks this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor); - + if (!this.numberMinorTicks) { this.numberMinorTicks = getnmt(this.tickPositions, this.tickInterval, this.tickFactor-1); } - + if (!this.numberMinorTicks) { this.numberMinorTicks = 1; var nums = [4, 5, 3, 6, 2]; @@ -597,14 +597,14 @@ } } } - + var r = this._radius, sa = this.startAngle, - ea = this.endAngle, + ea = this.endAngle, pi = Math.PI, hpi = Math.PI/2; - + if (this.semiCircular) { var overAngle = Math.atan(this.innerPad/r), outersa = this.outerStartAngle = sa - overAngle, @@ -612,28 +612,28 @@ hubsa = this.hubStartAngle = sa - Math.atan(this.innerPad/this.hubRadius*2), hubea = this.hubEndAngle = ea + Math.atan(this.innerPad/this.hubRadius*2); - ctx.save(); - + ctx.save(); + ctx.translate(this._center[0], this._center[1]); ctx.lineJoin = "round"; ctx.lineCap = "round"; - + // draw the innerbackground ctx.save(); - ctx.beginPath(); + ctx.beginPath(); ctx.fillStyle = this.background; ctx.arc(0, 0, r, outersa, outerea, false); ctx.closePath(); ctx.fill(); ctx.restore(); - + // draw the shadow // the outer ring. var shadowColor = 'rgba(0,0,0,'+this.shadowAlpha+')'; ctx.save(); for (var i=0; i<this.shadowDepth; i++) { ctx.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI), this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI)); - ctx.beginPath(); + ctx.beginPath(); ctx.strokeStyle = shadowColor; ctx.lineWidth = this.shadowWidth; ctx.arc(0 ,0, r, outersa, outerea, false); @@ -641,40 +641,40 @@ ctx.stroke(); } ctx.restore(); - + // the inner hub. ctx.save(); var tempd = parseInt((this.shadowDepth+1)/2, 10); for (var i=0; i<tempd; i++) { ctx.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI), this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI)); - ctx.beginPath(); + ctx.beginPath(); ctx.fillStyle = shadowColor; ctx.arc(0 ,0, this.hubRadius, hubsa, hubea, false); ctx.closePath(); ctx.fill(); } ctx.restore(); - + // draw the outer ring. ctx.save(); - ctx.beginPath(); + ctx.beginPath(); ctx.strokeStyle = this.ringColor; ctx.lineWidth = this.ringWidth; ctx.arc(0 ,0, r, outersa, outerea, false); ctx.closePath(); ctx.stroke(); ctx.restore(); - + // draw the hub - + ctx.save(); - ctx.beginPath(); + ctx.beginPath(); ctx.fillStyle = this.ringColor; ctx.arc(0 ,0, this.hubRadius,hubsa, hubea, false); ctx.closePath(); ctx.fill(); ctx.restore(); - + // draw the ticks if (this.showTicks) { ctx.save(); @@ -684,7 +684,7 @@ nmt = this.numberMinorTicks, ts = this.span * Math.PI / 180 / (this.ticks.length-1), mts = ts/(nmt + 1); - + for (i = 0; i<this.ticks.length; i++) { ctx.beginPath(); ctx.lineWidth = 1.5 + this.diameter/360; @@ -701,12 +701,12 @@ ctx.moveTo(-orad * Math.cos(ts*i+mts*j+sa), orad * Math.sin(ts*i+mts*j+sa)); ctx.lineTo(-(orad-mtl) * Math.cos(ts*i+mts*j+sa), (orad-mtl) * Math.sin(ts*i+mts*j+sa)); ctx.stroke(); - } + } } } ctx.restore(); } - + // draw the tick labels if (this.showTickLabels) { var elem, l, t, ew, eh, dim, maxdim=0; @@ -724,7 +724,7 @@ maxdim = (dim > maxdim) ? dim : maxdim; } } - + // draw the gauge label if (this.label && this.labelPosition == 'inside') { var l = this._center[0] + this.canvas._offsets.left; @@ -736,16 +736,16 @@ t -= this._labelElem.outerHeight(true)/2; this._labelElem.css({left:l, top:t}); } - + else if (this.label && this.labelPosition == 'bottom') { var l = this._center[0] + this.canvas._offsets.left - this._labelElem.outerWidth(true)/2; var t = this._center[1] + this.canvas._offsets.top + this.innerPad + + this.ringWidth + this.padding + this.labelHeightAdjust; this._labelElem.css({left:l, top:t}); - + } - + // draw the intervals - + ctx.save(); var inner = this.intervalInnerRadius || this.hubRadius * 1.5; if (this.intervalOuterRadius == null) { @@ -781,7 +781,7 @@ ctx.fill(); } ctx.restore(); - + // draw the needle var datapoint = this.data[0][1]; var dataspan = this.max - this.min; @@ -794,8 +794,8 @@ } } var dataang = (datapoint - this.min)/dataspan * this.span * Math.PI/180 + this.startAngle; - - + + ctx.save(); ctx.beginPath(); ctx.fillStyle = this.ringColor; @@ -804,7 +804,7 @@ this.needleThickness = (this.needleThickness < 2) ? 2 : this.needleThickness; var endwidth = this.needleThickness * 0.4; - + var dl = this.needleLength/10; var dt = (this.needleThickness - endwidth)/10; var templ; @@ -815,22 +815,22 @@ ctx.lineTo(dl*(i+1)*Math.cos(dataang), dl*(i+1)*Math.sin(dataang)); ctx.stroke(); } - + ctx.restore(); } else { this._center = [(cw - trans * offx)/2 + trans * offx, (ch - trans*offy)/2 + trans * offy]; - } + } }; - + $.jqplot.MeterGaugeAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.MeterGaugeAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.MeterGaugeAxisRenderer.prototype.constructor = $.jqplot.MeterGaugeAxisRenderer; - - + + // There are no traditional axes on a gauge chart. We just need to provide // dummy objects with properties so the plot will render. // called with scope of axis object. @@ -849,16 +849,16 @@ this.showTicks = false; this.ticks = []; this.showMark = false; - this.show = false; + this.show = false; }; - + $.jqplot.MeterGaugeLegendRenderer = function(){ $.jqplot.TableLegendRenderer.call(this); }; - + $.jqplot.MeterGaugeLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.MeterGaugeLegendRenderer.prototype.constructor = $.jqplot.MeterGaugeLegendRenderer; - + /** * Class: $.jqplot.MeterGaugeLegendRenderer *Meter gauges don't typically have a legend, this overrides the default legend renderer. @@ -870,7 +870,7 @@ this.numberColumns = null; $.extend(true, this, options); }; - + // called with context of legend $.jqplot.MeterGaugeLegendRenderer.prototype.draw = function() { if (this.show) { @@ -888,12 +888,12 @@ this._elem = $('<table class="jqplot-table-legend" style="'+ss+'"></table>'); // MeterGauge charts legends don't go by number of series, but by number of data points // in the series. Refactor things here for that. - - var pad = false, + + var pad = false, reverse = false, nr, nc; var s = series[0]; - + if (s.show) { var pd = s.data; if (this.numberRows) { @@ -913,10 +913,10 @@ nr = pd.length; nc = 1; } - + var i, j, tr, td1, td2, lt, rs, color; - var idx = 0; - + var idx = 0; + for (i=0; i<nr; i++) { if (reverse){ tr = $('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem); @@ -946,7 +946,7 @@ } } rs = (pad) ? this.rowSpacing : '0'; - + td1 = $('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+rs+';">'+ '<div><div class="jqplot-table-legend-swatch" style="border-color:'+color+';"></div>'+ '</div></td>'); @@ -968,14 +968,14 @@ pad = true; } idx++; - } + } } } } - return this._elem; + return this._elem; }; - - + + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -985,7 +985,7 @@ options.legend = options.legend || {}; options.seriesDefaults = options.seriesDefaults || {}; options.grid = options.grid || {}; - + // only set these if there is a gauge series var setopts = false; if (options.seriesDefaults.renderer == $.jqplot.MeterGaugeRenderer) { @@ -998,7 +998,7 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.MeterGaugeAxisRenderer; options.legend.renderer = $.jqplot.MeterGaugeLegendRenderer; @@ -1009,22 +1009,21 @@ options.grid.shadow = (options.grid.shadow != null) ? options.grid.shadow : false; } } - + // called with scope of plot function postParseOptions(options) { // } - + $.jqplot.preInitHooks.push(preInit); $.jqplot.postParseOptionsHooks.push(postParseOptions); - + $.jqplot.MeterGaugeTickRenderer = function() { $.jqplot.AxisTickRenderer.call(this); }; - + $.jqplot.MeterGaugeTickRenderer.prototype = new $.jqplot.AxisTickRenderer(); $.jqplot.MeterGaugeTickRenderer.prototype.constructor = $.jqplot.MeterGaugeTickRenderer; - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.min.js index 2b845054..2514b739 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.meterGaugeRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(c){c.jqplot.MeterGaugeRenderer=function(){c.jqplot.LineRenderer.call(this)};c.jqplot.MeterGaugeRenderer.prototype=new c.jqplot.LineRenderer();c.jqplot.MeterGaugeRenderer.prototype.constructor=c.jqplot.MeterGaugeRenderer;c.jqplot.MeterGaugeRenderer.prototype.init=function(e){this.diameter=null;this.padding=null;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=4;this.background="#efefef";this.ringColor="#BBC6D0";this.needleColor="#C3D3E5";this.tickColor="989898";this.ringWidth=null;this.min;this.max;this.ticks=[];this.showTicks=true;this.showTickLabels=true;this.label=null;this.labelHeightAdjust=0;this.labelPosition="inside";this.intervals=[];this.intervalColors=["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"];this.intervalInnerRadius=null;this.intervalOuterRadius=null;this.tickRenderer=c.jqplot.MeterGaugeTickRenderer;this.tickPositions=[1,2,2.5,5,10];this.tickSpacing=30;this.numberMinorTicks=null;this.hubRadius=null;this.tickPadding=null;this.needleThickness=null;this.needlePad=6;this.pegNeedle=true;this._type="meterGauge";c.extend(true,this,e);this.type=null;this.numberTicks=null;this.tickInterval=null;this.span=180;if(this.type=="circular"){this.semiCircular=false}else{if(this.type!="circular"){this.semiCircular=true}else{this.semiCircular=(this.span<=180)?true:false}}this._tickPoints=[];this._labelElem=null;this.startAngle=(90+(360-this.span)/2)*Math.PI/180;this.endAngle=(90-(360-this.span)/2)*Math.PI/180;this.setmin=!!(this.min==null);this.setmax=!!(this.max==null);if(this.intervals.length){if(this.intervals[0].length==null||this.intervals.length==1){for(var f=0;f<this.intervals.length;f++){this.intervals[f]=[this.intervals[f],this.intervals[f],this.intervalColors[f]]}}else{if(this.intervals[0].length==2){for(f=0;f<this.intervals.length;f++){this.intervals[f]=[this.intervals[f][0],this.intervals[f][1],this.intervalColors[f]]}}}}if(this.ticks.length){if(this.ticks[0].length==null||this.ticks[0].length==1){for(var f=0;f<this.ticks.length;f++){this.ticks[f]=[this.ticks[f],this.ticks[f]]}}this.min=(this.min==null)?this.ticks[0][0]:this.min;this.max=(this.max==null)?this.ticks[this.ticks.length-1][0]:this.max;this.setmin=false;this.setmax=false;this.numberTicks=this.ticks.length;this.tickInterval=this.ticks[1][0]-this.ticks[0][0];this.tickFactor=Math.floor(parseFloat((Math.log(this.tickInterval)/Math.log(10)).toFixed(11)));this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor);if(!this.numberMinorTicks){this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor-1)}if(!this.numberMinorTicks){this.numberMinorTicks=1}}else{if(this.intervals.length){this.min=(this.min==null)?0:this.min;this.setmin=false;if(this.max==null){if(this.intervals[this.intervals.length-1][0]>=this.data[0][1]){this.max=this.intervals[this.intervals.length-1][0];this.setmax=false}}else{this.setmax=false}}else{this.min=(this.min==null)?0:this.min;this.setmin=false;if(this.max==null){this.max=this.data[0][1]*1.25;this.setmax=true}else{this.setmax=false}}}};c.jqplot.MeterGaugeRenderer.prototype.setGridData=function(j){var f=[];var k=[];var e=this.startAngle;for(var h=0;h<this.data.length;h++){f.push(this.data[h][1]);k.push([this.data[h][0]]);if(h>0){f[h]+=f[h-1]}}var g=Math.PI*2/f[f.length-1];for(var h=0;h<f.length;h++){k[h][1]=f[h]*g}this.gridData=k};c.jqplot.MeterGaugeRenderer.prototype.makeGridData=function(j,k){var f=[];var l=[];var e=this.startAngle;for(var h=0;h<j.length;h++){f.push(j[h][1]);l.push([j[h][0]]);if(h>0){f[h]+=f[h-1]}}var g=Math.PI*2/f[f.length-1];for(var h=0;h<f.length;h++){l[h][1]=f[h]*g}return l};function b(j,f,g){var e;for(var h=j.length-1;h>=0;h--){e=f/(j[h]*Math.pow(10,g));if(e==4||e==5){return e-1}}return null}c.jqplot.MeterGaugeRenderer.prototype.draw=function(X,aC,ap){var aa;var aM=(ap!=undefined)?ap:{};var ai=0;var ah=0;var at=1;if(ap.legendInfo&&ap.legendInfo.placement=="inside"){var aI=ap.legendInfo;switch(aI.location){case"nw":ai=aI.width+aI.xoffset;break;case"w":ai=aI.width+aI.xoffset;break;case"sw":ai=aI.width+aI.xoffset;break;case"ne":ai=aI.width+aI.xoffset;at=-1;break;case"e":ai=aI.width+aI.xoffset;at=-1;break;case"se":ai=aI.width+aI.xoffset;at=-1;break;case"n":ah=aI.height+aI.yoffset;break;case"s":ah=aI.height+aI.yoffset;at=-1;break;default:break}}if(this.label){this._labelElem=c('<div class="jqplot-meterGauge-label" style="position:absolute;">'+this.label+"</div>");this.canvas._elem.after(this._labelElem)}var m=(aM.shadow!=undefined)?aM.shadow:this.shadow;var N=(aM.showLine!=undefined)?aM.showLine:this.showLine;var I=(aM.fill!=undefined)?aM.fill:this.fill;var K=X.canvas.width;var S=X.canvas.height;if(this.padding==null){this.padding=Math.round(Math.min(K,S)/30)}var Q=K-ai-2*this.padding;var ab=S-ah-2*this.padding;if(this.labelPosition=="bottom"&&this.label){ab-=this._labelElem.outerHeight(true)}var L=Math.min(Q,ab);var ad=L;if(!this.diameter){if(this.semiCircular){if(Q>=2*ab){if(!this.ringWidth){this.ringWidth=2*ab/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=this.ringWidth/2+this.needleThickness/2+this.needlePad;this.diameter=2*(ab-2*this.innerPad)}else{if(!this.ringWidth){this.ringWidth=Q/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=this.ringWidth/2+this.needleThickness/2+this.needlePad;this.diameter=Q-2*this.innerPad-this.ringWidth-this.padding}this._center=[(K-at*ai)/2+at*ai,(S+at*ah-this.padding-this.ringWidth-this.innerPad)]}else{if(!this.ringWidth){this.ringWidth=ad/35}this.needleThickness=this.needleThickness||2+Math.pow(this.ringWidth,0.8);this.innerPad=0;this.diameter=ad-this.ringWidth;this._center=[(K-at*ai)/2+at*ai,(S-at*ah)/2+at*ah]}}if(this._labelElem&&this.labelPosition=="bottom"){this._center[1]-=this._labelElem.outerHeight(true)}this._radius=this.diameter/2;this.tickSpacing=6000/this.diameter;if(!this.hubRadius){this.hubRadius=this.diameter/18}this.shadowOffset=0.5+this.ringWidth/9;this.shadowWidth=this.ringWidth*1;this.tickPadding=3+Math.pow(this.diameter/20,0.7);this.tickOuterRadius=this._radius-this.ringWidth/2-this.tickPadding;this.tickLength=(this.showTicks)?this._radius/13:0;if(this.ticks.length==0){var A=this.max,aL=this.min,q=this.setmax,aG=this.setmin,au=(A-aL)*this.tickSpacing/this.span;var aw=Math.floor(parseFloat((Math.log(au)/Math.log(10)).toFixed(11)));var an=(au/Math.pow(10,aw));(an>2&&an<=2.5)?an=2.5:an=Math.ceil(an);var T=this.tickPositions;var aA,ak;for(aa=0;aa<T.length;aa++){if(an==T[aa]||aa&&T[aa-1]<an&&an<T[aa]){au=T[aa]*Math.pow(10,aw);aA=aa}}for(aa=0;aa<T.length;aa++){if(an==T[aa]||aa&&T[aa-1]<an&&an<T[aa]){au=T[aa]*Math.pow(10,aw);ak=Math.ceil((A-aL)/au)}}if(q&&aG){var aP=(aL>0)?aL-aL%au:aL-aL%au-au;if(!this.forceZero){var D=Math.min(aL-aP,0.8*au);var o=Math.floor(D/T[aA]);if(o>1){aP=aP+T[aA]*(o-1);if(parseInt(aP,10)!=aP&&parseInt(aP-T[aA],10)==aP-T[aA]){aP=aP-T[aA]}}}if(aL==aP){aL-=au}else{if(aL-aP>0.23*au){aL=aP}else{aL=aP-au;ak+=1}}ak+=1;var E=aL+(ak-1)*au;if(A>=E){E+=au;ak+=1}if(E-A<0.23*au){E+=au;ak+=1}this.max=A=E;this.min=aL;this.tickInterval=au;this.numberTicks=ak;var O;for(aa=0;aa<ak;aa++){O=parseFloat((aL+aa*au).toFixed(11));this.ticks.push([O,O])}this.max=this.ticks[ak-1][1];this.tickFactor=aw;this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor);if(!this.numberMinorTicks){this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor-1)}}else{if(q){var E=aL+(ak-1)*au;if(A>=E){A=E+au;ak+=1}else{A=E}this.tickInterval=this.tickInterval||au;this.numberTicks=this.numberTicks||ak;var O;for(aa=0;aa<this.numberTicks;aa++){O=parseFloat((aL+aa*this.tickInterval).toFixed(11));this.ticks.push([O,O])}this.max=this.ticks[this.numberTicks-1][1];this.tickFactor=aw;this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor);if(!this.numberMinorTicks){this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor-1)}}}if(!q&&!aG){var P=this.max-this.min;aw=Math.floor(parseFloat((Math.log(P)/Math.log(10)).toFixed(11)))-1;var aN=[5,6,4,7,3,8,9,10,2],V,C,av=0,M;if(P>1){var aJ=String(P);if(aJ.search(/\./)==-1){var aF=aJ.search(/0+$/);av=(aF>0)?aJ.length-aF-1:0}}M=P/Math.pow(10,av);for(aa=0;aa<aN.length;aa++){V=M/(aN[aa]-1);if(V==parseInt(V,10)){this.numberTicks=aN[aa];this.tickInterval=P/(this.numberTicks-1);this.tickFactor=aw+1;break}}var O;for(aa=0;aa<this.numberTicks;aa++){O=parseFloat((this.min+aa*this.tickInterval).toFixed(11));this.ticks.push([O,O])}this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor);if(!this.numberMinorTicks){this.numberMinorTicks=b(this.tickPositions,this.tickInterval,this.tickFactor-1)}if(!this.numberMinorTicks){this.numberMinorTicks=1;var aH=[4,5,3,6,2];for(aa=0;aa<5;aa++){var ao=this.tickInterval/aH[aa];if(ao==parseInt(ao,10)){this.numberMinorTicks=aH[aa]-1;break}}}}}var U=this._radius,aE=this.startAngle,k=this.endAngle,H=Math.PI,e=Math.PI/2;if(this.semiCircular){var z=Math.atan(this.innerPad/U),ac=this.outerStartAngle=aE-z,aB=this.outerEndAngle=k+z,B=this.hubStartAngle=aE-Math.atan(this.innerPad/this.hubRadius*2),af=this.hubEndAngle=k+Math.atan(this.innerPad/this.hubRadius*2);X.save();X.translate(this._center[0],this._center[1]);X.lineJoin="round";X.lineCap="round";X.save();X.beginPath();X.fillStyle=this.background;X.arc(0,0,U,ac,aB,false);X.closePath();X.fill();X.restore();var aj="rgba(0,0,0,"+this.shadowAlpha+")";X.save();for(var aa=0;aa<this.shadowDepth;aa++){X.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));X.beginPath();X.strokeStyle=aj;X.lineWidth=this.shadowWidth;X.arc(0,0,U,ac,aB,false);X.closePath();X.stroke()}X.restore();X.save();var az=parseInt((this.shadowDepth+1)/2,10);for(var aa=0;aa<az;aa++){X.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));X.beginPath();X.fillStyle=aj;X.arc(0,0,this.hubRadius,B,af,false);X.closePath();X.fill()}X.restore();X.save();X.beginPath();X.strokeStyle=this.ringColor;X.lineWidth=this.ringWidth;X.arc(0,0,U,ac,aB,false);X.closePath();X.stroke();X.restore();X.save();X.beginPath();X.fillStyle=this.ringColor;X.arc(0,0,this.hubRadius,B,af,false);X.closePath();X.fill();X.restore();if(this.showTicks){X.save();var f=this.tickOuterRadius,aq=this.tickLength,v=aq/2,F=this.numberMinorTicks,am=this.span*Math.PI/180/(this.ticks.length-1),p=am/(F+1);for(aa=0;aa<this.ticks.length;aa++){X.beginPath();X.lineWidth=1.5+this.diameter/360;X.strokeStyle=this.ringColor;var ae=am*aa+aE;X.moveTo(-f*Math.cos(am*aa+aE),f*Math.sin(am*aa+aE));X.lineTo(-(f-aq)*Math.cos(am*aa+aE),(f-aq)*Math.sin(am*aa+aE));this._tickPoints.push([(f-aq)*Math.cos(am*aa+aE)+this._center[0]+this.canvas._offsets.left,(f-aq)*Math.sin(am*aa+aE)+this._center[1]+this.canvas._offsets.top,am*aa+aE]);X.stroke();X.lineWidth=1+this.diameter/440;if(aa<this.ticks.length-1){for(var Y=1;Y<=F;Y++){X.beginPath();X.moveTo(-f*Math.cos(am*aa+p*Y+aE),f*Math.sin(am*aa+p*Y+aE));X.lineTo(-(f-v)*Math.cos(am*aa+p*Y+aE),(f-v)*Math.sin(am*aa+p*Y+aE));X.stroke()}}}X.restore()}if(this.showTickLabels){var J,W,T,aO,g,G,n=0;var an=this.tickPadding*(1-1/(this.diameter/80+1));for(aa=0;aa<this.ticks.length;aa++){J=c('<div class="jqplot-meterGauge-tick" style="position:absolute;">'+this.ticks[aa][1]+"</div>");this.canvas._elem.after(J);aO=J.outerWidth(true);g=J.outerHeight(true);W=this._tickPoints[aa][0]-aO*(this._tickPoints[aa][2]-Math.PI)/Math.PI-an*Math.cos(this._tickPoints[aa][2]);T=this._tickPoints[aa][1]-g/2+g/2*Math.pow(Math.abs((Math.sin(this._tickPoints[aa][2]))),0.5)+an/3*Math.pow(Math.abs((Math.sin(this._tickPoints[aa][2]))),0.5);J.css({left:W,top:T});G=aO*Math.cos(this._tickPoints[aa][2])+g*Math.sin(Math.PI/2+this._tickPoints[aa][2]/2);n=(G>n)?G:n}}if(this.label&&this.labelPosition=="inside"){var W=this._center[0]+this.canvas._offsets.left;var an=this.tickPadding*(1-1/(this.diameter/80+1));var T=0.5*(this._center[1]+this.canvas._offsets.top-this.hubRadius)+0.5*(this._center[1]+this.canvas._offsets.top-this.tickOuterRadius+this.tickLength+an)+this.labelHeightAdjust;W-=this._labelElem.outerWidth(true)/2;T-=this._labelElem.outerHeight(true)/2;this._labelElem.css({left:W,top:T})}else{if(this.label&&this.labelPosition=="bottom"){var W=this._center[0]+this.canvas._offsets.left-this._labelElem.outerWidth(true)/2;var T=this._center[1]+this.canvas._offsets.top+this.innerPad+ +this.ringWidth+this.padding+this.labelHeightAdjust;this._labelElem.css({left:W,top:T})}}X.save();var ax=this.intervalInnerRadius||this.hubRadius*1.5;if(this.intervalOuterRadius==null){if(this.showTickLabels){var ag=(this.tickOuterRadius-this.tickLength-this.tickPadding-this.diameter/8)}else{var ag=(this.tickOuterRadius-this.tickLength-this.diameter/16)}}else{var ag=this.intervalOuterRadius}var P=this.max-this.min;var aD=this.intervals[this.intervals.length-1]-this.min;var y,Z,u=this.span*Math.PI/180;for(aa=0;aa<this.intervals.length;aa++){y=(aa==0)?aE:aE+(this.intervals[aa-1][0]-this.min)*u/P;if(y<0){y=0}Z=aE+(this.intervals[aa][0]-this.min)*u/P;if(Z<0){Z=0}X.beginPath();X.fillStyle=this.intervals[aa][2];X.arc(0,0,ax,y,Z,false);X.lineTo(ag*Math.cos(Z),ag*Math.sin(Z));X.arc(0,0,ag,Z,y,true);X.lineTo(ax*Math.cos(y),ax*Math.sin(y));X.closePath();X.fill()}X.restore();var ay=this.data[0][1];var R=this.max-this.min;if(this.pegNeedle){if(this.data[0][1]>this.max+R*3/this.span){ay=this.max+R*3/this.span}if(this.data[0][1]<this.min-R*3/this.span){ay=this.min-R*3/this.span}}var al=(ay-this.min)/R*this.span*Math.PI/180+this.startAngle;X.save();X.beginPath();X.fillStyle=this.ringColor;X.strokeStyle=this.ringColor;this.needleLength=(this.tickOuterRadius-this.tickLength)*0.85;this.needleThickness=(this.needleThickness<2)?2:this.needleThickness;var aK=this.needleThickness*0.4;var x=this.needleLength/10;var s=(this.needleThickness-aK)/10;var ar;for(var aa=0;aa<10;aa++){ar=this.needleThickness-aa*s;X.moveTo(x*aa*Math.cos(al),x*aa*Math.sin(al));X.lineWidth=ar;X.lineTo(x*(aa+1)*Math.cos(al),x*(aa+1)*Math.sin(al));X.stroke()}X.restore()}else{this._center=[(K-at*ai)/2+at*ai,(S-at*ah)/2+at*ah]}};c.jqplot.MeterGaugeAxisRenderer=function(){c.jqplot.LinearAxisRenderer.call(this)};c.jqplot.MeterGaugeAxisRenderer.prototype=new c.jqplot.LinearAxisRenderer();c.jqplot.MeterGaugeAxisRenderer.prototype.constructor=c.jqplot.MeterGaugeAxisRenderer;c.jqplot.MeterGaugeAxisRenderer.prototype.init=function(e){this.tickRenderer=c.jqplot.MeterGaugeTickRenderer;c.extend(true,this,e);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};c.jqplot.MeterGaugeLegendRenderer=function(){c.jqplot.TableLegendRenderer.call(this)};c.jqplot.MeterGaugeLegendRenderer.prototype=new c.jqplot.TableLegendRenderer();c.jqplot.MeterGaugeLegendRenderer.prototype.constructor=c.jqplot.MeterGaugeLegendRenderer;c.jqplot.MeterGaugeLegendRenderer.prototype.init=function(e){this.numberRows=null;this.numberColumns=null;c.extend(true,this,e)};c.jqplot.MeterGaugeLegendRenderer.prototype.draw=function(){if(this.show){var p=this._series;var x="position:absolute;";x+=(this.background)?"background:"+this.background+";":"";x+=(this.border)?"border:"+this.border+";":"";x+=(this.fontSize)?"font-size:"+this.fontSize+";":"";x+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";x+=(this.textColor)?"color:"+this.textColor+";":"";x+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";x+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";x+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";x+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=c('<table class="jqplot-table-legend" style="'+x+'"></table>');var f=false,q=false,u,o;var w=p[0];if(w.show){var t=w.data;if(this.numberRows){u=this.numberRows;if(!this.numberColumns){o=Math.ceil(t.length/u)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;u=Math.ceil(t.length/this.numberColumns)}else{u=t.length;o=1}}var n,m,r,g,e,l,k,h;var v=0;for(n=0;n<u;n++){if(q){r=c('<tr class="jqplot-table-legend"></tr>').prependTo(this._elem)}else{r=c('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem)}for(m=0;m<o;m++){if(v<t.length){l=this.labels[v]||t[v][0].toString();h=w.color;if(!q){if(n>0){f=true}else{f=false}}else{if(n==u-1){f=false}else{f=true}}k=(f)?this.rowSpacing:"0";g=c('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+k+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+h+';"></div></div></td>');e=c('<td class="jqplot-table-legend" style="padding-top:'+k+';"></td>');if(this.escapeHtml){e.text(l)}else{e.html(l)}if(q){e.prependTo(r);g.prependTo(r)}else{g.appendTo(r);e.appendTo(r)}f=true}v++}}}}return this._elem};function a(j,h,f){f=f||{};f.axesDefaults=f.axesDefaults||{};f.legend=f.legend||{};f.seriesDefaults=f.seriesDefaults||{};f.grid=f.grid||{};var e=false;if(f.seriesDefaults.renderer==c.jqplot.MeterGaugeRenderer){e=true}else{if(f.series){for(var g=0;g<f.series.length;g++){if(f.series[g].renderer==c.jqplot.MeterGaugeRenderer){e=true}}}}if(e){f.axesDefaults.renderer=c.jqplot.MeterGaugeAxisRenderer;f.legend.renderer=c.jqplot.MeterGaugeLegendRenderer;f.legend.preDraw=true;f.grid.background=f.grid.background||"white";f.grid.drawGridlines=false;f.grid.borderWidth=(f.grid.borderWidth!=null)?f.grid.borderWidth:0;f.grid.shadow=(f.grid.shadow!=null)?f.grid.shadow:false}}function d(e){}c.jqplot.preInitHooks.push(a);c.jqplot.postParseOptionsHooks.push(d);c.jqplot.MeterGaugeTickRenderer=function(){c.jqplot.AxisTickRenderer.call(this)};c.jqplot.MeterGaugeTickRenderer.prototype=new c.jqplot.AxisTickRenderer();c.jqplot.MeterGaugeTickRenderer.prototype.constructor=c.jqplot.MeterGaugeTickRenderer})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mobile.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mobile.min.js index 771a6d90..41ebe00f 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mobile.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.mobile.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(b){function a(e,d,c){this.bindCustomEvents=function(){this.eventCanvas._elem.bind("vclick",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("taphold",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("vmousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("vmousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("vmouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("vmouseup",{plot:this},this.onMouseUp)}};this.plugins.mobile=true}b.jqplot.postInitHooks.push(a)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.js index 2f143f1b..0fd1de36 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,43 +26,43 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** * Class: $.jqplot.OHLCRenderer * jqPlot Plugin to draw Open Hi Low Close, Candlestick and Hi Low Close charts. - * - * To use this plugin, include the renderer js file in + * + * To use this plugin, include the renderer js file in * your source: - * + * * > <script type="text/javascript" src="plugins/jqplot.ohlcRenderer.js"></script> - * + * * You will most likely want to use a date axis renderer * for the x axis also, so include the date axis render js file also: - * + * * > <script type="text/javascript" src="plugins/jqplot.dateAxisRenderer.js"></script> - * + * * Then you set the renderer in the series options on your plot: - * + * * > series: [{renderer:$.jqplot.OHLCRenderer}] - * + * * For OHLC and candlestick charts, data should be specified * like so: - * + * * > dat = [['07/06/2009',138.7,139.68,135.18,135.4], ['06/29/2009',143.46,144.66,139.79,140.02], ...] - * + * * If the data array has only 4 values per point instead of 5, * the renderer will create a Hi Low Close chart instead. In that case, * data should be supplied like: - * + * * > dat = [['07/06/2009',139.68,135.18,135.4], ['06/29/2009',144.66,139.79,140.02], ...] - * + * * To generate a candlestick chart instead of an OHLC chart, * set the "candlestick" option to true: - * + * * > series: [{renderer:$.jqplot.OHLCRenderer, rendererOptions:{candleStick:true}}], - * + * */ $.jqplot.OHLCRenderer = function(){ // subclass line renderer to make use of some of it's methods. @@ -73,7 +73,7 @@ this.candleStick = false; // prop: tickLength // length of the line in pixels indicating open and close price. - // Default will auto calculate based on plot width and + // Default will auto calculate based on plot width and // number of points displayed. this.tickLength = 'auto'; // prop: bodyWidth @@ -115,10 +115,10 @@ this._tickLength; this._bodyWidth; }; - + $.jqplot.OHLCRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.OHLCRenderer.prototype.constructor = $.jqplot.OHLCRenderer; - + // called with scope of series. $.jqplot.OHLCRenderer.prototype.init = function(options) { options = options || {}; @@ -135,28 +135,28 @@ if (d[0].length < 5) { this.renderer.hlc = true; - for (var j=0; j<d.length; j++) { + for (var j=0; j<d.length; j++) { if (d[j][2] < db.min || db.min == null) { db.min = d[j][2]; } if (d[j][1] > db.max || db.max == null) { db.max = d[j][1]; - } + } } } else { - for (var j=0; j<d.length; j++) { + for (var j=0; j<d.length; j++) { if (d[j][3] < db.min || db.min == null) { db.min = d[j][3]; } if (d[j][2] > db.max || db.max == null) { db.max = d[j][2]; - } + } } } - + }; - + // called within scope of series. $.jqplot.OHLCRenderer.prototype.draw = function(ctx, gd, options) { var d = this.data; @@ -181,7 +181,7 @@ if (this.show) { var x, open, hi, low, close; // need to get widths based on number of points shown, - // not on total number of points. Use the results + // not on total number of points. Use the results // to speed up drawing in next step. for (var i=0; i<d.length; i++) { if (d[i][0] < xmin) { @@ -195,13 +195,13 @@ var dwidth = this.gridData[xmaxidx-1][0] - this.gridData[xminidx][0]; var nvisiblePoints = xmaxidx - xminidx; try { - var dinterval = Math.abs(this._xaxis.series_u2p(parseInt(this._xaxis._intervalStats[0].sortedIntervals[0].interval, 10)) - this._xaxis.series_u2p(0)); + var dinterval = Math.abs(this._xaxis.series_u2p(parseInt(this._xaxis._intervalStats[0].sortedIntervals[0].interval, 10)) - this._xaxis.series_u2p(0)); } catch (e) { var dinterval = dwidth / nvisiblePoints; } - + if (r.candleStick) { if (typeof(r.bodyWidth) == 'number') { r._bodyWidth = r.bodyWidth; @@ -218,7 +218,7 @@ r._tickLength = Math.min(10, dinterval/3.5); } } - + for (var i=xminidx; i<xmaxidx; i++) { x = xp(d[i][0]); if (r.hlc) { @@ -249,8 +249,8 @@ o.color = r.upBodyColor; } ops = $.extend(true, {}, opts, o); - r.shapeRenderer.draw(ctx, [[x, hi], [x, close]], ops); - r.shapeRenderer.draw(ctx, [[x, open], [x, low]], ops); + r.shapeRenderer.draw(ctx, [[x, hi], [x, close]], ops); + r.shapeRenderer.draw(ctx, [[x, open], [x, low]], ops); o = {}; b = close; h = open - close; @@ -279,11 +279,11 @@ o.color = r.downBodyColor; } ops = $.extend(true, {}, opts, o); - r.shapeRenderer.draw(ctx, [[x, hi], [x, open]], ops); + r.shapeRenderer.draw(ctx, [[x, hi], [x, open]], ops); r.shapeRenderer.draw(ctx, [[x, close], [x, low]], ops); - + o = {}; - + b = open; h = close - open; // if color specified, use it @@ -308,7 +308,7 @@ o.color = r.wickColor; } ops = $.extend(true, {}, opts, o); - r.shapeRenderer.draw(ctx, [[x, hi], [x, low]], ops); + r.shapeRenderer.draw(ctx, [[x, hi], [x, low]], ops); o = {}; o.fillRect = false; o.strokeRect = false; @@ -328,32 +328,32 @@ } // draw open tick if (!r.hlc) { - r.shapeRenderer.draw(ctx, [[x-r._tickLength, open], [x, open]], opts); + r.shapeRenderer.draw(ctx, [[x-r._tickLength, open], [x, open]], opts); } opts.color = prevColor; // draw wick if (r.wickColor) { opts.color = r.wickColor; } - r.shapeRenderer.draw(ctx, [[x, hi], [x, low]], opts); + r.shapeRenderer.draw(ctx, [[x, hi], [x, low]], opts); opts.color = prevColor; // draw close tick if (r.closeColor) { opts.color = r.closeColor; } - r.shapeRenderer.draw(ctx, [[x, close], [x+r._tickLength, close]], opts); + r.shapeRenderer.draw(ctx, [[x, close], [x+r._tickLength, close]], opts); opts.color = prevColor; } } } - + ctx.restore(); - }; - + }; + $.jqplot.OHLCRenderer.prototype.drawShadow = function(ctx, gd, options) { // This is a no-op, shadows drawn with lines. }; - + // called with scope of plot. $.jqplot.OHLCRenderer.checkOptions = function(target, data, options) { // provide some sensible highlighter options by default @@ -367,7 +367,7 @@ }; } }; - + //$.jqplot.preInitHooks.push($.jqplot.OHLCRenderer.checkOptions); - -})(jQuery); \ No newline at end of file + +})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.min.js index b37fa64d..61cd8b88 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.ohlcRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.OHLCRenderer=function(){a.jqplot.LineRenderer.call(this);this.candleStick=false;this.tickLength="auto";this.bodyWidth="auto";this.openColor=null;this.closeColor=null;this.wickColor=null;this.fillUpBody=false;this.fillDownBody=true;this.upBodyColor=null;this.downBodyColor=null;this.hlc=false;this.lineWidth=1.5;this._tickLength;this._bodyWidth};a.jqplot.OHLCRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.OHLCRenderer.prototype.constructor=a.jqplot.OHLCRenderer;a.jqplot.OHLCRenderer.prototype.init=function(e){e=e||{};this.lineWidth=e.lineWidth||1.5;a.jqplot.LineRenderer.prototype.init.call(this,e);this._type="ohlc";var b=this._yaxis._dataBounds;var f=this._plotData;if(f[0].length<5){this.renderer.hlc=true;for(var c=0;c<f.length;c++){if(f[c][2]<b.min||b.min==null){b.min=f[c][2]}if(f[c][1]>b.max||b.max==null){b.max=f[c][1]}}}else{for(var c=0;c<f.length;c++){if(f[c][3]<b.min||b.min==null){b.min=f[c][3]}if(f[c][2]>b.max||b.max==null){b.max=f[c][2]}}}};a.jqplot.OHLCRenderer.prototype.draw=function(A,N,j){var J=this.data;var v=this._xaxis.min;var z=this._xaxis.max;var l=0;var K=J.length;var p=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var D,E,f,M,F,n,O,C;var y;var u=this.renderer;var s=(j!=undefined)?j:{};var k=(s.shadow!=undefined)?s.shadow:this.shadow;var B=(s.fill!=undefined)?s.fill:this.fill;var c=(s.fillAndStroke!=undefined)?s.fillAndStroke:this.fillAndStroke;u.bodyWidth=(s.bodyWidth!=undefined)?s.bodyWidth:u.bodyWidth;u.tickLength=(s.tickLength!=undefined)?s.tickLength:u.tickLength;A.save();if(this.show){var m,q,g,Q,t;for(var D=0;D<J.length;D++){if(J[D][0]<v){l=D}else{if(J[D][0]<z){K=D+1}}}var I=this.gridData[K-1][0]-this.gridData[l][0];var L=K-l;try{var P=Math.abs(this._xaxis.series_u2p(parseInt(this._xaxis._intervalStats[0].sortedIntervals[0].interval,10))-this._xaxis.series_u2p(0))}catch(H){var P=I/L}if(u.candleStick){if(typeof(u.bodyWidth)=="number"){u._bodyWidth=u.bodyWidth}else{u._bodyWidth=Math.min(20,P/1.65)}}else{if(typeof(u.tickLength)=="number"){u._tickLength=u.tickLength}else{u._tickLength=Math.min(10,P/3.5)}}for(var D=l;D<K;D++){m=p(J[D][0]);if(u.hlc){q=null;g=G(J[D][1]);Q=G(J[D][2]);t=G(J[D][3])}else{q=G(J[D][1]);g=G(J[D][2]);Q=G(J[D][3]);t=G(J[D][4])}y={};if(u.candleStick&&!u.hlc){n=u._bodyWidth;O=m-n/2;if(t<q){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.upBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,t]],f);u.shapeRenderer.draw(A,[[m,q],[m,Q]],f);y={};M=t;F=q-t;if(u.fillUpBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.upBodyColor){y.color=u.upBodyColor;y.fillStyle=u.upBodyColor}C=[O,M,n,F]}else{if(t>q){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.downBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,q]],f);u.shapeRenderer.draw(A,[[m,t],[m,Q]],f);y={};M=q;F=t-q;if(u.fillDownBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.downBodyColor){y.color=u.downBodyColor;y.fillStyle=u.downBodyColor}C=[O,M,n,F]}else{if(u.wickColor){y.color=u.wickColor}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,Q]],f);y={};y.fillRect=false;y.strokeRect=false;O=[m-n/2,q];M=[m+n/2,t];n=null;F=null;C=[O,M]}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,C,f)}else{E=s.color;if(u.openColor){s.color=u.openColor}if(!u.hlc){u.shapeRenderer.draw(A,[[m-u._tickLength,q],[m,q]],s)}s.color=E;if(u.wickColor){s.color=u.wickColor}u.shapeRenderer.draw(A,[[m,g],[m,Q]],s);s.color=E;if(u.closeColor){s.color=u.closeColor}u.shapeRenderer.draw(A,[[m,t],[m+u._tickLength,t]],s);s.color=E}}}A.restore()};a.jqplot.OHLCRenderer.prototype.drawShadow=function(b,d,c){};a.jqplot.OHLCRenderer.checkOptions=function(d,c,b){if(!b.highlighter){b.highlighter={showMarker:false,tooltipAxes:"y",yvalues:4,formatString:'<table class="jqplot-highlighter"><tr><td>date:</td><td>%s</td></tr><tr><td>open:</td><td>%s</td></tr><tr><td>hi:</td><td>%s</td></tr><tr><td>low:</td><td>%s</td></tr><tr><td>close:</td><td>%s</td></tr></table>'}}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.js index 2479885c..6a991aa1 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { /** @@ -34,15 +34,15 @@ * Plugin renderer to draw a pie chart. * x values, if present, will be used as slice labels. * y values give slice size. - * - * To use this renderer, you need to include the + * + * To use this renderer, you need to include the * pie renderer plugin, for example: - * + * * > <script type="text/javascript" src="plugins/jqplot.pieRenderer.js"></script> - * + * * Properties described here are passed into the $.jqplot function * as options on the series renderer. For example: - * + * * > plot2 = $.jqplot('chart2', [s1, s2], { * > seriesDefaults: { * > renderer:$.jqplot.PieRenderer, @@ -52,12 +52,12 @@ * > } * > } * > }); - * + * * A pie plot will trigger events on the plot target * according to user interaction. All events return the event object, - * the series index, the point (slice) index, and the point data for + * the series index, the point (slice) index, and the point data for * the appropriate slice. - * + * * 'jqplotDataMouseOver' - triggered when user mouseing over a slice. * 'jqplotDataHighlight' - triggered the first time user mouses over a slice, * if highlighting is enabled. @@ -70,10 +70,10 @@ $.jqplot.PieRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.PieRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.PieRenderer.prototype.constructor = $.jqplot.PieRenderer; - + // called with scope of a series $.jqplot.PieRenderer.prototype.init = function(options, plot) { // Group: Properties @@ -91,14 +91,14 @@ // true or false, wether to fil the slices. this.fill = true; // prop: shadowOffset - // offset of the shadow from the slice and offset of + // offset of the shadow from the slice and offset of // each succesive stroke of the shadow from the last. this.shadowOffset = 2; // prop: shadowAlpha // transparency of the shadow (0 = transparent, 1 = opaque) this.shadowAlpha = 0.07; // prop: shadowDepth - // number of strokes to apply to the shadow, + // number of strokes to apply to the shadow, // each stroke offset shadowOffset from the last. this.shadowDepth = 5; // prop: highlightMouseOver @@ -138,7 +138,7 @@ // False to set the inside facing edge of the label at its position. this.dataLabelCenterOn = true; // prop: startAngle - // Angle to start drawing pie in degrees. + // Angle to start drawing pie in degrees. // According to orientation of canvas coordinate system: // 0 = on the positive x axis // -90 = on the positive y axis. @@ -149,12 +149,12 @@ // Used as check for conditions where pie shouldn't be drawn. this._drawData = true; this._type = 'pie'; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } - + $.extend(true, this, options); if (this.sliceMargin < 0) { @@ -167,7 +167,7 @@ this._sliceAngles = []; // index of the currenty highlighted point, if any this._highlightedPoint = null; - + // set highlight colors if none provided if (this.highlightColors.length == 0) { for (var i=0; i<this.seriesColors.length; i++){ @@ -182,9 +182,9 @@ this.highlightColors.push('rgb('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+')'); } } - + this.highlightColorGenerator = new $.jqplot.ColorGenerator(this.highlightColors); - + plot.postParseOptionsHooks.addOnce(postParseOptions); plot.postInitHooks.addOnce(postInit); plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove); @@ -194,7 +194,7 @@ plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick); plot.postDrawHooks.addOnce(postPlotDraw); }; - + $.jqplot.PieRenderer.prototype.setGridData = function(plot) { // set gridData property. This will hold angle in radians of each data point. var stack = []; @@ -216,14 +216,14 @@ tot += this.data[i][1]; } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; td[i][2] = this.data[i][1]/tot; } this.gridData = td; }; - + $.jqplot.PieRenderer.prototype.makeGridData = function(data, plot) { var stack = []; var td = []; @@ -244,7 +244,7 @@ tot += data[i][1]; } var fact = Math.PI*2/stack[stack.length - 1]; - + for (var i=0; i<stack.length; i++) { td[i][1] = stack[i] * fact; td[i][2] = data[i][1]/tot; @@ -271,7 +271,7 @@ return rprime; } - + $.jqplot.PieRenderer.prototype.drawSlice = function (ctx, ang1, ang2, color, isShadow) { if (this._drawData) { var r = this._radius; @@ -283,21 +283,21 @@ } ctx.save(); ctx.translate(this._center[0], this._center[1]); - + var rprime = calcRPrime(ang1, ang2, this.sliceMargin, this.fill, this.lineWidth); var transx = rprime * Math.cos((ang1 + ang2) / 2.0); var transy = rprime * Math.sin((ang1 + ang2) / 2.0); if ((ang2 - ang1) <= Math.PI) { - r -= rprime; + r -= rprime; } else { r += rprime; } ctx.translate(transx, transy); - + if (isShadow) { for (var i=0, l=this.shadowDepth; i<l; i++) { ctx.save(); @@ -308,13 +308,13 @@ ctx.restore(); } } - + else { doDraw(r); } ctx.restore(); } - + function doDraw (rad) { // Fix for IE and Chrome that can't seem to draw circles correctly. // ang2 should always be <= 2 pi since that is the way the data is converted. @@ -329,16 +329,16 @@ // ugly line on unfilled pies. if (ang1 >= ang2) { return; - } - - ctx.beginPath(); + } + + ctx.beginPath(); ctx.fillStyle = color; ctx.strokeStyle = color; ctx.lineWidth = lineWidth; ctx.arc(0, 0, rad, ang1, ang2, false); ctx.lineTo(0,0); ctx.closePath(); - + if (fill) { ctx.fill(); } @@ -347,7 +347,7 @@ } } }; - + // called with scope of series $.jqplot.PieRenderer.prototype.draw = function (ctx, gd, options, plot) { var i; @@ -392,7 +392,7 @@ break; } } - + var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow; var fill = (opts.fill != undefined) ? opts.fill : this.fill; var cw = ctx.canvas.width; @@ -401,7 +401,7 @@ var h = ch - offy - 2 * this.padding; var mindim = Math.min(w,h); var d = mindim; - + // Fixes issue #272. Thanks hugwijst! // reset slice angles array. this._sliceAngles = []; @@ -410,7 +410,7 @@ if (this.fill == false) { sm += this.lineWidth; } - + var rprime; var maxrprime = 0; @@ -427,7 +427,7 @@ rprime = calcRPrime(ang1, ang2, this.sliceMargin, this.fill, this.lineWidth); if (Math.abs(ang2-ang1) > Math.PI) { - maxrprime = Math.max(rprime, maxrprime); + maxrprime = Math.max(rprime, maxrprime); } } @@ -455,14 +455,14 @@ this.renderer.drawSlice.call (this, ctx, this._sliceAngles[i][0], this._sliceAngles[i][1], shadowColor, true); } } - + for (var i=0; i<gd.length; i++) { - + this.renderer.drawSlice.call (this, ctx, this._sliceAngles[i][0], this._sliceAngles[i][1], colorGenerator.next(), false); - + if (this.showDataLabels && gd[i][2]*100 >= this.dataLabelThreshold) { var fstr, avgang = (this._sliceAngles[i][0] + this._sliceAngles[i][1])/2, label; - + if (this.dataLabels == 'label') { fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, gd[i][0]); @@ -479,12 +479,12 @@ fstr = this.dataLabelFormatString || '%s'; label = $.jqplot.sprintf(fstr, this.dataLabels[i]); } - + var fact = (this._radius ) * this.dataLabelPositionFactor + this.sliceMargin + this.dataLabelNudge; - + var x = this._center[0] + Math.cos(avgang) * fact + this.canvas._offsets.left; var y = this._center[1] + Math.sin(avgang) * fact + this.canvas._offsets.top; - + var labelelem = $('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">' + label + '</div>').insertBefore(plot.eventCanvas._elem); if (this.dataLabelCenterOn) { x -= labelelem.width()/2; @@ -498,17 +498,17 @@ y = Math.round(y); labelelem.css({left: x, top: y}); } - } + } }; - + $.jqplot.PieAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.PieAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.PieAxisRenderer.prototype.constructor = $.jqplot.PieAxisRenderer; - - + + // There are no traditional axes on a pie chart. We just need to provide // dummy objects with properties so the plot will render. // called with scope of axis object. @@ -527,19 +527,19 @@ this.showTicks = false; this.ticks = []; this.showMark = false; - this.show = false; + this.show = false; }; - - - - + + + + $.jqplot.PieLegendRenderer = function(){ $.jqplot.TableLegendRenderer.call(this); }; - + $.jqplot.PieLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); $.jqplot.PieLegendRenderer.prototype.constructor = $.jqplot.PieLegendRenderer; - + /** * Class: $.jqplot.PieLegendRenderer * Legend Renderer specific to pie plots. Set by default @@ -556,7 +556,7 @@ this.numberColumns = null; $.extend(true, this, options); }; - + // called with context of legend $.jqplot.PieLegendRenderer.prototype.draw = function() { var legend = this; @@ -600,14 +600,14 @@ // Pie charts legends don't go by number of series, but by number of data points // in the series. Refactor things here for that. - - var pad = false, + + var pad = false, reverse = false, - nr, + nr, nc; var s = series[0]; var colorGenerator = new $.jqplot.ColorGenerator(s.seriesColors); - + if (s.show) { var pd = s.data; if (this.numberRows) { @@ -627,25 +627,25 @@ nr = pd.length; nc = 1; } - + var i, j; - var tr, td1, td2; + var tr, td1, td2; var lt, rs, color; - var idx = 0; - var div0, div1; - + var idx = 0; + var div0, div1; + for (i=0; i<nr; i++) { tr = $(document.createElement('tr')); tr.addClass('jqplot-table-legend'); - + if (reverse){ tr.prependTo(this._elem); } - + else{ tr.appendTo(this._elem); } - + for (j=0; j<nc; j++) { if (idx < pd.length){ lt = this.labels[idx] || pd[idx][0].toString(); @@ -702,13 +702,13 @@ pad = true; } idx++; - } + } } } } - return this._elem; + return this._elem; }; - + $.jqplot.PieRenderer.prototype.handleMove = function(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -722,10 +722,10 @@ unhighlight (plot); } }; - - + + // this.eventCanvas._elem.bind($.jqplot.eventListenerHooks[i][0], {plot:this}, $.jqplot.eventListenerHooks[i][1]); - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -745,7 +745,7 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.PieAxisRenderer; options.legend.renderer = $.jqplot.PieLegendRenderer; @@ -753,7 +753,7 @@ options.seriesDefaults.pointLabels = {show: false}; } } - + function postInit(target, data, options) { for (var i=0; i<this.series.length; i++) { if (this.series[i].renderer.constructor == $.jqplot.PieRenderer) { @@ -764,7 +764,7 @@ } } } - + // called with scope of plot function postParseOptions(options) { for (var i=0; i<this.series.length; i++) { @@ -772,7 +772,7 @@ this.series[i].colorGenerator = $.jqplot.colorGenerator; } } - + function highlight (plot, sidx, pidx) { var s = plot.series[sidx]; var canvas = plot.plugins.pieRenderer.highlightCanvas; @@ -781,7 +781,7 @@ plot.plugins.pieRenderer.highlightedSeriesIndex = sidx; s.renderer.drawSlice.call(s, canvas._ctx, s._sliceAngles[pidx][0], s._sliceAngles[pidx][1], s.highlightColorGenerator.get(pidx), false); } - + function unhighlight (plot) { var canvas = plot.plugins.pieRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -791,7 +791,7 @@ plot.plugins.pieRenderer.highlightedSeriesIndex = null; plot.target.trigger('jqplotDataUnhighlight'); } - + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -811,8 +811,8 @@ else if (neighbor == null) { unhighlight (plot); } - } - + } + function handleMouseDown(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -829,14 +829,14 @@ unhighlight (plot); } } - + function handleMouseUp(ev, gridpos, datapos, neighbor, plot) { var idx = plot.plugins.pieRenderer.highlightedSeriesIndex; if (idx != null && plot.series[idx].highlightMouseDown) { unhighlight(plot); } } - + function handleClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -847,7 +847,7 @@ plot.target.trigger(evt, ins); } } - + function handleRightClick(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -861,13 +861,13 @@ evt.pageY = ev.pageY; plot.target.trigger(evt, ins); } - } - + } + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.pieRenderer && this.plugins.pieRenderer.highlightCanvas) { this.plugins.pieRenderer.highlightCanvas.resetCanvas(); this.plugins.pieRenderer.highlightCanvas = null; @@ -875,7 +875,7 @@ this.plugins.pieRenderer = {highlightedSeriesIndex:null}; this.plugins.pieRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); - + // do we have any data labels? if so, put highlight canvas before those var labels = $(this.targetId+' .jqplot-data-label'); if (labels.length) { @@ -885,20 +885,19 @@ else { this.eventCanvas._elem.before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-pieRenderer-highlight-canvas', this._plotDimensions, this)); } - + var hctx = this.plugins.pieRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); } - + $.jqplot.preInitHooks.push(preInit); - + $.jqplot.PieTickRenderer = function() { $.jqplot.AxisTickRenderer.call(this); }; - + $.jqplot.PieTickRenderer.prototype = new $.jqplot.AxisTickRenderer(); $.jqplot.PieTickRenderer.prototype.constructor = $.jqplot.PieTickRenderer; - + })(jQuery); - - \ No newline at end of file + diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.min.js index 94759168..0c5738a7 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pieRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(e){e.jqplot.PieRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.PieRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.PieRenderer.prototype.constructor=e.jqplot.PieRenderer;e.jqplot.PieRenderer.prototype.init=function(q,u){this.diameter=null;this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.52;this.dataLabelNudge=2;this.dataLabelCenterOn=true;this.startAngle=0;this.tickRenderer=e.jqplot.PieTickRenderer;this._drawData=true;this._type="pie";if(q.highlightMouseDown&&q.highlightMouseOver==null){q.highlightMouseOver=false}e.extend(true,this,q);if(this.sliceMargin<0){this.sliceMargin=0}this._diameter=null;this._radius=null;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var s=0;s<this.seriesColors.length;s++){var r=e.jqplot.getColorComponents(this.seriesColors[s]);var o=[r[0],r[1],r[2]];var t=o[0]+o[1]+o[2];for(var p=0;p<3;p++){o[p]=(t>570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")")}}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r<this.data.length;r++){if(this.data[r][1]!=0){this._drawData=true}p.push(this.data[r][1]);u.push([this.data[r][0]]);if(r>0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){u[r][1]=p[r]*q;u[r][2]=this.data[r][1]/s}this.gridData=u};e.jqplot.PieRenderer.prototype.makeGridData=function(t,u){var p=[];var v=[];var s=0;var o=this.startAngle/180*Math.PI;this._drawData=false;for(var r=0;r<t.length;r++){if(this.data[r][1]!=0){this._drawData=true}p.push(t[r][1]);v.push([t[r][0]]);if(r>0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){v[r][1]=p[r]*q;v[r][2]=t[r][1]/s}return v};function h(o){return Math.sin((o-(o-Math.PI)/8/Math.PI)/2)}function j(u,t,o,v,r){var w=0;var q=t-u;var s=Math.abs(q);var p=o;if(v==false){p+=r}if(p>0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v<t;v++){B.save();B.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));q(p)}for(var v=0,t=this.shadowDepth;v<t;v++){B.restore()}}else{q(p)}B.restore()}function q(r){if(y>6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=B.canvas.width;var I=B.canvas.height;var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;W<V;W++){aa=(W==0)?D:z[W-1][1]+D;Z=z[W][1]+D;this._sliceAngles.push([aa,Z]);q=j(aa,Z,this.sliceMargin,this.fill,this.lineWidth);if(Math.abs(Z-aa)>Math.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W<V;W++){ab="rgba(0,0,0,"+this.shadowAlpha+")";this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],ab,true)}}for(var W=0;W<z.length;W++){this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],L.next(),false);if(this.showDataLabels&&z[W][2]*100>=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">'+T+"</div>").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2}P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table"));this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H<o;H++){q=e(document.createElement("tr"));q.addClass("jqplot-table-legend");if(A){q.prependTo(this._elem)}else{q.appendTo(this._elem)}for(G=0;G<y;G++){if(D<J.length){x=this.labels[D]||J[D][0].toString();F=p.next();if(!A){if(H>0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;q<p.series.length;q++){if(p.series[q].renderer==e.jqplot.PieRenderer){o=true}}}}if(o){p.axesDefaults.renderer=e.jqplot.PieAxisRenderer;p.legend.renderer=e.jqplot.PieLegendRenderer;p.legend.preDraw=true;p.seriesDefaults.pointLabels={show:false}}}function g(r,q,o){for(var p=0;p<this.series.length;p++){if(this.series[p].renderer.constructor==e.jqplot.PieRenderer){if(this.series[p].highlightMouseOver){this.series[p].highlightMouseDown=false}}}}function m(o){for(var p=0;p<this.series.length;p++){this.series[p].seriesColors=this.seriesColors;this.series[p].colorGenerator=e.jqplot.colorGenerator}}function d(t,r,q){var p=t.series[r];var o=t.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);p._highlightedPoint=q;t.plugins.pieRenderer.highlightedSeriesIndex=r;p.renderer.drawSlice.call(p,o._ctx,p._sliceAngles[q][0],p._sliceAngles[q][1],p.highlightColorGenerator.get(q),false)}function k(q){var o=q.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);for(var p=0;p<q.series.length;p++){q.series[p]._highlightedPoint=null}q.plugins.pieRenderer.highlightedSeriesIndex=null;q.target.trigger("jqplotDataUnhighlight")}function b(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var p=jQuery.Event("jqplotDataMouseOver");p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q);if(t.series[q[0]].highlightMouseOver&&!(q[0]==t.plugins.pieRenderer.highlightedSeriesIndex&&q[1]==t.series[q[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.which=s.which;o.pageX=s.pageX;o.pageY=s.pageY;t.target.trigger(o,q);d(t,q[0],q[1])}}else{if(u==null){k(t)}}}function a(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];if(s.series[p[0]].highlightMouseDown&&!(p[0]==s.plugins.pieRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);d(s,p[0],p[1])}}else{if(t==null){k(s)}}}function l(q,p,t,s,r){var o=r.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&r.series[o].highlightMouseDown){k(r)}}function f(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataClick");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}function n(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var o=t.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&t.series[o].highlightMouseDown){k(t)}var p=jQuery.Event("jqplotDataRightClick");p.which=s.which;p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q)}}function i(){if(this.plugins.pieRenderer&&this.plugins.pieRenderer.highlightCanvas){this.plugins.pieRenderer.highlightCanvas.resetCanvas();this.plugins.pieRenderer.highlightCanvas=null}this.plugins.pieRenderer={highlightedSeriesIndex:null};this.plugins.pieRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var p=e(this.targetId+" .jqplot-data-label");if(p.length){e(p[0]).before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}else{this.eventCanvas._elem.before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}var o=this.plugins.pieRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(q){k(q.data.plot)})}e.jqplot.preInitHooks.push(c);e.jqplot.PieTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.PieTickRenderer.prototype=new e.jqplot.AxisTickRenderer();e.jqplot.PieTickRenderer.prototype.constructor=e.jqplot.PieTickRenderer})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.js index c20a9c44..0cc44443 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,54 +26,54 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { - + /** * Class: $.jqplot.PointLabels * Plugin for putting labels at the data points. - * + * * To use this plugin, include the js * file in your source: - * + * * > <script type="text/javascript" src="plugins/jqplot.pointLabels.js"></script> - * + * * By default, the last value in the data ponit array in the data series is used - * for the label. For most series renderers, extra data can be added to the + * for the label. For most series renderers, extra data can be added to the * data point arrays and the last value will be used as the label. - * - * For instance, + * + * For instance, * this series: - * + * * > [[1,4], [3,5], [7,2]] - * + * * Would, by default, use the y values in the labels. * Extra data can be added to the series like so: - * + * * > [[1,4,'mid'], [3 5,'hi'], [7,2,'low']] - * + * * And now the point labels would be 'mid', 'low', and 'hi'. - * + * * Options to the point labels and a custom labels array can be passed into the * "pointLabels" option on the series option like so: - * + * * > series:[{pointLabels:{ * > labels:['mid', 'hi', 'low'], * > location:'se', * > ypadding: 12 * > } * > }] - * + * * A custom labels array in the options takes precendence over any labels * in the series data. If you have a custom labels array in the options, * but still want to use values from the series array as labels, set the * "labelsFromSeries" option to true. - * - * By default, html entities (<, >, etc.) are escaped in point labels. - * If you want to include actual html markup in the labels, + * + * By default, html entities (<, >, etc.) are escaped in point labels. + * If you want to include actual html markup in the labels, * set the "escapeHTML" option to false. - * + * */ $.jqplot.PointLabels = function(options) { // Group: Properties @@ -127,14 +127,14 @@ // true to not show a label for a value which is 0. this.hideZeros = false; this._elems = []; - + $.extend(true, this, options); }; - + var locations = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w']; var locationIndicies = {'nw':0, 'n':1, 'ne':2, 'e':3, 'se':4, 's':5, 'sw':6, 'w':7}; var oppositeLocations = ['se', 's', 'sw', 'w', 'nw', 'n', 'ne', 'e']; - + // called with scope of a series $.jqplot.PointLabels.init = function (target, data, seriesDefaults, opts, plot){ var options = $.extend(true, {}, seriesDefaults, opts); @@ -146,10 +146,10 @@ this.plugins.pointLabels = new $.jqplot.PointLabels(options.pointLabels); this.plugins.pointLabels.setLabels.call(this); }; - + // called with scope of series - $.jqplot.PointLabels.prototype.setLabels = function() { - var p = this.plugins.pointLabels; + $.jqplot.PointLabels.prototype.setLabels = function() { + var p = this.plugins.pointLabels; var labelIdx; if (p.seriesLabelIndex != null) { labelIdx = p.seriesLabelIndex; @@ -161,7 +161,7 @@ labelIdx = (this._plotData.length === 0) ? 0 : this._plotData[0].length -1; } p._labels = []; - if (p.labels.length === 0 || p.labelsFromSeries) { + if (p.labels.length === 0 || p.labelsFromSeries) { if (p.stackedValue) { if (this._plotData.length && this._plotData[0].length){ // var idx = p.seriesLabelIndex || this._plotData[0].length -1; @@ -189,12 +189,12 @@ p._labels = p.labels; } }; - + $.jqplot.PointLabels.prototype.xOffset = function(elem, location, padding) { location = location || this.location; padding = padding || this.xpadding; var offset; - + switch (location) { case 'nw': offset = -elem.outerWidth(true) - this.xpadding; @@ -224,14 +224,14 @@ offset = -elem.outerWidth(true) - this.xpadding; break; } - return offset; + return offset; }; - + $.jqplot.PointLabels.prototype.yOffset = function(elem, location, padding) { location = location || this.location; padding = padding || this.xpadding; var offset; - + switch (location) { case 'nw': offset = -elem.outerHeight(true) - this.ypadding; @@ -261,9 +261,9 @@ offset = -elem.outerHeight(true) - this.ypadding; break; } - return offset; + return offset; }; - + // called with scope of series $.jqplot.PointLabels.draw = function (sctx, options, plot) { var p = this.plugins.pointLabels; @@ -279,12 +279,12 @@ if (p.show) { var ax = '_'+this._stackAxis+'axis'; - + if (!p.formatString) { p.formatString = this[ax]._ticks[0].formatString; p.formatter = this[ax]._ticks[0].formatter; } - + var pd = this._plotData; var ppd = this._prevPlotData; var xax = this._xaxis; @@ -293,14 +293,14 @@ for (var i=0, l=p._labels.length; i < l; i++) { var label = p._labels[i]; - + if (p.hideZeros && parseInt(p._labels[i], 10) == 0) { label = ''; } - + if (label != null) { label = p.formatter(p.formatString, label); - } + } helem = document.createElement('div'); p._elems[i] = $(helem); @@ -373,7 +373,7 @@ } }; - + $.jqplot.postSeriesInitHooks.push($.jqplot.PointLabels.init); $.jqplot.postDrawSeriesHooks.push($.jqplot.PointLabels.draw); })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.min.js index 2e1a00c7..d4fa0b51 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pointLabels.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this._labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=-5;this.formatter=c.jqplot.DefaultTickFormatter;this.formatString="";this.hideZeros=false;this._elems=[];c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(j,h,f,g,i){var e=c.extend(true,{},f,g);e.pointLabels=e.pointLabels||{};if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"&&!e.pointLabels.location){e.pointLabels.location="e"}this.plugins.pointLabels=new c.jqplot.PointLabels(e.pointLabels);this.plugins.pointLabels.setLabels.call(this)};c.jqplot.PointLabels.prototype.setLabels=function(){var f=this.plugins.pointLabels;var h;if(f.seriesLabelIndex!=null){h=f.seriesLabelIndex}else{if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"){h=0}else{h=(this._plotData.length===0)?0:this._plotData[0].length-1}}f._labels=[];if(f.labels.length===0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){for(var e=0;e<this._plotData.length;e++){f._labels.push(this._plotData[e][h])}}}else{var g=this.data;if(this.renderer.constructor===c.jqplot.BarRenderer&&this.waterfall){g=this._data}if(g.length&&g[0].length){for(var e=0;e<g.length;e++){f._labels.push(g[e][h])}}g=null}}else{if(f.labels.length){f._labels=f.labels}}};c.jqplot.PointLabels.prototype.xOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerWidth(true)-this.xpadding;break;case"n":h=-f.outerWidth(true)/2;break;case"ne":h=this.xpadding;break;case"e":h=this.xpadding;break;case"se":h=this.xpadding;break;case"s":h=-f.outerWidth(true)/2;break;case"sw":h=-f.outerWidth(true)-this.xpadding;break;case"w":h=-f.outerWidth(true)-this.xpadding;break;default:h=-f.outerWidth(true)-this.xpadding;break}return h};c.jqplot.PointLabels.prototype.yOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerHeight(true)-this.ypadding;break;case"n":h=-f.outerHeight(true)-this.ypadding;break;case"ne":h=-f.outerHeight(true)-this.ypadding;break;case"e":h=-f.outerHeight(true)/2;break;case"se":h=this.ypadding;break;case"s":h=this.ypadding;break;case"sw":h=this.ypadding;break;case"w":h=-f.outerHeight(true)/2;break;default:h=-f.outerHeight(true)-this.ypadding;break}return h};c.jqplot.PointLabels.draw=function(x,j,v){var t=this.plugins.pointLabels;t.setLabels.call(this);for(var w=0;w<t._elems.length;w++){t._elems[w].emptyForce()}t._elems.splice(0,t._elems.length);if(t.show){var r="_"+this._stackAxis+"axis";if(!t.formatString){t.formatString=this[r]._ticks[0].formatString;t.formatter=this[r]._ticks[0].formatter}var E=this._plotData;var D=this._prevPlotData;var A=this._xaxis;var q=this._yaxis;var z,f;for(var w=0,u=t._labels.length;w<u;w++){var o=t._labels[w];if(t.hideZeros&&parseInt(t._labels[w],10)==0){o=""}if(o!=null){o=t.formatter(t.formatString,o)}f=document.createElement("div");t._elems[w]=c(f);z=t._elems[w];z.addClass("jqplot-point-label jqplot-series-"+this.index+" jqplot-point-"+w);z.css("position","absolute");z.insertAfter(x.canvas);if(t.escapeHTML){z.text(o)}else{z.html(o)}var g=t.location;if((this.fillToZero&&E[w][1]<0)||(this.fillToZero&&this._type==="bar"&&this.barDirection==="horizontal"&&E[w][0]<0)||(this.waterfall&&parseInt(o,10))<0){g=b[d[g]]}var n=A.u2p(E[w][0])+t.xOffset(z,g);var h=q.u2p(E[w][1])+t.yOffset(z,g);if(this._stack&&!t.stackedValue){if(this.barDirection==="vertical"){h=(this._barPoints[w][0][1]+this._barPoints[w][1][1])/2+v._gridPadding.top-0.5*z.outerHeight(true)}else{n=(this._barPoints[w][2][0]+this._barPoints[w][0][0])/2+v._gridPadding.left-0.5*z.outerWidth(true)}}if(this.renderer.constructor==c.jqplot.BarRenderer){if(this.barDirection=="vertical"){n+=this._barNudge}else{h-=this._barNudge}}z.css("left",n);z.css("top",h);var k=n+z.width();var s=h+z.height();var C=t.edgeTolerance;var e=c(x.canvas).position().left;var y=c(x.canvas).position().top;var B=x.canvas.width+e;var m=x.canvas.height+y;if(n-C<e||h-C<y||k+C>B||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.js index 4035488a..e43f6bda 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,16 +26,16 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { $.jqplot.PyramidAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); }; - + $.jqplot.PyramidAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.PyramidAxisRenderer.prototype.constructor = $.jqplot.PyramidAxisRenderer; - + // called with scope of axis $.jqplot.PyramidAxisRenderer.prototype.init = function(options){ // Group: Properties @@ -60,7 +60,7 @@ this.category = false; this._autoFormatString = ''; this._overrideFormatString = false; - + $.extend(true, this, options); this.renderer.options = options; @@ -79,8 +79,8 @@ for (var i=0; i<this._series.length; i++) { var s = this._series[i]; var d = s._plotData; - - for (var j=0, l=d.length; j<l; j++) { + + for (var j=0, l=d.length; j<l; j++) { if (this.name.charAt(0) === 'x') { temp = d[j][1]; if ((temp !== null && temp < db.min) || db.min === null) { @@ -89,7 +89,7 @@ if ((temp !== null && temp > db.max) || db.max === null) { db.max = temp; } - } + } else { temp = d[j][0]; if ((temp !== null && temp < db.min) || db.min === null) { @@ -98,11 +98,11 @@ if ((temp !== null && temp > db.max) || db.max === null) { db.max = temp; } - } + } } } }; - + // called with scope of axis $.jqplot.PyramidAxisRenderer.prototype.draw = function(ctx, plot) { if (this.show) { @@ -122,19 +122,19 @@ this._elem.emptyForce(); this._elem = null; } - + this._elem = $(document.createElement('div')); this._elem.addClass('jqplot-axis jqplot-'+this.name); this._elem.css('position', 'absolute'); - + if (this.name == 'xaxis' || this.name == 'x2axis') { this._elem.width(this._plotDimensions.width); } else { this._elem.height(this._plotDimensions.height); } - + // create a _label object. this.labelOptions.axis = this.name; this._label = new this.labelRenderer(this.labelOptions); @@ -143,7 +143,7 @@ elem.appendTo(this._elem); elem = null; } - + var t = this._ticks; var tick; for (var i=0; i<t.length; i++) { @@ -156,7 +156,7 @@ t = null; } return this._elem; - }; + }; // Note, primes can be found on http://primes.utm.edu/ var _primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]; @@ -200,7 +200,7 @@ var val; var skip = null; var temp; - + // if we already have ticks, use them. // ticks must be in order of increasing value. @@ -221,7 +221,7 @@ t.axis = this.name; this._ticks.push(t); } - + else { if (typeof ut === 'string') { val = i + plot.defaultAxisStart; @@ -348,10 +348,10 @@ threshold = 30; tdim = Math.max(dim, threshold+1); scalefact = (tdim-threshold)/300.0; - ret = $.jqplot.LinearTickGenerator(min, max, scalefact); + ret = $.jqplot.LinearTickGenerator(min, max, scalefact); // calculate a padded max and min, points should be less than these // so that they aren't too close to the edges of the plot. - // User can adjust how much padding is allowed with pad, padMin and PadMax options. + // User can adjust how much padding is allowed with pad, padMin and PadMax options. tumin = min + range*(this.padMin - 1); tumax = max - range*(this.padMax - 1); @@ -386,7 +386,7 @@ this.max = max; this.min = min; - + maxVisibleTicks = Math.round(2.0 + dim/this.tickSpacingFactor); if (range + 1 <= maxVisibleTicks) { @@ -404,11 +404,11 @@ this.tickInterval = range/(i - 1); break; } - + } } } - + if (this._overrideFormatString && this._autoFormatString != '') { this.tickOptions = this.tickOptions || {}; this.tickOptions.formatString = this._autoFormatString; @@ -441,9 +441,9 @@ t = null; } }; - + // called with scope of axis - $.jqplot.PyramidAxisRenderer.prototype.set = function() { + $.jqplot.PyramidAxisRenderer.prototype.set = function() { var dim = 0; var temp; var w = 0; @@ -481,10 +481,10 @@ } tick = null; t = null; - + if (lshow) { w = this._label._elem.outerWidth(true); - h = this._label._elem.outerHeight(true); + h = this._label._elem.outerHeight(true); } if (this.name === 'xaxis') { dim = dim + h; @@ -517,40 +517,40 @@ this._label._elem.css('width', w+'px'); } } - } + } }; - - $.jqplot.PyramidAxisRenderer.prototype.pack = function(pos, offsets) { + + $.jqplot.PyramidAxisRenderer.prototype.pack = function(pos, offsets) { // Add defaults for repacking from resetTickValues function. pos = pos || {}; offsets = offsets || this._offsets; - + var ticks = this._ticks; var max = this.max; var min = this.min; var offmax = offsets.max; var offmin = offsets.min; var lshow = (this._label == null) ? false : this._label.show; - + for (var p in pos) { this._elem.css(p, pos[p]); } - + this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; var sl = this._splitLength; - + // point to unit and unit to point conversions references to Plot DOM element top left corner. if (this._splitAxis) { pixellength -= this._splitLength; - + // don't know that this one is correct. this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + this.u2p = function(u){ if (u <= 0) { return (u - min) * pixellength / unitlength + offmin; @@ -559,7 +559,7 @@ return (u - min) * pixellength / unitlength + offmin + sl; } }; - + this.series_u2p = function(u){ if (u <= 0) { return (u - min) * pixellength / unitlength; @@ -578,11 +578,11 @@ this.p2u = function(p){ return (p - offmin) * unitlength / pixellength + min; }; - + this.u2p = function(u){ return (u - min) * pixellength / unitlength + offmin; }; - + if (this.name.charAt(0) === 'x'){ this.series_u2p = function(u){ return (u - min) * pixellength / unitlength; @@ -591,7 +591,7 @@ return p * unitlength / pixellength + min; }; } - + else { this.series_u2p = function(u){ return (u - max) * pixellength / unitlength; @@ -601,14 +601,14 @@ }; } } - + if (this.show) { if (this.name.charAt(0) === 'x') { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; - + if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. var temp = (this.name == 'xaxis') ? 1 : -1; @@ -660,7 +660,7 @@ else { for (var i=0; i<ticks.length; i++) { var t = ticks[i]; - if (t.show && t.showLabel && !t.isMinorTick) { + if (t.show && t.showLabel && !t.isMinorTick) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { // will need to adjust auto positioning based on which axis this is. @@ -701,7 +701,7 @@ else { shim = -t.getHeight()/2; } - + var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); @@ -717,7 +717,7 @@ } else if (this.name !== 'yMidAxis') { this._label._elem.css('right', '0px'); - } + } this._label.pack(); } } diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js index f59fb564..bcb184a6 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(e){e.jqplot.PyramidAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PyramidAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PyramidAxisRenderer.prototype.constructor=e.jqplot.PyramidAxisRenderer;e.jqplot.PyramidAxisRenderer.prototype.init=function(f){this.position=null;this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.tickSpacingFactor=25;this._type="pyramid";this._splitAxis=false;this._splitLength=null;this.category=false;this._autoFormatString="";this._overrideFormatString=false;e.extend(true,this,f);this.renderer.options=f;this.resetDataBounds=this.renderer.resetDataBounds;this.resetDataBounds()};e.jqplot.PyramidAxisRenderer.prototype.resetDataBounds=function(){var h=this._dataBounds;h.min=null;h.max=null;var g;for(var m=0;m<this._series.length;m++){var n=this._series[m];var o=n._plotData;for(var k=0,f=o.length;k<f;k++){if(this.name.charAt(0)==="x"){g=o[k][1];if((g!==null&&g<h.min)||h.min===null){h.min=g}if((g!==null&&g>h.max)||h.max===null){h.max=g}}else{g=o[k][0];if((g!==null&&g<h.min)||h.min===null){h.min=g}if((g!==null&&g>h.max)||h.max===null){h.max=g}}}}};e.jqplot.PyramidAxisRenderer.prototype.draw=function(f,n){if(this.show){this.renderer.createTicks.call(this,n);var m=0;var g;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=e(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var l=this._label.draw(f,n);l.appendTo(this._elem);l=null}var k=this._ticks;var j;for(var h=0;h<k.length;h++){j=k[h];if(j.show&&j.showLabel&&(!j.isMinorTick)){this._elem.append(j.draw(f,n))}}j=null;k=null}return this._elem};var b=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var d={};for(var c=0,a=b.length;c<a;c++){d[b[c]]=b[c]}e.jqplot.PyramidAxisRenderer.prototype.createTicks=function(D){var J=this.ticks;var M=this._dataBounds;var E;var K;var B;var G;var y;var n;var k;var h;var H;var C;var x;var L=this.min;var N=this.max;var q;var v;var m;var g;var j;var O;var A;var F;var r;var P;var z=null;var I;if(J.length){for(H=0,C=J.length;H<C;H++){q=J[H];v=new this.tickRenderer(this.tickOptions);if(e.isArray(q)){v.value=q[0];v.label=q[1];v.setTick(q[0],this.name);this._ticks.push(v)}else{if(e.isPlainObject(q)){e.extend(true,v,q);v.axis=this.name;this._ticks.push(v)}else{if(typeof q==="string"){P=H+D.defaultAxisStart}else{P=q}v.value=P;v.label=q;v.axis=this.name;this._ticks.push(v)}}}this.numberTicks=J.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1);if(this._options.tickInterval){var o=this._options.tickInterval;for(H=0;H<this.numberTicks;H++){if(H%o!==0){this._ticks[H].isMinorTick=true}}}else{E=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;r=Math.round(2+E/this.tickSpacingFactor);if(this.numberTicks>r){I=this.numberTicks-1;for(H=2;H<I;H++){if(I%H===0&&I/H<r){z=H-1;break}}if(z!==null){var p=1;for(H=1,C=this._ticks.length;H<C;H++){if(p<=z){this._ticks[H].show=false;p+=1}else{p=1}}}}}I=[];if(this.category){this._ticks[0].showGridline=false;this._ticks[0].showMark=false;for(H=this._ticks.length-1;H>0;H--){v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[H-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks[H].showGridline=false;this._ticks[H].showMark=false;this._ticks.splice(H,0,v)}v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[0].value-this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.unshift(v);v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[this._ticks.length-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.push(v);this.tickInterval=this.tickInterval/2;this.numberTicks=this._ticks.length;this.min=this._ticks[0].value;this.max=this._ticks[this._ticks.length-1].value}}else{if(this.name.charAt(0)==="x"){E=this._plotDimensions.width;var w=Math.max(M.max,Math.abs(M.min));var u=Math.min(M.min,-w);B=u;G=w;y=G-B;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}m=30;g=Math.max(E,m+1);j=(g-m)/300;O=e.jqplot.LinearTickGenerator(B,G,j);A=B+y*(this.padMin-1);F=G-y*(this.padMax-1);if(B<A||G>F){A=B-y*(this.padMin-1);F=G+y*(this.padMax-1);O=e.jqplot.LinearTickGenerator(A,F,j)}this.min=O[0];this.max=O[1];this.numberTicks=O[2];this._autoFormatString=O[3];this.tickInterval=O[4]}else{E=this._plotDimensions.height;B=M.min;G=M.max;x=this._series[0];this._ticks=[];y=G-B;if(d[y]){y+=1;G+=1}this.max=G;this.min=B;r=Math.round(2+E/this.tickSpacingFactor);if(y+1<=r){this.numberTicks=y+1;this.tickInterval=1}else{for(var H=r;H>1;H--){if(y/(H-1)===Math.round(y/(H-1))){this.numberTicks=H;this.tickInterval=y/(H-1);break}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var f;for(H=0;H<this.numberTicks;H++){this.tickOptions.axis=this.name;f=this.min+this.tickInterval*H;if(this.name.charAt(0)==="x"){f=Math.abs(f)}this.tickOptions.value=this.min+this.tickInterval*H;v=new this.tickRenderer(this.tickOptions);v.label=v.prefix+v.formatter(v.formatString,f);this._ticks.push(v);if(this.name.charAt(0)==="x"&&D.axes.yMidAxis.show&&this.tickOptions.value===0){this._splitAxis=true;this._splitLength=D.axes.yMidAxis.getWidth();v=new this.tickRenderer(this.tickOptions);this._ticks.push(v);v.value=this.max/2000}}v=null}};e.jqplot.PyramidAxisRenderer.prototype.set=function(){var o=0;var j;var g=0;var n=0;var m;var l;var k;var f=(this._label==null)?false:this._label.show;if(this.show){l=this._ticks;a=l.length;for(m=0;m<a;m++){k=l[m];if(!k._breakTick&&k.show&&k.showLabel&&!k.isMinorTick){if(this.name.charAt(0)==="x"){j=k._elem.outerHeight(true)}else{j=k._elem.outerWidth(true)}if(j>o){o=j}}}if(this.name==="yMidAxis"){for(m=0;m<a;m++){k=l[m];if(k._elem){j=(o-k._elem.outerWidth(true))/2;k._elem.css("left",j)}}}k=null;l=null;if(f){g=this._label._elem.outerWidth(true);n=this._label._elem.outerHeight(true)}if(this.name==="xaxis"){o=o+n;this._elem.css({height:o+"px",left:"0px",bottom:"0px"})}else{if(this.name==="x2axis"){o=o+n;this._elem.css({height:o+"px",left:"0px",top:"0px"})}else{if(this.name==="yaxis"){o=o+g;this._elem.css({width:o+"px",left:"0px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css("width",g+"px")}}else{if(this.name==="yMidAxis"){var j=o/2-g/2;this._elem.css({width:o+"px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css({width:g,left:j,top:0})}}else{o=o+g;this._elem.css({width:o+"px",right:"0px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css("width",g+"px")}}}}}}};e.jqplot.PyramidAxisRenderer.prototype.pack=function(j,g){j=j||{};g=g||this._offsets;var B=this._ticks;var v=this.max;var u=this.min;var o=g.max;var m=g.min;var r=(this._label==null)?false:this._label.show;for(var s in j){this._elem.css(s,j[s])}this._offsets=g;var k=o-m;var l=v-u;var z=this._splitLength;if(this._splitAxis){k-=this._splitLength;this.p2u=function(h){return(h-m)*l/k+u};this.u2p=function(h){if(h<=0){return(h-u)*k/l+m}else{return(h-u)*k/l+m+z}};this.series_u2p=function(h){if(h<=0){return(h-u)*k/l}else{return(h-u)*k/l+z}};this.series_p2u=function(h){return h*l/k+u}}else{this.p2u=function(h){return(h-m)*l/k+u};this.u2p=function(h){return(h-u)*k/l+m};if(this.name.charAt(0)==="x"){this.series_u2p=function(h){return(h-u)*k/l};this.series_p2u=function(h){return h*l/k+u}}else{this.series_u2p=function(h){return(h-v)*k/l};this.series_p2u=function(h){return h*l/k+v}}}if(this.show){if(this.name.charAt(0)==="x"){for(var x=0;x<B.length;x++){var q=B[x];if(q.show&&q.showLabel){var f;if(q.constructor==e.jqplot.CanvasAxisTickRenderer&&q.angle){var A=(this.name=="xaxis")?1:-1;switch(q.labelPosition){case"auto":if(A*q.angle<0){f=-q.getWidth()+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2}else{f=-q._textRenderer.height*Math.sin(q._textRenderer.angle)/2}break;case"end":f=-q.getWidth()+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break;case"start":f=-q._textRenderer.height*Math.sin(q._textRenderer.angle)/2;break;case"middle":f=-q.getWidth()/2+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break;default:f=-q.getWidth()/2+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break}}else{f=-q.getWidth()/2}var C=this.u2p(q.value)+f+"px";q._elem.css("left",C);q.pack()}}if(r){var n=this._label._elem.outerWidth(true);this._label._elem.css("left",m+k/2-n/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var x=0;x<B.length;x++){var q=B[x];if(q.show&&q.showLabel&&!q.isMinorTick){var f;if(q.constructor==e.jqplot.CanvasAxisTickRenderer&&q.angle){var A=(this.name=="yaxis")?1:-1;switch(q.labelPosition){case"auto":case"end":if(A*q.angle<0){f=-q._textRenderer.height*Math.cos(-q._textRenderer.angle)/2}else{f=-q.getHeight()+q._textRenderer.height*Math.cos(q._textRenderer.angle)/2}break;case"start":if(q.angle>0){f=-q._textRenderer.height*Math.cos(-q._textRenderer.angle)/2}else{f=-q.getHeight()+q._textRenderer.height*Math.cos(q._textRenderer.angle)/2}break;case"middle":f=-q.getHeight()/2;break;default:f=-q.getHeight()/2;break}}else{f=-q.getHeight()/2}var C=this.u2p(q.value)+f+"px";q._elem.css("top",C);q.pack()}}if(r){var y=this._label._elem.outerHeight(true);if(this.name!=="yMidAxis"){this._label._elem.css("top",o-k/2-y/2+"px")}if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{if(this.name!=="yMidAxis"){this._label._elem.css("right","0px")}}this._label.pack()}}}B=null}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.js index 6124cbad..64fa2acc 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,9 +26,9 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ -(function($) { +(function($) { // Class: $.jqplot.CanvasGridRenderer // The default jqPlot grid renderer, creating a grid on a canvas element. // The renderer has no additional options beyond the <Grid> class. @@ -38,7 +38,7 @@ $.jqplot.PyramidGridRenderer.prototype = new $.jqplot.CanvasGridRenderer(); $.jqplot.PyramidGridRenderer.prototype.constructor = $.jqplot.PyramidGridRenderer; - + // called with context of Grid object $.jqplot.CanvasGridRenderer.prototype.init = function(options) { this._ctx; @@ -54,7 +54,7 @@ var sopts = {lineJoin:'miter', lineCap:'round', fill:false, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.shadowWidth, closePath:false, strokeStyle:this.shadowColor}; this.renderer.shadowRenderer.init(sopts); }; - + $.jqplot.PyramidGridRenderer.prototype.draw = function() { this._ctx = this._elem.get(0).getContext("2d"); var ctx = this._ctx; @@ -126,7 +126,7 @@ } ctx.restore(); } - + ctx.save(); ctx.lineJoin = 'miter'; ctx.lineCap = 'butt'; @@ -160,7 +160,7 @@ case 'yaxis': drawLine (this._left, this._bottom, this._left, this._top, bopts); break; - case 'yMidAxis': + case 'yMidAxis': drawLine(xp0, this._bottom, xp0, this._top, bopts); drawLine(xpn, this._bottom, xpn, this._top, bopts); break; @@ -189,7 +189,7 @@ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) { drawLine(pos, this._top, pos, this._bottom); } - + // draw the mark if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) { s = t.markSize; @@ -368,9 +368,9 @@ axis = null; ticks = null; } - + ctx.restore(); - + function drawLine(bx, by, ex, ey, opts) { ctx.save(); opts = opts || {}; @@ -383,7 +383,7 @@ } ctx.restore(); } - + if (this.shadow) { if (axes.yMidAxis.show) { var points = [[this._left, this._bottom], [xp0, this._bottom]]; @@ -421,9 +421,9 @@ // ctx.lineWidth = this.borderWidth; // ctx.strokeStyle = this.borderColor; // ctx.strokeRect(this._left, this._top, this._width, this._height); - + ctx.restore(); ctx = null; axes = null; }; -})(jQuery); \ No newline at end of file +})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.min.js index 0bcd0289..ebf6ee44 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidGridRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(a){a.jqplot.PyramidGridRenderer=function(){a.jqplot.CanvasGridRenderer.call(this)};a.jqplot.PyramidGridRenderer.prototype=new a.jqplot.CanvasGridRenderer();a.jqplot.PyramidGridRenderer.prototype.constructor=a.jqplot.PyramidGridRenderer;a.jqplot.CanvasGridRenderer.prototype.init=function(c){this._ctx;this.plotBands={show:false,color:"rgb(230, 219, 179)",axis:"y",start:null,interval:10};a.extend(true,this,c);var b={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(b)};a.jqplot.PyramidGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var D=this._ctx;var G=this._axes;var q=G.xaxis.u2p;var J=G.yMidAxis.u2p;var l=G.xaxis.max/1000;var u=q(0);var f=q(l);var r=["xaxis","yaxis","x2axis","y2axis","yMidAxis"];D.save();D.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);D.fillStyle=this.backgroundColor||this.background;D.fillRect(this._left,this._top,this._width,this._height);if(this.plotBands.show){D.save();var c=this.plotBands;D.fillStyle=c.color;var d;var o,n,p,I;if(c.axis.charAt(0)==="x"){if(G.xaxis.show){d=G.xaxis}}else{if(c.axis.charAt(0)==="y"){if(G.yaxis.show){d=G.yaxis}else{if(G.y2axis.show){d=G.y2axis}else{if(G.yMidAxis.show){d=G.yMidAxis}}}}}if(d!==undefined){var g=c.start;if(g===null){g=d.min}for(var H=g;H<d.max;H+=2*c.interval){if(d.name.charAt(0)==="y"){o=this._left;if((H+c.interval)<d.max){n=d.series_u2p(H+c.interval)+this._top}else{n=d.series_u2p(d.max)+this._top}p=this._right-this._left;I=d.series_u2p(g)-d.series_u2p(g+c.interval);D.fillRect(o,n,p,I)}}}D.restore()}D.save();D.lineJoin="miter";D.lineCap="butt";D.lineWidth=this.gridLineWidth;D.strokeStyle=this.gridLineColor;var L,K,A,C;for(var H=5;H>0;H--){var O=r[H-1];var d=G[O];var M=d._ticks;var B=M.length;if(d.show){if(d.drawBaseline){var N={};if(d.baselineWidth!==null){N.lineWidth=d.baselineWidth}if(d.baselineColor!==null){N.strokeStyle=d.baselineColor}switch(O){case"xaxis":if(G.yMidAxis.show){z(this._left,this._bottom,u,this._bottom,N);z(f,this._bottom,this._right,this._bottom,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"yaxis":z(this._left,this._bottom,this._left,this._top,N);break;case"yMidAxis":z(u,this._bottom,u,this._top,N);z(f,this._bottom,f,this._top,N);break;case"x2axis":if(G.yMidAxis.show){z(this._left,this._top,u,this._top,N);z(f,this._top,this._right,this._top,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"y2axis":z(this._right,this._bottom,this._right,this._top,N);break}}for(var E=B;E>0;E--){var v=M[E-1];if(v.show){var k=Math.round(d.u2p(v.value))+0.5;switch(O){case"xaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._top,k,this._bottom)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._bottom;K=this._bottom+A;break;case"inside":L=this._bottom-A;K=this._bottom;break;case"cross":L=this._bottom-A;K=this._bottom+A;break;default:L=this._bottom;K=this._bottom+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"yaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._right,k,this._left,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._left-A;K=this._left;break;case"inside":L=this._left;K=this._left+A;break;case"cross":L=this._left-A;K=this._left+A;break;default:L=this._left-A;K=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"yMidAxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,u,k);z(f,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;L=u;K=u+A;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor});L=f-A;K=f;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"x2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._bottom,k,this._top)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._top-A;K=this._top;break;case"inside":L=this._top;K=this._top+A;break;case"cross":L=this._top-A;K=this._top+A;break;default:L=this._top-A;K=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"y2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._right;K=this._right+A;break;case"inside":L=this._right-A;K=this._right;break;case"cross":L=this._right-A;K=this._right+A;break;default:L=this._right;K=this._right+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;default:break}}}v=null}d=null;M=null}D.restore();function z(j,i,e,b,h){D.save();h=h||{};if(h.lineWidth==null||h.lineWidth!=0){a.extend(true,D,h);D.beginPath();D.moveTo(j,i);D.lineTo(e,b);D.stroke()}D.restore()}if(this.shadow){if(G.yMidAxis.show){var F=[[this._left,this._bottom],[u,this._bottom]];this.renderer.shadowRenderer.draw(D,F);var F=[[f,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F);var F=[[u,this._bottom],[u,this._top]];this.renderer.shadowRenderer.draw(D,F)}else{var F=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F)}}if(this.borderWidth!=0&&this.drawBorder){if(G.yMidAxis.show){z(this._left,this._top,u,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(f,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,f,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(u,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(u,this._bottom,u,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(f,this._bottom,f,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}else{z(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}}D.restore();D=null;G=null}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.js index 185b94a7..d4cc48c9 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { @@ -41,7 +41,7 @@ async: false }); } - + if ($.jqplot.PyramidGridRenderer === undefined) { $.ajax({ url: $.jqplot.pluginLocation + 'jqplot.pyramidGridRenderer.js', @@ -53,10 +53,10 @@ $.jqplot.PyramidRenderer = function(){ $.jqplot.LineRenderer.call(this); }; - + $.jqplot.PyramidRenderer.prototype = new $.jqplot.LineRenderer(); $.jqplot.PyramidRenderer.prototype.constructor = $.jqplot.PyramidRenderer; - + // called with scope of a series $.jqplot.PyramidRenderer.prototype.init = function(options, plot) { options = options || {}; @@ -94,14 +94,14 @@ // True will push bars up by 1/2 bar width to fill between their y values. // If true, there needs to be 1 more tick than there are bars. this.offsetBars = false; - + // if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver if (options.highlightMouseDown && options.highlightMouseOver == null) { options.highlightMouseOver = false; } this.side = 'right'; - + $.extend(true, this, options); // if (this.fill === false) { @@ -115,7 +115,7 @@ else { this._highlightThreshold = [[0,0], [0,0], [this.highlightThreshold, 0], [this.highlightThreshold, 0]]; } - + this.renderer.options = options; // index of the currenty highlighted point, if any this._highlightedPoint = null; @@ -125,7 +125,7 @@ this.fillAxis = 'y'; this._primaryAxis = '_yaxis'; this._xnudge = 0; - + // set the shape renderer options var opts = {lineJoin:'miter', lineCap:'butt', fill:this.fill, fillRect:this.fill, isarc:false, strokeStyle:this.color, fillStyle:this.color, closePath:this.fill, lineWidth: this.lineWidth}; this.renderer.shapeRenderer.init(opts); @@ -156,7 +156,7 @@ } } }; - + // setGridData // converts the user data values to grid coordinates and stores them // in the gridData array. @@ -203,7 +203,7 @@ } } }; - + // makeGridData // converts any arbitrary data values to grid coordinates and // returns them. This method exists so that plugins can use a series' @@ -276,7 +276,7 @@ } } }; - + $.jqplot.PyramidRenderer.prototype.draw = function(ctx, gridData, options) { var i; // Ughhh, have to make a copy of options b/c it may be modified later. @@ -290,11 +290,11 @@ // clear out data colors. this._dataColors = []; this._barPoints = []; - + if (this.renderer.options.barWidth == null) { this.renderer.setBarWidth.call(this); } - + // var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this); // var nvals = temp[0]; // var nseries = temp[1]; @@ -302,7 +302,7 @@ var points = [], w, h; - + // this._barNudge = 0; if (showLine) { @@ -321,7 +321,7 @@ var bw2 = bw/2.0; var points = []; var yadj = this.offsetBars ? bw2 : 0; - + for (var i=0, l=gridData.length; i<l; i++) { if (this.data[i][0] == null) { continue; @@ -345,9 +345,9 @@ } else { opts.fillStyle = positiveColor; - } + } } - + if (this.fill) { if (this._plotData[i][1] >= 0) { @@ -370,7 +370,7 @@ } var clr = opts.fillStyle || this.color; this._dataColors.push(clr); - this.renderer.shapeRenderer.draw(ctx, points, opts); + this.renderer.shapeRenderer.draw(ctx, points, opts); } else { @@ -380,12 +380,12 @@ else if (i < l-1) { points = points.concat([[gridData[i-1][0], gridData[i-1][1] - bw2 - yadj], [gridData[i][0], gridData[i][1] + bw2 - yadj], [gridData[i][0], gridData[i][1] - bw2 - yadj]]); - } + } // finally, draw the line else { points = points.concat([[gridData[i-1][0], gridData[i-1][1] - bw2 - yadj], [gridData[i][0], gridData[i][1] + bw2 - yadj], [gridData[i][0], yend], [xstart, yend]]); - + if (shadow) { this.renderer.shadowRenderer.draw(ctx, points); } @@ -394,23 +394,23 @@ this.renderer.shapeRenderer.draw(ctx, points, opts); } } - } - } - + } + } + if (this.highlightColors.length == 0) { this.highlightColors = $.jqplot.computeHighlightColors(this._dataColors); } - + else if (typeof(this.highlightColors) == 'string') { this.highlightColors = []; for (var i=0; i<this._dataColors.length; i++) { this.highlightColors.push(this.highlightColors); } } - + }; - + // setup default renderers for axes and legend so user doesn't have to // called with scope of plot function preInit(target, data, options) { @@ -431,33 +431,33 @@ } } } - + if (setopts) { options.axesDefaults.renderer = $.jqplot.PyramidAxisRenderer; options.grid.renderer = $.jqplot.PyramidGridRenderer; options.seriesDefaults.pointLabels = {show: false}; } } - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. function postPlotDraw() { - // Memory Leaks patch + // Memory Leaks patch if (this.plugins.pyramidRenderer && this.plugins.pyramidRenderer.highlightCanvas) { this.plugins.pyramidRenderer.highlightCanvas.resetCanvas(); this.plugins.pyramidRenderer.highlightCanvas = null; } - + this.plugins.pyramidRenderer = {highlightedSeriesIndex:null}; this.plugins.pyramidRenderer.highlightCanvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(this.plugins.pyramidRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-pyramidRenderer-highlight-canvas', this._plotDimensions, this)); this.plugins.pyramidRenderer.highlightCanvas.setContext(); this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); }); - } - + } + function highlight (plot, sidx, pidx, points) { var s = plot.series[sidx]; var canvas = plot.plugins.pyramidRenderer.highlightCanvas; @@ -473,7 +473,7 @@ } canvas = null; } - + function unhighlight (plot) { var canvas = plot.plugins.pyramidRenderer.highlightCanvas; canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height); @@ -484,8 +484,8 @@ plot.target.trigger('jqplotDataUnhighlight'); canvas = null; } - - + + function handleMove(ev, gridpos, datapos, neighbor, plot) { if (neighbor) { var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data]; @@ -509,6 +509,6 @@ // Have to add hook here, becuase it needs called before series is inited. $.jqplot.preInitHooks.push(preInit); - + })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.min.js index 877f8a39..968303cc 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.pyramidRenderer.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(c){if(c.jqplot.PyramidAxisRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidAxisRenderer.js",dataType:"script",async:false})}if(c.jqplot.PyramidGridRenderer===undefined){c.ajax({url:c.jqplot.pluginLocation+"jqplot.pyramidGridRenderer.js",dataType:"script",async:false})}c.jqplot.PyramidRenderer=function(){c.jqplot.LineRenderer.call(this)};c.jqplot.PyramidRenderer.prototype=new c.jqplot.LineRenderer();c.jqplot.PyramidRenderer.prototype.constructor=c.jqplot.PyramidRenderer;c.jqplot.PyramidRenderer.prototype.init=function(j,o){j=j||{};this._type="pyramid";this.barPadding=10;this.barWidth=null;this.fill=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.highlightThreshold=2;this.synchronizeHighlight=false;this.offsetBars=false;if(j.highlightMouseDown&&j.highlightMouseOver==null){j.highlightMouseOver=false}this.side="right";c.extend(true,this,j);if(this.side==="left"){this._highlightThreshold=[[-this.highlightThreshold,0],[-this.highlightThreshold,0],[0,0],[0,0]]}else{this._highlightThreshold=[[0,0],[0,0],[this.highlightThreshold,0],[this.highlightThreshold,0]]}this.renderer.options=j;this._highlightedPoint=null;this._dataColors=[];this._barPoints=[];this.fillAxis="y";this._primaryAxis="_yaxis";this._xnudge=0;var n={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shapeRenderer.init(n);var m=j.shadowOffset;if(m==null){if(this.lineWidth>2.5){m=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{m=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var h={lineJoin:"miter",lineCap:"butt",fill:this.fill,fillRect:this.fill,isarc:false,angle:this.shadowAngle,offset:m,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill,lineWidth:this.lineWidth};this.renderer.shadowRenderer.init(h);o.postDrawHooks.addOnce(f);o.eventListenerHooks.addOnce("jqplotMouseMove",e);if(this.side==="left"){for(var k=0,g=this.data.length;k<g;k++){this.data[k][1]=-Math.abs(this.data[k][1])}}};c.jqplot.PyramidRenderer.prototype.setGridData=function(p){var j=this._xaxis.series_u2p;var o=this._yaxis.series_u2p;var k=this._plotData;var n=this._prevPlotData;this.gridData=[];this._prevGridData=[];var g=k.length;var m=false;var h;for(h=0;h<g;h++){if(k[h][1]<0){this.side="left"}}if(this._yaxis.name==="yMidAxis"&&this.side==="right"){this._xnudge=this._xaxis.max/2000;m=true}for(h=0;h<g;h++){if(k[h][0]!=null&&k[h][1]!=null){this.gridData.push([j(k[h][1]),o(k[h][0])])}else{if(k[h][0]==null){this.gridData.push([j(k[h][1]),null])}else{if(k[h][1]==null){this.gridData.push(null,[o(k[h][0])])}}}if(k[h][1]===0&&m){this.gridData[h][0]=j(this._xnudge)}}};c.jqplot.PyramidRenderer.prototype.makeGridData=function(m,p){var k=this._xaxis.series_u2p;var o=this._yaxis.series_u2p;var j=[];var g=m.length;var n=false;var h;for(h=0;h<g;h++){if(m[h][1]<0){this.side="left"}}if(this._yaxis.name==="yMidAxis"&&this.side==="right"){this._xnudge=this._xaxis.max/2000;n=true}for(h=0;h<g;h++){if(m[h][0]!=null&&m[h][1]!=null){j.push([k(m[h][1]),o(m[h][0])])}else{if(m[h][0]==null){j.push([k(m[h][1]),null])}else{if(m[h][1]==null){j.push([null,o(m[h][0])])}}}if(m[h][1]===0&&n){j[h][0]=k(this._xnudge)}}return j};c.jqplot.PyramidRenderer.prototype.setBarWidth=function(){var k;var g=0;var h=0;var m=this[this._primaryAxis];var q,l,o;g=m.max-m.min;var n=m.numberTicks;var j=(n-1)/2;var p=(this.barPadding===0)?1:0;if(m.name=="xaxis"||m.name=="x2axis"){this.barWidth=(m._offsets.max-m._offsets.min)/g-this.barPadding+p}else{if(this.fill){this.barWidth=(m._offsets.min-m._offsets.max)/g-this.barPadding+p}else{this.barWidth=(m._offsets.min-m._offsets.max)/g}}};c.jqplot.PyramidRenderer.prototype.draw=function(B,I,k){var E;var u=c.extend({},k);var p=(u.shadow!=undefined)?u.shadow:this.shadow;var K=(u.showLine!=undefined)?u.showLine:this.showLine;var C=(u.fill!=undefined)?u.fill:this.fill;var t=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var z,x;this._dataColors=[];this._barPoints=[];if(this.renderer.options.barWidth==null){this.renderer.setBarWidth.call(this)}var D=[],s,F;if(K){var q=new c.jqplot.ColorGenerator(this.negativeSeriesColors);var v=new c.jqplot.ColorGenerator(this.seriesColors);var J=q.get(this.index);if(!this.useNegativeColors){J=u.fillStyle}var o=u.fillStyle;var n;var L=this._xaxis.series_u2p(this._xnudge);var j=this._yaxis.series_u2p(this._yaxis.min);var m=this._yaxis.series_u2p(this._yaxis.max);var H=this.barWidth;var y=H/2;var D=[];var r=this.offsetBars?y:0;for(var E=0,A=I.length;E<A;E++){if(this.data[E][0]==null){continue}n=I[E][1];if(this._plotData[E][1]<0){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){u.fillStyle=q.next()}else{u.fillStyle=v.next()}}}else{if(this.varyBarColor&&!this._stack){u.fillStyle=v.next()}else{u.fillStyle=o}}if(this.fill){if(this._plotData[E][1]>=0){s=I[E][0]-L;F=this.barWidth;D=[L,n-y-r,s,F]}else{s=L-I[E][0];F=this.barWidth;D=[I[E][0],n-y-r,s,F]}this._barPoints.push([[D[0],D[1]+F],[D[0],D[1]],[D[0]+s,D[1]],[D[0]+s,D[1]+F]]);if(p){this.renderer.shadowRenderer.draw(B,D)}var g=u.fillStyle||this.color;this._dataColors.push(g);this.renderer.shapeRenderer.draw(B,D,u)}else{if(E===0){D=[[L,j],[I[E][0],j],[I[E][0],I[E][1]-y-r]]}else{if(E<A-1){D=D.concat([[I[E-1][0],I[E-1][1]-y-r],[I[E][0],I[E][1]+y-r],[I[E][0],I[E][1]-y-r]])}else{D=D.concat([[I[E-1][0],I[E-1][1]-y-r],[I[E][0],I[E][1]+y-r],[I[E][0],m],[L,m]]);if(p){this.renderer.shadowRenderer.draw(B,D)}var g=u.fillStyle||this.color;this._dataColors.push(g);this.renderer.shapeRenderer.draw(B,D,u)}}}}}if(this.highlightColors.length==0){this.highlightColors=c.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){this.highlightColors=[];for(var E=0;E<this._dataColors.length;E++){this.highlightColors.push(this.highlightColors)}}}};function b(l,k,h){h=h||{};h.axesDefaults=h.axesDefaults||{};h.grid=h.grid||{};h.legend=h.legend||{};h.seriesDefaults=h.seriesDefaults||{};var g=false;if(h.seriesDefaults.renderer===c.jqplot.PyramidRenderer){g=true}else{if(h.series){for(var j=0;j<h.series.length;j++){if(h.series[j].renderer===c.jqplot.PyramidRenderer){g=true}}}}if(g){h.axesDefaults.renderer=c.jqplot.PyramidAxisRenderer;h.grid.renderer=c.jqplot.PyramidGridRenderer;h.seriesDefaults.pointLabels={show:false}}}function f(){if(this.plugins.pyramidRenderer&&this.plugins.pyramidRenderer.highlightCanvas){this.plugins.pyramidRenderer.highlightCanvas.resetCanvas();this.plugins.pyramidRenderer.highlightCanvas=null}this.plugins.pyramidRenderer={highlightedSeriesIndex:null};this.plugins.pyramidRenderer.highlightCanvas=new c.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.pyramidRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pyramidRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.pyramidRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(g){d(g.data.plot)})}function a(m,l,j,i){var h=m.series[l];var g=m.plugins.pyramidRenderer.highlightCanvas;g._ctx.clearRect(0,0,g._ctx.canvas.width,g._ctx.canvas.height);h._highlightedPoint=j;m.plugins.pyramidRenderer.highlightedSeriesIndex=l;var k={fillStyle:h.highlightColors[j],fillRect:false};h.renderer.shapeRenderer.draw(g._ctx,i,k);if(h.synchronizeHighlight!==false&&m.series.length>=h.synchronizeHighlight&&h.synchronizeHighlight!==l){h=m.series[h.synchronizeHighlight];k={fillStyle:h.highlightColors[j],fillRect:false};h.renderer.shapeRenderer.draw(g._ctx,h._barPoints[j],k)}g=null}function d(j){var g=j.plugins.pyramidRenderer.highlightCanvas;g._ctx.clearRect(0,0,g._ctx.canvas.width,g._ctx.canvas.height);for(var h=0;h<j.series.length;h++){j.series[h]._highlightedPoint=null}j.plugins.pyramidRenderer.highlightedSeriesIndex=null;j.target.trigger("jqplotDataUnhighlight");g=null}function e(k,j,n,m,l){if(m){var i=[m.seriesIndex,m.pointIndex,m.data];var h=jQuery.Event("jqplotDataMouseOver");h.pageX=k.pageX;h.pageY=k.pageY;l.target.trigger(h,i);if(l.series[i[0]].highlightMouseOver&&!(i[0]==l.plugins.pyramidRenderer.highlightedSeriesIndex&&i[1]==l.series[i[0]]._highlightedPoint)){var g=jQuery.Event("jqplotDataHighlight");g.which=k.which;g.pageX=k.pageX;g.pageY=k.pageY;l.target.trigger(g,i);a(l,m.seriesIndex,m.pointIndex,m.points)}}else{if(m==null){d(l)}}}c.jqplot.preInitHooks.push(b)})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.js index 168fb7a6..dc5c7554 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,17 +26,17 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { - + /** * Class: $.jqplot.Trendline * Plugin which will automatically compute and draw trendlines for plotted data. */ $.jqplot.Trendline = function() { // Group: Properties - + // prop: show // Wether or not to show the trend line. this.show = $.jqplot.config.enablePlugins; @@ -82,13 +82,13 @@ // number of strokes to make of the shadow. this.shadowDepth = 3; this.isTrendline = true; - + }; - + $.jqplot.postSeriesInitHooks.push(parseTrendLineOptions); $.jqplot.postDrawSeriesHooks.push(drawTrendline); $.jqplot.addLegendRowHooks.push(addTrendlineLegend); - + // called witin scope of the legend object // current series passed in // must return null or an object {label:label, color:color} @@ -112,7 +112,7 @@ this.trendline.renderer.init.call(this.trendline, null); } } - + // called within scope of series object function drawTrendline(sctx, options) { // if we have options, merge trendline options in with precedence @@ -127,12 +127,12 @@ this.trendline.renderer.draw.call(this.trendline, sctx, gridData, {showLine:true, shadow:this.trendline.shadow}); } } - + function regression(x, y, typ) { var type = (typ == null) ? 'linear' : typ; var N = x.length; var slope; - var intercept; + var intercept; var SX = 0; var SY = 0; var SXX = 0; @@ -140,7 +140,7 @@ var SYY = 0; var Y = []; var X = []; - + if (type == 'linear') { X = x; Y = y; @@ -195,14 +195,14 @@ var x = []; var y = []; var ypred = []; - + for (i=0; i<data.length; i++){ if (data[i] != null && data[i][0] != null && data[i][1] != null) { x.push(data[i][0]); y.push(data[i][1]); } } - + if (type == 'linear') { ret = linearRegression(x,y); for ( var i=0; i<x.length; i++){ @@ -218,6 +218,6 @@ } } return {data: ypred, slope: ret[0], intercept: ret[1]}; - } + } })(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.min.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.min.js index 96c8f5ac..07105a4f 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.min.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.trendline.min.js @@ -5,13 +5,13 @@ * Version: 1.0.4r1121 * * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. + * jqPlot is currently available for use in all personal or commercial projects + * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL + * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -30,18 +30,18 @@ * * Copyright (c) 2010-2011 Chris Leonello * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can + * jsDate is currently available for use in all personal or commercial projects + * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * - * jsDate borrows many concepts and ideas from the Date Instance + * jsDate borrows many concepts and ideas from the Date Instance * Methods by Ken Snyder along with some parts of Ken's actual code. - * + * * Ken's origianl Date Instance Methods and copyright notice: - * + * * Ken Snyder (ken d snyder at gmail dot com) * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) + * version 2.0.2 (http://kendsnyder.com/sandbox/date/) * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) * * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. @@ -51,7 +51,7 @@ * Larry's original code can be found here: * * https://github.com/lsiden/export-jqplot-to-png - * - * + * + * */ (function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p<v.length;p++){if(v[p]<=0){s--}else{k.push(w[p]);j.push(Math.log(v[p]))}}}}for(var p=0;p<s;p++){o=o+k[p];m=m+j[p];q=q+k[p]*j[p];r=r+k[p]*k[p];l=l+j[p]*j[p]}t=(s*q-o*m)/(s*r-o*o);z=(m-t*o)/s;return[t,z]}function h(k,j){var i;i=b(k,j,"linear");return[i[0],i[1]]}function d(o,m){var k;var i=o;var n=m;k=b(i,n,"exp");var l=Math.exp(k[0]);var j=Math.exp(k[1]);return[l,j]}function c(l,j){var p=(j==null)?"linear":j;var n;var o;var r=[];var q=[];var m=[];for(k=0;k<l.length;k++){if(l[k]!=null&&l[k][0]!=null&&l[k][1]!=null){r.push(l[k][0]);q.push(l[k][1])}}if(p=="linear"){n=h(r,q);for(var k=0;k<r.length;k++){o=n[0]*r[k]+n[1];m.push([r[k],o])}}else{if(p=="exp"||p=="exponential"){n=d(r,q);for(var k=0;k<r.length;k++){o=n[1]*Math.pow(n[0],r[k]);m.push([r[k],o])}}}return{data:m,slope:n[0],intercept:n[1]}}})(jQuery); \ No newline at end of file diff --git a/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jasmine.js b/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jasmine.js index 03bf89a0..79d1d4f4 100755 --- a/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jasmine.js +++ b/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jasmine.js @@ -1019,7 +1019,7 @@ jasmine.Block = function(env, func, spec) { this.spec = spec; }; -jasmine.Block.prototype.execute = function(onComplete) { +jasmine.Block.prototype.execute = function(onComplete) { try { this.func.apply(this.spec); } catch (e) { @@ -1059,7 +1059,7 @@ jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) { type: isSuite ? 'suite' : 'spec', children: [] }; - + if (isSuite) { var children = suiteOrSpec.children(); for (var i = 0; i < children.length; i++) { @@ -1887,7 +1887,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) { jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { for (var property in obj) { if (property == '__Jasmine_been_here_before__') continue; - fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && + fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && obj.__lookupGetter__(property) !== null) : false); } }; @@ -1990,7 +1990,7 @@ jasmine.Queue.prototype.next_ = function() { while (goAgain) { goAgain = false; - + if (self.index < self.blocks.length && !this.abort) { var calledSynchronously = true; var completedSynchronously = false; @@ -2028,7 +2028,7 @@ jasmine.Queue.prototype.next_ = function() { if (completedSynchronously) { onComplete(); } - + } else { self.running = false; if (self.onComplete) { diff --git a/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jquery.js b/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jquery.js index 11e6d067..27914ea3 100755 --- a/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jquery.js +++ b/wqflask/wqflask/static/packages/pragmaticly-smart-time-ago-40fa376/test/lib/jquery.js @@ -2110,9 +2110,9 @@ jQuery.fn.extend({ ret = elem.value; - return typeof ret === "string" ? + return typeof ret === "string" ? // handle most common string cases - ret.replace(rreturn, "") : + ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } @@ -4392,7 +4392,7 @@ var Expr = Sizzle.selectors = { text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, @@ -4508,21 +4508,21 @@ var Expr = Sizzle.selectors = { case "only": case "first": while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } - if ( type === "first" ) { - return true; + if ( type === "first" ) { + return true; } node = elem; case "last": while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; + if ( node.nodeType === 1 ) { + return false; } } @@ -4546,7 +4546,7 @@ var Expr = Sizzle.selectors = { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } - } + } parent.sizcache = doneName; } @@ -5006,7 +5006,7 @@ if ( document.querySelectorAll ) { expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { - try { + try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); @@ -5147,7 +5147,7 @@ if ( document.documentElement.contains ) { Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) + // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; diff --git a/wqflask/wqflask/tracer.py b/wqflask/wqflask/tracer.py index 43a0f15e..a1043d28 100755 --- a/wqflask/wqflask/tracer.py +++ b/wqflask/wqflask/tracer.py @@ -8,21 +8,21 @@ import sys # Originally based on http://stackoverflow.com/a/8315566 def tracefunc(frame, event, arg, indent=[0]): - + func = dict(funcname = frame.f_code.co_name, filename = frame.f_code.co_filename, lineno = frame.f_lineno) - + #These are too common to bother printing... too_common = ( '/home/sam/ve27/local/lib/python2.7/site-packages/werkzeug/', '/home/sam/ve27/local/lib/python2.7/site-packages/jinja2/', ) - - + + if func['filename'].startswith(too_common): return tracefunc - + info = "{funcname} [{filename}: {lineno}]".format(**func) if event == "call": @@ -36,6 +36,6 @@ def tracefunc(frame, event, arg, indent=[0]): def turn_on(): sys.settrace(tracefunc) - print("Tracing turned on!!!!") + print("Tracing turned on!!!!") #################################################################################### diff --git a/wqflask/wqflask/update_search_results.py b/wqflask/wqflask/update_search_results.py index ffd7fd51..166649a4 100644 --- a/wqflask/wqflask/update_search_results.py +++ b/wqflask/wqflask/update_search_results.py @@ -72,17 +72,17 @@ class GSearch(object): WHERE PublishXRef.`InbredSetId`=InbredSet.`Id` AND PublishFreeze.`InbredSetId`=InbredSet.`Id` AND InbredSet.`SpeciesId`=Species.`Id` - AND PublishXRef.`PhenotypeId`=Phenotype.`Id` + AND PublishXRef.`PhenotypeId`=Phenotype.`Id` AND PublishXRef.`PublicationId`=Publication.`Id` - AND (Phenotype.Post_publication_description REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Pre_publication_description REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" - OR Phenotype.Lab_code REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.PubMed_ID REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Abstract REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Title REGEXP "[[:<:]]%s[[:>:]]" - OR Publication.Authors REGEXP "[[:<:]]%s[[:>:]]" + AND (Phenotype.Post_publication_description REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Pre_publication_description REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]%s[[:>:]]" + OR Phenotype.Lab_code REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.PubMed_ID REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Abstract REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Title REGEXP "[[:<:]]%s[[:>:]]" + OR Publication.Authors REGEXP "[[:<:]]%s[[:>:]]" OR PublishXRef.Id REGEXP "[[:<:]]%s[[:>:]]") ORDER BY Species.`Name`, InbredSet.`Name`, PublishXRef.`Id` LIMIT 6000 @@ -95,35 +95,35 @@ class GSearch(object): trait_id = line[3] this_trait = GeneralTrait(dataset=dataset, name=trait_id, get_qtl_info=True, get_sample_info=False) self.trait_list.append(this_trait) - + self.results = self.convert_to_json() - + def convert_to_json(self): json_dict = {} #json_dict['draw'] = self.draw, json_dict['recordsTotal'] = len(self.trait_list), json_dict['data'] = [] - + for i, trait in enumerate(self.trait_list): trait_row = { "checkbox": "<INPUT TYPE=\"checkbox\" NAME=\"searchResult\" class=\"checkbox trait_checkbox\" style=\"transform: scale(1.5);\" VALUE=\"{}:{}\">".format(trait.name, trait.dataset.name), - "index": i+1, - "species": trait.dataset.group.species, - "group": trait.dataset.group.name, - "tissue": trait.dataset.tissue, - "dataset": trait.dataset.fullname, - "record": "<a href=\"/show_trait?trait_id=" + trait.name + "&dataset=" + trait.dataset.name + "\" target=\"_blank\">" + trait.name + "</a>", - "symbol": trait.symbol, - "description": trait.description_display, - "location": trait.location_repr, - "mean": trait.mean, - "max_lrs": trait.LRS_score_repr, - "max_lrs_location": trait.LRS_location_repr, + "index": i+1, + "species": trait.dataset.group.species, + "group": trait.dataset.group.name, + "tissue": trait.dataset.tissue, + "dataset": trait.dataset.fullname, + "record": "<a href=\"/show_trait?trait_id=" + trait.name + "&dataset=" + trait.dataset.name + "\" target=\"_blank\">" + trait.name + "</a>", + "symbol": trait.symbol, + "description": trait.description_display, + "location": trait.location_repr, + "mean": trait.mean, + "max_lrs": trait.LRS_score_repr, + "max_lrs_location": trait.LRS_location_repr, "additive_effect": trait.additive} json_dict['data'].append(trait_row) - + json_results = json.dumps(json_dict) return json_results - - - - + + + + diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py index e334a9aa..1e454292 100755 --- a/wqflask/wqflask/user_manager.py +++ b/wqflask/wqflask/user_manager.py @@ -31,7 +31,7 @@ import redis Redis = redis.StrictRedis() -from flask import (Flask, g, render_template, url_for, request, make_response, +from flask import (Flask, g, render_template, url_for, request, make_response, redirect, flash, abort) from wqflask import app @@ -60,7 +60,7 @@ def timestamp(): class AnonUser(object): cookie_name = 'anon_user_v1' - + def __init__(self): self.cookie = request.cookies.get(self.cookie_name) if self.cookie: @@ -69,7 +69,7 @@ class AnonUser(object): else: print("creating new cookie") self.anon_id, self.cookie = create_signed_cookie() - + @after.after_this_request def set_cookie(response): response.set_cookie(self.cookie_name, self.cookie) @@ -111,7 +111,7 @@ class UserSession(object): # This will occur, for example, when the browser has been left open over a long # weekend and the site hasn't been visited by the user self.logged_in = False - + ########### Grrr...this won't work because of the way flask handles cookies # Delete the cookie #response = make_response(redirect(url_for('login'))) @@ -125,7 +125,7 @@ class UserSession(object): # (Almost) everytime the user does something we extend the session_id in Redis... print("Extending ttl...") Redis.expire(self.redis_key, THREE_DAYS) - + print("record is:", self.record) self.logged_in = True diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index df1f77bc..f88a9cdb 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -168,7 +168,7 @@ def gsearchact(): return render_template("gsearch_gene.html", **result) elif type == "phenotype": return render_template("gsearch_pheno.html", **result) - + @app.route("/gsearch_updating", methods=('POST',)) def gsearch_updating(): print("REQUEST ARGS:", request.values) @@ -294,13 +294,13 @@ def export_trait_csv(): return Response(csv_data, mimetype='text/csv', headers={"Content-Disposition":"attachment;filename=sample_data.csv"}) - + @app.route('/export_perm_data', methods=('POST',)) def export_perm_data(): """CSV file consisting of the permutation data for the mapping results""" num_perm = float(request.form['num_perm']) perm_data = json.loads(request.form['perm_results']) - + buff = StringIO.StringIO() writer = csv.writer(buff) writer.writerow(["Suggestive LRS (p=0.63) = " + str(perm_data[int(num_perm*0.37-1)])]) @@ -338,10 +338,10 @@ def show_trait_page(): @app.route("/heatmap", methods=('POST',)) def heatmap_page(): print("In heatmap, request.form is:", pf(request.form)) - + start_vars = request.form temp_uuid = uuid.uuid4() - + traits = [trait.strip() for trait in start_vars['trait_list'].split(',')] if traits[0] != "": version = "v5" @@ -349,33 +349,33 @@ def heatmap_page(): print("key is:", pf(key)) with Bench("Loading cache"): result = Redis.get(key) - + if result: print("Cache hit!!!") with Bench("Loading results"): result = pickle.loads(result) - + else: print("Cache miss!!!") - + template_vars = heatmap.Heatmap(request.form, temp_uuid) template_vars.js_data = json.dumps(template_vars.js_data, default=json_default_handler, indent=" ") - + result = template_vars.__dict__ for item in template_vars.__dict__.keys(): print(" ---**--- {}: {}".format(type(template_vars.__dict__[item]), item)) - + pickled_result = pickle.dumps(result, pickle.HIGHEST_PROTOCOL) print("pickled result length:", len(pickled_result)) Redis.set(key, pickled_result) Redis.expire(key, 60*60) - + with Bench("Rendering template"): rendered_template = render_template("heatmap.html", **result) - + else: rendered_template = render_template("empty_collection.html", **{'tool':'Heatmap'}) @@ -468,18 +468,18 @@ def marker_regression_page(): imgB64 = imgdata.encode("base64") bytesarray = array.array('B', imgB64) result['pair_scan_array'] = bytesarray - rendered_template = render_template("pair_scan_results.html", **result) + rendered_template = render_template("pair_scan_results.html", **result) else: #for item in template_vars.__dict__.keys(): # print(" ---**--- {}: {}".format(type(template_vars.__dict__[item]), item)) - + gn1_template_vars = marker_regression_gn1.MarkerRegression(result).__dict__ pickled_result = pickle.dumps(result, pickle.HIGHEST_PROTOCOL) print("pickled result length:", len(pickled_result)) Redis.set(key, pickled_result) Redis.expire(key, 1*60) - + with Bench("Rendering template"): rendered_template = render_template("marker_regression_gn1.html", **gn1_template_vars) @@ -542,7 +542,7 @@ def corr_matrix_page(): template_vars.js_data = json.dumps(template_vars.js_data, default=json_default_handler, indent=" ") - + return render_template("correlation_matrix.html", **template_vars.__dict__) else: return render_template("empty_collection.html", **{'tool':'Correlation Matrix'}) -- cgit v1.2.3