From 943c0c8188cb25752a4357df94d0a51d9d846431 Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Sat, 12 Sep 2015 13:19:21 -0700 Subject: [PATCH] fixed css bugs --- app/models/form.server.model.js | 18 ++++++++-------- app/models/logic_jump.server.model.js | 11 ++++------ docs/testing_feedback_Sep12.md | 31 +++++++++++++++++++++++++++ public/modules/core/css/core.css | 4 ++++ 4 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 docs/testing_feedback_Sep12.md diff --git a/app/models/form.server.model.js b/app/models/form.server.model.js index 00c21aa6..20bcd89e 100644 --- a/app/models/form.server.model.js +++ b/app/models/form.server.model.js @@ -17,7 +17,7 @@ var mongoose = require('mongoose'), var FieldSchema = require('./form_field.server.model.js'), FormSubmissionSchema = require('./form_submission.server.model.js'), Field = mongoose.model('Field', FieldSchema), - FormSubmission = mongoose.model('FormSubmission', FormSubmissionSchema) + FormSubmission = mongoose.model('FormSubmission', FormSubmissionSchema); var ButtonSchema = new Schema({ url: { @@ -41,7 +41,7 @@ var ButtonSchema = new Schema({ /** * Form Schema */ -var LogicJumpSchema = new Schema({ +var FormSchema = new Schema({ created: { type: Date, default: Date.now @@ -144,7 +144,7 @@ var LogicJumpSchema = new Schema({ //Delete template PDF of current Form -LogicJumpSchema.pre('remove', function (next) { +FormSchema.pre('remove', function (next) { if(this.pdf && process.env.NODE_ENV === 'development'){ //Delete template form fs.unlink(this.pdf.path, function(err){ @@ -157,7 +157,7 @@ LogicJumpSchema.pre('remove', function (next) { var _original; //Set _original -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { // console.log(this.constructor.model); // console.log(FormModel); this.constructor // ≈ mongoose.model('…', FieldSchema).findById @@ -175,7 +175,7 @@ LogicJumpSchema.pre('save', function (next) { }); //Update lastModified and created everytime we save -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { var now = new Date(); this.lastModified = now; if( !this.created ){ @@ -198,7 +198,7 @@ function getDeletedIndexes(needle, haystack){ } //Move PDF to permanent location after new template is uploaded -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { if(this.pdf){ var that = this; async.series([ @@ -311,7 +311,7 @@ LogicJumpSchema.pre('save', function (next) { next(); }); -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { // var _original = this._original; // console.log('_original\n------------'); // console.log(_original); @@ -445,7 +445,7 @@ LogicJumpSchema.pre('save', function (next) { } }); -// LogicJumpSchema.methods.generateFDFTemplate = function() { +// FormSchema.methods.generateFDFTemplate = function() { // var _keys = _.pluck(this.form_fields, 'title'), // _values = _.pluck(this.form_fields, 'fieldValue'); @@ -462,4 +462,4 @@ LogicJumpSchema.pre('save', function (next) { // return jsonObj; // }; - mongoose.model('LogicJump', LogicJumpSchema); + mongoose.model('Form', FormSchema); diff --git a/app/models/logic_jump.server.model.js b/app/models/logic_jump.server.model.js index 0c35a8d8..598b658c 100644 --- a/app/models/logic_jump.server.model.js +++ b/app/models/logic_jump.server.model.js @@ -6,9 +6,7 @@ var mongoose = require('mongoose'), Schema = mongoose.Schema, _ = require('lodash'), - tree = require('mongoose-tree'), - math = require('math'), - deasync = require('fibers'); + math = require('math'); var BooleanExpresssionSchema = new Schema({ @@ -40,7 +38,6 @@ BooleanExpresssionSchema.methods.evaluate = function(){ headNode.traverse(function (node, path, parent) { if(node.type === 'SymbolNode'){ - Fiber() mongoose.model('Field') .findOne({_id: node.name}).exec(function(err, field){ if(err) { @@ -59,14 +56,14 @@ BooleanExpresssionSchema.methods.evaluate = function(){ } }); - var code = node.compile(); + var code = headNode.compile(); var result = code.eval(expressionScope); this.result = result; return result; -}); +}; -mongoose.model('BooleanStatement', BooleanStatementSchema); +mongoose.model('BooleanExpresssion', BooleanExpresssionSchema); /** * Form Schema diff --git a/docs/testing_feedback_Sep12.md b/docs/testing_feedback_Sep12.md new file mode 100644 index 00000000..f001d0ff --- /dev/null +++ b/docs/testing_feedback_Sep12.md @@ -0,0 +1,31 @@ +##Tester 1: Justin Crosby + Browser: Chrome + Resolution: 1920x1080 + OS: Windows 10 + + +Landing Page: + Horizontal Scroll Bar Bug +create new form view (in listForms): + name field input is outside the red box + languages aren't capitalized + name field should be right next to label to be consistent + +Admin Form View + it says drag and drop fields but there's no drag and drop, have to click + DropdownList Rendering Problems (see justin_testing2.jpg) + + +##Tester2: Evan Moore + Browser: FB Messenger Browser (Webkit) + Phone: iPhone 5 + + Well first thing I see is that some of the fields are compressed kinda weird on my iPhone (see evan_testing1.jpg) + + And the settings button at the top right is a little hard to make out any of the detail, but that's a pretty minor fix + + When I try to change the title of one of the fields, it bugs out quite a bit too + + Like it seems to be trying to update the info before I've finished typing + + diff --git a/public/modules/core/css/core.css b/public/modules/core/css/core.css index bd98ab4a..f45cfa81 100755 --- a/public/modules/core/css/core.css +++ b/public/modules/core/css/core.css @@ -1,3 +1,7 @@ +body { + overflow-x: hidden; +} + /*Navbar Custom CSS*/ .navbar-inverse { background-color:#fafafa;