Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes #5

Merged
merged 2 commits into from
Oct 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Remove logs, fix reference error
  • Loading branch information
JonasWissing committed Oct 13, 2017
commit db8ea99931ed39c7ece812ee6b885a0b7bd05399
2 changes: 0 additions & 2 deletions controllers/submit/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ var validate = ajv.compile(schema);

// POST
exports.request = function(req, res) {
console.log("SUBMIT SOME DATA");
console.log(req.body);
var valid = validate(req.body);
if (!valid) {
res.status(errors.schema.error_1.code).send(_.extend(errors.schema.error_1, {
Expand Down
17 changes: 8 additions & 9 deletions public/configure/js/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ Form.prototype.Postgres = function (categories, modify) {
$('#panelQuery').append(this.elements.queryDescription());
//Category
this.Categories(categories);

var that = this;
if(modify) {
this.btnSend("Send", function (e) {
alert(e);
});
} else {
this.btnSend("Send", function (e) {
alert(e);
this.Table.Queries();
that.Table.Queries();
});
}
}
Expand Down Expand Up @@ -194,15 +194,15 @@ Form.prototype.API = function (categories, modify) {
$('#panelQuery').append(this.elements.queryDescription());
//Category
this.Categories(categories);

var that = this;
if(modify) {
this.btnSend("Send", function (e) {
alert(e);
});
} else {
this.btnSend("Send", function (e) {
alert(e);
this.Table.Queries();
that.Table.Queries();
});
}
}
Expand Down Expand Up @@ -234,15 +234,15 @@ Form.prototype.CouchDB = function (categories, modify) {
$('#panelQuery').append(this.elements.queryDescription());
//Category
this.Categories(categories);

var that = this;
if(modify) {
this.btnSend("Send", function (e) {
alert(e);
});
} else {
this.btnSend("Send", function (e) {
alert(e);
this.Table.Queries();
that.Table.Queries();
});
}
}
Expand All @@ -269,14 +269,15 @@ Form.prototype.Parliament = function (categories, modify) {
$('#panelQuery').append(this.elements.queryDescription());
//Category
this.Categories(categories);
var that = this;
if(modify) {
this.btnSend("Send", function (e) {
alert(e);
});
} else {
this.btnSend("Send", function (e) {
alert(e);
this.Table.Queries();
that.Table.Queries();
});
}
}
Expand Down Expand Up @@ -401,8 +402,6 @@ Form.prototype.btnSend = function (text, callback) {

//Listen on Button Clicks
$btnSend.click(function (e) {
console.log(that.status);
console.log(that)
submit = new Submit(that.user, that.categories);
submit.submit(that.status, callback);
//Check which status is active
Expand Down
3 changes: 0 additions & 3 deletions public/configure/js/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,7 @@ Table.prototype.QueriesByUser = function (username, form) {
* Expand Table to show more Information
*/
Table.prototype.moreInfo = function (data) {
console.log(this.data_all);
console.log(data);
for(i in this.data_all) {
console.log(this.data_all[i][1])
if(this.data_all[i][1] == data) {
return '<center><code>' + this.data_all[i][2] + '</code></center>';
}
Expand Down