From a1ad0a79147a777600d8b4f10d1a2c2d35216ddb Mon Sep 17 00:00:00 2001 From: Bob Stahl Date: Mon, 1 Apr 2019 10:21:15 -0400 Subject: [PATCH] Source files --- docs/README.md | 19 ++++++++++++------- docs/images/README.md | 20 +------------------- docs/images/wireframes/README.md | 20 ++++++++++++++++++++ src/greenhouse/js/demo_script.js | 18 ++++++++++++++++++ src/greenhouse/js/scripts.js | 6 ++++++ src/greenhouse/schools.php | 7 ++++++- src/index.php | 18 ++---------------- 7 files changed, 65 insertions(+), 43 deletions(-) create mode 100644 src/greenhouse/js/demo_script.js create mode 100644 src/greenhouse/js/scripts.js diff --git a/docs/README.md b/docs/README.md index 9b1b8e8..d20bc90 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,5 @@ -# Education Form Module - -Documentation +# Documentation See [Job Board](https://developers.greenhouse.io/job-board.html) for full documentation. 1. Click on [Educations](https://developers.greenhouse.io/job-board.html#educations) in the left menu. @@ -16,10 +14,17 @@ Our token is **romeopower** ## Expectations See [wireframes](https://github.com/boxballoon/education_form_module/tree/master/docs/images/wireframes) for a visual. -Use [material icons](https://material.io/tools/icons/) for the search icon used in the wireframes. 1. The user begins typing in the input field. They type the word "State". 1. A select menu will appear below the input field containing all the matching results. -1. The user will click one of the results. -1. The NAME of the college will appear in the input field. -1. When the form is submitted, the VALUE of this field should be the ID of the school NAME. +1. IF the user scrolls to the bottom of the results AND more results exist, load the next 100 results. Continue this until there are no more results (Lazy Load). +1. The user will click one of the results. +1. The NAME of the college will appear in the input field. +1. When the form is submitted, the VALUE of this field should be the ID of the school NAME. +1. Please comment all code and explain responsibilities of methods, functions, etc. + + +## 'Nice To Have...Not A Need To Have' + +1. Styling to match wireframes. +1. Use [material icons](https://material.io/tools/icons/) for the search icon used in the wireframes. diff --git a/docs/images/README.md b/docs/images/README.md index 03afc00..3313174 100644 --- a/docs/images/README.md +++ b/docs/images/README.md @@ -1,21 +1,3 @@ # Images -## WIREFRAME 1 -Input field. -In this frame the input field has not been clicked. -Do not style with any library. -Custom CSS is welcome but not required. - -## WIREFRAME 2 -Input field. -The user has clicked this field and has typed the word “State”. Any result with the word “State” must appear below the input field in a selectable list. The user will choose one. Upon submit, the post request is expecting the id of the school selected. - -## WIREFRAME 3 - -Input field. Lazy Load. -The user has scrolled to the bottom of the results but they have not found what they are looking for. When the user arrives at the last result AND more results exist, load the next 100 results. Continue this process until the user scrolls to the end of the results. - -## WIREFRAME 4 - -Input field. -The user has arrived at the end of all the results. +1. [Wireframes](https://github.com/boxballoon/education_form_module/tree/master/docs/images/wireframes) diff --git a/docs/images/wireframes/README.md b/docs/images/wireframes/README.md index 76f7562..4ad5d3a 100644 --- a/docs/images/wireframes/README.md +++ b/docs/images/wireframes/README.md @@ -1 +1,21 @@ # Wireframes + +## WIREFRAME 1 +Input field. +In this frame the input field has not been clicked. +Do not style with any library. +Custom CSS is welcome but not required. + +## WIREFRAME 2 +Input field. +The user has clicked this field and has typed the word “State”. Any result with the word “State” must appear below the input field in a selectable list. The user will choose one. Upon submit, the post request is expecting the id of the school selected. + +## WIREFRAME 3 + +Input field. Lazy Load. +The user has scrolled to the bottom of the results but they have not found what they are looking for. When the user arrives at the last result AND more results exist, load the next 100 results. Continue this process until the user scrolls to the end of the results. + +## WIREFRAME 4 + +Input field. +The user has arrived at the end of all the results. diff --git a/src/greenhouse/js/demo_script.js b/src/greenhouse/js/demo_script.js new file mode 100644 index 0000000..d10214d --- /dev/null +++ b/src/greenhouse/js/demo_script.js @@ -0,0 +1,18 @@ +/* + DEMO + +*/ + +$(function () { + $('#demo-form').parsley().on('field:validated', function() { + var ok = $('.parsley-error').length === 0; + $('.bs-callout-info').toggleClass('hidden', !ok); + $('.bs-callout-warning').toggleClass('hidden', ok); + }) + .on('form:submit', function() { + + console.log("LOG THE VALUE OF THE SEARCH FIELD HERE."); + + return false; // Don't submit form for this demo + }); +}); diff --git a/src/greenhouse/js/scripts.js b/src/greenhouse/js/scripts.js new file mode 100644 index 0000000..f104d29 --- /dev/null +++ b/src/greenhouse/js/scripts.js @@ -0,0 +1,6 @@ +/* + + SCRIPTS + This is where we want to see the development of your code. Please comment all code and explain responsibilities functions, methods, etc. + +*/ diff --git a/src/greenhouse/schools.php b/src/greenhouse/schools.php index ad998e3..d87425c 100644 --- a/src/greenhouse/schools.php +++ b/src/greenhouse/schools.php @@ -1,5 +1,10 @@ diff --git a/src/index.php b/src/index.php index 9df6610..34a5dd6 100644 --- a/src/index.php +++ b/src/index.php @@ -22,22 +22,8 @@ - - + +