didier

added list of libraries

......@@ -17,8 +17,11 @@
"objmtlloader": "https://raw.githubusercontent.com/mrdoob/three.js/r68/examples/js/loaders/OBJMTLLoader.js",
"aruco": "https://js-aruco.googlecode.com/svn/trunk/src/aruco.js",
"cv": "https://js-aruco.googlecode.com/svn/trunk/src/cv.js",
"codemirror" : "*",
"jquery-mobile-bower" : "*",
"CodeMirror-htmlmixed": "https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/htmlmixed/htmlmixed.js",
"CodeMirror-javascript": "https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/javascript/javascript.js"
"CodeMirror-javascript": "https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/javascript/javascript.js",
"md5" :"*"
......
......@@ -44,7 +44,7 @@ function createProject() {
// we are ok, we recieved components
var libraryList = $('#libraryList');
for (c in data) {
libraryList.append('<input name="cmp_'+data[c]+'" id="cmp_'+data[c]+'" type="checkbox">');
libraryList.append('<input name="cmp_'+data[c]+'" id="cmp_'+data[c]+'" data-lib="'+data[c]+'" type="checkbox">');
libraryList.append('<label for="cmp_'+data[c]+'">'+data[c]+'</label>');
}
//libraryList.listview('refresh');
......@@ -55,10 +55,20 @@ function createProject() {
}
function fetchLibraries() {
var cbs = $('');
var libraries = [];
$('#libraryList div input').each(function() {
if ($(this).is(':checked')) {
libraries.push($(this).data('lib'));
}
});
$.post(
"/project/libraries",
libraries,
function(data) {
}
);
}
......
......@@ -67,6 +67,12 @@ app.get('/deps/*', function(req, res) {
});
});
app.post('/project/libraries', upload.array(), function(req, res) {
var libraries = req.body;
});
app.post('/login', upload.array(), function(req, res) {
console.log('attempted to login with id ', req.body);
// here we should verify user access
......