Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d18a20b
updated README w/ current routes
lucyq Jan 5, 2018
1e8a1ce
Fix Zenodo name
frederickjansen Feb 7, 2018
92f8347
Remove unused dependencies
frederickjansen Mar 8, 2018
4a0e996
Update package-lock.json
frederickjansen Mar 8, 2018
7abf650
Merge branch 'master' of github.com:multiparty/web-mpc into pacesetters
lucyq May 17, 2018
98551c5
Merge branch 'pacesetters' of github.com:multiparty/web-mpc into gene…
lucyq May 17, 2018
d3fff63
deleting table
lucyq May 17, 2018
8850d0d
rendering questions dynamically
lucyq May 18, 2018
8a286db
dynamically creating divs in index
lucyq May 18, 2018
d81f628
fixed rendering of buttons
lucyq Sep 5, 2018
5697001
saving before checkout
lucyq Sep 16, 2018
2633ace
Updating package.json in server and client
vidyaap Oct 1, 2018
4a7074b
fixed error in rendering survey questions
lucyq Nov 13, 2018
37df261
adding header back to tables
lucyq Nov 13, 2018
b2d0420
resolved merge conflict in packagelock
lucyq Nov 13, 2018
1b7fb59
generic table rendering
lucyq Nov 15, 2018
48a18bc
added new tempalte for pacesetters
lucyq Nov 15, 2018
270fe4d
displaying survey question div dynamically
lucyq Nov 16, 2018
0728847
moved totals check table out of tables in bwwc template
lucyq Nov 16, 2018
f910711
removed redundancy in functio exports
lucyq Nov 16, 2018
fa44094
totals check rendering dynamically
lucyq Nov 16, 2018
3ae57e6
fixed error in hiding totals for pacesetters
lucyq Nov 16, 2018
0b8b7f5
fixing merge conflicts
lucyq Nov 16, 2018
2afa29a
removed extraneous getsheetrange function
lucyq Nov 16, 2018
fdbc704
moved totals table to correct location
lucyq Nov 16, 2018
fd989ed
table widths are correctly updating upon opening tables-area section
lucyq Nov 29, 2018
1263ece
table widths proerply resizing!
lucyq Nov 29, 2018
7194c4f
saving before switching branches to look at original pacesetters
lucyq Nov 29, 2018
978b25c
cleaned up validation code on server side
lucyq Nov 29, 2018
d0a841b
rendering divs in unmaskview
lucyq Nov 30, 2018
a0e3c8e
refactored make_hot_table"
lucyq Dec 5, 2018
a4ee818
display read only table
lucyq Dec 5, 2018
5685cda
removed console logs
lucyq Dec 5, 2018
d070758
cleaned up client view
lucyq Dec 18, 2018
c4f6a61
clean up on unmask view
lucyq Dec 18, 2018
d61fa4e
fixed linting errors
lucyq Dec 18, 2018
0033332
commented out validator that is not working atm
lucyq Dec 18, 2018
069e185
default width to original. only change width when bigger
lucyq Dec 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"affiliation": "Boston University",
"name": "Kinan Bab"
"name": "Kinan Dak Albab"
},
{
"affiliation": "Boston University",
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Instructions on how to operate the web-mpc application. All steps below are perf

#### Generate session key

* Navigate to `localhost:8080/session`.
* Navigate to `localhost:8080/create`.
* Click on **Generate Session** and copy and share the session key with all participants.

#### Fill out data
Expand All @@ -93,7 +93,7 @@ Instructions on how to operate the web-mpc application. All steps below are perf

#### Manage session

* Navigate to `localhost:8080/track`.
* Navigate to `localhost:8080/manage`.
* Input your session key and password.
* Generate participation links.
* Start the session.
Expand All @@ -105,3 +105,6 @@ Instructions on how to operate the web-mpc application. All steps below are perf
* Paste the session key and password in its designated fields.
* Click **Browse** and upload the private key file that was downloaded when generating the session key.
* Click **Unmask Data** and view the result.

## License
Web-mpc is freely distributable under the terms of the [MIT license](https://github.com/multiparty/web-mpc/blob/master/LICENSE). This release supports Handsontable's "[Nested headers](https://docs.handsontable.com/pro/1.17.0/demo-nested-headers.html)", a Pro feature. A [valid license](https://handsontable.com/pricing) must be obtained when using this feature.
2 changes: 1 addition & 1 deletion client/app/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require.config({
DropSheet: 'helper/drop_sheet',
mpc: 'helper/mpc',
ResizeSensor: 'vendor/ResizeSensor',
table_template: 'data/tables'
table_template: 'data/pacesetters'

},
shim: {
Expand Down
15 changes: 7 additions & 8 deletions client/app/controllers/analystController.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ define(['filesaver'], function (filesaver) {
} else {
// TODO add better error reporting
alert('Error Not a valid Session Status');
//console.log('Error Not a valid Session Status');
}
}

Expand Down Expand Up @@ -249,13 +248,13 @@ define(['filesaver'], function (filesaver) {


return {
checkStatus: checkStatus,
changeStatus: changeStatus,
generateUrls: generateUrls,
getExistingParticipants: getExistingParticipants,
generateTable: generateTable,
generateSession: generateSession,
getParameterByName: getParameterByName,
checkStatus,
changeStatus,
generateUrls,
getExistingParticipants,
generateTable,
generateSession,
getParameterByName,
START: 'START',
PAUSE: 'PAUSE',
STOP: 'STOP'
Expand Down
78 changes: 6 additions & 72 deletions client/app/controllers/clientController.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,63 +104,6 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler

var errors = [];

/*
Called when the instructions card is expanded.
*/
var tableWidthsOld = [];

function updateWidth(tables, reset) {

if (reset) {
tableController.resetTableWidth();

tableWidthsOld = [];
return;
}

var tableWidths = [];
for (var i = 0; i < tables.length - 1; i++) {
var table = tables[i];
var header_width = getWidth(table);
tableWidths.push(parseFloat(header_width));
}

// No need to resize if width hasn't changed
// Quick and dirty equality check of arrays
if (JSON.stringify(tableWidths) === JSON.stringify(tableWidthsOld)) {
return;
}

for (var j = 0; j < tables.length - 1; j++) {
table = tables[j];
table.updateSettings({
// TODO check why reported table width is off
// This value is incorrect when expanding table by inputting more data
width: tableWidths[j] - 40
});
}

var maxWidth = Math.max.apply(null, tableWidths);

tableController.updateTableWidth(maxWidth);
tableWidthsOld = tableWidths.concat();
}

function getWidth(table) {
var colWidths = [];

for (var i = 0; i < table.countRenderedCols(); i++) {
colWidths.push(parseFloat(table.getColWidth(i)));
}

// Need to account for column header.
var narrowestCol = Math.min.apply(null, colWidths);
var colSum = colWidths.reduce(function (a, b) {
return a + b
}, 0);
return narrowestCol * 5 + colSum;
}

/**
* Called when the submit button is pressed.
*/
Expand Down Expand Up @@ -210,14 +153,10 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler
$(questions[q]).removeClass('has-error');
}
}
// NOTE: no error check available
// if (!questionsValid) {
// errors = errors.concat(ADD_QUESTIONS_ERR);
// }

// Register semantic discrepancies validator.
// console.log("VALIDATE?", registerValidator)
// NOTE: semantic discrepancies for sal equity?!
// tableController.registerValidator('discrepancies', function (table, cell, value, callback) {
// checkSemanticDiscrepancies(tables, table, cell, value, callback);
// });
Expand Down Expand Up @@ -279,7 +218,7 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler
/**
* All inputs are valid. Construct JSON objects and send them to the server.
*/
function construct_and_send(tables, la) {
function constructAndSend(tables, la) {
// Begin constructing the data
var questions = $('#questions form');
var data_submission = questions.length ? {questions: {}} : {};
Expand Down Expand Up @@ -360,8 +299,6 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler
session: session
};

//console.log(submission);

return $.ajax({
type: 'POST',
url: '/',
Expand Down Expand Up @@ -433,8 +370,6 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler
}
}

//console.log('bonus',bonus_table);

// bonus can only be non-zero if the other tables are non-zero.
if (name === bonus_table._sail_meta.name) {
// bonus can only be non-zero if the other tables are non-zero.
Expand Down Expand Up @@ -472,12 +407,11 @@ define(['jquery', 'controllers/tableController', 'helper/mpc', 'alertify', 'aler
}

return {
errors: errors,
submitEntries: submitEntries,
validate: validate,
constructAndSend: construct_and_send,
validateSessionInput: validateSessionInput,
updateWidth: updateWidth
errors,
submitEntries,
validate,
constructAndSend,
validateSessionInput,
};
})();

Expand Down
Loading