').attr('class', 'table-section')
+ .attr('id', tables[i].element)
+ .appendTo(div);
+
+ $(div).appendTo(tablesArea);
+ }
+ }
+
+ function updateWidth(tables) {
+
+ var maxWidth = $('#instructions').width;
+
+ for (var i = 0; i < tables.length; i++) {
+
+ var t = tables[i];
+
+ var w = getWidth(t) + getHeaderWidth(t);
+
+ t.updateSettings({
+ width: w,
+ });
+
+ if (w > maxWidth) {
+ maxWidth = w;
+ }
+ }
+
+ var padding = getPadding('#instructions')
+
+ if (maxWidth > 0) {
+ updateTableWidth(maxWidth + padding);
+ }
+ }
+
+ function getWidth(table) {
+ var colWidths = 0;
+ for (var i = 0; i < table.countRenderedCols(); i++) {
+ colWidths += parseFloat(table.getColWidth(i));
+ }
+
+ return colWidths;
+ }
+
function saveQuestions(questions, session) {
if (questions.length === 0) {
return;
@@ -984,18 +1048,22 @@ define(['jquery', 'Handsontable', 'table_template', 'filesaver', 'alertify', 'qt
}
return {
- makeTables: makeTables,
- registerValidator: registerValidator,
- registerErrorHandler: registerErrorHandler,
- removeValidator: removeValidator,
- removeValidators: removeValidators,
- removeErrorHandler: removeErrorHandler,
- constructDataTables: constructDataTables,
- fillData: fillData,
- saveTables: saveTables,
- saveQuestions: saveQuestions,
- displayReadTable: displayReadTable,
- resetTableWidth: resetTableWidth,
- updateTableWidth: updateTableWidth
+ makeTables,
+ registerValidator,
+ registerErrorHandler,
+ removeValidator,
+ removeValidators,
+ removeErrorHandler,
+ constructDataTables,
+ fillData,
+ saveTables,
+ saveQuestions,
+ displayReadTable,
+ resetTableWidth,
+ updateTableWidth,
+ getWidth,
+ updateWidth,
+ checkTotals,
+ createTableElems
}
});
diff --git a/client/app/controllers/unmaskController.js b/client/app/controllers/unmaskController.js
index aa8ed491..6900696d 100644
--- a/client/app/controllers/unmaskController.js
+++ b/client/app/controllers/unmaskController.js
@@ -39,10 +39,6 @@ define(['helper/mpc'], function (mpc) {
// Aggregate decrypted values by key
var analystResultShare = decrypted.then(function (analystShares) {
- // var invalidShareCount = mpc.countInvalidShares(analystShares);
- // TODO: we should set a threshold and abort if there are too
- // many invalid shares
- // console.log('Invalid share count:', invalidShareCount);
return mpc.aggregateShares(analystShares);
});
@@ -209,6 +205,6 @@ define(['helper/mpc'], function (mpc) {
}
return {
- aggregateAndUnmask: aggregateAndUnmask
+ aggregateAndUnmask
}
});
diff --git a/client/app/data/bwwc.js b/client/app/data/bwwc.js
new file mode 100644
index 00000000..3d2339ab
--- /dev/null
+++ b/client/app/data/bwwc.js
@@ -0,0 +1,1016 @@
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module);
+}
+
+define([], function () {
+ return {
+ "tables": [
+ {
+ "name": "Number Of Employees",
+ "element": "number-employees-hot",
+ "hot_parameters": {
+ "rowHeaderWidth": 200,
+ "height": 425
+ },
+ "rows": [
+ {
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "min": 0,
+ "max_warning": 10000,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "1.Number of Employees",
+ "start": "B7",
+ "end": "Q16",
+ "firstrow": "Executive/Senior Level Officials and Managers"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Number of Female Employees",
+ "//prompt": "Please input the total number of female employees in this race/ethnicity and job category.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
+ "tooltip": {
+ "//promptTitle": "Number of Male Employees",
+ "//prompt": "Please input the total number of male employees in this race/ethnicity and job category.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Total Annual Compensation (Dollars)",
+ "element": "compensation-hot",
+ "hot_parameters": {
+ "rowHeaderWidth": 200,
+ "height": 425
+ },
+ "rows": [
+ {
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "currency",
+ "min": 0,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "2.Compensation",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Compensation",
+ "//prompt": "Please input the total annual compensation of female employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Compensation",
+ "//prompt": "Please input the total annual compensation of male employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Total Annual Cash Performance Pay (Dollars)",
+ "element": "performance-pay-hot",
+ "hot_parameters": {
+ "rowHeaderWidth": 200,
+ "height": 425
+ },
+ "rows": [
+ {
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "currency",
+ "min": 0,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "3.Performance Pay",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Performance Pay",
+ "//prompt": "Please input the total annual cash performance pay of female employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Performance Pay",
+ "//prompt": "Please input the total annual cash performance pay of male employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Total Length of Service (Months)",
+ "element": "service-length-hot",
+ "hot_parameters": {
+ "rowHeaderWidth": 200,
+ "height": 425
+ },
+ "rows": [
+ {
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "min": 0,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "4.Tenure",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Length of Service",
+ "//prompt": "Please input the total length of service of female employees in this race/ethnicity and job category in months.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Length of Service",
+ "//prompt": "Please input the total length of service of male employees in this race/ethnicity and job category in months.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ }
+ ],
+ "totals": {
+ "name": "Totals Check",
+ "element": "totals-hot",
+ "submit": false,
+ "hot_parameters": {
+ "rowHeaderWidth": 100
+ },
+ "rows": [
+ {
+ "label": "Total"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Total Number of Employees",
+ "colspan": 3
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": ""
+ },
+ {
+ "label": "Male",
+ "key": ""
+ },
+ {
+ "label": "All",
+ "key": ""
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "read_only": true
+ }
+ ]
+ },
+ "survey": {
+ "header": "Answer Additional Questions",
+ "directions": "We have included these questions to get instant feedback as to how this process went in order to improve the process in future years. Please know that the answers to these questions will be anonymous, and they will be considered separately from the encrypted and aggregated data above.",
+ "questions": [
+ {
+ "question_text": "Which department are you in?",
+ "input_type": "radio",
+ "inputs": [
+ {
+ "label": "Human Resources (e.g. HR Manager, HRIS Manager, Compensation Manager, Talent & Development)",
+ "value": "1"
+ },
+ {
+ "label": "Operations (e.g. Director of Operations)",
+ "value": "2"
+ },
+ {
+ "label": "Diversity (e.g. Chief Diversity Officer)",
+ "value": "3"
+ },
+ {
+ "label": "Upper Management (e.g. COO, CEO, Executive Director)",
+ "value": "4"
+ },
+ {
+ "label": "Human Resources (e.g. HR Manager, HRIS Manager, Compensation Manager, Talent & Development)",
+ "value": "5"
+ }
+ ]
+ },
+ {
+ "question_text": "What kind of HRIS or organizational system does your company/organization use?",
+ "input_type": "radio",
+ "inputs": [
+ {
+ "label": "Large-scale traditional HRIS/HRMS software (e.g. ADP, Workday, PeopleSoft, etc.)",
+ "value": "1"
+ },
+ {
+ "label": "Microsoft Office or similar (e.g. Excel, Microsoft Word, Google Docs)",
+ "value": "2"
+ },
+ {
+ "label": "Other",
+ "value": "3"
+ }
+ ]
+ },
+ {
+ "question_text": "How easy was it to understand what data was required given the template and instructions?",
+ "input_type": "radio",
+ "inputs": [
+ {
+ "label": "Extremely easy",
+ "value": "1"
+ },
+ {
+ "label": "Moderately easy",
+ "value": "2"
+ },
+ {
+ "label": "Slightly easy",
+ "value": "3"
+ },
+ {
+ "label": "Neither easy nor difficult",
+ "value": "4"
+ },
+ {
+ "label": "Slightly difficult",
+ "value": "5"
+ },
+ {
+ "label": "Moderately difficult",
+ "value": "6"
+ },
+ {
+ "label": "Extremely difficult",
+ "value": "7"
+ }
+ ]
+ },
+ {
+ "question_text": "How easy was it to prepare the data for submission given your organizational system?",
+ "input_type": "radio",
+ "inputs": [
+ {
+ "label": "Extremely easy",
+ "value": "1"
+ },
+ {
+ "label": "Moderately easy",
+ "value": "2"
+ },
+ {
+ "label": "Slightly easy",
+ "value": "3"
+ },
+ {
+ "label": "Neither easy nor difficult",
+ "value": "4"
+ },
+ {
+ "label": "Slightly difficult",
+ "value": "5"
+ },
+ {
+ "label": "Moderately difficult",
+ "value": "6"
+ },
+ {
+ "label": "Extremely difficult",
+ "value": "7"
+ }
+ ]
+ },
+ {
+ "question_text": "How long did it take to prepare the data for submission given your organizational system?",
+ "input_type": "radio",
+ "inputs": [
+ {
+ "label": "Less than 1 business day",
+ "value": "1"
+ },
+ {
+ "label": "1-3 business days",
+ "value": "2"
+ },
+ {
+ "label": "4-7 business days",
+ "value": "3"
+ },
+ {
+ "label": "7-10 business days",
+ "value": "4"
+ },
+ {
+ "label": "Greater than 10 business days",
+ "value": "5"
+ }
+ ]
+ }
+ ]
+ }
+ }
+});
diff --git a/client/app/data/pacesetters.js b/client/app/data/pacesetters.js
new file mode 100644
index 00000000..0ee3d94b
--- /dev/null
+++ b/client/app/data/pacesetters.js
@@ -0,0 +1,214 @@
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module);
+}
+
+define([], function () {
+ return {
+ "tables": [
+ {
+ "name": "Amount Spent with MBEs",
+ "element": "amount-spent",
+ "hot_parameters": {
+ "rowHeaderWidth": 300,
+ "height": 325
+ },
+ "rows": [
+ {
+ "key": "local",
+ "label": "Dollar Amount Spent with Local MBEs"
+ },
+ {
+ "key": "state",
+ "label": "Dollar Amount Spent with State MBEs"
+ },
+ {
+ "key": "national",
+ "label": "Dollar Amount Spent with National MBEs"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "key": "value",
+ "label": "Value for FY in Thousands of Dollars"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "min": 0,
+ "max_warning": 100,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "1. Amount Spent",
+ "start": "B2",
+ "end": "B4",
+ "firstrow": "Dollar Amount Spent with Local MBEs"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+
+ },
+ "tooltip": {
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Addressable Spend",
+ "element": "addressable-spend",
+ "hot_parameters": {
+ "rowHeaderWidth": 300,
+ "height": 325
+ },
+ "rows": [
+ {
+ "key": "local",
+ "label": "Total Dollar Amount Spent Procuring All Goods and Services Locally"
+ },
+ {
+ "key": "state",
+ "label": "Total Dollar Amount Spent Procuring All Goods and Services at the State Level"
+ },
+ {
+ "key": "national",
+ "label": "Total Dollar Amount Spent Procuring All Goods and Services in the United States"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "key": "value",
+ "label": "Value for FY in Thousands of Dollars"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "min": 0,
+ "max_warning": 100,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "2. Addressable Spend",
+ "start": "B2",
+ "end": "B4",
+ "firstrow": "Total Dollar Amount Spent Procuring All Goods and Services Locally"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+
+ },
+ "tooltip": {
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Number of MBEs",
+ "element": "number-MBEs",
+ "hot_parameters": {
+ "rowHeaderWidth": 300,
+ "height": 325
+ },
+ "rows": [
+ {
+ "key": "local",
+ "label": "Number of Local MBEs With Whom You Have Done Business"
+ },
+ {
+ "key": "state",
+ "label": "Number of State MBEs With Whom You Have Done Business"
+ },
+ {
+ "key": "national",
+ "label": "Number of National MBEs With Whom You Have Done Business"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "key": "value",
+ "label": "Value for FY"
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "min": 0,
+ "max_warning": 100,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "3. Number of MBEs",
+ "start": "B2",
+ "end": "B4",
+ "firstrow": "Number of Local MBEs With Whom You Have Done Business"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+
+ },
+ "tooltip": {
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ }
+ ]
+ }
+});
diff --git a/client/app/data/tables.js b/client/app/data/tables.js
index 0b4fec7e..81302690 100644
--- a/client/app/data/tables.js
+++ b/client/app/data/tables.js
@@ -4,45 +4,167 @@ if (typeof define !== 'function') {
define([], function () {
return {
- tables: [
+ "tables": [
{
- "name": "Amount spent with MBEs",
- "element": "pacesetter-measure-hot",
+ "name": "Number Of Employees",
+ "element": "number-employees-hot",
"hot_parameters": {
- "rowHeaderWidth": 480,
- "height": 230,
- "colWidths": [190],
- "stretchH": "last"
+ "rowHeaderWidth": 200,
+ "height": 425
},
"rows": [
{
- "key": "DollarAmtLocal",
- "label": "Dollar Amount Spent with
Local MBEs"
- }, {
- "key": "DollarAmtState",
- "label": "Dollar Amount Spent with
State MBEs"
- }, {
- "key": "DollarAmtNational",
- "label": "Dollar Amount Spent with
National MBEs"
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
}
],
"cols": [
[
{
- "label": "Value for FY17 in Thousands of Dollars",
- "key": "value"
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
}
]
],
"types": [
{
"range": {
- "row": "0:2",
+ "row": "*",
"col": "*"
},
- "type": "currency",
+ "type": "int",
"min": 0,
- "max_warning": 50000000,
+ "max_warning": 10000,
"empty": false,
"validators": [
"discrepancies"
@@ -51,19 +173,35 @@ define([], function () {
],
"excel": [
{
- "sheet": "Pacesetters",
+ "sheet": "1.Number of Employees",
"start": "B7",
"end": "Q16",
- "firstrow": "Dollar Amount Spent with Local MBEs"
+ "firstrow": "Executive/Senior Level Officials and Managers"
}
],
"tooltips": [
{
"range": {
"row": "*",
- "col": "*"
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Number of Female Employees",
+ "//prompt": "Please input the total number of female employees in this race/ethnicity and job category.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
},
"tooltip": {
+ "//promptTitle": "Number of Male Employees",
+ "//prompt": "Please input the total number of male employees in this race/ethnicity and job category.",
"errorTitle": "Invalid Data Entry",
"error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
"warningTitle": "Warning: Data is too big",
@@ -71,44 +209,166 @@ define([], function () {
}
}
]
- }, {
- "name": "Addressable spend",
- "element": "pacesetter-measure-hot-2",
+ },
+ {
+ "name": "Total Annual Compensation (Dollars)",
+ "element": "compensation-hot",
"hot_parameters": {
- "rowHeaderWidth": 480,
- "height": 230,
- "colWidths": [190],
- "stretchH": "last"
+ "rowHeaderWidth": 200,
+ "height": 425
},
"rows": [
{
- "key": "TotalAmtLocal",
- "label": "Total Dollar Amount Spent Procuring All Goods and Services
Locally"
- }, {
- "key": "TotalAmtState",
- "label": "Total Dollar Amount Spent Procuring All Goods and Services at the
State Level"
- }, {
- "key": "TotalAmtNational",
- "label": "Total Dollar Amount Spent Procuring All Goods and Services in the
United States"
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
}
],
"cols": [
[
{
- "label": "Value for FY17 in Thousands of Dollars",
- "key": "value"
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
}
]
],
"types": [
{
"range": {
- "row": "0:2",
+ "row": "*",
"col": "*"
},
"type": "currency",
"min": 0,
- "max_warning": 50000000,
"empty": false,
"validators": [
"discrepancies"
@@ -117,19 +377,239 @@ define([], function () {
],
"excel": [
{
- "sheet": "Pacesetters",
- "start": "B7",
- "end": "Q16",
- "firstrow": "Dollar Amount Spent with Local MBEs"
+ "sheet": "2.Compensation",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
}
],
"tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Compensation",
+ "//prompt": "Please input the total annual compensation of female employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Compensation",
+ "//prompt": "Please input the total annual compensation of male employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Total Annual Cash Performance Pay (Dollars)",
+ "element": "performance-pay-hot",
+ "hot_parameters": {
+ "rowHeaderWidth": 200,
+ "height": 425
+ },
+ "rows": [
+ {
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
+ }
+ ]
+ ],
+ "types": [
{
"range": {
"row": "*",
"col": "*"
},
+ "type": "currency",
+ "min": 0,
+ "empty": false,
+ "validators": [
+ "discrepancies"
+ ]
+ }
+ ],
+ "excel": [
+ {
+ "sheet": "3.Performance Pay",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
+ }
+ ],
+ "tooltips": [
+ {
+ "range": {
+ "row": "*",
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Annual Performance Pay",
+ "//prompt": "Please input the total annual cash performance pay of female employees in this race/ethnicity and job category in dollars.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
+ },
"tooltip": {
+ "//promptTitle": "Total Annual Performance Pay",
+ "//prompt": "Please input the total annual cash performance pay of male employees in this race/ethnicity and job category in dollars.",
"errorTitle": "Invalid Data Entry",
"error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
"warningTitle": "Warning: Data is too big",
@@ -137,44 +617,166 @@ define([], function () {
}
}
]
- }, {
- "name": "Number of MBEs",
- "element": "pacesetter-measure-hot-3",
+ },
+ {
+ "name": "Total Length of Service (Months)",
+ "element": "service-length-hot",
"hot_parameters": {
- "rowHeaderWidth": 480,
- "height": 230,
- "colWidths": [190],
- "stretchH": "last"
+ "rowHeaderWidth": 200,
+ "height": 425
},
"rows": [
{
- "key": "NumContractedLocal",
- "label": "Number of
Local MBEs With Whom You Have Done Business"
- }, {
- "key": "NumContractedState",
- "label": "Number of
State MBEs With Whom You Have Done Business"
- }, {
- "key": "NumContractedNational",
- "label": "Number of
National MBEs With Whom You Have Done Business"
+ "key": "Ex/Sen",
+ "label": "Executive/Senior Level
Officials and Managers"
+ },
+ {
+ "key": "F/M",
+ "label": "First/Mid-Level Officials
and Managers"
+ },
+ {
+ "key": "Profs",
+ "label": "Professionals"
+ },
+ {
+ "key": "Techs",
+ "label": "Technicians"
+ },
+ {
+ "key": "Sales",
+ "label": "Sales Workers"
+ },
+ {
+ "key": "Adminis",
+ "label": "Administrative Support Workers"
+ },
+ {
+ "key": "Craft",
+ "label": "Craft Workers"
+ },
+ {
+ "key": "Operatives",
+ "label": "Operatives"
+ },
+ {
+ "key": "Laborers",
+ "label": "Laborers and Helpers"
+ },
+ {
+ "key": "Service",
+ "label": "Service Workers"
}
],
"cols": [
[
{
- "label": "Value for FY17",
- "key": "value"
+ "label": "Hispanic or Latinx",
+ "colspan": 2
+ },
+ {
+ "label": "White",
+ "colspan": 2
+ },
+ {
+ "label": "Black/African American",
+ "colspan": 2
+ },
+ {
+ "label": "Native Hawaiian or
Pacific Islander",
+ "colspan": 2
+ },
+ {
+ "label": "Asian",
+ "colspan": 2
+ },
+ {
+ "label": "American Indian/Alaska
Native",
+ "colspan": 2
+ },
+ {
+ "label": "Two or More Races
(Not Hispanic or Latinx)",
+ "colspan": 2
+ },
+ {
+ "label": "Unreported",
+ "colspan": 2
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": "hispF"
+ },
+ {
+ "label": "Male",
+ "key": "hispM"
+ },
+ {
+ "label": "Female",
+ "key": "whiteF"
+ },
+ {
+ "label": "Male",
+ "key": "whiteM"
+ },
+ {
+ "label": "Female",
+ "key": "afrF"
+ },
+ {
+ "label": "Male",
+ "key": "afrM"
+ },
+ {
+ "label": "Female",
+ "key": "hawaiiF"
+ },
+ {
+ "label": "Male",
+ "key": "hawaiiM"
+ },
+ {
+ "label": "Female",
+ "key": "asianF"
+ },
+ {
+ "label": "Male",
+ "key": "asianM"
+ },
+ {
+ "label": "Female",
+ "key": "indF"
+ },
+ {
+ "label": "Male",
+ "key": "indM"
+ },
+ {
+ "label": "Female",
+ "key": "twoF"
+ },
+ {
+ "label": "Male",
+ "key": "twoM"
+ },
+ {
+ "label": "Female",
+ "key": "unrF"
+ },
+ {
+ "label": "Male",
+ "key": "unrM"
}
]
],
"types": [
{
"range": {
- "row": "0:2",
+ "row": "*",
"col": "*"
},
"type": "int",
"min": 0,
- "max_warning": 50000,
"empty": false,
"validators": [
"discrepancies"
@@ -183,19 +785,35 @@ define([], function () {
],
"excel": [
{
- "sheet": "Pacesetters",
- "start": "B7",
- "end": "Q16",
- "firstrow": "Dollar Amount Spent with Local MBEs"
+ "sheet": "4.Tenure",
+ "start": "B6",
+ "end": "Q15",
+ "firstrow": "Executive/Senior Level Officials and Managers"
}
],
"tooltips": [
{
"range": {
"row": "*",
- "col": "*"
+ "col": "0-2-4-6-8-10-12-14"
+ },
+ "tooltip": {
+ "//promptTitle": "Total Length of Service",
+ "//prompt": "Please input the total length of service of female employees in this race/ethnicity and job category in months.",
+ "errorTitle": "Invalid Data Entry",
+ "error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
+ "warningTitle": "Warning: Data is too big",
+ "warning": "Are you sure this value is correct?"
+ }
+ },
+ {
+ "range": {
+ "row": "*",
+ "col": "1-3-5-7-9-11-13-15"
},
"tooltip": {
+ "//promptTitle": "Total Length of Service",
+ "//prompt": "Please input the total length of service of male employees in this race/ethnicity and job category in months.",
"errorTitle": "Invalid Data Entry",
"error": "Please do not input any text or leave any cells blank. If the value is zero, please input zero.",
"warningTitle": "Warning: Data is too big",
@@ -203,8 +821,53 @@ define([], function () {
}
}
]
+ },
+ {
+ "name": "Totals Check",
+ "element": "totals-hot",
+ "submit": false,
+ "hot_parameters": {
+ "rowHeaderWidth": 100
+ },
+ "rows": [
+ {
+ "label": "Total"
+ }
+ ],
+ "cols": [
+ [
+ {
+ "label": "Total Number of Employees",
+ "colspan": 3
+ }
+ ],
+ [
+ {
+ "label": "Female",
+ "key": ""
+ },
+ {
+ "label": "Male",
+ "key": ""
+ },
+ {
+ "label": "All",
+ "key": ""
+ }
+ ]
+ ],
+ "types": [
+ {
+ "range": {
+ "row": "*",
+ "col": "*"
+ },
+ "type": "int",
+ "read_only": true
+ }
+ ]
}
- ]
-
+ ],
+ "survey": {}
}
});
diff --git a/client/app/helper/drop_sheet.js b/client/app/helper/drop_sheet.js
index 8862c62d..a2c82fc0 100644
--- a/client/app/helper/drop_sheet.js
+++ b/client/app/helper/drop_sheet.js
@@ -52,7 +52,6 @@ define(['alertify', 'alertify_defaults', 'XLSX'], function (alertify) {
for (i = 0; i !== files.length; ++i) {
f = files[i];
var reader = new FileReader();
-
reader.onload = function (e) {
var data = e.target.result;
@@ -68,7 +67,7 @@ define(['alertify', 'alertify_defaults', 'XLSX'], function (alertify) {
opts.on.workstart();
wb = XLSX.read(data, readtype);
- opts.on.workend(processWB(wb, 'XLSX'));
+ opts.on.workend(processWB(wb));
} catch (e) {
opts.errors.failed(e);
}
@@ -102,43 +101,46 @@ define(['alertify', 'alertify_defaults', 'XLSX'], function (alertify) {
return o;
}
+ // Process individual sheet.
+ function processWS(ws, table, start, end) {
- // Parses workbook for relevant cells.
- function processWB(wb, type, sheetidx) {
- var hotTable = opts.tables[0];
- var hotTable2 = opts.tables[1];
- var hotTable3 = opts.tables[2];
- var sheet = wb.Sheets[wb.SheetNames[0]];
-
-
- if ((sheet['A3'].h === 'Amount spent with MBEs') &&
- (sheet['A9'].h === 'Addressable spend') &&
- (sheet['A15'].h === 'Number of MBEs')) {
- try {
- hotTable.setDataAtCell(0, 0, sheet['B5'].v);
- hotTable.setDataAtCell(1, 0, sheet['B6'].v);
- hotTable.setDataAtCell(2, 0, sheet['B7'].v);
-
- hotTable2.setDataAtCell(0, 0, sheet['B11'].v);
- hotTable2.setDataAtCell(1, 0, sheet['B12'].v);
- hotTable2.setDataAtCell(2, 0, sheet['B13'].v);
-
- hotTable3.setDataAtCell(0, 0, sheet['B17'].v);
- hotTable3.setDataAtCell(1, 0, sheet['B18'].v);
- hotTable3.setDataAtCell(2, 0, sheet['B19'].v);
-
- alertify.alert('

Success',
- 'The tables below have been populated. Please confirm that your data is accurate and scroll down to verify and submit your data.');
-
- return true;
- } catch (err) {
- alertify.alert("

Error!", 'Data improperly formatted');
- return false;
+ let s = XLSX.utils.decode_cell(start);
+ let e = XLSX.utils.decode_cell(end);
+
+ for (let i = s.r; i <= e.r; i++) {
+ for (let j = s.c; j <= e.c; j++) {
+ var cell = XLSX.utils.encode_cell({r: i, c: j});
+ if (ws[cell] && !isNaN(ws[cell].v)) {
+ // subtract initial offset
+ table.setDataAtCell(i-s.r, j-s.c, ws[cell].v);
+ } else {
+ alertify.alert("

Error!", "Spreadsheet format does not match original template, or there are empty cells, or non-numeric data. Please copy-and-paste or type data into the 'Number Of Employees' table manually.");
+ return false;
+ }
}
+ }
+ return true;
+ }
+ // Parses workbook for relevant cells.
+ function processWB(wb) {
+ var tableDef = opts.tables_def.tables;
+
+ for (const name of wb.SheetNames) {
+ let tableId = 0;
+ for (const table of tableDef) {
+ if (table.excel && table.excel[0] && table.excel[0].sheet === name) {
+ if (!processWS(wb.Sheets[name], opts.tables[tableId], table.excel[0].start, table.excel[0].end)) {
+ return false; // mistake in processing sheet
+ }
+ }
+ tableId++;
+ }
}
- alertify.alert("

Error!", 'Data improperly formatted');
- return false;
+
+ alertify.alert('

Success', 'The tables below have been populated. Please confirm that your data is accurate and scroll down to answer the multiple choice questions, verify, and submit your data');
+
+ return true;
}
diff --git a/client/app/vendor/papaparse.js b/client/app/vendor/papaparse.js
deleted file mode 100644
index f03246ee..00000000
--- a/client/app/vendor/papaparse.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- Papa Parse
- v4.3.6
- https://github.com/mholt/PapaParse
- License: MIT
-*/
-!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof module&&"undefined"!=typeof exports?module.exports=b():a.Papa=b()}(this,function(){"use strict";function a(a,b){b=b||{};var c=b.dynamicTyping||!1;if(r(c)&&(b.dynamicTypingFunction=c,c={}),b.dynamicTyping=c,b.worker&&z.WORKERS_SUPPORTED){var h=k();return h.userStep=b.step,h.userChunk=b.chunk,h.userComplete=b.complete,h.userError=b.error,b.step=r(b.step),b.chunk=r(b.chunk),b.complete=r(b.complete),b.error=r(b.error),delete b.worker,void h.postMessage({input:a,config:b,workerId:h.id})}var i=null;return"string"==typeof a?i=b.download?new d(b):new f(b):a.readable===!0&&r(a.read)&&r(a.on)?i=new g(b):(t.File&&a instanceof File||a instanceof Object)&&(i=new e(b)),i.stream(a)}function b(a,b){function c(){"object"==typeof b&&("string"==typeof b.delimiter&&1===b.delimiter.length&&z.BAD_DELIMITERS.indexOf(b.delimiter)===-1&&(j=b.delimiter),("boolean"==typeof b.quotes||b.quotes instanceof Array)&&(h=b.quotes),"string"==typeof b.newline&&(k=b.newline),"string"==typeof b.quoteChar&&(l=b.quoteChar),"boolean"==typeof b.header&&(i=b.header))}function d(a){if("object"!=typeof a)return[];var b=[];for(var c in a)b.push(c);return b}function e(a,b){var c="";"string"==typeof a&&(a=JSON.parse(a)),"string"==typeof b&&(b=JSON.parse(b));var d=a instanceof Array&&a.length>0,e=!(b[0]instanceof Array);if(d&&i){for(var g=0;g
0&&(c+=j),c+=f(a[g],g);b.length>0&&(c+=k)}for(var h=0;h0&&(c+=j);var n=d&&e?a[m]:m;c+=f(b[h][n],m)}h-1||" "===a.charAt(0)||" "===a.charAt(a.length-1);return c?l+a+l:a}function g(a,b){for(var c=0;c-1)return!0;return!1}var h=!1,i=!0,j=",",k="\r\n",l='"';c();var m=new RegExp(l,"g");if("string"==typeof a&&(a=JSON.parse(a)),a instanceof Array){if(!a.length||a[0]instanceof Array)return e(null,a);if("object"==typeof a[0])return e(d(a[0]),a)}else if("object"==typeof a)return"string"==typeof a.data&&(a.data=JSON.parse(a.data)),a.data instanceof Array&&(a.fields||(a.fields=a.meta&&a.meta.fields),a.fields||(a.fields=a.data[0]instanceof Array?a.fields:d(a.data[0])),a.data[0]instanceof Array||"object"==typeof a.data[0]||(a.data=[a.data])),e(a.fields||[],a.data||[]);throw"exception: Unable to serialize unrecognized input"}function c(a){function b(a){var b=p(a);b.chunkSize=parseInt(b.chunkSize),a.step||a.chunk||(b.chunkSize=null),this._handle=new h(b),this._handle.streamer=this,this._config=b}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},b.call(this,a),this.parseChunk=function(a){if(this.isFirstChunk&&r(this._config.beforeFirstChunk)){var b=this._config.beforeFirstChunk(a);void 0!==b&&(a=b)}this.isFirstChunk=!1;var c=this._partialLine+a;this._partialLine="";var d=this._handle.parse(c,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var e=d.meta.cursor;this._finished||(this._partialLine=c.substring(e-this._baseIndex),this._baseIndex=e),d&&d.data&&(this._rowCount+=d.data.length);var f=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(v)t.postMessage({results:d,workerId:z.WORKER_ID,finished:f});else if(r(this._config.chunk)){if(this._config.chunk(d,this._handle),this._paused)return;d=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(d.data),this._completeResults.errors=this._completeResults.errors.concat(d.errors),this._completeResults.meta=d.meta),!f||!r(this._config.complete)||d&&d.meta.aborted||this._config.complete(this._completeResults,this._input),f||d&&d.meta.paused||this._nextChunk(),d}},this._sendError=function(a){r(this._config.error)?this._config.error(a):v&&this._config.error&&t.postMessage({workerId:z.WORKER_ID,error:a,finished:!1})}}function d(a){function b(a){var b=a.getResponseHeader("Content-Range");return null===b?-1:parseInt(b.substr(b.lastIndexOf("/")+1))}a=a||{},a.chunkSize||(a.chunkSize=z.RemoteChunkSize),c.call(this,a);var d;u?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(a){this._input=a,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(d=new XMLHttpRequest,this._config.withCredentials&&(d.withCredentials=this._config.withCredentials),u||(d.onload=q(this._chunkLoaded,this),d.onerror=q(this._chunkError,this)),d.open("GET",this._input,!u),this._config.downloadRequestHeaders){var a=this._config.downloadRequestHeaders;for(var b in a)d.setRequestHeader(b,a[b])}if(this._config.chunkSize){var c=this._start+this._config.chunkSize-1;d.setRequestHeader("Range","bytes="+this._start+"-"+c),d.setRequestHeader("If-None-Match","webkit-no-cache")}try{d.send()}catch(a){this._chunkError(a.message)}u&&0===d.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==d.readyState){if(d.status<200||d.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>b(d),this.parseChunk(d.responseText)}},this._chunkError=function(a){var b=d.statusText||a;this._sendError(b)}}function e(a){a=a||{},a.chunkSize||(a.chunkSize=z.LocalChunkSize),c.call(this,a);var b,d,e="undefined"!=typeof FileReader;this.stream=function(a){this._input=a,d=a.slice||a.webkitSlice||a.mozSlice,e?(b=new FileReader,b.onload=q(this._chunkLoaded,this),b.onerror=q(this._chunkError,this)):b=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(a.target.result)},this._chunkError=function(){this._sendError(b.error)}}function f(a){a=a||{},c.call(this,a);var b,d;this.stream=function(a){return b=a,d=a,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var a=this._config.chunkSize,b=a?d.substr(0,a):d;return d=a?d.substr(a):"",this._finished=!d,this.parseChunk(b)}}}function g(a){a=a||{},c.call(this,a);var b=[],d=!0;this.stream=function(a){this._input=a,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._nextChunk=function(){b.length?this.parseChunk(b.shift()):d=!0},this._streamData=q(function(a){try{b.push("string"==typeof a?a:a.toString(this._config.encoding)),d&&(d=!1,this.parseChunk(b.shift()))}catch(a){this._streamError(a)}},this),this._streamError=q(function(a){this._streamCleanUp(),this._sendError(a.message)},this),this._streamEnd=q(function(){this._streamCleanUp(),this._finished=!0,this._streamData("")},this),this._streamCleanUp=q(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(a){function b(){if(x&&o&&(l("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+z.DefaultDelimiter+"'"),o=!1),a.skipEmptyLines)for(var b=0;b=w.length?"__parsed_extra":w[d]),g=f(e,g),"__parsed_extra"===e?(c[e]=c[e]||[],c[e].push(g)):c[e]=g}x.data[b]=c,a.header&&(d>w.length?l("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+d,b):d1&&(l+=Math.abs(q-g),g=q):g=q}o.data.length>0&&(m/=o.data.length-n),("undefined"==typeof f||l1.99&&(f=l,e=k)}return a.delimiter=e,{successful:!!e,bestDelimiter:e}}function j(a){a=a.substr(0,1048576);var b=a.split("\r"),c=a.split("\n"),d=c.length>1&&c[0].length=b.length/2?"\r\n":"\r"}function k(a){var b=q.test(a);return b?parseFloat(a):a}function l(a,b,c,d){x.errors.push({type:a,code:b,message:c,row:d})}var m,n,o,q=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,s=this,t=0,u=!1,v=!1,w=[],x={data:[],errors:[],meta:{}};if(r(a.step)){var y=a.step;a.step=function(d){if(x=d,c())b();else{if(b(),0===x.data.length)return;t+=d.data.length,a.preview&&t>a.preview?n.abort():y(x,s)}}}this.parse=function(c,d,e){if(a.newline||(a.newline=j(c)),o=!1,a.delimiter)r(a.delimiter)&&(a.delimiter=a.delimiter(c),x.meta.delimiter=a.delimiter);else{var f=h(c,a.newline,a.skipEmptyLines);f.successful?a.delimiter=f.bestDelimiter:(o=!0,a.delimiter=z.DefaultDelimiter),x.meta.delimiter=a.delimiter}var g=p(a);return a.preview&&a.header&&g.preview++,m=c,n=new i(g),x=n.parse(m,d,e),b(),u?{meta:{paused:!0}}:x||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,n.abort(),m=m.substr(n.getCharIndex())},this.resume=function(){u=!1,s.streamer.parseChunk(m)},this.aborted=function(){return v},this.abort=function(){v=!0,n.abort(),x.meta.aborted=!0,r(a.complete)&&a.complete(x),m=""}}function i(a){a=a||{};var b=a.delimiter,c=a.newline,d=a.comments,e=a.step,f=a.preview,g=a.fastMode,h=a.quoteChar||'"';if(("string"!=typeof b||z.BAD_DELIMITERS.indexOf(b)>-1)&&(b=","),d===b)throw"Comment character same as delimiter";d===!0?d="#":("string"!=typeof d||z.BAD_DELIMITERS.indexOf(d)>-1)&&(d=!1),"\n"!=c&&"\r"!=c&&"\r\n"!=c&&(c="\n");var i=0,j=!1;this.parse=function(a,k,l){function m(a){x.push(a),A=i}function n(b){return l?p():("undefined"==typeof b&&(b=a.substr(i)),z.push(b),i=s,m(z),w&&q(),p())}function o(b){i=b,m(z),z=[],E=a.indexOf(c,i)}function p(a){return{data:x,errors:y,meta:{delimiter:b,linebreak:c,aborted:j,truncated:!!a,cursor:A+(k||0)}}}function q(){e(p()),x=[],y=[]}if("string"!=typeof a)throw"Input must be a string";var s=a.length,t=b.length,u=c.length,v=d.length,w=r(e);i=0;var x=[],y=[],z=[],A=0;if(!a)return p();if(g||g!==!1&&a.indexOf(h)===-1){for(var B=a.split(c),C=0;C=f)return x=x.slice(0,f),p(!0)}}return p()}for(var D=a.indexOf(b,i),E=a.indexOf(c,i),F=new RegExp(h+h,"g");;)if(a[i]!==h)if(d&&0===z.length&&a.substr(i,v)===d){if(E===-1)return p();i=E+u,E=a.indexOf(c,i),D=a.indexOf(b,i)}else if(D!==-1&&(D=f)return p(!0)}else{var G=i;for(i++;;){var G=a.indexOf(h,G+1);if(G===-1)return l||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:x.length,index:i}),n();if(G===s-1){var H=a.substring(i,G).replace(F,h);return n(H)}if(a[G+1]!==h){if(a[G+1]===b){z.push(a.substring(i,G).replace(F,h)),i=G+1+t,D=a.indexOf(b,i),E=a.indexOf(c,i);break}if(a.substr(G+1,u)===c){if(z.push(a.substring(i,G).replace(F,h)),o(G+1+u),D=a.indexOf(b,i),w&&(q(),j))return p();if(f&&x.length>=f)return p(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:i}),G++}else G++}}return n()},this.abort=function(){j=!0},this.getCharIndex=function(){return i}}function j(){var a=document.getElementsByTagName("script");return a.length?a[a.length-1].src:""}function k(){if(!z.WORKERS_SUPPORTED)return!1;if(!w&&null===z.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var a=z.SCRIPT_PATH||s;a+=(a.indexOf("?")!==-1?"&":"?")+"papaworker";var b=new t.Worker(a);return b.onmessage=l,b.id=y++,x[b.id]=b,b}function l(a){var b=a.data,c=x[b.workerId],d=!1;if(b.error)c.userError(b.error,b.file);else if(b.results&&b.results.data){var e=function(){d=!0,m(b.workerId,{data:[],errors:[],meta:{aborted:!0}})},f={abort:e,pause:n,resume:n};if(r(c.userStep)){for(var g=0;g 0) { // If there is at least one NaN, change every thing to Excel's NaN equivalent.
- totals = ['#VALUE!', '#VALUE!', '#VALUE!'];
+ var running = tableController.checkTotals(totals_table, changes, sums, NaNs);
+ sums = running.sums;
+ NaNs = running.NaNs;
}
-
- // NOTE: for survey quetsions
- // Note: took out declarations to fix eslint error
- // changes = []; // [ [row, col, change], [row, col, change], ..]
- // for (i = 0; i < totals.length; i++) {
- // changes.push([0, i, totals[i]]);
- // }
- // tables[4].setDataAtCell(changes); // This changes the data without changing cellProperties (e.g. keeps readOnly)
};
- // Alerts, page elements, etc. for drag-and-drop/choose file.
- // var workbook_js = null;
var _target = document.getElementById('drop-area');
var _choose = document.getElementById('choose-file-button');
@@ -111,6 +151,7 @@ define(['jquery', 'controllers/clientController', 'controllers/tableController',
spinner = new Spinner().spin(_target);
};
var _workend = function (status) {
+ $('#tables-area').show();
spinner.stop();
};
@@ -130,7 +171,6 @@ define(['jquery', 'controllers/clientController', 'controllers/tableController',
var _failed = function (e) {
alertify.alert('
Error!', 'This format is not supported.', function () {
});
-
spinner.stop();
};
@@ -174,37 +214,15 @@ define(['jquery', 'controllers/clientController', 'controllers/tableController',
});
// Table accordion.
- //$('#tables-area').hide();
+ $('#tables-area').hide();
$('#expand-table-button').click(function (e) {
$('#tables-area').slideToggle(function () {
- if ($('#tables-area').css('display') === 'none') {
- resizeCard(tables, false);
- } else {
- resizeCard(tables, true);
- }
+ tableController.updateWidth(tables);
});
$(e.target).toggleClass('flip');
});
- function resizeCard(tables, attach) {
- // GENERIC
- if (attach) {
-
- var table_divs = $('.table-section');
-
- for (var i = 0; i < table_divs.length; i++) {
- var table = table_divs[i];
- // TODO!
-
- // new ResizeSensor((table).find('.wtHider').first()[0], function() {
- // // clientController.updateWidth(tables);
- // });
- }
- }
- clientController.updateWidth(tables, !attach);
- }
-
function addValidationErrors(msg) {
$verify.prop('checked', false);
$('#submit').prop('disabled', true);
diff --git a/client/app/views/unmaskView.js b/client/app/views/unmaskView.js
index 0ecc6b80..036adeb6 100644
--- a/client/app/views/unmaskView.js
+++ b/client/app/views/unmaskView.js
@@ -1,7 +1,10 @@
/*eslint no-console: ["error", { allow: ["warn", "error"] }] */
-define(['jquery', 'controllers/unmaskController', 'controllers/clientController', 'controllers/tableController', 'helper/drop_sheet', 'spin', 'Ladda', 'ResizeSensor', 'alertify', 'table_template'],
- function ($, unmaskController, clientController, tableController, DropSheet, Spinner, Ladda, ResizeSensor, alertify, alertify_defaults, table_template) {
+// define(['jquery', 'controllers/unmaskController', 'controllers/tableController', 'helper/drop_sheet', 'spin', 'Ladda', 'ResizeSensor', 'alertify', 'table_template'],
+// function ($, unmaskController, tableController, DropSheet, Spinner, Ladda, ResizeSensor, alertify, alertify_defaults, table_template) {
+define(['jquery', 'controllers/unmaskController', 'controllers/tableController', 'helper/drop_sheet', 'alertify', 'table_template'],
+ function ($, unmaskController, tableController, DropSheet, alertify, table_template) {
+
function error(msg) {
alertify.alert('
Error!', msg);
@@ -12,15 +15,13 @@ define(['jquery', 'controllers/unmaskController', 'controllers/clientController'
if (typeof(d) !== 'object') {
return;
}
- var tables = {};
-
- tables = d;
+ var tables = d;
+ tableController.createTableElems(table_template.tables, '#tables-area');
tableController.saveTables(tables, session);
+
+ $('#tables-area').show();
tableController.displayReadTable(tables);
-
- // TODO: why is this even here?
- $('#HandsontableCopyPaste').hide();
}
diff --git a/client/index.html b/client/index.html
index b2ebcf71..cae3b2fe 100755
--- a/client/index.html
+++ b/client/index.html
@@ -112,18 +112,30 @@ Entered Data
Yellow cells indicate the value might be outside of the expected range. Please double-check
to make sure the data is correct. You will still be able to submit your data.
For a list of definitions, please click here.
-
+