OpenEugene / little-help-book-web

Human service resource guide powered by White Bird Clinic
MIT License
6 stars 4 forks source link

Feature/daniel generate select options #42

Closed coatsd closed 3 years ago

coatsd commented 3 years ago

Created three .js files under the "src" directory for use of the application: "map.js" contains the code to initialize a map in any div element using the id tag "mapid". Also contains functions to place markers and change the view on a map object. "generateSelectOptions.js" contains the code to populate the select box elements with options. To use, you have to pass in an array of objects (that contain an "id" and a "name" field) into the "generateOptionElements" function to create a string to be written to the DOM. After you have that string, pass the id of the select element you want to populate, and the string that was generated, into the "placeOptionElements" function - this function will find that element by it's ID and place the generated string into the select box. "generateServiceTiles.js" contains the code to populate the subcategories page with provider tiles. This works similarly to the "generateSelectOptions.js", in that you have a function to generate the string (called "generateServiceTiles") and a function to actually write the generated string to the DOM (called "placeServiceTiles"). I also edited the subcategory and provider page's html and css to accommodate use of this code.