├── .bowerrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .travis.yml ├── .yo-rc.json ├── Procfile ├── README.md ├── app ├── .buildignore ├── .htaccess ├── 404.html ├── favicon.ico ├── images │ ├── arrow-right-aaa.png │ ├── arrow-right-curve.png │ ├── arrow-right.png │ ├── bank-cards-32.png │ ├── basket-f77.png │ ├── basket.png │ ├── bubble-f77.png │ ├── bubble.png │ ├── calendar.png │ ├── card-amex.png │ ├── card.png │ ├── chair.png │ ├── chevron-down.png │ ├── chevron-right.png │ ├── clock.png │ ├── door.png │ ├── doorhandle.png │ ├── download.png │ ├── energy.png │ ├── faces │ │ ├── armando.jpg │ │ ├── craig.jpg │ │ ├── cs.jpg │ │ ├── nina.jpg │ │ ├── oxana.jpg │ │ └── sean.jpg │ ├── favorite-f77.png │ ├── favorite-fff.png │ ├── favorite.png │ ├── fire-f77.png │ ├── fire.png │ ├── heart.png │ ├── hires │ │ └── room │ │ │ ├── blux1.jpg │ │ │ ├── blux2.jpg │ │ │ ├── blux3.jpg │ │ │ ├── blux4.jpg │ │ │ ├── blux5.png │ │ │ ├── blux6.png │ │ │ └── blux7.png │ ├── image.png │ ├── layout.png │ ├── logo.png │ ├── magnifier.png │ ├── mail.png │ ├── menu.png │ ├── newprospect.png │ ├── note-f77.png │ ├── note.png │ ├── notebook.png │ ├── openmail-f77.png │ ├── openmail.png │ ├── paperplane.png │ ├── pencil.png │ ├── phone.png │ ├── piechart-f77.png │ ├── piechart.png │ ├── plane.png │ ├── pointer-left-fff.png │ ├── pointer-left.png │ ├── pointer-right-fff.png │ ├── pointer-right.png │ ├── question.png │ ├── service.png │ ├── slide-left.png │ ├── table.png │ ├── tableround.png │ ├── time.png │ ├── trash.png │ └── users.png ├── index.html ├── robots.txt ├── scripts │ ├── app.js │ ├── controllers │ │ ├── bookings.js │ │ ├── checkout.js │ │ ├── favoritescontroller.js │ │ ├── landing.js │ │ ├── menu.js │ │ ├── payments.js │ │ ├── room.js │ │ ├── searchBar.js │ │ ├── searchResultsController.js │ │ └── topnavcontroller.js │ ├── directives │ │ └── landing.js │ └── factory │ │ ├── authFactory.js │ │ ├── authInterceptor.js │ │ ├── bookingsFactory.js │ │ ├── checkoutFactory.js │ │ ├── favoriteFactory.js │ │ ├── roomFactory.js │ │ ├── searchBarFactory.js │ │ └── searchResultsFactory.js ├── styles │ ├── main.css │ ├── main.css.map │ └── scss │ │ ├── _base.scss │ │ ├── _foundation-icons.scss │ │ ├── _foundation.scss │ │ ├── _functions.scss │ │ ├── _normalize.scss │ │ ├── _settings.scss │ │ ├── app.css │ │ ├── app.css.map │ │ ├── app.css.min.map │ │ ├── app.min.css │ │ ├── app.scss │ │ ├── default-theme.css │ │ ├── dropzone.css │ │ ├── foundation.css │ │ ├── foundation.css.map │ │ ├── foundation │ │ ├── _functions.scss │ │ ├── _settings.scss │ │ └── components │ │ │ ├── _accordion.scss │ │ │ ├── _alert-boxes.scss │ │ │ ├── _block-grid.scss │ │ │ ├── _breadcrumbs.scss │ │ │ ├── _button-groups.scss │ │ │ ├── _buttons.scss │ │ │ ├── _clearing.scss │ │ │ ├── _dropdown-buttons.scss │ │ │ ├── _dropdown.scss │ │ │ ├── _flex-video.scss │ │ │ ├── _forms.scss │ │ │ ├── _global.scss │ │ │ ├── _grid.scss │ │ │ ├── _icon-bar.scss │ │ │ ├── _inline-lists.scss │ │ │ ├── _joyride.scss │ │ │ ├── _keystrokes.scss │ │ │ ├── _labels.scss │ │ │ ├── _magellan.scss │ │ │ ├── _offcanvas.scss │ │ │ ├── _orbit.scss │ │ │ ├── _pagination.scss │ │ │ ├── _panels.scss │ │ │ ├── _pricing-tables.scss │ │ │ ├── _progress-bars.scss │ │ │ ├── _range-slider.scss │ │ │ ├── _reveal.scss │ │ │ ├── _side-nav.scss │ │ │ ├── _split-buttons.scss │ │ │ ├── _sub-nav.scss │ │ │ ├── _switches.scss │ │ │ ├── _tables.scss │ │ │ ├── _tabs.scss │ │ │ ├── _thumbs.scss │ │ │ ├── _toolbar.scss │ │ │ ├── _tooltips.scss │ │ │ ├── _top-bar.scss │ │ │ ├── _type.scss │ │ │ └── _visibility.scss │ │ ├── normalize.css │ │ ├── normalize.css.map │ │ ├── side-comments.css │ │ └── style.css ├── templates │ ├── authorized_layout.html │ ├── auths │ │ ├── signin.html │ │ └── signup.html │ ├── dashboard.html │ ├── shared │ │ ├── alert_message.html │ │ ├── fileupload.html │ │ ├── tag.html │ │ └── topnav.html │ └── vendor │ │ ├── images.html │ │ ├── images │ │ ├── image.html │ │ └── list.html │ │ ├── menu_items.html │ │ ├── menu_items │ │ └── form.html │ │ ├── menus.html │ │ ├── menus │ │ ├── course.html │ │ ├── courses.html │ │ ├── form.html │ │ └── form_course.html │ │ ├── rooms.html │ │ ├── rooms │ │ ├── amenities.html │ │ ├── form_layout.html │ │ ├── general.html │ │ ├── layouts.html │ │ ├── marketing.html │ │ ├── menus.html │ │ ├── revenue.html │ │ ├── room.html │ │ └── services.html │ │ ├── setup.html │ │ └── setup │ │ ├── form_role.html │ │ ├── form_service.html │ │ ├── item_role.html │ │ ├── item_service.html │ │ ├── roles.html │ │ ├── search_terminology.html │ │ ├── services.html │ │ ├── settings.html │ │ ├── terminology.html │ │ └── venue.html ├── videos │ └── Private-Table.mp4 └── views │ ├── accounts │ ├── loginpartial.html │ └── signuppartial.html │ ├── bookings.html │ ├── checkout.html │ ├── checkout │ ├── checkoutbox.html │ ├── confirmation.html │ ├── menu.html │ ├── payments.html │ └── room.html │ ├── favorites.html │ ├── landing.html │ ├── searchBar.html │ ├── searchBar │ └── searchResults.html │ └── topnav.html ├── bower.json ├── package.json ├── repo_assets ├── pthomepage.png ├── roadmap.png └── schema.png ├── server ├── app.js ├── config │ ├── .DS_Store │ └── dbConfig.js └── models │ ├── amenities.js │ ├── associations.js │ ├── bookings.js │ ├── courseCombinations.js │ ├── coursesInMenus.js │ ├── favorites.js │ ├── helpers.js │ ├── images.js │ ├── layouts.js │ ├── layoutsOffered.js │ ├── menuItems.js │ ├── menus.js │ ├── menusOffered.js │ ├── roomAmenities.js │ ├── rooms.js │ ├── services.js │ ├── users.js │ └── venues.js └── test ├── .jshintrc ├── karma.conf.js └── spec └── controllers ├── about.js └── main.js /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .tmp 4 | .sass-cache 5 | bower_components 6 | .floo 7 | .flooignore 8 | app/bower_components 9 | .DS_Store 10 | 11 | #databse name 12 | /server/config/databasename 13 | 14 | #database password 15 | /server/config/databasepassword 16 | 17 | #database username 18 | /server/config/databaseusername 19 | 20 | #host 21 | /server/config/host 22 | 23 | # Ignore actual authentication secret 24 | /server/config/secret -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 2, 11 | "latedef": true, 12 | "newcap": true, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "undef": true, 16 | "unused": true, 17 | "strict": true, 18 | "trailing": true, 19 | "smarttabs": true, 20 | "globals": { 21 | "angular": false 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'iojs' 5 | - '0.12' 6 | - '0.10' 7 | before_script: 8 | - 'npm install -g bower grunt-cli' 9 | - 'bower install' 10 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node server/app.js 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PrivateTable 2 | 3 | > The AirBnB for Event Spaces 4 | 5 | ![PT HomePage](repo_assets/pthomepage.png "PrivateTable Homepage") 6 | 7 | Visit our live site at [PrivateTable.io](http://www.privatetable.io/). Search "San Francisco" for the full effect or check out the [video demo.](https://youtu.be/6z-8uyu8i40) 8 | 9 | This project is built on [Angular](https://angularjs.org/), [Node](https://angularjs.org/), and [Express](http://expressjs.com/), with a [PostgreSQL](http://http://www.postgresql.org/) database and [Sequelize](http://docs.sequelizejs.com/en/latest/) for the ORM. 10 | 11 | Baseline scaffolding was generated with [Yeoman](https://github.com/yeoman/generator-angular) 12 | version 0.11.1. 13 | 14 | ## Build & Development 15 | 16 | ###Build 17 | - Download and unzip the repository. 18 | - Install [Node](https://angularjs.org/) and [Bower](http://http://bower.io/). 19 | - Run `npm install` from your CLI to install both npm and Bower dependencies. 20 | - Rename `/server/config/dbConfig.example.js` to be `dbConfig.js`. 21 | - Edit `dbConfig.js` to point to a valid relational database supported by Sequelize, and update `dbConfig.js` to match your database's security parameters. This product was originally designed using PostgreSQL and deployed on Heroku. 22 | - Configure your database, per the [schema](#database-schema). 23 | - Data within our database is not available so you will need to load your own data in your database. 24 | - The app uses token-based authentication so you will need to create a secret key (any text file is fine) in `/server/config`, name it `secret` and replace the content with a new secret string. 25 | 26 | ###Run 27 | - Run `node server/app.js` to preview locally. 28 | - Also compatible with [Nodemon](https://github.com/remy/nodemon), as `nodemon server/app.js`. 29 | 30 | ### Database Schema 31 | 32 | ![db Schema](repo_assets/schema.png "Database Schema") 33 | 34 | ## Product Roadmap 35 | 36 | ![PT Roadmap](repo_assets/roadmap.png "PrivateTable Road Map") 37 | 38 | Our team plans to expands to extend PrivateTable with additional features that support selectable event layouts, premium services, and customizable menus. 39 | 40 | We will also expand the platform's CRM capabilities so that vendors can manage their properties and client relationships directly from PrivateTable. 41 | 42 | ## Team 43 | 44 | - __Product Owner__: Craig Smith 45 | - __Scrum Master__: Lindsay Pond 46 | - __Development Team Members__: Henry Ng 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/.buildignore: -------------------------------------------------------------------------------- 1 | *.coffee -------------------------------------------------------------------------------- /app/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 | 151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/favicon.ico -------------------------------------------------------------------------------- /app/images/arrow-right-aaa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/arrow-right-aaa.png -------------------------------------------------------------------------------- /app/images/arrow-right-curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/arrow-right-curve.png -------------------------------------------------------------------------------- /app/images/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/arrow-right.png -------------------------------------------------------------------------------- /app/images/bank-cards-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/bank-cards-32.png -------------------------------------------------------------------------------- /app/images/basket-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/basket-f77.png -------------------------------------------------------------------------------- /app/images/basket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/basket.png -------------------------------------------------------------------------------- /app/images/bubble-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/bubble-f77.png -------------------------------------------------------------------------------- /app/images/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/bubble.png -------------------------------------------------------------------------------- /app/images/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/calendar.png -------------------------------------------------------------------------------- /app/images/card-amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/card-amex.png -------------------------------------------------------------------------------- /app/images/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/card.png -------------------------------------------------------------------------------- /app/images/chair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/chair.png -------------------------------------------------------------------------------- /app/images/chevron-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/chevron-down.png -------------------------------------------------------------------------------- /app/images/chevron-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/chevron-right.png -------------------------------------------------------------------------------- /app/images/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/clock.png -------------------------------------------------------------------------------- /app/images/door.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/door.png -------------------------------------------------------------------------------- /app/images/doorhandle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/doorhandle.png -------------------------------------------------------------------------------- /app/images/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/download.png -------------------------------------------------------------------------------- /app/images/energy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/energy.png -------------------------------------------------------------------------------- /app/images/faces/armando.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/armando.jpg -------------------------------------------------------------------------------- /app/images/faces/craig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/craig.jpg -------------------------------------------------------------------------------- /app/images/faces/cs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/cs.jpg -------------------------------------------------------------------------------- /app/images/faces/nina.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/nina.jpg -------------------------------------------------------------------------------- /app/images/faces/oxana.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/oxana.jpg -------------------------------------------------------------------------------- /app/images/faces/sean.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/faces/sean.jpg -------------------------------------------------------------------------------- /app/images/favorite-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/favorite-f77.png -------------------------------------------------------------------------------- /app/images/favorite-fff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/favorite-fff.png -------------------------------------------------------------------------------- /app/images/favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/favorite.png -------------------------------------------------------------------------------- /app/images/fire-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/fire-f77.png -------------------------------------------------------------------------------- /app/images/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/fire.png -------------------------------------------------------------------------------- /app/images/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/heart.png -------------------------------------------------------------------------------- /app/images/hires/room/blux1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux1.jpg -------------------------------------------------------------------------------- /app/images/hires/room/blux2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux2.jpg -------------------------------------------------------------------------------- /app/images/hires/room/blux3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux3.jpg -------------------------------------------------------------------------------- /app/images/hires/room/blux4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux4.jpg -------------------------------------------------------------------------------- /app/images/hires/room/blux5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux5.png -------------------------------------------------------------------------------- /app/images/hires/room/blux6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux6.png -------------------------------------------------------------------------------- /app/images/hires/room/blux7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/hires/room/blux7.png -------------------------------------------------------------------------------- /app/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/image.png -------------------------------------------------------------------------------- /app/images/layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/layout.png -------------------------------------------------------------------------------- /app/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/logo.png -------------------------------------------------------------------------------- /app/images/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/magnifier.png -------------------------------------------------------------------------------- /app/images/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/mail.png -------------------------------------------------------------------------------- /app/images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/menu.png -------------------------------------------------------------------------------- /app/images/newprospect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/newprospect.png -------------------------------------------------------------------------------- /app/images/note-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/note-f77.png -------------------------------------------------------------------------------- /app/images/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/note.png -------------------------------------------------------------------------------- /app/images/notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/notebook.png -------------------------------------------------------------------------------- /app/images/openmail-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/openmail-f77.png -------------------------------------------------------------------------------- /app/images/openmail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/openmail.png -------------------------------------------------------------------------------- /app/images/paperplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/paperplane.png -------------------------------------------------------------------------------- /app/images/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/pencil.png -------------------------------------------------------------------------------- /app/images/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/phone.png -------------------------------------------------------------------------------- /app/images/piechart-f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/piechart-f77.png -------------------------------------------------------------------------------- /app/images/piechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/piechart.png -------------------------------------------------------------------------------- /app/images/plane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/plane.png -------------------------------------------------------------------------------- /app/images/pointer-left-fff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/pointer-left-fff.png -------------------------------------------------------------------------------- /app/images/pointer-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/pointer-left.png -------------------------------------------------------------------------------- /app/images/pointer-right-fff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/pointer-right-fff.png -------------------------------------------------------------------------------- /app/images/pointer-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/pointer-right.png -------------------------------------------------------------------------------- /app/images/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/question.png -------------------------------------------------------------------------------- /app/images/service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/service.png -------------------------------------------------------------------------------- /app/images/slide-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/slide-left.png -------------------------------------------------------------------------------- /app/images/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/table.png -------------------------------------------------------------------------------- /app/images/tableround.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/tableround.png -------------------------------------------------------------------------------- /app/images/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/time.png -------------------------------------------------------------------------------- /app/images/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/trash.png -------------------------------------------------------------------------------- /app/images/users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/images/users.png -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /app/scripts/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | $(document).foundation(); 3 | (function() { 4 | Stripe.setPublishableKey('pk_test_rT3gR317GZZ9QOG0D5uMaQWy'); 5 | })(); 6 | /** 7 | * @ngdoc overview 8 | * @name privateTableApp 9 | * @description 10 | * # privateTableApp 11 | * 12 | * Main module of the application. 13 | */ 14 | angular 15 | .module('privateTableApp', [ 16 | 'ngAria', 17 | 'ngCookies', 18 | 'ngMessages', 19 | 'ngResource', 20 | 'ngSanitize', 21 | 'ui.router', 22 | 'ngTouch', 23 | 'searchBarFactory', 24 | 'searchResultsFactory', 25 | 'roomFactory', 26 | 'checkoutFactory', 27 | 'angularPayments', 28 | 'mm.foundation', 29 | 'ngModal', 30 | 'authFactory', 31 | 'favoriteFactory', 32 | 'authInterceptorFactory', 33 | 'bookingsFactory' 34 | ]) 35 | .config(function ($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) { 36 | $urlRouterProvider.otherwise('/'); 37 | 38 | $httpProvider.interceptors.push('authInterceptor'); 39 | 40 | $stateProvider 41 | .state('landing', { 42 | url: '/', 43 | templateUrl: 'views/landing.html' 44 | }) 45 | .state('searchBar', { 46 | url: '/searchbar?location&date&startTime&endTime&eventType&guests&budget', 47 | views: { 48 | '': {templateUrl: 'views/searchBar.html'}, 49 | 'searchResults@searchBar': { 50 | templateUrl: 'views/searchBar/searchResults.html', 51 | controller: 'searchResultsController' 52 | } 53 | } 54 | }) 55 | .state('bookings', { 56 | url: '/bookings', 57 | views: { 58 | '': {templateUrl: 'views/bookings.html'}, 59 | 'searchResults@bookings': { 60 | templateUrl: 'views/searchBar/searchResults.html', 61 | controller: 'searchResultsController', 62 | authenticate: true 63 | } 64 | }, 65 | authenticate: true 66 | }) 67 | 68 | .state('favorites', { 69 | url: '/favorites', 70 | templateUrl: 'views/favorites.html', 71 | controller: 'favoritesController', 72 | authenticate: true 73 | }) 74 | 75 | .state('checkout', { 76 | url: '/checkout', 77 | abstract: true, 78 | views: { 79 | '': { 80 | templateUrl: 'views/checkout.html' 81 | }, 82 | 'checkoutbox@checkout': { 83 | templateUrl: 'views/checkout/checkoutbox.html' 84 | } 85 | } 86 | }) 87 | .state('checkout.room', { 88 | url: '/room/:roomID', 89 | templateUrl: 'views/checkout/room.html' 90 | }) 91 | 92 | .state('checkout.menu', { 93 | url: '/menu', 94 | templateUrl: 'views/checkout/menu.html' 95 | }) 96 | 97 | .state('checkout.payment', { 98 | url: '/payments', 99 | templateUrl: 'views/checkout/payments.html' 100 | }) 101 | .state('checkout.confirmation', { 102 | url: '/confirmation', 103 | templateUrl: 'views/checkout/confirmation.html' 104 | }); 105 | 106 | }) 107 | .run(function ($rootScope, $location, Auth) { 108 | // Redirect to login if route requires auth and you're not logged in 109 | $rootScope.$on('$stateChangeStart', function (event, toState) { 110 | Auth.isLoggedInAsync(function(loggedIn) { 111 | if (toState.authenticate && !loggedIn) { 112 | $rootScope.returnToState = toState.url; 113 | $location.path('/'); 114 | } 115 | }); 116 | }); 117 | // $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) { 118 | // }); 119 | }); 120 | // $locationProvider.html5Mode(true).hashPrefix('!'); 121 | -------------------------------------------------------------------------------- /app/scripts/controllers/bookings.js: -------------------------------------------------------------------------------- 1 | angular.module('privateTableApp') 2 | 3 | .controller('bookingsController', ['$scope', 'Bookings', function($scope, Bookings) { 4 | //This controller determines how the ngRepeat in searchResults view is filtered. 5 | $scope.Bookings = Bookings; 6 | 7 | $scope.init = function () { 8 | Bookings.getAllBookings(); 9 | }; 10 | 11 | $scope.init(); 12 | }]); -------------------------------------------------------------------------------- /app/scripts/controllers/checkout.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('checkoutController', ['$scope', '$location', 'SearchBar', 'SearchResults', 'CheckoutOptions', '$http', 'roomData', '$stateParams', 'Auth', function($scope, $location, SearchBar, SearchResults, CheckoutOptions, $http, roomData, $stateParams, Auth) { 5 | $scope.params = SearchBar; 6 | $scope.room; 7 | $scope.allBookedTimes; 8 | $scope.eventConfirmed = false; 9 | $scope.menuConfirmed = true; 10 | $scope.menuLabel = true; 11 | $scope.showSummary = true; 12 | $scope.available = false; 13 | $scope.menuFinal = true; 14 | $scope.checkoutMenu = roomData; 15 | $scope.Auth = Auth; 16 | $scope.roomData = roomData; 17 | 18 | $scope.toMenu = function() { 19 | $scope.eventConfirmed = true; 20 | $scope.menuLabel = false; 21 | $scope.menuConfirmed = false; 22 | $('#roomtab').removeClass('active'); 23 | $('#menutab').addClass('active'); 24 | roomData.reroute('/checkout/menu'); 25 | }; 26 | 27 | $scope.toRoom = function () { 28 | $('#roomtab').addClass('active'); 29 | $('#menutab').removeClass('active'); 30 | roomData.reroute('/checkout/room/'+$scope.room.id); 31 | }; 32 | 33 | $scope.toPay = function() { 34 | $('.active').removeClass('active'); 35 | $location.path('/checkout/payments'); 36 | $scope.menuName = true; 37 | $scope.menuFinal = false; 38 | $scope.menuConfirmed = true; 39 | $scope.showSummary = false; 40 | }; 41 | //also reveal menu panel 42 | 43 | $scope.dateInit = function() { 44 | SearchBar.searchFormInit(); 45 | if (typeof parseInt($stateParams.roomID) === 'number') { 46 | roomData.viewRoom($stateParams.roomID, 'api/room/', function() { 47 | $scope.room = roomData.getRoom(); 48 | $scope.allBookedTimes = roomData.getAllBookedTimes(); 49 | }, roomData.reroute('/checkout/room/', $stateParams.roomID)); 50 | } 51 | $scope.room = roomData.getRoom(); 52 | $scope.allBookedTimes = roomData.getAllBookedTimes(); 53 | }; 54 | 55 | $scope.dateSearch = function() { 56 | var startTimeStamp = ""; 57 | var endTimeStamp = ""; 58 | //time format: YYYY-MM-DD HH:MM:SS 59 | startTimeStamp = SearchResults.createDate($scope.params.searchParams.date, startTimeStamp); 60 | endTimeStamp = SearchResults.createDate($scope.params.searchParams.date, endTimeStamp); 61 | startTimeStamp +=' 00:00:00'; 62 | endTimeStamp +=' 23:59:59'; 63 | roomData.findAvailableTimes($scope.room.id, 'api/dates', startTimeStamp, endTimeStamp, function() { 64 | $scope.allBookedTimes = roomData.getAllBookedTimes(); 65 | if ($scope.params.searchParams.endTime && $scope.params.searchParams.startTime) { 66 | $scope.checkTime($scope.params.searchParams.startTime, $scope.params.searchParams.endTime); 67 | } 68 | }); 69 | 70 | }; 71 | 72 | $scope.checkTime = function(start, end) { 73 | if (start && end) { 74 | var convertedStartTime = SearchResults.timeConverter(start); 75 | var convertedEndTime = SearchResults.timeConverter(end); 76 | var available = false; 77 | $scope.allBookedTimes.forEach(function(times){ 78 | var startTime = SearchResults.dbTimeConverter(times.start); 79 | var endTime = SearchResults.dbTimeConverter(times.end); 80 | if (((convertedStartTime >= startTime) && (convertedStartTime <= endTime)) || 81 | ((convertedEndTime >= startTime) && (convertedEndTime <= endTime))) { 82 | available = true; 83 | } 84 | }); 85 | $scope.available = available; 86 | } 87 | }; 88 | 89 | $scope.setMinEndTime = function () { 90 | var minEndTime = SearchBar.endTimeAdjuster($scope.params.searchParams.startTime); 91 | $('#eventend').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30, minTime: minEndTime}); 92 | }; 93 | 94 | $scope.dateInit(); 95 | $scope.Auth.checkLoggedIn(); 96 | 97 | }]); 98 | -------------------------------------------------------------------------------- /app/scripts/controllers/favoritescontroller.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('favoritesController', ['$scope','Favorites','roomData', 'Auth', '$cookies', function($scope, Favorites, roomData, Auth, $cookies) { 5 | $scope.Favorites = Favorites; 6 | $scope.roomData = roomData; 7 | $scope.Auth = Auth; 8 | 9 | $scope.viewRoom = function(room) { 10 | roomData.viewRoom(room.roomID, 'api/room/', null, roomData.reroute('/checkout/room/', room.roomID)); 11 | }; 12 | 13 | $scope.init = function () { 14 | Favorites.getFavorites(); 15 | Auth.checkLoggedIn(); 16 | }; 17 | 18 | $scope.init(); 19 | }]); -------------------------------------------------------------------------------- /app/scripts/controllers/landing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('landingController', ['$scope', '$location', 'SearchBar', 'SearchResults', function($scope, $location, SearchBar, SearchResults) { 5 | 6 | $scope.SearchBar = SearchBar; 7 | 8 | $scope.submitSearch = function() { 9 | SearchResults.getSearchResults($scope.SearchBar.searchParams, SearchResults.reroute($scope.SearchBar.searchParams, '/searchbar'), '/searchBar'); 10 | }; 11 | 12 | $scope.init = function () { 13 | SearchBar.searchFormInit(); 14 | }; 15 | 16 | $scope.setMinEndTime = function () { 17 | var minEndTime = SearchBar.endTimeAdjuster($scope.SearchBar.startTime); 18 | $('#endtimepick').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30, minTime: minEndTime}); 19 | $('#starttimepick').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30, minTime: '12:00 AM'}); 20 | }; 21 | 22 | $scope.init(); 23 | }]); 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/scripts/controllers/menu.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | angular.module('privateTableApp') 5 | .controller('menuController', ['$scope', 'SearchBar', 'SearchResults', 'roomData', function($scope, SearchBar, SearchResults, roomData) { 6 | 7 | 8 | $scope.firstMenu = true; 9 | $scope.lastMenu = false; 10 | $scope.menus = roomData.menus; 11 | $scope.menuNumber = 0; 12 | $scope.menuTitle = $scope.menus[$scope.menuNumber].name; 13 | $scope.checkoutMenu = roomData; 14 | 15 | $scope.prevMenu = function() { 16 | $scope.menuNumber --; 17 | roomData.viewCourses($scope.menus[$scope.menuNumber].id, function() { 18 | $scope.currentMenu = roomData.getCurrentMenu(); 19 | $scope.menuTitle = $scope.menus[$scope.menuNumber].name; 20 | $scope.lastMenu = false; 21 | if ($scope.menuNumber === 0) { 22 | $scope.firstMenu = true; 23 | } 24 | }); 25 | }; 26 | 27 | $scope.nextMenu = function() { 28 | $scope.menuNumber ++; 29 | roomData.viewCourses($scope.menus[$scope.menuNumber].id, function() { 30 | $scope.currentMenu = roomData.getCurrentMenu(); 31 | $scope.menuTitle = $scope.menus[$scope.menuNumber].name; 32 | $scope.firstMenu = false; 33 | if ($scope.menuNumber === $scope.menus.length-1) { 34 | $scope.lastMenu = true; 35 | } 36 | }); 37 | }; 38 | 39 | $scope.chooseMenu = function() { 40 | var menuOfMenuNumber = $scope.menus[$scope.menuNumber]; 41 | roomData.chooseMenu(menuOfMenuNumber); 42 | }; 43 | 44 | $scope.init = function () { 45 | $scope.currentMenu = roomData.getCurrentMenu(); 46 | }; 47 | 48 | $scope.init(); 49 | }]); 50 | -------------------------------------------------------------------------------- /app/scripts/controllers/payments.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('paymentsController', ['$scope', '$location', '$state', '$http','SearchBar', 'roomData', 'SearchResults', function($scope, $location, $state, $http, SearchBar, roomData, SearchResults) { 5 | 6 | $scope.roomData = roomData; 7 | $scope.SearchBar = SearchBar; 8 | $scope.SearchResults = SearchResults; 9 | $scope.stripeCallback = function (code, result) { 10 | result.email = $scope.email; 11 | var date = SearchBar.searchParams.date; 12 | var startTimeConverted = SearchResults.timeConverter(SearchBar.searchParams.startTime); 13 | var endTimeConverted = SearchResults.timeConverter(SearchBar.searchParams.endTime); 14 | var startTime = SearchResults.createDate(date, '') + ' '+startTimeConverted+ '+00'; 15 | var endTime = SearchResults.createDate(date, '') + ' '+ endTimeConverted+ '+00'; 16 | var price = (SearchBar.searchParams.guests) * (roomData.checkoutMenu.price); 17 | var roomID = roomData.currentRoom.id; 18 | var menuID = roomData.checkoutMenu.id; 19 | var guests = SearchBar.searchParams.guests; 20 | var eventType = SearchBar.searchParams.eventType; 21 | 22 | 23 | var data = { 24 | startTime: startTime, 25 | endTime: endTime, 26 | price: price, 27 | roomID: roomID, 28 | menuID: menuID, 29 | guests: guests, 30 | eventType: eventType, 31 | result: result, 32 | }; 33 | console.log(data); 34 | if (result.error) { 35 | window.alert('Your payment did not go through... Try again!'); 36 | } else { 37 | var url = 'api/payments'; 38 | return $http({ 39 | method: 'POST', 40 | url: url, 41 | data: data, 42 | }) 43 | .then(function(response){ 44 | $state.go('checkout.confirmation'); 45 | }); 46 | } 47 | }; 48 | 49 | }]); -------------------------------------------------------------------------------- /app/scripts/controllers/room.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | angular.module('privateTableApp') 5 | .controller('roomController', ['$scope', 'SearchBar', 'SearchResults', 'roomData', '$stateParams', '$state', function($scope, SearchBar, SearchResults, roomData, $stateParams, $state) { 6 | 7 | $scope.room = roomData.currentRoom; 8 | $scope.amenityMore = true; 9 | $scope.feeMore = true; 10 | $scope.roomID = $stateParams; 11 | $scope.SearchBar = SearchBar; 12 | $scope.searchParams = SearchBar.searchParams; 13 | 14 | //FEES View Limit & Full Display methods/properties 15 | $scope.feeLimit = 4; 16 | //$scope.fees = $scope.room.fees; 17 | $scope.feeMoreClick = function () { 18 | this.liftLimit(this.feeLimit, this.fees, 'feeMore'); 19 | }; 20 | 21 | $scope.toBookings = function() { 22 | $state.go('bookings'); 23 | }; 24 | //AMENITIES View Limit & Full Display methods/properties 25 | //$scope.amenities = $scope.room.amenities; 26 | $scope.amenityLimit = 4; 27 | $scope.amenityMoreClick = function () { 28 | this.liftLimit(this.amenityLimit, this.amenities, 'amenityMore'); 29 | }; 30 | 31 | $scope.liftLimit = function (limit, list, more) { 32 | //when lists of amenities and fees are available, uncomment below 33 | //limit = list.length; 34 | $scope[more] = false; 35 | 36 | }; 37 | 38 | $scope.init = function () { 39 | SearchBar.searchFormInit(); 40 | if (typeof parseInt($stateParams.roomID) === 'number') { 41 | roomData.viewRoom($stateParams.roomID, 'api/room/', function() { 42 | $scope.room = roomData.getRoom(); 43 | }, roomData.reroute('/checkout/room/', $stateParams.roomID)); 44 | } 45 | $scope.room = roomData.getRoom(); 46 | if ($scope.searchParams) { 47 | if ($scope.searchParams.eventType) { 48 | roomData.viewMenus($stateParams.roomID, $scope.searchParams.eventType); 49 | } else { 50 | roomData.viewMenus($stateParams.roomID); 51 | } 52 | } else { 53 | roomData.viewMenus($stateParams.roomID); 54 | } 55 | }; 56 | $scope.init(); 57 | }]); 58 | -------------------------------------------------------------------------------- /app/scripts/controllers/searchBar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('searchBarController', ['$scope', '$location', 'SearchBar', 'SearchResults', '$stateParams', function($scope, $location, SearchBar, SearchResults, $stateParams) { 5 | 6 | $scope.SearchBar = SearchBar; 7 | 8 | $scope.newSearch = function() { 9 | SearchResults.getSearchResults($scope.SearchBar.searchParams); 10 | }; 11 | 12 | $scope.init = function () { 13 | SearchBar.searchFormInit(); 14 | if ($stateParams) { 15 | SearchResults.getSearchResults($stateParams); 16 | } else { 17 | SearchResults.getSearchResults($scope.SearchBar.searchParams); 18 | } 19 | SearchResults.showAll(); 20 | }; 21 | 22 | $scope.setMinEndTime = function () { 23 | 24 | var minEndTime = SearchBar.endTimeAdjuster($scope.SearchBar.searchParams.startTime); 25 | $('#endtimepicker').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30, minTime: minEndTime}); 26 | $('#starttimepicker').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30, minTime: '12:00 AM'}); 27 | }; 28 | 29 | $scope.init(); 30 | }]); -------------------------------------------------------------------------------- /app/scripts/controllers/searchResultsController.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .controller('searchResultsController', ['$scope', '$http','$location', 'SearchResults', 'roomData', '$cookies', 'Auth', 'Favorites', function($scope, $http, $location, SearchResults, roomData, $cookies, Auth, Favorites) { 5 | $scope.roomResults = SearchResults.searchResults; 6 | $scope.Auth = Auth; 7 | $scope.Favorites = Favorites; 8 | 9 | $scope.bookingType = function (room) { 10 | return (SearchResults.bookingsSelection(room)) ? true : false; 11 | }; 12 | 13 | $scope.viewRoom = function (room) { 14 | roomData.viewRoom(room.roomID, 'api/room/', null, roomData.reroute('/checkout/room/', room.roomID)); 15 | }; 16 | 17 | $scope.addFavorite = function(room) { 18 | Favorites.addFavorite(room.roomID); 19 | }; 20 | 21 | $scope.removeFavorite = function(room) { 22 | Favorites.removeFavorite(room.roomID); 23 | }; 24 | 25 | $scope.init = function() { 26 | Auth.checkLoggedIn(); 27 | if ($scope.Auth.loggedIn) { 28 | $scope.Favorites.getFavorites(); 29 | } 30 | }; 31 | 32 | $scope.init(); 33 | 34 | }]); -------------------------------------------------------------------------------- /app/scripts/controllers/topnavcontroller.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | angular.module('privateTableApp') 5 | .controller('navController', ['$scope', '$location', 'SearchBar', 'Auth', '$state', 'SearchResults', function($scope, $location, SearchBar, Auth, $state, SearchResults) { 6 | $scope.currentUser; 7 | $scope.Auth = Auth; 8 | $scope.SearchBar = SearchBar; 9 | $scope.$state = $state; 10 | 11 | 12 | $scope.init = function () { 13 | $scope.SearchResults = Auth.getUser(); 14 | }; 15 | 16 | $scope.backToSearch = function() { 17 | $state.go('searchBar', $scope.SearchBar.searchParams); 18 | }; 19 | 20 | //login 21 | $scope.loginCredentials = {}; 22 | $scope.errors = {}; 23 | $scope.loginShown = false; 24 | 25 | $scope.toggleLogin = function () { 26 | $scope.loginShown = !$scope.loginShown; 27 | }; 28 | $scope.login = function(form) { 29 | 30 | if(form) { 31 | Auth.login({ 32 | username: $scope.loginCredentials.username, 33 | password: $scope.loginCredentials.password 34 | }) 35 | .then(function() { 36 | // Logged in, redirect to user's dashboard 37 | $scope.currentUser = Auth.getUser(); 38 | $scope.toggleLogin(); 39 | $scope.Auth.loggedIn = true; 40 | }) 41 | .catch(function(err) { 42 | $scope.errors.other = err.message; 43 | }); 44 | } 45 | }; 46 | 47 | //signup 48 | $scope.signupCredentials = {}; 49 | $scope.errors = {}; 50 | $scope.signUpShown = false; 51 | $scope.toggleSignUp = function () { 52 | $scope.signUpShown = !$scope.signUpShown; 53 | }; 54 | 55 | $scope.signup = function(form) { 56 | if (form) { 57 | Auth.createUser({ 58 | username: $scope.signupCredentials.username, 59 | email: $scope.signupCredentials.email, 60 | password: $scope.signupCredentials.password 61 | }) 62 | .then(function() { 63 | // Account created, redirect to user's dashboard 64 | $scope.currentUser = Auth.getUser(); 65 | $scope.toggleSignUp(); 66 | $scope.Auth.loggedIn = true; 67 | 68 | }) 69 | .catch(function(err) { 70 | err = err.data; 71 | $scope.errors = {}; 72 | }); 73 | } else { 74 | console.log('Form is not valid'); 75 | } 76 | }; 77 | 78 | $scope.logout = function () { 79 | Auth.logout(); 80 | $scope.currentUser = Auth.getUser(); 81 | $state.go('landing'); 82 | } 83 | $scope.init(); 84 | }]); -------------------------------------------------------------------------------- /app/scripts/directives/landing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('privateTableApp') 4 | .directive('googleplace', function() { 5 | return { 6 | require: 'ngModel', 7 | link: function(scope, element, attrs, model) { 8 | var options = { 9 | types: [], 10 | componentRestrictions: {} 11 | }; 12 | scope.gPlace = new google.maps.places.Autocomplete(element[0], options); 13 | google.maps.event.addListener(scope.gPlace, 'place_changed', function() { 14 | scope.$apply(function() { 15 | model.$setViewValue(element.val()); 16 | }); 17 | }); 18 | } 19 | }; 20 | }); 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/scripts/factory/authFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('authFactory', []) 4 | .factory('Auth', ['$http','$resource', '$cookies', '$q', function($http, $resource, $cookies, $q) { 5 | 6 | var currentUser = {}; 7 | 8 | var loggedIn = false; 9 | 10 | if($cookies.get('PrivateTableToken')) { 11 | currentUser = $resource('api/users/me').get(); 12 | } 13 | 14 | var login = function(credentials) { 15 | return $resource('auth/local/').save(credentials, function(data) { 16 | $cookies.put('PrivateTableToken', data.token); 17 | //if returned a token, find the user based on that token and set current user to the return value 18 | AuthFactory.currentUser = $resource('api/users/me').get(); 19 | }, 20 | function(err) { 21 | console.log(err); 22 | console.log('we need to figure out error handling here'); 23 | }.bind(this)).$promise; 24 | }; 25 | 26 | var createUser = function(credentials) { 27 | var User = $resource('api/users/'); 28 | return User.save(credentials, function(data) { 29 | $cookies.put('PrivateTableToken', data.token); 30 | AuthFactory.currentUser = $resource('api/users/me').get(); 31 | }, 32 | function(err) { 33 | console.log(err); 34 | console.log('we need to figure out error handling here'); 35 | }.bind(this)).$promise; 36 | }; 37 | 38 | var getUser = function() { 39 | return AuthFactory.currentUser; 40 | }; 41 | 42 | var logout = function() { 43 | $cookies.remove('PrivateTableToken'); 44 | AuthFactory.loggedIn = false; 45 | AuthFactory.currentUser = {}; 46 | }; 47 | 48 | var isLoggedInAsync = function(callback) { 49 | if(AuthFactory.currentUser.hasOwnProperty('$promise')) { 50 | AuthFactory.currentUser.$promise.then(function() { 51 | callback(true); 52 | }).catch(function() { 53 | callback(false); 54 | }); 55 | } else { 56 | callback(false); 57 | } 58 | }; 59 | 60 | var checkLoggedIn = function() { 61 | if ($cookies.get('PrivateTableToken')) { 62 | AuthFactory.loggedIn = true; 63 | }; 64 | }; 65 | 66 | var AuthFactory = { 67 | login: login, 68 | logout: logout, 69 | createUser: createUser, 70 | currentUser: currentUser, 71 | getUser: getUser, 72 | isLoggedInAsync: isLoggedInAsync, 73 | loggedIn: loggedIn, 74 | checkLoggedIn: checkLoggedIn 75 | }; 76 | 77 | return AuthFactory; 78 | 79 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/authInterceptor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('authInterceptorFactory', []) 4 | .factory('authInterceptor', ['$rootScope', '$cookies', '$q', '$location', function($rootScope, $cookies, $q, $location) { 5 | 6 | var request = function(config) { 7 | config.headers = config.headers || {}; 8 | if ($cookies.get('PrivateTableToken')){ 9 | config.headers.Authorization = 'Bearer ' + $cookies.get('PrivateTableToken'); 10 | } 11 | return config; 12 | }; 13 | 14 | var responseError = function(response) { 15 | if(response.status === 401) { 16 | $location.path('/login'); 17 | // remove any stale tokens 18 | $cookies.remove('PrivateTableToken'); 19 | return $q.reject(response); 20 | } 21 | else { 22 | return $q.reject(response); 23 | } 24 | }; 25 | 26 | return { 27 | 28 | request: request, 29 | responseError: responseError 30 | 31 | }; 32 | 33 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/bookingsFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('bookingsFactory', []) 4 | 5 | .factory('Bookings', ['$http', function($http) { 6 | var bookings = []; 7 | var currentBooking; 8 | 9 | var getAllBookings = function() { 10 | var url = '/api/users/bookings'; 11 | $http.get(url) 12 | .success(function(data, status, headers, config) { 13 | bookings.splice(0, bookings.length); 14 | data.forEach(function(val){ 15 | bookings.push(val); 16 | }); 17 | }) 18 | .error(function(data, status, headers, config) { 19 | console.log(data); 20 | console.log('There was an error'); 21 | }); 22 | }; 23 | 24 | var BookingsFactory = { 25 | bookings: bookings, 26 | getAllBookings: getAllBookings, 27 | currentBooking: currentBooking 28 | }; 29 | 30 | return BookingsFactory; 31 | 32 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/checkoutFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('checkoutFactory', []) 4 | 5 | .factory('CheckoutOptions', ['$location', function($location) { 6 | // Your code here 7 | var eventParams = {}; 8 | var menuParams; 9 | var setEventParams = function (params, callback) { 10 | for (var key in params) { 11 | eventParams[key] = params[key]; 12 | } 13 | }; 14 | 15 | var getEventParams = function() { 16 | return eventParams; 17 | }; 18 | 19 | var setMenuParams = function(menu) { 20 | menuParams = menu; 21 | }; 22 | 23 | return { 24 | eventParams: eventParams, 25 | getEventParams: getEventParams, 26 | setEventParams: setEventParams, 27 | setMenuParams: setMenuParams 28 | }; 29 | 30 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/favoriteFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('favoriteFactory', []) 4 | 5 | .factory('Favorites', ['$location', '$http', 'SearchResults', function($location, $http, SearchResults) { 6 | var favorites = []; 7 | 8 | var getFavorites = function() { 9 | var url = '/api/users/favorites'; 10 | $http.get(url) 11 | .success(function(data, status, headers, config) { 12 | favorites.splice(0, favorites.length); 13 | data.forEach(function(val){ 14 | favorites.push(val); 15 | }); 16 | }) 17 | .error(function(data, status, headers, config) { 18 | console.log(data); 19 | console.log('There was an error'); 20 | }); 21 | }; 22 | 23 | var isFavorite = function (room) { 24 | var result = false; 25 | favorites.forEach(function(roomInArray) { 26 | if (roomInArray.roomID === room.roomID) { 27 | result = true; 28 | } 29 | }); 30 | return result; 31 | }; 32 | 33 | var addFavorite = function (room) { 34 | var url = '/api/users/favorites/addfavorites'; 35 | $http.post(url, {roomID: room}) 36 | .success(function(data, status, headers, config) { 37 | FavoritesFactory.getFavorites(); 38 | }) 39 | .error(function(data, status, headers, config) { 40 | console.log(data); 41 | console.log('There was an error'); 42 | }); 43 | }; 44 | 45 | var removeFavorite = function (room) { 46 | var url = '/api/users/favorites/deletefavorites'; 47 | $http.post(url, {roomID: room}) 48 | .success(function(data, status, headers, config) { 49 | FavoritesFactory.getFavorites(); 50 | }) 51 | .error(function(data, status, headers, config) { 52 | console.log(data); 53 | console.log('There was an error'); 54 | }); 55 | }; 56 | 57 | var FavoritesFactory = { 58 | favorites: favorites, 59 | removeFavorite: removeFavorite, 60 | addFavorite: addFavorite, 61 | isFavorite: isFavorite, 62 | getFavorites: getFavorites 63 | }; 64 | 65 | return FavoritesFactory; 66 | 67 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/roomFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('roomFactory', []) 4 | 5 | .factory('roomData', ['SearchResults', '$location', '$http', function(SearchResults, $location, $http) { 6 | var currentRoom; 7 | var roomID; 8 | var allBookedTimes = []; 9 | var menus = []; 10 | var currentMenu; 11 | var checkoutMenu = {}; 12 | checkoutMenu.price = 0; 13 | 14 | var viewRoom = function(room, url, callback, reroute) { 15 | var toUrl = url + room; 16 | return $http({ 17 | method: 'GET', 18 | url: toUrl 19 | }) 20 | .then(function(response) { 21 | roomID = response.data.id; 22 | roomFactory.currentRoom = response.data; 23 | roomFactory.currentRoom.menuPrices = roomFactory.currentRoom.menuPrices.sort(function(a,b){return a-b;}); 24 | 25 | if (callback) { 26 | callback(); 27 | } 28 | if (reroute) { 29 | reroute(); 30 | } 31 | }); 32 | }; 33 | 34 | 35 | var findAvailableTimes = function(roomID, url, startTime, endTime, callback) { 36 | var toUrl = url; 37 | return $http({ 38 | method: 'GET', 39 | url: toUrl, 40 | params: {roomID: roomID, startTime: startTime, endTime: endTime} 41 | }) 42 | .then(function(response) { 43 | roomFactory.allBookedTimes.splice(0, roomFactory.allBookedTimes.length); 44 | response.data.allTimeBlocks.forEach(function(val){ 45 | roomFactory.allBookedTimes.push(val); 46 | }); 47 | if (callback) { 48 | callback(); 49 | } 50 | }); 51 | }; 52 | 53 | var reroute = function(url, roomID) { 54 | if (roomID) { 55 | $location.url($location.path()); 56 | $location.path(url + roomID); 57 | } else { 58 | $location.path(url); 59 | } 60 | }; 61 | 62 | var getRoom = function() { 63 | return roomFactory.currentRoom; 64 | }; 65 | 66 | var getAllBookedTimes = function() { 67 | return roomFactory.allBookedTimes; 68 | }; 69 | 70 | var getCurrentMenu = function() { 71 | return roomFactory.currentMenu; 72 | }; 73 | 74 | var chooseMenu = function(menu) { 75 | roomFactory.checkoutMenu = menu; 76 | }; 77 | 78 | var viewMenus = function(room, eventType, callback) { 79 | var url = 'api/menu/eventType'; 80 | return $http({ 81 | method: 'GET', 82 | url: url, 83 | params: {roomID: room, eventType: eventType} 84 | }) 85 | .then(function(response){ 86 | roomFactory.menus.splice(0, roomFactory.menus.length); 87 | response.data.forEach(function(menu) { 88 | roomFactory.menus.push(menu); 89 | }); 90 | roomFactory.viewCourses(roomFactory.menus[0].id); 91 | if (callback) { 92 | callback(); 93 | } 94 | }); 95 | }; 96 | 97 | var viewCourses = function(menuID, callback) { 98 | var url = 'api/menu/menuID?'; 99 | return $http({ 100 | method: 'GET', 101 | url: url, 102 | params: {menuID: menuID} 103 | }) 104 | .then(function(response){ 105 | roomFactory.currentMenu = response.data; 106 | if (callback) { 107 | callback(); 108 | } 109 | }); 110 | }; 111 | 112 | var roomFactory = { 113 | menus: menus, 114 | viewCourses: viewCourses, 115 | viewMenus: viewMenus, 116 | currentRoom: currentRoom, 117 | viewRoom: viewRoom, 118 | getRoom: getRoom, 119 | allBookedTimes: allBookedTimes, 120 | reroute: reroute, 121 | getAllBookedTimes: getAllBookedTimes, 122 | getCurrentMenu: getCurrentMenu, 123 | chooseMenu: chooseMenu, 124 | currentMenu: currentMenu, 125 | findAvailableTimes: findAvailableTimes, 126 | checkoutMenu: checkoutMenu 127 | }; 128 | 129 | return roomFactory; 130 | 131 | }]); -------------------------------------------------------------------------------- /app/scripts/factory/searchBarFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('searchBarFactory', []) 4 | 5 | .factory('SearchBar', ['SearchResults', '$location', 'CheckoutOptions', '$state', function(SearchResults, $location, CheckoutOptions, $state) { 6 | // Your code here 7 | var searchParams; 8 | 9 | var searchFormInit = function () { 10 | $('.timepicker').datetimepicker({datepicker:false, format: 'g:i A', formatTime: 'g:i A', step: 30}); 11 | $('#datepicker').datetimepicker({timepicker:false, format: 'm/d/Y', closeOnDateSelect:true, minDate:0}); 12 | }; 13 | 14 | var endTimeAdjuster = function (time, hours) { 15 | hours = hours ? hours : 1; 16 | var amPmSwitch = function (minAmPm) { 17 | minAmPm.split(" "); 18 | if (minAmPm[1].indexOf('AM') > -1) { 19 | minAmPm[1] = 'PM'; 20 | } else { 21 | minAmPm[1] = 'AM'; 22 | } 23 | minAmPm.join(" "); 24 | }; 25 | var hhMmA= time.split(':'); 26 | hhMmA[0] = parseInt(hhMmA[0])+1; 27 | if (hhMmA[0] > 12) { 28 | hhMmA[0] -= 11; 29 | hhMmA[1] = amPmSwitch(hhMmA[1]); 30 | } 31 | if (hhMmA[0] === 12) { 32 | hhMmA[1] = amPmSwitch(hhMmA[1]); 33 | } 34 | return hhMmA.join(":"); 35 | }; 36 | 37 | var searchBarFactory = { 38 | endTimeAdjuster: endTimeAdjuster, 39 | searchParams: searchParams, 40 | searchFormInit: searchFormInit 41 | }; 42 | 43 | return searchBarFactory; 44 | 45 | }]); -------------------------------------------------------------------------------- /app/styles/main.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "", 4 | "sources": [], 5 | "names": [], 6 | "file": "main.css" 7 | } -------------------------------------------------------------------------------- /app/styles/scss/_foundation.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | // Foundation by ZURB 3 | // foundation.zurb.com 4 | // Licensed under MIT Open Source 5 | 6 | // Make sure the charset is set appropriately 7 | 8 | // Behold, here are all the Foundation components. 9 | @import "foundation/components/grid"; 10 | @import "foundation/components/accordion"; 11 | @import "foundation/components/alert-boxes"; 12 | @import "foundation/components/block-grid"; 13 | @import "foundation/components/breadcrumbs"; 14 | @import "foundation/components/button-groups"; 15 | @import "foundation/components/buttons"; 16 | @import "foundation/components/clearing"; 17 | @import "foundation/components/dropdown"; 18 | @import "foundation/components/dropdown-buttons"; 19 | @import "foundation/components/flex-video"; 20 | @import "foundation/components/forms"; 21 | @import "foundation/components/icon-bar"; 22 | @import "foundation/components/inline-lists"; 23 | @import "foundation/components/joyride"; 24 | @import "foundation/components/keystrokes"; 25 | @import "foundation/components/labels"; 26 | @import "foundation/components/magellan"; 27 | @import "foundation/components/orbit"; 28 | @import "foundation/components/pagination"; 29 | @import "foundation/components/panels"; 30 | @import "foundation/components/pricing-tables"; 31 | @import "foundation/components/progress-bars"; 32 | @import "foundation/components/range-slider"; 33 | @import "foundation/components/reveal"; 34 | @import "foundation/components/side-nav"; 35 | @import "foundation/components/split-buttons"; 36 | @import "foundation/components/sub-nav"; 37 | @import "foundation/components/switches"; 38 | @import "foundation/components/tables"; 39 | @import "foundation/components/tabs"; 40 | @import "foundation/components/thumbs"; 41 | @import "foundation/components/tooltips"; 42 | @import "foundation/components/top-bar"; 43 | @import "foundation/components/type"; 44 | @import "foundation/components/offcanvas"; 45 | @import "foundation/components/visibility"; 46 | -------------------------------------------------------------------------------- /app/styles/scss/_functions.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | // This is the default html and body font-size for the base rem value. 6 | $rem-base: 16px !default; 7 | 8 | // IMPORT ONCE 9 | // We use this to prevent styles from being loaded multiple times for compenents that rely on other components. 10 | $modules: () !default; 11 | @mixin exports($name) { 12 | // Import from global scope 13 | $modules: $modules !global; 14 | // Check if a module is already on the list 15 | $module_index: index($modules, $name); 16 | @if (($module_index == null) or ($module_index == false)) { 17 | $modules: append($modules, $name) !global; 18 | @content; 19 | } 20 | } 21 | 22 | // 23 | // @functions 24 | // 25 | 26 | 27 | // RANGES 28 | // We use these functions to define ranges for various things, like media queries. 29 | @function lower-bound($range){ 30 | @if length($range) <= 0 { 31 | @return 0; 32 | } 33 | @return nth($range,1); 34 | } 35 | 36 | @function upper-bound($range) { 37 | @if length($range) < 2 { 38 | @return 999999999999; 39 | } 40 | @return nth($range, 2); 41 | } 42 | 43 | // STRIP UNIT 44 | // It strips the unit of measure and returns it 45 | @function strip-unit($num) { 46 | @return $num / ($num * 0 + 1); 47 | } 48 | 49 | // TEXT INPUT TYPES 50 | 51 | @function text-inputs( $types: all, $selector: input ) { 52 | 53 | $return: (); 54 | 55 | $all-text-input-types: 56 | text 57 | password 58 | date 59 | datetime 60 | datetime-local 61 | month 62 | week 63 | email 64 | number 65 | search 66 | tel 67 | time 68 | url 69 | color 70 | textarea; 71 | 72 | @if $types == all { $types: $all-text-input-types; } 73 | 74 | @each $type in $types { 75 | @if $type == textarea { 76 | @if $selector == input { 77 | $return: append($return, unquote('#{$type}'), comma) 78 | } @else { 79 | $return: append($return, unquote('#{$type}#{$selector}'), comma) 80 | } 81 | } @else { 82 | $return: append($return, unquote('#{$selector}[type="#{$type}"]'), comma) 83 | } 84 | } 85 | 86 | @return $return; 87 | 88 | } 89 | 90 | // CONVERT TO REM 91 | @function convert-to-rem($value, $base-value: $rem-base) { 92 | $value: strip-unit($value) / strip-unit($base-value) * 1rem; 93 | @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0 94 | @return $value; 95 | } 96 | 97 | @function data($attr) { 98 | @if $namespace { 99 | @return '[data-' + $namespace + '-' + $attr + ']'; 100 | } 101 | 102 | @return '[data-' + $attr + ']'; 103 | } 104 | 105 | // REM CALC 106 | 107 | // New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's. 108 | // Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported: 109 | // 110 | // rem-calc(10 20 30px 40); 111 | // 112 | // Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets 113 | // 114 | // rem-calc((10, 20, 30, 40px)); 115 | // 116 | // Optionally call with a different base (eg: 8px) to calculate rem. 117 | // 118 | // rem-calc(16px 32px 48px, 8px); 119 | // 120 | // If you require to comma separate your list 121 | // 122 | // rem-calc((16px, 32px, 48), 8px); 123 | 124 | @function rem-calc($values, $base-value: $rem-base) { 125 | $max: length($values); 126 | 127 | @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); } 128 | 129 | $remValues: (); 130 | @for $i from 1 through $max { 131 | $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value)); 132 | } 133 | @return $remValues; 134 | } 135 | 136 | // OLD EM CALC 137 | // Deprecated: We'll drop support for this in 5.1.0, use rem-calc() 138 | @function emCalc($values){ 139 | @return rem-calc($values); 140 | } 141 | 142 | // OLD EM CALC 143 | // Deprecated: We'll drop support for this in 5.1.0, use rem-calc() 144 | @function em-calc($values){ 145 | @return rem-calc($values); 146 | } 147 | -------------------------------------------------------------------------------- /app/styles/scss/app.css.min.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/styles/scss/app.css.min.map -------------------------------------------------------------------------------- /app/styles/scss/app.scss: -------------------------------------------------------------------------------- 1 | @import "settings"; 2 | @import "normalize"; 3 | @import "foundation"; 4 | @import "foundation-icons"; 5 | @import "base"; -------------------------------------------------------------------------------- /app/styles/scss/foundation/_functions.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | // This is the default html and body font-size for the base rem value. 6 | $rem-base: 16px !default; 7 | 8 | // IMPORT ONCE 9 | // We use this to prevent styles from being loaded multiple times for compenents that rely on other components. 10 | $modules: () !default; 11 | @mixin exports($name) { 12 | // Import from global scope 13 | $modules: $modules !global; 14 | // Check if a module is already on the list 15 | $module_index: index($modules, $name); 16 | @if (($module_index == null) or ($module_index == false)) { 17 | $modules: append($modules, $name) !global; 18 | @content; 19 | } 20 | } 21 | 22 | // 23 | // @functions 24 | // 25 | 26 | 27 | // RANGES 28 | // We use these functions to define ranges for various things, like media queries. 29 | @function lower-bound($range){ 30 | @if length($range) <= 0 { 31 | @return 0; 32 | } 33 | @return nth($range,1); 34 | } 35 | 36 | @function upper-bound($range) { 37 | @if length($range) < 2 { 38 | @return 999999999999; 39 | } 40 | @return nth($range, 2); 41 | } 42 | 43 | // STRIP UNIT 44 | // It strips the unit of measure and returns it 45 | @function strip-unit($num) { 46 | @return $num / ($num * 0 + 1); 47 | } 48 | 49 | // TEXT INPUT TYPES 50 | 51 | @function text-inputs( $types: all, $selector: input ) { 52 | 53 | $return: (); 54 | 55 | $all-text-input-types: 56 | text 57 | password 58 | date 59 | datetime 60 | datetime-local 61 | month 62 | week 63 | email 64 | number 65 | search 66 | tel 67 | time 68 | url 69 | color 70 | textarea; 71 | 72 | @if $types == all { $types: $all-text-input-types; } 73 | 74 | @each $type in $types { 75 | @if $type == textarea { 76 | @if $selector == input { 77 | $return: append($return, unquote('#{$type}'), comma) 78 | } @else { 79 | $return: append($return, unquote('#{$type}#{$selector}'), comma) 80 | } 81 | } @else { 82 | $return: append($return, unquote('#{$selector}[type="#{$type}"]'), comma) 83 | } 84 | } 85 | 86 | @return $return; 87 | 88 | } 89 | 90 | // CONVERT TO REM 91 | @function convert-to-rem($value, $base-value: $rem-base) { 92 | $value: strip-unit($value) / strip-unit($base-value) * 1rem; 93 | @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0 94 | @return $value; 95 | } 96 | 97 | @function data($attr) { 98 | @if $namespace { 99 | @return '[data-' + $namespace + '-' + $attr + ']'; 100 | } 101 | 102 | @return '[data-' + $attr + ']'; 103 | } 104 | 105 | // REM CALC 106 | 107 | // New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's. 108 | // Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported: 109 | // 110 | // rem-calc(10 20 30px 40); 111 | // 112 | // Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets 113 | // 114 | // rem-calc((10, 20, 30, 40px)); 115 | // 116 | // Optionally call with a different base (eg: 8px) to calculate rem. 117 | // 118 | // rem-calc(16px 32px 48px, 8px); 119 | // 120 | // If you require to comma separate your list 121 | // 122 | // rem-calc((16px, 32px, 48), 8px); 123 | 124 | @function rem-calc($values, $base-value: $rem-base) { 125 | $max: length($values); 126 | 127 | @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); } 128 | 129 | $remValues: (); 130 | @for $i from 1 through $max { 131 | $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value)); 132 | } 133 | @return $remValues; 134 | } 135 | 136 | // OLD EM CALC 137 | // Deprecated: We'll drop support for this in 5.1.0, use rem-calc() 138 | @function emCalc($values){ 139 | @return rem-calc($values); 140 | } 141 | 142 | // OLD EM CALC 143 | // Deprecated: We'll drop support for this in 5.1.0, use rem-calc() 144 | @function em-calc($values){ 145 | @return rem-calc($values); 146 | } 147 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_block-grid.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // Block Grid Variables 9 | // 10 | $include-html-block-grid-classes: $include-html-classes !default; 11 | $include-xl-html-block-grid-classes: false !default; 12 | 13 | // We use this to control the maximum number of block grid elements per row 14 | $block-grid-elements: 12 !default; 15 | $block-grid-default-spacing: rem-calc(20) !default; 16 | 17 | $align-block-grid-to-grid: false !default; 18 | @if $align-block-grid-to-grid { 19 | $block-grid-default-spacing: $column-gutter; 20 | } 21 | 22 | // Enables media queries for block-grid classes. Set to false if writing semantic HTML. 23 | $block-grid-media-queries: true !default; 24 | 25 | // 26 | // Block Grid Mixins 27 | // 28 | 29 | // Create a custom block grid 30 | // 31 | // $per-row - # of items to display per row. Default: false. 32 | // $spacing - # of ems to use as padding on each block item. Default: rem-calc(20). 33 | // $base-style - Apply a base style to block grid. Default: true. 34 | @mixin block-grid( 35 | $per-row:false, 36 | $spacing:$block-grid-default-spacing, 37 | $include-spacing:true, 38 | $base-style:true) { 39 | 40 | @if $base-style { 41 | display: block; 42 | padding: 0; 43 | @if $align-block-grid-to-grid { 44 | margin: 0; 45 | } @else { 46 | margin: 0 (-$spacing/2); 47 | } 48 | @include clearfix; 49 | 50 | &>li { 51 | display: block; 52 | height: auto; 53 | float: $default-float; 54 | @if $include-spacing { 55 | padding: 0 ($spacing/2) $spacing; 56 | } 57 | } 58 | } 59 | 60 | @if $per-row { 61 | &>li { 62 | width: 100%/$per-row; 63 | @if $include-spacing { 64 | padding: 0 ($spacing/2) $spacing; 65 | } 66 | list-style: none; 67 | 68 | &:nth-of-type(1n) { clear: none; } 69 | &:nth-of-type(#{$per-row}n+1) { clear: both; } 70 | @if $align-block-grid-to-grid { 71 | @include block-grid-aligned($per-row, $spacing); 72 | } 73 | } 74 | } 75 | } 76 | 77 | @mixin block-grid-aligned($per-row, $spacing) { 78 | @for $i from 1 through $block-grid-elements { 79 | @if $per-row >= $i { 80 | $grid-column: '+' + $i; 81 | @if $per-row == $i { 82 | $grid-column: ''; 83 | } 84 | &:nth-of-type(#{$per-row}n#{unquote($grid-column)}) { 85 | padding-left: ($spacing - (($spacing / $per-row) * ($per-row - ($i - 1)))); 86 | padding-right: ($spacing - (($spacing / $per-row) * $i)); 87 | } 88 | } 89 | } 90 | } 91 | 92 | // Generate presentational markup for block grid. 93 | // 94 | // $size - Name of class to use, i.e. "large" will generate .large-block-grid-1, .large-block-grid-2, etc. 95 | @mixin block-grid-html-classes($size,$include-spacing) { 96 | @for $i from 1 through $block-grid-elements { 97 | .#{$size}-block-grid-#{($i)} { 98 | @include block-grid($i,$block-grid-default-spacing,$include-spacing,false); 99 | } 100 | } 101 | } 102 | 103 | @include exports("block-grid") { 104 | @if $include-html-block-grid-classes { 105 | 106 | [class*="block-grid-"] { @include block-grid; } 107 | 108 | @if $block-grid-media-queries { 109 | @media #{$small-up} { 110 | @include block-grid-html-classes($size:small,$include-spacing:false); 111 | } 112 | 113 | @media #{$medium-up} { 114 | @include block-grid-html-classes($size:medium,$include-spacing:false); 115 | } 116 | 117 | @media #{$large-up} { 118 | @include block-grid-html-classes($size:large,$include-spacing:false); 119 | } 120 | 121 | @if $include-xl-html-block-grid-classes { 122 | @media #{$xlarge-up} { 123 | @include block-grid-html-classes($size:xlarge,$include-spacing:false); 124 | } 125 | 126 | @media #{$xxlarge-up} { 127 | @include block-grid-html-classes($size:xxlarge,$include-spacing:false); 128 | } 129 | } 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // Breadcrumb Variables 9 | // 10 | $include-html-nav-classes: $include-html-classes !default; 11 | 12 | // We use this to set the background color for the breadcrumb container. 13 | $crumb-bg: scale-color($secondary-color, $lightness: 55%) !default; 14 | 15 | // We use these to set the padding around the breadcrumbs. 16 | $crumb-padding: rem-calc(9 14 9) !default; 17 | $crumb-side-padding: rem-calc(12) !default; 18 | 19 | // We use these to control border styles. 20 | $crumb-function-factor: -10% !default; 21 | $crumb-border-size: 1px !default; 22 | $crumb-border-style: solid !default; 23 | $crumb-border-color: scale-color($crumb-bg, $lightness: $crumb-function-factor) !default; 24 | $crumb-radius: $global-radius !default; 25 | 26 | // We use these to set various text styles for breadcrumbs. 27 | $crumb-font-size: rem-calc(11) !default; 28 | $crumb-font-color: $primary-color !default; 29 | $crumb-font-color-current: $oil !default; 30 | $crumb-font-color-unavailable: $aluminum !default; 31 | $crumb-font-transform: uppercase !default; 32 | $crumb-link-decor: underline !default; 33 | 34 | // We use these to control the slash between breadcrumbs 35 | $crumb-slash-color: $base !default; 36 | $crumb-slash: "/" !default; 37 | 38 | // 39 | // Breadcrumb Mixins 40 | // 41 | 42 | // We use this mixin to create a container around our breadcrumbs 43 | @mixin crumb-container { 44 | display: block; 45 | padding: $crumb-padding; 46 | overflow: hidden; 47 | margin-#{$default-float}: 0; 48 | list-style: none; 49 | border-style: $crumb-border-style; 50 | border-width: $crumb-border-size; 51 | 52 | // We control which background color and border come through. 53 | background-color: $crumb-bg; 54 | border-color: $crumb-border-color; 55 | } 56 | 57 | // We use this mixin to create breadcrumb styles from list items. 58 | @mixin crumbs { 59 | 60 | // A normal state will make the links look and act like clickable breadcrumbs. 61 | margin: 0; 62 | float: $default-float; 63 | font-size: $crumb-font-size; 64 | line-height: $crumb-font-size; 65 | text-transform: $crumb-font-transform; 66 | color: $crumb-font-color; 67 | 68 | &:hover a, &:focus a { text-decoration: $crumb-link-decor; } 69 | 70 | a { 71 | color: $crumb-font-color; 72 | } 73 | 74 | // Current is for the link of the current page 75 | &.current { 76 | cursor: $cursor-default-value; 77 | color: $crumb-font-color-current; 78 | a { 79 | cursor: $cursor-default-value; 80 | color: $crumb-font-color-current; 81 | } 82 | 83 | &:hover, &:hover a, 84 | &:focus, &:focus a { text-decoration: none; } 85 | } 86 | 87 | // Unavailable removed color and link styles so it looks inactive. 88 | &.unavailable { 89 | color: $crumb-font-color-unavailable; 90 | a { color: $crumb-font-color-unavailable; } 91 | 92 | &:hover, 93 | &:hover a, 94 | &:focus, 95 | a:focus { 96 | text-decoration: none; 97 | color: $crumb-font-color-unavailable; 98 | cursor: $cursor-disabled-value; 99 | } 100 | } 101 | 102 | &:before { 103 | content: "#{$crumb-slash}"; 104 | color: $crumb-slash-color; 105 | margin: 0 $crumb-side-padding; 106 | position: relative; 107 | top: 1px; 108 | } 109 | 110 | &:first-child:before { 111 | content: " "; 112 | margin: 0; 113 | } 114 | } 115 | 116 | @include exports("breadcrumbs") { 117 | @if $include-html-nav-classes { 118 | .breadcrumbs { 119 | @include crumb-container; 120 | @include radius($crumb-radius); 121 | 122 | &>* { 123 | @include crumbs; 124 | } 125 | } 126 | } 127 | } 128 | 129 | /* Accessibility - hides the forward slash */ 130 | [aria-label="breadcrumbs"] [aria-hidden="true"]:after { 131 | content: "/"; 132 | } 133 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_flex-video.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-media-classes: $include-html-classes !default; 11 | 12 | // We use these to control video container padding and margins 13 | $flex-video-padding-top: rem-calc(25) !default; 14 | $flex-video-padding-bottom: 67.5% !default; 15 | $flex-video-margin-bottom: rem-calc(16) !default; 16 | 17 | // We use this to control widescreen bottom padding 18 | $flex-video-widescreen-padding-bottom: 56.34% !default; 19 | 20 | // 21 | // @mixins 22 | // 23 | 24 | @mixin flex-video-container { 25 | position: relative; 26 | padding-top: $flex-video-padding-top; 27 | padding-bottom: $flex-video-padding-bottom; 28 | height: 0; 29 | margin-bottom: $flex-video-margin-bottom; 30 | overflow: hidden; 31 | 32 | &.widescreen { padding-bottom: $flex-video-widescreen-padding-bottom; } 33 | &.vimeo { padding-top: 0; } 34 | 35 | iframe, 36 | object, 37 | embed, 38 | video { 39 | position: absolute; 40 | top: 0; 41 | #{$default-float}: 0; 42 | width: 100%; 43 | height: 100%; 44 | } 45 | } 46 | 47 | @include exports("flex-video") { 48 | @if $include-html-media-classes { 49 | .flex-video { @include flex-video-container; } 50 | } 51 | } -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_inline-lists.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-inline-list-classes: $include-html-classes !default; 11 | 12 | // We use this to control the margins and padding of the inline list. 13 | $inline-list-top-margin: 0 !default; 14 | $inline-list-opposite-margin: 0 !default; 15 | $inline-list-bottom-margin: rem-calc(17) !default; 16 | $inline-list-default-float-margin: rem-calc(-22) !default; 17 | $inline-list-default-float-list-margin: rem-calc(22) !default; 18 | 19 | $inline-list-padding: 0 !default; 20 | 21 | // We use this to control the overflow of the inline list. 22 | $inline-list-overflow: hidden !default; 23 | 24 | // We use this to control the list items 25 | $inline-list-display: block !default; 26 | 27 | // We use this to control any elements within list items 28 | $inline-list-children-display: block !default; 29 | 30 | // 31 | // @mixins 32 | // 33 | // We use this mixin to create inline lists 34 | @mixin inline-list { 35 | margin: $inline-list-top-margin auto $inline-list-bottom-margin auto; 36 | margin-#{$default-float}: $inline-list-default-float-margin; 37 | margin-#{$opposite-direction}: $inline-list-opposite-margin; 38 | padding: $inline-list-padding; 39 | list-style: none; 40 | overflow: $inline-list-overflow; 41 | 42 | & > li { 43 | list-style: none; 44 | float: $default-float; 45 | margin-#{$default-float}: $inline-list-default-float-list-margin; 46 | display: $inline-list-display; 47 | &>* { display: $inline-list-children-display; } 48 | } 49 | } 50 | 51 | @include exports("inline-list") { 52 | @if $include-html-inline-list-classes { 53 | .inline-list { 54 | @include inline-list(); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_keystrokes.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-keystroke-classes: $include-html-classes !default; 11 | 12 | // We use these to control text styles. 13 | $keystroke-font: "Consolas", "Menlo", "Courier", monospace !default; 14 | $keystroke-font-size: inherit !default; 15 | $keystroke-font-color: $jet !default; 16 | $keystroke-font-color-alt: $white !default; 17 | $keystroke-function-factor: -7% !default; 18 | 19 | // We use this to control keystroke padding. 20 | $keystroke-padding: rem-calc(2 4 0) !default; 21 | 22 | // We use these to control background and border styles. 23 | $keystroke-bg: scale-color($white, $lightness: $keystroke-function-factor) !default; 24 | $keystroke-border-style: solid !default; 25 | $keystroke-border-width: 1px !default; 26 | $keystroke-border-color: scale-color($keystroke-bg, $lightness: $keystroke-function-factor) !default; 27 | $keystroke-radius: $global-radius !default; 28 | 29 | // 30 | // @mixins 31 | // 32 | // We use this mixin to create keystroke styles. 33 | // $bg - Default: $keystroke-bg || scale-color($white, $lightness: $keystroke-function-factor) !default; 34 | @mixin keystroke($bg:$keystroke-bg) { 35 | // This find the lightness percentage of the background color. 36 | $bg-lightness: lightness($bg); 37 | 38 | background-color: $bg; 39 | border-color: scale-color($bg, $lightness: $keystroke-function-factor); 40 | 41 | // We adjust the font color based on the brightness of the background. 42 | @if $bg-lightness > 70% { color: $keystroke-font-color; } 43 | @else { color: $keystroke-font-color-alt; } 44 | 45 | border-style: $keystroke-border-style; 46 | border-width: $keystroke-border-width; 47 | margin: 0; 48 | font-family: $keystroke-font; 49 | font-size: $keystroke-font-size; 50 | padding: $keystroke-padding; 51 | } 52 | 53 | @include exports("keystroke") { 54 | @if $include-html-keystroke-classes { 55 | .keystroke, 56 | kbd { 57 | @include keystroke; 58 | @include radius($keystroke-radius); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_labels.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-label-classes: $include-html-classes !default; 11 | 12 | // We use these to style the labels 13 | $label-padding: rem-calc(4 8 4) !default; 14 | $label-radius: $global-radius !default; 15 | 16 | // We use these to style the label text 17 | $label-font-sizing: rem-calc(11) !default; 18 | $label-font-weight: $font-weight-normal !default; 19 | $label-font-color: $oil !default; 20 | $label-font-color-alt: $white !default; 21 | $label-font-family: $body-font-family !default; 22 | 23 | // 24 | // @mixins 25 | // 26 | // We use this mixin to create a default label base. 27 | @mixin label-base { 28 | font-weight: $label-font-weight; 29 | font-family: $label-font-family; 30 | text-align: center; 31 | text-decoration: none; 32 | line-height: 1; 33 | white-space: nowrap; 34 | display: inline-block; 35 | position: relative; 36 | margin-bottom: auto; 37 | } 38 | 39 | // @mixins 40 | // 41 | // We use this mixin to add label size styles. 42 | // $padding - Used to determine label padding. Default: $label-padding || rem-calc(4 8 4) !default 43 | // $text-size - Used to determine label text-size. Default: $text-size found in settings 44 | @mixin label-size($padding:$label-padding, $text-size:$label-font-sizing) { 45 | @if $padding { padding: $padding; } 46 | @if $text-size { font-size: $text-size; } 47 | } 48 | 49 | // @mixins 50 | // 51 | // We use this mixin to add label styles. 52 | // $bg - Default: $primary-color (found in settings file) 53 | // $radius - Default: false, Options: true, sets radius to $global-radius (found in settings file) 54 | @mixin label-style($bg:$primary-color, $radius:false) { 55 | 56 | // We control which background color comes through 57 | @if $bg { 58 | 59 | // This find the lightness percentage of the background color. 60 | $bg-lightness: lightness($bg); 61 | 62 | background-color: $bg; 63 | 64 | // We control the text color for you based on the background color. 65 | @if $bg-lightness < 70% { color: $label-font-color-alt; } 66 | @else { color: $label-font-color; } 67 | } 68 | 69 | // We use this to control the radius on labels. 70 | @if $radius == true { @include radius($label-radius); } 71 | @else if $radius { @include radius($radius); } 72 | 73 | } 74 | 75 | // @mixins 76 | // 77 | // We use this to add close buttons to alerts 78 | // $padding - Default: $label-padding, 79 | // $text-size - Default: $label-font-sizing, 80 | // $bg - Default: $primary-color(found in settings file) 81 | // $radius - Default: false, Options: true which sets radius to $global-radius (found in settings file) 82 | @mixin label($padding:$label-padding, $text-size:$label-font-sizing, $bg:$primary-color, $radius:false) { 83 | 84 | @include label-base; 85 | @include label-size($padding, $text-size); 86 | @include label-style($bg, $radius); 87 | } 88 | 89 | @include exports("label") { 90 | @if $include-html-label-classes { 91 | .label { 92 | @include label-base; 93 | @include label-size; 94 | @include label-style; 95 | 96 | &.radius { @include label-style(false, true); } 97 | &.round { @include label-style(false, $radius:1000px); } 98 | 99 | &.alert { @include label-style($alert-color); } 100 | &.warning { @include label-style($warning-color); } 101 | &.success { @include label-style($success-color); } 102 | &.secondary { @include label-style($secondary-color); } 103 | &.info { @include label-style($info-color); } 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_magellan.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-magellan-classes: $include-html-classes !default; 11 | 12 | $magellan-bg: $white !default; 13 | $magellan-padding: 10px !default; 14 | 15 | @include exports("magellan") { 16 | @if $include-html-magellan-classes { 17 | 18 | #{data('magellan-expedition')}, #{data('magellan-expedition-clone')} { 19 | background: $magellan-bg; 20 | z-index: 50; 21 | min-width: 100%; 22 | padding: $magellan-padding; 23 | 24 | .sub-nav { 25 | margin-bottom: 0; 26 | dd { margin-bottom: 0; } 27 | a { 28 | line-height: 1.8em; 29 | } 30 | } 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_panels.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-panel-classes: $include-html-classes !default; 11 | 12 | // We use these to control the background and border styles 13 | $panel-bg: scale-color($white, $lightness: -5%) !default; 14 | $panel-border-style: solid !default; 15 | $panel-border-size: 1px !default; 16 | 17 | // We use this % to control how much we darken things on hover 18 | $panel-function-factor: -11% !default; 19 | $panel-border-color: scale-color($panel-bg, $lightness: $panel-function-factor) !default; 20 | 21 | // We use these to set default inner padding and bottom margin 22 | $panel-margin-bottom: rem-calc(20) !default; 23 | $panel-padding: rem-calc(20) !default; 24 | 25 | // We use these to set default font colors 26 | $panel-font-color: $oil !default; 27 | $panel-font-color-alt: $white !default; 28 | 29 | $panel-header-adjust: true !default; 30 | $callout-panel-link-color: $primary-color !default; 31 | $callout-panel-link-color-hover: scale-color($callout-panel-link-color, $lightness: -14%) !default; 32 | // 33 | // @mixins 34 | // 35 | // We use this mixin to create panels. 36 | // $bg - Sets the panel background color. Default: $panel-pg || scale-color($white, $lightness: -5%) !default 37 | // $padding - Sets the panel padding amount. Default: $panel-padding || rem-calc(20) 38 | // $adjust - Sets the font color based on the darkness of the bg & resets header line-heights for panels. Default: $panel-header-adjust || true 39 | @mixin panel($bg:$panel-bg, $padding:$panel-padding, $adjust:$panel-header-adjust) { 40 | 41 | @if $bg { 42 | $bg-lightness: lightness($bg); 43 | 44 | border-style: $panel-border-style; 45 | border-width: $panel-border-size; 46 | border-color: scale-color($bg, $lightness: $panel-function-factor); 47 | margin-bottom: $panel-margin-bottom; 48 | padding: $padding; 49 | 50 | background: $bg; 51 | @if $bg-lightness >= 50% { color: $panel-font-color; } 52 | @else { color: $panel-font-color-alt; } 53 | 54 | // Respect the padding, fool. 55 | &>:first-child { margin-top: 0; } 56 | &>:last-child { margin-bottom: 0; } 57 | 58 | @if $adjust { 59 | // We set the font color based on the darkness of the bg. 60 | @if $bg-lightness >= 50% { 61 | h1,h2,h3,h4,h5,h6,p,li,dl { color: $panel-font-color; } 62 | } 63 | @else { 64 | h1,h2,h3,h4,h5,h6,p,li,dl { color: $panel-font-color-alt; } 65 | } 66 | 67 | // reset header line-heights for panels 68 | h1,h2,h3,h4,h5,h6 { 69 | line-height: 1; margin-bottom: rem-calc(20) / 2; 70 | &.subheader { line-height: 1.4; } 71 | } 72 | } 73 | } 74 | } 75 | 76 | @include exports("panel") { 77 | @if $include-html-panel-classes { 78 | 79 | /* Panels */ 80 | .panel { @include panel; 81 | 82 | &.callout { 83 | @include panel(scale-color($primary-color, $lightness: 94%)); 84 | a:not(.button) { 85 | color: $callout-panel-link-color; 86 | 87 | &:hover, 88 | &:focus { 89 | color: $callout-panel-link-color-hover; 90 | } 91 | } 92 | } 93 | 94 | &.radius { 95 | @include radius; 96 | } 97 | 98 | } 99 | 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_progress-bars.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | $include-html-media-classes: $include-html-classes !default; 11 | 12 | // We use this to set the progress bar height 13 | $progress-bar-height: rem-calc(25) !default; 14 | $progress-bar-color: $vapor !default; 15 | 16 | // We use these to control the border styles 17 | $progress-bar-border-color: scale-color($white, $lightness: 20%) !default; 18 | $progress-bar-border-size: 1px !default; 19 | $progress-bar-border-style: solid !default; 20 | $progress-bar-border-radius: $global-radius !default; 21 | 22 | // We use these to control the margin & padding 23 | $progress-bar-pad: rem-calc(2) !default; 24 | $progress-bar-margin-bottom: rem-calc(10) !default; 25 | 26 | // We use these to set the meter colors 27 | $progress-meter-color: $primary-color !default; 28 | $progress-meter-secondary-color: $secondary-color !default; 29 | $progress-meter-success-color: $success-color !default; 30 | $progress-meter-alert-color: $alert-color !default; 31 | 32 | // @mixins 33 | // 34 | // We use this to set up the progress bar container 35 | @mixin progress-container { 36 | background-color: $progress-bar-color; 37 | height: $progress-bar-height; 38 | border: $progress-bar-border-size $progress-bar-border-style $progress-bar-border-color; 39 | padding: $progress-bar-pad; 40 | margin-bottom: $progress-bar-margin-bottom; 41 | } 42 | 43 | // @mixins 44 | // 45 | // $bg - Default: $progress-meter-color || $primary-color 46 | @mixin progress-meter($bg:$progress-meter-color) { 47 | background: $bg; 48 | height: 100%; 49 | display: block; 50 | } 51 | 52 | 53 | @include exports("progress-bar") { 54 | @if $include-html-media-classes { 55 | 56 | /* Progress Bar */ 57 | .progress { 58 | @include progress-container; 59 | 60 | // Meter 61 | .meter { 62 | @include progress-meter; 63 | } 64 | &.secondary .meter { @include progress-meter($bg:$progress-meter-secondary-color); } 65 | &.success .meter { @include progress-meter($bg:$progress-meter-success-color); } 66 | &.alert .meter { @include progress-meter($bg:$progress-meter-alert-color); } 67 | 68 | &.radius { @include radius($progress-bar-border-radius); 69 | .meter { @include radius($progress-bar-border-radius - 1); } 70 | } 71 | 72 | &.round { @include radius(1000px); 73 | .meter { @include radius(999px); } 74 | } 75 | 76 | } 77 | 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_side-nav.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @variables 9 | // 10 | 11 | $include-html-nav-classes: $include-html-classes !default; 12 | 13 | // We use this to control padding. 14 | $side-nav-padding: rem-calc(14 0) !default; 15 | 16 | // We use these to control list styles. 17 | $side-nav-list-type: none !default; 18 | $side-nav-list-position: outside !default; 19 | $side-nav-list-margin: rem-calc(0 0 7 0) !default; 20 | 21 | // We use these to control link styles. 22 | $side-nav-link-color: $primary-color !default; 23 | $side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%) !default; 24 | $side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%) !default; 25 | $side-nav-link-bg-hover: hsla(0, 0, 0, 0.025) !default; 26 | $side-nav-link-margin: 0 !default; 27 | $side-nav-link-padding: rem-calc(7 14) !default; 28 | $side-nav-font-size: rem-calc(14) !default; 29 | $side-nav-font-weight: $font-weight-normal !default; 30 | $side-nav-font-weight-active: $side-nav-font-weight !default; 31 | $side-nav-font-family: $body-font-family !default; 32 | $side-nav-font-family-active: $side-nav-font-family !default; 33 | 34 | // We use these to control heading styles. 35 | $side-nav-heading-color: $side-nav-link-color !default; 36 | $side-nav-heading-font-size: $side-nav-font-size !default; 37 | $side-nav-heading-font-weight: bold !default; 38 | $side-nav-heading-text-transform: uppercase !default; 39 | 40 | // We use these to control border styles 41 | $side-nav-divider-size: 1px !default; 42 | $side-nav-divider-style: solid !default; 43 | $side-nav-divider-color: scale-color($white, $lightness: 10%) !default; 44 | 45 | 46 | // 47 | // @mixins 48 | // 49 | 50 | 51 | // We use this to style the side-nav 52 | // 53 | // $divider-color - Border color of divider. Default: $side-nav-divider-color. 54 | // $font-size - Font size of nav items. Default: $side-nav-font-size. 55 | // $link-color - Color of navigation links. Default: $side-nav-link-color. 56 | // $link-color-hover - Color of navigation links when hovered. Default: $side-nav-link-color-hover. 57 | @mixin side-nav( 58 | $divider-color:$side-nav-divider-color, 59 | $font-size:$side-nav-font-size, 60 | $link-color:$side-nav-link-color, 61 | $link-color-hover:$side-nav-link-color-hover, 62 | $link-bg-hover:$side-nav-link-bg-hover) { 63 | display: block; 64 | margin: 0; 65 | padding: $side-nav-padding; 66 | list-style-type: $side-nav-list-type; 67 | list-style-position: $side-nav-list-position; 68 | font-family: $side-nav-font-family; 69 | 70 | li { 71 | margin: $side-nav-list-margin; 72 | font-size: $font-size; 73 | font-weight: $side-nav-font-weight; 74 | 75 | a:not(.button) { 76 | display: block; 77 | color: $link-color; 78 | margin: $side-nav-link-margin; 79 | padding: $side-nav-link-padding; 80 | &:hover, 81 | &:focus { 82 | background: $link-bg-hover; 83 | color: $link-color-hover; 84 | } 85 | } 86 | 87 | &.active > a:first-child:not(.button) { 88 | color: $side-nav-link-color-active; 89 | font-weight: $side-nav-font-weight-active; 90 | font-family: $side-nav-font-family-active; 91 | } 92 | 93 | &.divider { 94 | border-top: $side-nav-divider-size $side-nav-divider-style; 95 | height: 0; 96 | padding: 0; 97 | list-style: none; 98 | border-top-color: $divider-color; 99 | } 100 | 101 | &.heading { 102 | color: $side-nav-heading-color; 103 | font: { 104 | size: $side-nav-heading-font-size; 105 | weight: $side-nav-heading-font-weight; 106 | } 107 | text-transform: $side-nav-heading-text-transform; 108 | } 109 | } 110 | } 111 | 112 | @include exports("side-nav") { 113 | @if $include-html-nav-classes { 114 | .side-nav { @include side-nav; } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_sub-nav.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @name _sub-nav.scss 9 | // @dependencies _global.scss 10 | // 11 | 12 | // 13 | // @variables 14 | // 15 | 16 | $include-html-nav-classes: $include-html-classes !default; 17 | 18 | // We use these to control margin and padding 19 | $sub-nav-list-margin: rem-calc(-4 0 18) !default; 20 | $sub-nav-list-padding-top: rem-calc(4) !default; 21 | 22 | // We use this to control the definition 23 | $sub-nav-font-family: $body-font-family !default; 24 | $sub-nav-font-size: rem-calc(14) !default; 25 | $sub-nav-font-color: $aluminum !default; 26 | $sub-nav-font-weight: $font-weight-normal !default; 27 | $sub-nav-text-decoration: none !default; 28 | $sub-nav-padding: rem-calc(3 16) !default; 29 | $sub-nav-border-radius: 3px !default; 30 | $sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%) !default; 31 | 32 | 33 | // We use these to control the active item styles 34 | 35 | $sub-nav-active-font-weight: $font-weight-normal !default; 36 | $sub-nav-active-bg: $primary-color !default; 37 | $sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%) !default; 38 | $sub-nav-active-color: $white !default; 39 | $sub-nav-active-padding: $sub-nav-padding !default; 40 | $sub-nav-active-cursor: default !default; 41 | 42 | $sub-nav-item-divider: "" !default; 43 | $sub-nav-item-divider-margin: rem-calc(12) !default; 44 | 45 | // 46 | // @mixins 47 | // 48 | 49 | 50 | // Create a sub-nav item 51 | // 52 | // $font-color - Font color. Default: $sub-nav-font-color. 53 | // $font-size - Font size. Default: $sub-nav-font-size. 54 | // $active-bg - Background of active nav item. Default: $sub-nav-active-bg. 55 | // $active-bg-hover - Background of active nav item, when hovered. Default: $sub-nav-active-bg-hover. 56 | @mixin sub-nav( 57 | $font-color: $sub-nav-font-color, 58 | $font-size: $sub-nav-font-size, 59 | $active-bg: $sub-nav-active-bg, 60 | $active-bg-hover: $sub-nav-active-bg-hover) { 61 | display: block; 62 | width: auto; 63 | overflow: hidden; 64 | margin: $sub-nav-list-margin; 65 | padding-top: $sub-nav-list-padding-top; 66 | 67 | dt { 68 | text-transform: uppercase; 69 | } 70 | 71 | dt, 72 | dd, 73 | li { 74 | float: $default-float; 75 | display: inline; 76 | margin-#{$default-float}: rem-calc(16); 77 | margin-bottom: 0; 78 | font-family: $sub-nav-font-family; 79 | font-weight: $sub-nav-font-weight; 80 | font-size: $font-size; 81 | color: $font-color; 82 | 83 | a { 84 | text-decoration: $sub-nav-text-decoration; 85 | color: $sub-nav-font-color; 86 | padding: $sub-nav-padding; 87 | &:hover { 88 | color: $sub-nav-font-color-hover; 89 | } 90 | } 91 | 92 | &.active a { 93 | @include radius($sub-nav-border-radius); 94 | font-weight: $sub-nav-active-font-weight; 95 | background: $active-bg; 96 | padding: $sub-nav-active-padding; 97 | cursor: $sub-nav-active-cursor; 98 | color: $sub-nav-active-color; 99 | &:hover { 100 | background: $active-bg-hover; 101 | } 102 | } 103 | @if $sub-nav-item-divider != "" { 104 | margin-#{$default-float}: 0; 105 | 106 | &:before { 107 | content: "#{$sub-nav-item-divider}"; 108 | margin: 0 $sub-nav-item-divider-margin; 109 | } 110 | 111 | &:first-child:before { 112 | content: ""; 113 | margin: 0; 114 | } 115 | } 116 | } 117 | } 118 | 119 | @include exports("sub-nav") { 120 | @if $include-html-nav-classes { 121 | .sub-nav { @include sub-nav; } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_tables.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @name _tables.scss 9 | // @dependencies _global.scss 10 | // 11 | 12 | // 13 | // @variables 14 | // 15 | 16 | $include-html-table-classes: $include-html-classes !default; 17 | 18 | // These control the background color for the table and even rows 19 | $table-bg: $white !default; 20 | $table-even-row-bg: $snow !default; 21 | 22 | // These control the table cell border style 23 | $table-border-style: solid !default; 24 | $table-border-size: 1px !default; 25 | $table-border-color: $gainsboro !default; 26 | 27 | // These control the table head styles 28 | $table-head-bg: $white-smoke !default; 29 | $table-head-font-size: rem-calc(14) !default; 30 | $table-head-font-color: $jet !default; 31 | $table-head-font-weight: $font-weight-bold !default; 32 | $table-head-padding: rem-calc(8 10 10) !default; 33 | 34 | // These control the table foot styles 35 | $table-foot-bg: $table-head-bg !default; 36 | $table-foot-font-size: $table-head-font-size !default; 37 | $table-foot-font-color: $table-head-font-color !default; 38 | $table-foot-font-weight: $table-head-font-weight !default; 39 | $table-foot-padding: $table-head-padding !default; 40 | 41 | // These control the caption 42 | $table-caption-bg: transparent !default; 43 | $table-caption-font-color: $table-head-font-color !default; 44 | $table-caption-font-size: rem-calc(16) !default; 45 | $table-caption-font-weight: bold !default; 46 | 47 | // These control the row padding and font styles 48 | $table-row-padding: rem-calc(9 10) !default; 49 | $table-row-font-size: rem-calc(14) !default; 50 | $table-row-font-color: $jet !default; 51 | $table-line-height: rem-calc(18) !default; 52 | 53 | // These are for controlling the layout, display and margin of tables 54 | $table-layout: auto !default; 55 | $table-display: table-cell !default; 56 | $table-margin-bottom: rem-calc(20) !default; 57 | 58 | 59 | // 60 | // @mixins 61 | // 62 | 63 | @mixin table { 64 | background: $table-bg; 65 | margin-bottom: $table-margin-bottom; 66 | border: $table-border-style $table-border-size $table-border-color; 67 | table-layout: $table-layout; 68 | 69 | caption { 70 | background: $table-caption-bg; 71 | color: $table-caption-font-color; 72 | font: { 73 | size: $table-caption-font-size; 74 | weight: $table-caption-font-weight; 75 | } 76 | } 77 | 78 | thead { 79 | background: $table-head-bg; 80 | 81 | tr { 82 | th, 83 | td { 84 | padding: $table-head-padding; 85 | font-size: $table-head-font-size; 86 | font-weight: $table-head-font-weight; 87 | color: $table-head-font-color; 88 | } 89 | } 90 | } 91 | 92 | tfoot { 93 | background: $table-foot-bg; 94 | 95 | tr { 96 | th, 97 | td { 98 | padding: $table-foot-padding; 99 | font-size: $table-foot-font-size; 100 | font-weight: $table-foot-font-weight; 101 | color: $table-foot-font-color; 102 | } 103 | } 104 | } 105 | 106 | tr { 107 | th, 108 | td { 109 | padding: $table-row-padding; 110 | font-size: $table-row-font-size; 111 | color: $table-row-font-color; 112 | text-align: $default-float; 113 | } 114 | 115 | &.even, 116 | &.alt, 117 | &:nth-of-type(even) { background: $table-even-row-bg; } 118 | } 119 | 120 | thead tr th, 121 | tfoot tr th, 122 | tfoot tr td, 123 | tbody tr th, 124 | tbody tr td, 125 | tr td { display: $table-display; line-height: $table-line-height; } 126 | } 127 | 128 | 129 | @include exports("table") { 130 | @if $include-html-table-classes { 131 | table { 132 | @include table; 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_tabs.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | @import "grid"; 7 | 8 | // 9 | // @variables 10 | // 11 | 12 | $include-html-tabs-classes: $include-html-classes !default; 13 | 14 | $tabs-navigation-padding: rem-calc(16) !default; 15 | $tabs-navigation-bg-color: $silver !default; 16 | $tabs-navigation-active-bg-color: $white !default; 17 | $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%) !default; 18 | $tabs-navigation-font-color: $jet !default; 19 | $tabs-navigation-active-font-color: $tabs-navigation-font-color !default; 20 | $tabs-navigation-font-size: rem-calc(16) !default; 21 | $tabs-navigation-font-family: $body-font-family !default; 22 | 23 | $tabs-content-margin-bottom: rem-calc(24) !default; 24 | $tabs-content-padding: ($column-gutter/2) !default; 25 | 26 | $tabs-vertical-navigation-margin-bottom: 1.25rem !default; 27 | 28 | @include exports("tab") { 29 | @if $include-html-tabs-classes { 30 | .tabs { 31 | @include clearfix; 32 | margin-bottom: 0 !important; 33 | margin-left: 0; 34 | dd, .tab-title { 35 | position: relative; 36 | margin-bottom: 0 !important; 37 | list-style: none; 38 | float: $default-float; 39 | > a { 40 | outline: none; 41 | display: block; 42 | background: { 43 | color: $tabs-navigation-bg-color; 44 | } 45 | color: $tabs-navigation-font-color; 46 | padding: $tabs-navigation-padding $tabs-navigation-padding * 2; 47 | font-family: $tabs-navigation-font-family; 48 | font-size: $tabs-navigation-font-size; 49 | &:hover { 50 | background: { 51 | color: $tabs-navigation-hover-bg-color; 52 | } 53 | } 54 | } 55 | &.active a { 56 | background: { 57 | color: $tabs-navigation-active-bg-color; 58 | } 59 | color:$tabs-navigation-active-font-color; 60 | } 61 | } 62 | &.radius { 63 | dd:first-child, .tab:first-child { 64 | a { @include side-radius($default-float, $global-radius); } 65 | } 66 | dd:last-child, .tab:last-child { 67 | a { @include side-radius($opposite-direction, $global-radius); } 68 | } 69 | } 70 | &.vertical { 71 | dd, .tab-title { 72 | position: inherit; 73 | float: none; 74 | display: block; 75 | top: auto; 76 | } 77 | } 78 | } 79 | 80 | .tabs-content { 81 | @include clearfix; 82 | margin-bottom: $tabs-content-margin-bottom; 83 | width: 100%; 84 | > .content { 85 | display: none; 86 | float: $default-float; 87 | padding: $tabs-content-padding 0; 88 | width: 100%; 89 | &.active { display: block; float: none; } 90 | &.contained { padding: $tabs-content-padding; } 91 | } 92 | &.vertical { 93 | display: block; 94 | > .content { padding: 0 $tabs-content-padding; } 95 | } 96 | } 97 | @media #{$medium-up} { 98 | .tabs { 99 | &.vertical { 100 | width: 20%; 101 | max-width: 20%; 102 | float: $default-float; 103 | margin: 0 0 $tabs-vertical-navigation-margin-bottom; 104 | } 105 | } 106 | .tabs-content { 107 | &.vertical { 108 | width: 80%; 109 | max-width: 80%; 110 | float: $default-float; 111 | margin-#{$default-float}: -1px; 112 | padding-#{$default-float}: 1rem; 113 | } 114 | } 115 | } 116 | .no-js { 117 | .tabs-content > .content { 118 | display: block; 119 | float: none; 120 | } 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_thumbs.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // @name _thumbs.scss 9 | // @dependencies _globals.scss 10 | // 11 | 12 | // 13 | // @variables 14 | // 15 | 16 | $include-html-media-classes: $include-html-classes !default; 17 | 18 | // We use these to control border styles 19 | $thumb-border-style: solid !default; 20 | $thumb-border-width: 4px !default; 21 | $thumb-border-color: $white !default; 22 | $thumb-box-shadow: 0 0 0 1px rgba($black,.2) !default; 23 | $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5) !default; 24 | 25 | // Radius and transition speed for thumbs 26 | $thumb-radius: $global-radius !default; 27 | $thumb-transition-speed: 200ms !default; 28 | 29 | // 30 | // @mixins 31 | // 32 | 33 | // We use this to create image thumbnail styles. 34 | // 35 | // $border-width - Width of border around thumbnail. Default: $thumb-border-width. 36 | // $box-shadow - Box shadow to apply to thumbnail. Default: $thumb-box-shadow. 37 | // $box-shadow-hover - Box shadow to apply on hover. Default: $thumb-box-shadow-hover. 38 | @mixin thumb( 39 | $border-width:$thumb-border-width, 40 | $box-shadow:$thumb-box-shadow, 41 | $box-shadow-hover:$thumb-box-shadow-hover) { 42 | line-height: 0; 43 | display: inline-block; 44 | border: $thumb-border-style $border-width $thumb-border-color; 45 | max-width: 100%; 46 | box-shadow: $box-shadow; 47 | 48 | &:hover, 49 | &:focus { 50 | box-shadow: $box-shadow-hover; 51 | } 52 | } 53 | 54 | 55 | @include exports("thumb") { 56 | @if $include-html-media-classes { 57 | 58 | /* Image Thumbnails */ 59 | .th { 60 | @include thumb; 61 | @include single-transition(all,$thumb-transition-speed,ease-out); 62 | 63 | &.radius { @include radius($thumb-radius); } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_toolbar.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | // toolbar styles 5 | 6 | .toolbar { 7 | background: $oil; 8 | width: 100%; 9 | font-size: 0; 10 | display: inline-block; 11 | 12 | &.label-bottom .tab .tab-content { 13 | i, img { margin-bottom: 10px; } 14 | } 15 | 16 | &.label-right .tab .tab-content { 17 | i, img { margin-right: 10px; display: inline-block;} 18 | label { display: inline-block; } 19 | } 20 | 21 | &.vertical.label-right .tab .tab-content { 22 | text-align: left; 23 | } 24 | 25 | &.vertical { 26 | height: 100%; 27 | width: auto; 28 | 29 | .tab { 30 | width: auto; 31 | margin: auto; 32 | float: none; 33 | } 34 | } 35 | 36 | .tab { 37 | text-align: center; 38 | width: 25%; 39 | margin: 0 auto; 40 | display: block; 41 | padding: 20px; 42 | float: left; 43 | 44 | &:hover { 45 | background: rgba($white, 0.1); 46 | } 47 | } 48 | } 49 | 50 | .toolbar .tab-content { 51 | font-size: 16px; 52 | text-align: center; 53 | 54 | label { color: $iron; } 55 | 56 | i { 57 | font-size: 30px; 58 | display: block; 59 | margin: 0 auto; 60 | color: $iron; 61 | vertical-align: middle; 62 | } 63 | 64 | img { 65 | width: 30px; 66 | height: 30px; 67 | display: block; 68 | margin: 0 auto; 69 | } 70 | } -------------------------------------------------------------------------------- /app/styles/scss/foundation/components/_tooltips.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "global"; 6 | 7 | // 8 | // Tooltip Variables 9 | // 10 | $include-html-tooltip-classes: $include-html-classes !default; 11 | 12 | $has-tip-border-bottom: dotted 1px $iron !default; 13 | $has-tip-font-weight: $font-weight-bold !default; 14 | $has-tip-font-color: $oil !default; 15 | $has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%) !default; 16 | $has-tip-font-color-hover: $primary-color !default; 17 | $has-tip-cursor-type: help !default; 18 | 19 | $tooltip-padding: rem-calc(12) !default; 20 | $tooltip-bg: $oil !default; 21 | $tooltip-font-size: rem-calc(14) !default; 22 | $tooltip-font-weight: $font-weight-normal !default; 23 | $tooltip-font-color: $white !default; 24 | $tooltip-line-height: 1.3 !default; 25 | $tooltip-close-font-size: rem-calc(10) !default; 26 | $tooltip-close-font-weight: $font-weight-normal !default; 27 | $tooltip-close-font-color: $monsoon !default; 28 | $tooltip-font-size-sml: rem-calc(14) !default; 29 | $tooltip-radius: $global-radius !default; 30 | $tooltip-rounded: $global-rounded !default; 31 | $tooltip-pip-size: 5px !default; 32 | $tooltip-max-width: 300px !default; 33 | 34 | @include exports("tooltip") { 35 | @if $include-html-tooltip-classes { 36 | 37 | /* Tooltips */ 38 | .has-tip { 39 | border-bottom: $has-tip-border-bottom; 40 | cursor: $has-tip-cursor-type; 41 | font-weight: $has-tip-font-weight; 42 | color: $has-tip-font-color; 43 | 44 | &:hover, 45 | &:focus { 46 | border-bottom: $has-tip-border-bottom-hover; 47 | color: $has-tip-font-color-hover; 48 | } 49 | 50 | &.tip-left, 51 | &.tip-right { float: none !important; } 52 | } 53 | 54 | .tooltip { 55 | display: none; 56 | position: absolute; 57 | z-index: 1006; 58 | font-weight: $tooltip-font-weight; 59 | font-size: $tooltip-font-size; 60 | line-height: $tooltip-line-height; 61 | padding: $tooltip-padding; 62 | max-width: $tooltip-max-width; 63 | #{$default-float}: 50%; 64 | width: 100%; 65 | color: $tooltip-font-color; 66 | background: $tooltip-bg; 67 | 68 | &>.nub { 69 | display: block; 70 | #{$default-float}: $tooltip-pip-size; 71 | position: absolute; 72 | width: 0; 73 | height: 0; 74 | border: solid $tooltip-pip-size; 75 | border-color: transparent transparent $tooltip-bg transparent; 76 | top: -($tooltip-pip-size * 2); 77 | pointer-events: none; 78 | 79 | &.rtl { 80 | left: auto; 81 | #{$opposite-direction}: $tooltip-pip-size; 82 | } 83 | } 84 | 85 | &.radius { 86 | @include radius($tooltip-radius); 87 | } 88 | &.round { 89 | @include radius($tooltip-rounded); 90 | &>.nub { 91 | left: 2rem; 92 | } 93 | } 94 | 95 | &.opened { 96 | color: $has-tip-font-color-hover !important; 97 | border-bottom: $has-tip-border-bottom-hover !important; 98 | } 99 | } 100 | 101 | .tap-to-close { 102 | display: block; 103 | font-size: $tooltip-close-font-size; 104 | color: $tooltip-close-font-color; 105 | font-weight: $tooltip-close-font-weight; 106 | } 107 | 108 | @media #{$small} { 109 | .tooltip { 110 | &>.nub { 111 | border-color: transparent transparent $tooltip-bg transparent; 112 | top: -($tooltip-pip-size * 2); 113 | } 114 | &.tip-top>.nub { 115 | border-color: $tooltip-bg transparent transparent transparent; 116 | top: auto; 117 | bottom: -($tooltip-pip-size * 2); 118 | } 119 | 120 | &.tip-left, 121 | &.tip-right { float: none !important; } 122 | 123 | &.tip-left>.nub { 124 | border-color: transparent transparent transparent $tooltip-bg; 125 | right: -($tooltip-pip-size * 2); 126 | left: auto; 127 | top: 50%; 128 | margin-top: -$tooltip-pip-size; 129 | } 130 | &.tip-right>.nub { 131 | border-color: transparent $tooltip-bg transparent transparent; 132 | right: auto; 133 | left: -($tooltip-pip-size * 2); 134 | top: 50%; 135 | margin-top: -$tooltip-pip-size; 136 | } 137 | 138 | } 139 | } 140 | 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /app/styles/scss/normalize.css: -------------------------------------------------------------------------------- 1 | 2 | /*# sourceMappingURL=normalize.css.map */ -------------------------------------------------------------------------------- /app/styles/scss/normalize.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "normalize.css", 4 | "sources": [ 5 | "normalize.scss" 6 | ], 7 | "names": [], 8 | "mappings": "", 9 | "sourceRoot": "" 10 | } -------------------------------------------------------------------------------- /app/styles/scss/side-comments.css: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes fadein { 2 | from { 3 | opacity: 0; 4 | } 5 | to { 6 | opacity: 1; 7 | } 8 | } 9 | @keyframes fadein { 10 | from { 11 | opacity: 0; 12 | } 13 | to { 14 | opacity: 1; 15 | } 16 | } 17 | .commentable-section { 18 | position: relative; 19 | } 20 | .commentable-section:hover .side-comment .marker { 21 | display: block; 22 | } 23 | .side-comment { 24 | position: absolute; 25 | top: 0; 26 | right: 0; 27 | width: 20px; 28 | min-height: 100%; 29 | height: 100%; 30 | } 31 | .side-comment * { 32 | -webkit-box-sizing: border-box; 33 | -moz-box-sizing: border-box; 34 | box-sizing: border-box; 35 | } 36 | .side-comment .hide { 37 | display: none; 38 | } 39 | .side-comment .marker { 40 | display: none; 41 | position: absolute; 42 | top: 0; 43 | right: 0; 44 | cursor: pointer; 45 | } 46 | .side-comment .marker span { 47 | display: none; 48 | } 49 | .side-comment.active .marker, 50 | .side-comment.has-comments .marker, 51 | .side-comment.has-comments ul.comments { 52 | display: block; 53 | } 54 | .side-comment .add-comment { 55 | display: none; 56 | } 57 | .side-comment.has-comments .add-comment, 58 | .side-comment.no-current-user .add-comment { 59 | display: block; 60 | } 61 | .side-comment.no-current-user .add-comment { 62 | margin-top: 20px; 63 | } 64 | .side-comment.has-comments .marker:before { 65 | content: ""; 66 | } 67 | .side-comment.has-comments .marker span { 68 | display: block; 69 | } 70 | .side-comment.has-comments .add-comment.hide { 71 | display: none; 72 | } 73 | .side-comment.has-comments .comment-form { 74 | display: none; 75 | } 76 | .side-comment .comments-wrapper { 77 | display: none; 78 | position: absolute; 79 | top: 0; 80 | left: 40px; 81 | } 82 | .side-comment .comments { 83 | list-style: none; 84 | padding: 0; 85 | margin: 0; 86 | display: none; 87 | width: 100%; 88 | } 89 | .side-comment .comments li { 90 | width: 100%; 91 | overflow: hidden; 92 | } 93 | .side-comment .comment, 94 | .side-comment .comment-box, 95 | .side-comment .actions { 96 | margin: 0; 97 | } 98 | .side-comment .actions, 99 | .side-comment .delete { 100 | margin-left: 42px; 101 | } 102 | .side-comment .add-comment.active { 103 | display: block; 104 | } 105 | .side-comment .comment-form { 106 | overflow: hidden; 107 | } 108 | .side-comment .comment-form.active { 109 | display: block; 110 | } 111 | .side-comment.active .comments-wrapper { 112 | display: block; 113 | } 114 | @media (max-width: 768px) { 115 | body { 116 | -webkit-overflow-scrolling: touch; 117 | overflow-x: hidden; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /app/styles/scss/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } -------------------------------------------------------------------------------- /app/templates/authorized_layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |
12 |
13 | 14 |
15 |
16 | 51 |
52 | 53 |
54 |
55 |
56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/templates/auths/signin.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
We help increase the conversion rate of your inbound private events inquiries at amazing speed.

Sign In With Facebook 5 |
6 |
7 | 10 | 11 |
12 |
13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 | Sign Up 22 |
23 | 24 |
25 |
26 |
27 |
28 | -------------------------------------------------------------------------------- /app/templates/auths/signup.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
We help increase the conversion rate of your inbound private events inquiries at amazing speed.

Sign Up With Facebook 5 |
6 |
7 |
8 | 9 |
10 | ERROR 11 |
12 |
13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 |
31 |
32 | 35 | 36 |
37 |
38 |
39 | 40 |
41 | 42 |
43 | 44 |
45 |
46 | Sign In 47 |
48 | 49 |
50 |
51 |
52 |
53 | -------------------------------------------------------------------------------- /app/templates/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |
12 |
13 | 14 |
15 |
16 | 29 |
30 |
31 |
32 | 49 |
50 |
51 |
52 |
53 | 54 |
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /app/templates/shared/alert_message.html: -------------------------------------------------------------------------------- 1 |
2 | × 3 | <% 4 | _.each(messages, function(message){ 5 | %> 6 | <%= message %> 7 | <% 8 | }); 9 | %> 10 |
11 | -------------------------------------------------------------------------------- /app/templates/shared/fileupload.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /app/templates/shared/tag.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | 7 | 8 | 11 |
add
12 |
13 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /app/templates/shared/topnav.html: -------------------------------------------------------------------------------- 1 | 56 |
57 | -------------------------------------------------------------------------------- /app/templates/vendor/images.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
upload images
7 |
hide dropzone
8 |
9 |
10 |
11 |
12 |
13 |
14 |
DROPZONE
15 |
Drag and Drop Images Here
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 |
27 |
28 |
29 | 30 |
31 |
-------------------------------------------------------------------------------- /app/templates/vendor/images/image.html: -------------------------------------------------------------------------------- 1 | 2 | <%= image.fileName %> 3 | 4 |
<%= image.fileName %>
5 | 6 | 7 | <% _.each(image.tags, function(tag){ %> 8 |
9 | <%= tag %>  10 |
11 | <% }); %> 12 | <% if(!image.tags || image.tags.length == 0){ %> 13 | not set tag yet 14 | <% } %> 15 | 16 | 17 |
add tags
18 |     19 | 20 | -------------------------------------------------------------------------------- /app/templates/vendor/images/list.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | <% if(images.length == 0 ){ %> 14 | 15 | 18 | 19 | <% } %> 20 | 21 | 22 |
imagenametagsaction
16 | There are no images 17 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /app/templates/vendor/menu_items.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /app/templates/vendor/menus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 12 |
13 |
14 | 15 |
16 |
17 |
18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /app/templates/vendor/menus/course.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | <%= course.name %> 6 |

7 |
8 |
9 | add menu item 10 |   11 | edit course name 12 |   13 | delete course 14 |
15 |
16 | 17 | 20 |
-------------------------------------------------------------------------------- /app/templates/vendor/menus/courses.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | FIRST COURSE 6 | APPETIZER 7 |

8 |
9 | 14 |
15 | 16 | 19 |
-------------------------------------------------------------------------------- /app/templates/vendor/menus/form.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |   delete menu   4 |
5 |
6 |   save   7 |
8 |
cancel
9 | <% if(!isNew){ %> 10 |
add a course
11 | <%}%> 12 |

13 | MENUS 14 | 15 | <%= menu.name ? '| '+menu.name : '' %> 16 |

17 |
18 |
19 |
20 | 23 |
24 |
25 | 34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 |
42 | $ 43 |
44 |
45 |
46 |
47 |
48 |
49 | 56 |
57 |
58 | 59 |
60 | 61 |
62 |
63 |
64 |
65 |
66 | 67 |
68 |
69 |
70 | > 71 | 72 |
73 |
74 |
75 |
76 | menu is active 77 |
78 |
79 |
80 |
81 | 82 |
83 | 84 |
85 |
86 |
87 | Tap on 88 | Add a Course 89 | to add courses to this menu 90 |
91 |
92 |
93 |
94 |
95 | -------------------------------------------------------------------------------- /app/templates/vendor/menus/form_course.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 7 | 8 |
9 | 10 |
11 | 12 |   13 | save 14 |   15 | cancel 16 |
17 | 18 |
19 | 20 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /app/templates/vendor/rooms/amenities.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
  delete venue   6 |
7 |
8 |   save   9 |
10 |
cancel
11 | 12 |

ROOM | Sophia Room Amenities

13 |
14 |
15 |
Amenities
16 |
17 |
private entrance   18 |
19 |
private restrooms   20 |
21 |
night skyline view   22 |
23 |
24 |
edit Amenities
25 |
26 |
27 |
28 | 29 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/form_layout.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |   delete layout   7 |
8 |
9 |   save   10 |
11 |
cancel
12 |

13 | ROOM 14 | 15 | <%= layout.name ? ('|'+layout.name) : '' %> 16 |

17 |
18 |
19 |
20 |
21 | 24 |
25 | 41 |
42 |
43 |
44 | 47 |
48 |
49 |
50 |
51 | 54 |
55 |
56 |
57 | 62 |
63 |
64 |
65 |
66 |
67 | 68 | > 69 | 70 |
71 |
72 |
73 |
Layout is active
74 |
75 |
76 |
77 |
78 | 79 |
80 |
81 |

This layout has 3 images. Select the hero image.

82 |

83 | {return images for this layout. user simply clicks on desired images to select as hero} 84 |

85 |
86 |
87 |
88 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/layouts.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 11 |
12 |
13 | 14 | 15 |
16 |
17 |
18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/marketing.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

ROOM 5 | <%= room.name ? ('| '+room.name) : '' %> 6 | 7 |

8 |
9 |
10 |
Tags
11 |
12 | <% _.each(room.marketing, function(name){%> 13 |
14 | <%= name %>   15 |
16 | <% }); %> 17 |
18 |
add tags
19 |
20 |
21 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/menus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | ROOM 5 | | Sophia Room Menus 6 |

7 |
8 | 9 | <% 10 | _.each(menus, function(menu){ 11 | %> 12 | 35 | 36 | <% 37 | }); 38 | %>
39 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/room.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 32 |
33 |
34 | 35 |
36 |
37 | 38 |
39 |
-------------------------------------------------------------------------------- /app/templates/vendor/rooms/services.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | ROOM 5 | 6 | <%= room.name ? ('| '+room.name) : '' %> 7 | 8 |

9 |
10 | <% 11 | _.each(services, function(service){ 12 | %> 13 |
14 |
15 |
16 |
17 |
18 | =0) ? 'checked' : '' %> > 19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 | 27 | 28 | <%= service.name %> 29 |
30 |
31 | <% 32 | }); 33 | %>
34 |
-------------------------------------------------------------------------------- /app/templates/vendor/setup.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/form_service.html: -------------------------------------------------------------------------------- 1 |
2 |
  delete <%= service.name%>  3 |
4 |
5 |   save   6 |
7 |
cancel
8 |

SERVICES <%= service.name ? (' | '+service.name) : '' %>

9 |
10 |
11 |
12 | 15 | 16 | 17 | 30 | 33 |
34 |
35 |
36 |
37 |
38 | > 39 | 40 |
41 |
42 |
43 |
Currently Active
44 |
45 |
46 | 47 | 48 |
49 |
50 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/item_role.html: -------------------------------------------------------------------------------- 1 | <% 2 | _.each(roles, function(role){ 3 | %> 4 |
  • 5 | <%= role.name %> 6 |
  • 7 | <% 8 | }); 9 | %> 10 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/item_service.html: -------------------------------------------------------------------------------- 1 | <% 2 | _.each(services, function(service){ 3 | %> 4 |
  • 5 | <%= service.name %> 6 |
  • 7 | <% 8 | }) 9 | %> 10 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/roles.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    18 |
    -------------------------------------------------------------------------------- /app/templates/vendor/setup/search_terminology.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | 8 |
    add
    9 |
    10 | 12 |
    13 |
    14 |
    15 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/services.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 13 |
    14 |
    15 |
    16 |
    17 |
    18 | 19 |
    20 |
    21 |
    22 | -------------------------------------------------------------------------------- /app/templates/vendor/setup/settings.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |   save   5 |
    6 |
    cancel
    7 |

    8 | SETTINGS 9 | | Copy, Intros, Success 10 |

    11 |
    12 |
    13 | 17 | 21 | 25 |
    26 |
    27 |
    28 |
    -------------------------------------------------------------------------------- /app/templates/vendor/setup/terminology.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |

    5 | TERMINOLOGY 6 | | Customize Your Venue 7 |

    8 |
    9 |
    10 |
    Room Type
    11 |
    12 | <% 13 | _.each(setting.roomType, function(roomType){ 14 | 15 | %> 16 |
    17 | <%= roomType %>   18 | 19 |
    20 | <% 21 | }); 22 | %> 23 |
    24 | Add Room Type 25 |
    26 |
    Course Type
    27 |
    28 | <% 29 | _.each(setting.courseType, function(courseType){ 30 | 31 | %> 32 |
    33 | <%= courseType %>   34 | 35 |
    36 | <% 37 | }); 38 | %> 39 | 40 |
    41 | Add Course Type 42 |
    43 |
    Job Role Type
    44 |
    45 | <% 46 | _.each(setting.jobRoleType, function(jobRoleType){ 47 | 48 | %> 49 |
    50 | <%= jobRoleType %>   51 | 52 |
    53 | <% 54 | }); 55 | %> 56 |
    57 | Add Job Role Type 58 |
    59 |
    Ammenities
    60 |
    61 | <% 62 | _.each(setting.ammenityType, function(ammenityType){ 63 | 64 | %> 65 |
    66 | <%= ammenityType %>   67 | 68 |
    69 | <% 70 | }); 71 | %> 72 |
    73 | Add Ammenities Type 74 |
    75 |
    76 | 77 |
    -------------------------------------------------------------------------------- /app/videos/Private-Table.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/app/videos/Private-Table.mp4 -------------------------------------------------------------------------------- /app/views/accounts/loginpartial.html: -------------------------------------------------------------------------------- 1 |
    2 | 4 |

    Username is too short.

    5 |

    Username is too long.

    6 | 8 |

    Password is too short.

    9 | 10 |
    -------------------------------------------------------------------------------- /app/views/accounts/signuppartial.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 | 5 |

    Username is too short.

    6 |

    Username is too long.

    7 | 8 | 9 |

    Enter a valid email.

    10 |
    11 |
    12 | 13 | 14 |

    Password is too short.

    15 | 16 |
    17 | 18 |
    -------------------------------------------------------------------------------- /app/views/bookings.html: -------------------------------------------------------------------------------- 1 |
    2 |

    Your Bookings

    3 | 4 | 5 | 6 | {{booking.room}} at {{booking.venue}} {{booking.bookingStartTime | date: 'fullDate'}} 7 | 8 |
    9 |
    10 |
    11 |
    12 |
    13 |
    14 |

    Your booking for the

    15 |

    {{booking.room}}

    16 |

    at the {{booking.venue}} is confirmed for:
    17 | {{booking.bookingStartTime | date: 'fullDate'}}
    18 | from {{booking.bookingStartTime | date: 'h:mm a'}} to {{booking.bookingEndTime | date: 'h:mm a'}}

    19 |
    20 |
    21 | 22 |

    23 | {{booking.contactFullName}}
    24 | {{booking.contactTitle}}

    25 |
    26 |
    27 |
    28 |
    29 |
    30 |
    -------------------------------------------------------------------------------- /app/views/checkout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 |
    6 | 7 |
    8 |
    9 |
    10 |

    {{room.roomName}}

    11 |
    12 |
    13 |
    14 |
    15 |

    {{room.venueName}}

    16 |
    17 |
    18 |
    19 |
    20 | 21 |

    {{room.type}}

    22 |
    23 |
    24 | 25 |

    {{room.receptionCapacity}} Guests

    26 |
    27 |
    28 | 29 |

    Minimum: ${{room.minSpend | number: fractionSize}}

    30 |
    31 |
    32 | 33 |

    {{room.eventDuration}} Hours

    34 |
    35 |
    36 | 37 |

    {{room.layouts}} Layouts

    38 |
    39 |
    40 |
    41 |
    42 | 46 |
    47 |
    48 | 49 | 50 | 51 |
    52 |
    53 | 65 |
    66 |
    67 |
    68 |
    69 |
    70 |
    71 |
    72 |
    73 | -------------------------------------------------------------------------------- /app/views/checkout/confirmation.html: -------------------------------------------------------------------------------- 1 |
    2 |

    Thank you for choosing the {{room.roomName}}.

    3 |

    Your reservation has been successfully booked

    4 |

    for {{SearchBar.searchParams.date}} from {{SearchBar.searchParams.startTime}} to {{SearchBar.searchParams.endTime}}

    5 |

    A confirmation email has been sent with details of your event.

    6 |
    7 | 8 |
    9 |
    -------------------------------------------------------------------------------- /app/views/checkout/menu.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |

    {{menuTitle}}

    4 |
    5 |
    6 |

    {{course.name}}

    7 |
    8 |
    {{options.name}}
    9 |

    {{options.description}}

    10 |
    11 |
    12 |
    13 |
    14 | 15 |
    16 |
    17 |
    18 | 19 |
    20 |
    21 | {{menuNumber+1}} of {{menus.length}} 22 |
    23 |
    24 | 25 |
    26 |
    27 |
    28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/checkout/payments.html: -------------------------------------------------------------------------------- 1 |
    2 |

    Payment

    3 |
    4 |
    5 | 6 | 7 |
    8 |
    9 | 10 |
    11 |
    12 | 13 | 14 |
    15 |
    16 | 17 | 18 |
    19 |
    20 | 21 |
    22 |

    Billing Address

    23 | 24 | 25 |
    26 |
    27 | 28 | 29 |
    30 |
    31 | 32 | 33 |
    34 |
    35 | 36 |
    37 |
    38 | 39 | 40 |
    41 |
    42 | 43 | 44 |
    45 |
    46 | 47 |
    48 |
    49 | 50 | 51 |
    52 |
    53 | 54 | 55 |
    56 |
    57 | 58 | 59 |
    60 |
    61 | 62 | 63 |
    64 |
    65 |
    66 |
    67 | I agree to the Cancellation Policy, House Rules and Terms of Service 68 |
    69 |
    70 |
    71 |
    72 | pay the entire amount 73 |
    74 |
    75 |
    76 |
    77 | pay 50% deposit + balance 7 days prior to event 78 |
    79 |
    80 |
    81 | 82 |
    83 |
    -------------------------------------------------------------------------------- /app/views/checkout/room.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
    7 |
    8 |
    9 |

    {{room.description}}

    10 |
    11 |
    12 |
    13 |
    14 |
    The Space
    15 |
    16 |
      17 |
    • Size: {{room.size}}
    • 18 |
    • Room Type: {{room.type}}
    • 19 |
    • Minimum Spend: ${{room.minSpend | number: fractionSize}}
    • 20 |
    • Time Included: {{room.eventDuration}} hours
    • 21 |
    22 |
    23 |
    24 | 25 |
    26 |
    27 |
    House Rules
    28 |
    29 |
    30 |
    31 |
      32 |
    • Cancellation Policy: {{room.cancelPolicy}}
    • 33 |
    • House Rules: {{room.houseRules}}
    • 34 |
    35 |
    36 |
    37 |
    38 |
    39 | 40 |
    41 |
    42 |
    Fees
    43 |
    44 |
    45 |
    46 |
      47 |
    • Overage: ${{room.durationOverageFee}} per hour
    • 48 |
    49 | 50 |
    51 |
    52 |
    53 |
    54 | 55 | 65 |
    66 |
    67 |
    Amenities
    68 |
    69 |
    70 |
    71 |
      72 |
    • {{amenities}}
    • 73 |
    74 | 75 |
    76 |
    77 |
    78 |
    79 |
    80 |
    81 |
    Menus
    82 |
    83 |
      84 |
    • Menus: {{room.menuNumber}}
    • 85 |
    • Cuisine Type: {{room.cuisineType}}
    • 86 |
    • Price: ${{room.menuPrices[0]}} to ${{room.menuPrices[room.menuPrices.length-1]}} per person
    • 87 | 88 |
    89 |
    90 |
    91 |
    92 | 93 | -------------------------------------------------------------------------------- /app/views/favorites.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |

    FAVORITE ROOMS

    5 |
    6 | 7 | 8 | 9 | 10 |
    11 |
    12 |
    {{room.venue}}
    13 |
    14 |
    15 | 16 |
    17 |
    18 |
    {{room.room}}
    19 |
    20 | 21 |
    22 |
    23 |
    24 |
    25 | 26 | 27 |
    28 | 29 | 30 |
    31 |
    32 |
    {{room.contactFullName}}
    33 |
    {{room.contactTitle}}
    34 |
    35 |
    -------------------------------------------------------------------------------- /app/views/landing.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 6 |
    7 | 8 | 45 |
    -------------------------------------------------------------------------------- /app/views/searchBar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |
    5 | 37 |
    38 |
    39 |
    40 | -------------------------------------------------------------------------------- /app/views/searchBar/searchResults.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 5 | 6 | 7 | 8 |
    9 |
    10 |
    {{room.venue}}
    11 |
    12 |
    13 | 14 |
    15 |
    16 |
    {{room.room}}
    17 |
    18 | 19 |
    20 |
    21 |
    22 |
    23 | 24 | 25 |
    26 | 27 | 28 |
    29 |
    30 |
    {{room.contactFullName}}
    31 |
    {{room.contactTitle}}
    32 |
    33 |
    34 |
    -------------------------------------------------------------------------------- /app/views/topnav.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
      4 |
    • 5 |

      6 |
    • 7 |
    8 | 9 | 10 |
      11 |
    • 12 |
    • 13 |
    14 | 15 | 19 | 20 | 23 | 24 | 31 |
    32 |
    33 | 34 |
    35 |
    36 | 37 |
    38 |
    39 |
    -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "private-table", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "angular": "~1.4.0", 6 | "angular-animate": "~1.4.0", 7 | "angular-aria": "^1.3.0", 8 | "angular-messages": "^1.3.0", 9 | "angular-resource": "^1.3.0", 10 | "angular-sanitize": "^1.3.0", 11 | "angular-touch": "^1.3.0", 12 | "angular-ui-router": "^0.2.15", 13 | "foundation": "~5.5.2", 14 | "datetimepicker": "^2.4.3", 15 | "angular-payments": "*", 16 | "angular-foundation": "~0.6.0", 17 | "ngModal": "~1.2.0", 18 | "angular-cookies": "~1.4.0" 19 | }, 20 | "devDependencies": { 21 | "angular-mocks": "^1.3.0" 22 | }, 23 | "appPath": "app", 24 | "moduleName": "privateTableApp", 25 | "resolutions": { 26 | "angular": "1.4.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "privatetable", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "bcrypt-nodejs": "0.0.3", 6 | "body-parser": "~1.5.0", 7 | "bower": "latest", 8 | "composable-middleware": "~0.3.0", 9 | "compression": "~1.0.1", 10 | "cookie-parser": "~1.0.1", 11 | "ejs": "~0.8.4", 12 | "errorhandler": "~1.0.0", 13 | "express": "~4.0.0", 14 | "express-jwt": "~3.0.0", 15 | "express-session": "~1.0.2", 16 | "jsonwebtoken": "~5.0.0", 17 | "lodash": "~2.4.1", 18 | "method-override": "~1.0.0", 19 | "morgan": "~1.0.0", 20 | "mysql": "^2.6.2", 21 | "passport": "~0.2.1", 22 | "passport-local": "~1.0.0", 23 | "pg": "^4.3.0", 24 | "pg-hstore": "^2.3.2", 25 | "readline": "0.0.7", 26 | "sequelize": "~3.0.0", 27 | "sequelize-heroku": "^1.0.0", 28 | "serve-favicon": "~2.0.1", 29 | "stripe": "^3.3.4" 30 | }, 31 | "repository": {}, 32 | "devDependencies": { 33 | "grunt": "^0.4.5", 34 | "grunt-autoprefixer": "^2.0.0", 35 | "grunt-concurrent": "^1.0.0", 36 | "grunt-contrib-clean": "^0.6.0", 37 | "grunt-contrib-compass": "^1.0.0", 38 | "grunt-contrib-concat": "^0.5.0", 39 | "grunt-contrib-connect": "^0.9.0", 40 | "grunt-contrib-copy": "^0.7.0", 41 | "grunt-contrib-cssmin": "^0.12.0", 42 | "grunt-contrib-htmlmin": "^0.4.0", 43 | "grunt-contrib-imagemin": "^0.9.2", 44 | "grunt-contrib-jshint": "^0.11.0", 45 | "grunt-contrib-uglify": "^0.7.0", 46 | "grunt-contrib-watch": "^0.6.1", 47 | "grunt-express-server": "^0.5.1", 48 | "grunt-filerev": "^2.1.2", 49 | "grunt-google-cdn": "^0.4.3", 50 | "grunt-karma": "*", 51 | "grunt-newer": "^1.1.0", 52 | "grunt-ng-annotate": "^0.9.2", 53 | "grunt-svgmin": "^2.0.0", 54 | "grunt-usemin": "^3.0.0", 55 | "grunt-wiredep": "^2.0.0", 56 | "jshint-stylish": "^1.0.0", 57 | "karma-jasmine": "*", 58 | "karma-phantomjs-launcher": "*", 59 | "load-grunt-tasks": "^3.1.0", 60 | "time-grunt": "^1.0.0" 61 | }, 62 | "engines": { 63 | "node": ">=0.10.0" 64 | }, 65 | "scripts": { 66 | "postinstall": "bower install" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /repo_assets/pthomepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/repo_assets/pthomepage.png -------------------------------------------------------------------------------- /repo_assets/roadmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/repo_assets/roadmap.png -------------------------------------------------------------------------------- /repo_assets/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/repo_assets/schema.png -------------------------------------------------------------------------------- /server/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var bodyParser = require('body-parser'); 3 | var expressJwt = require('express-jwt'); 4 | var jwt = require('jsonwebtoken'); 5 | var helper = require('./models/helpers.js'); 6 | var fs = require('fs'); 7 | var port = process.env.PORT || 9000; 8 | var stripe = require('stripe')('pk_test_rT3gR317GZZ9QOG0D5uMaQWy'); 9 | 10 | var app = express(); 11 | 12 | app.use(bodyParser.json()); 13 | app.use(bodyParser.urlencoded({ extended: true })); 14 | 15 | app.use(express.static(__dirname + '/../app')); 16 | 17 | if (process.env.S1_SECRET) { 18 | var secret = process.env.S1_SECRET; 19 | } else { 20 | var secret = String(fs.readFileSync(__dirname + '/config/secret')); 21 | } 22 | 23 | //refactor this to explicitly protect certain routes 24 | app.use('/api/users/bookings', expressJwt({secret: secret})); 25 | app.use('/api/users/favorites', expressJwt({secret: secret})); 26 | app.use('/api/users/bookings', expressJwt({secret: secret})); 27 | app.use('/api/payments', expressJwt({secret: secret})); 28 | 29 | //path for when users are created 30 | app.post('/api/users', function(req, res){ 31 | helper.searchOrMake(req.body.username, req.body.email, req.body.password, res, secret); 32 | }); 33 | 34 | //path for user's profile 35 | app.get('/api/users/me', function(req, res){ 36 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 37 | helper.findAllInfo(decoded.username, res); 38 | }); 39 | 40 | // path for when users are logging in 41 | app.post('/auth/local', function(req, res) { 42 | helper.authenticate(req.body.username, req.body.password, res, secret); 43 | }); 44 | 45 | //path for obtaining menus for a selected room 46 | app.get('/api/menu/eventType?', function(req, res){ 47 | helper.serveMenus(req.query, res); 48 | }); 49 | 50 | //path for obtaining courses for a selected menu 51 | app.get('/api/menu/menuID?', function(req, res){ 52 | helper.serveCourses(req.query.menuID, res); 53 | }); 54 | 55 | // path for obtaining search results 56 | app.get('/api/searchresults?', function(req, res){ 57 | helper.getSearchResults(req.query, res); 58 | }); 59 | 60 | //path for obtaining detailed room info 61 | app.get('/api/room/:roomID', function(req, res){ 62 | helper.findRoom(req.params.roomID, res); 63 | }); 64 | 65 | //path for searching for available times 66 | app.get('/api/dates?', function(req, res){ 67 | helper.findDates(req.query.roomID, req.query.startTime, req.query.endTime, res); 68 | }); 69 | 70 | //path for adding a room to favorites 71 | app.post('/api/users/favorites/addfavorites', function(req, res){ 72 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 73 | helper.addFavorite(decoded.username, req.body.roomID, res); 74 | }); 75 | 76 | //path for fetching a user's favorites 77 | app.get('/api/users/favorites', function(req, res){ 78 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 79 | console.log(decoded); 80 | helper.getFavorites(decoded.username, res); 81 | }); 82 | 83 | //path for deleting a room from favorites 84 | app.post('/api/users/favorites/deletefavorites', function(req, res){ 85 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 86 | helper.deleteFavorite(decoded.username, req.body.roomID, res); 87 | }); 88 | 89 | //path for viewing a user's bookings 90 | app.get('/api/users/bookings', function(req, res){ 91 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 92 | helper.getBookings(decoded.username, res); 93 | }); 94 | 95 | //path for processing payments 96 | app.post('/api/payments', function(req, res){ 97 | var decoded = jwt.decode(req.headers.authorization.slice(7)); 98 | var stripeToken = req.body; 99 | var charge = stripe.charges.create({ 100 | amount: stripeToken.price, 101 | currency: "usd", 102 | source: stripeToken.result, 103 | description: "Payment for venue booking" 104 | }, function(err, charge) { 105 | if (err && err.type === 'StripeCardError') { 106 | console.log(JSON.stringify(err, null, 2)); 107 | } 108 | }); 109 | helper.createBooking(decoded.username, req.body.roomID, req.body.menuID, req.body.startTime, req.body.endTime, req.body.eventType, req.body.guests, res); 110 | }); 111 | 112 | app.listen(port); 113 | -------------------------------------------------------------------------------- /server/config/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craigsmith24/Private-Table/916c484520d35f040fa0fae43c8a2f1ec695f9bf/server/config/.DS_Store -------------------------------------------------------------------------------- /server/config/dbConfig.js: -------------------------------------------------------------------------------- 1 | var Sequelize = require('sequelize'); 2 | var fs = require('fs'); 3 | 4 | if (process.env.DATABASE_URL) { 5 | var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); 6 | var sequelize = new Sequelize(match[5], match[1], match[2], { 7 | dialect: 'postgres', 8 | protocol: 'postgres', 9 | port: match[4], 10 | host: match[3], 11 | logging: console.log, 12 | dialectOptions: { 13 | ssl: true 14 | } 15 | }); 16 | } else { 17 | var username = String(fs.readFileSync(__dirname + '/databaseusername')); 18 | var password = String(fs.readFileSync(__dirname + '/databasepassword')); 19 | var databaseName = String(fs.readFileSync(__dirname + '/databasename')); 20 | var host = String(fs.readFileSync(__dirname + '/host')); 21 | var sequelize = new Sequelize(databaseName, username, password, { 22 | dialect: 'postgres', 23 | protocol: 'postgres', 24 | port: '5432', 25 | host: host, 26 | logging: console.log, 27 | dialectOptions: { 28 | ssl: true 29 | } 30 | }); 31 | } 32 | 33 | module.exports = sequelize; 34 | 35 | 36 | -------------------------------------------------------------------------------- /server/models/amenities.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | var Amenity = db.define('Amenity', 5 | { 6 | name: Sequelize.STRING 7 | } 8 | ); 9 | 10 | db.sync(); 11 | 12 | module.exports = Amenity; -------------------------------------------------------------------------------- /server/models/associations.js: -------------------------------------------------------------------------------- 1 | var Booking = require('./bookings.js'); 2 | var Images = require('./images.js'); 3 | var Venue = require('./venues.js'); 4 | var Room = require('./rooms.js'); 5 | var Menu = require('./menus.js'); 6 | var MenuItem = require('./menuItems.js'); 7 | var db = require('../config/dbConfig.js'); 8 | var CourseCombination = require('./courseCombinations.js'); 9 | var CoursesInMenu = require('./coursesInMenus.js'); 10 | var RoomAmenity = require('./roomAmenities.js'); 11 | var Amenity = require('./amenities.js'); 12 | var User = require('./users.js'); 13 | var Favorite = require('./favorites.js'); 14 | var Layout = require ('./layouts.js'); 15 | var LayoutsOffered = require ('./layoutsOffered.js'); 16 | var Service = require ('./services.js'); 17 | var MenusOffered = require ('./menusOffered.js'); 18 | 19 | 20 | //relationship between venue and room 21 | Venue.hasMany(Room, {foreignKey: 'parentVenue'}); 22 | Room.belongsTo(Venue, {foreignKey: 'parentVenue'}); 23 | 24 | // relationship between room and image 25 | Room.hasMany(Images, {foreignKey:'pictureOf'}); 26 | Images.belongsTo(Room, {foreignKey: 'pictureOf'}); 27 | 28 | // relationship between booking and room 29 | Room.hasMany(Booking, {foreignKey:'room'}); 30 | Booking.belongsTo(Room, {foreignKey: 'room'}); 31 | 32 | // relationship between room and roomAmenity 33 | Room.hasMany(RoomAmenity, {foreignKey:'room_ID'}); 34 | RoomAmenity.belongsTo(Room, {foreignKey: 'room_ID'}); 35 | 36 | // relationship between roomAmenity and amenity 37 | Amenity.hasMany(RoomAmenity, {foreignKey:'amenities_ID'}); 38 | RoomAmenity.belongsTo(Amenity, {foreignKey: 'amenities_ID'}); 39 | 40 | // relationship between coursesInMenu and courseCombination 41 | CourseCombination.hasMany(CoursesInMenu, {foreignKey:'courseCombination_ID'}); 42 | CoursesInMenu.belongsTo(CourseCombination, {foreignKey: 'courseCombination_ID'}); 43 | 44 | // relationship between coursesInMenu and menu 45 | Menu.hasMany(CoursesInMenu, {foreignKey:'menu_ID'}); 46 | CoursesInMenu.belongsTo(Menu, {foreignKey: 'menu_ID'}); 47 | 48 | // relationship between courseCombination and menuItem 49 | MenuItem.hasMany(CourseCombination, {foreignKey:'menuItem_ID'}); 50 | CourseCombination.belongsTo(MenuItem, {foreignKey: 'menuItem_ID'}); 51 | 52 | //relationship between user and booking 53 | User.hasMany(Booking, {foreignKey:'booker'}); 54 | Booking.belongsTo(User, {foreignKey: 'booker'}); 55 | 56 | // relationship between service and room 57 | Room.hasMany(Service, {foreignKey:'room_ID'}); 58 | Service.belongsTo(Room, {foreignKey: 'room_ID'}); 59 | 60 | // relationship between layoutsOffered and layout 61 | Layout.hasMany(LayoutsOffered, {foreignKey:'layout_ID'}); 62 | LayoutsOffered.belongsTo(Layout, {foreignKey: 'layout_ID'}); 63 | 64 | // relationship between layoutsOffered and room 65 | Room.hasMany(LayoutsOffered, {foreignKey:'room_ID'}); 66 | LayoutsOffered.belongsTo(Room, {foreignKey: 'room_ID'}); 67 | 68 | // relationship between menusOffered and menu 69 | Menu.hasMany(MenusOffered, {foreignKey:'menu_ID'}); 70 | MenusOffered.belongsTo(Menu, {foreignKey: 'menu_ID'}); 71 | 72 | // relationship between menusOffered and room 73 | Room.hasMany(MenusOffered, {foreignKey:'room_ID'}); 74 | MenusOffered.belongsTo(Room, {foreignKey: 'room_ID'}); 75 | 76 | // relationship between favorite and user 77 | User.hasMany(Favorite, {foreignKey:'user_ID'}); 78 | Favorite.belongsTo(User, {foreignKey: 'user_ID'}); 79 | 80 | // relationship between favorite and room 81 | Room.hasMany(Favorite, {foreignKey:'room_ID'}); 82 | Favorite.belongsTo(Room, {foreignKey: 'room_ID'}); 83 | 84 | 85 | db.sync(); 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /server/models/bookings.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Room = require('./rooms.js'); 4 | var User = require('./users.js'); 5 | 6 | var Booking = db.define('Booking', 7 | { 8 | start: Sequelize.DATE, 9 | end: Sequelize.DATE, 10 | room: Sequelize.INTEGER, 11 | booker: Sequelize.INTEGER 12 | } 13 | ); 14 | 15 | db.sync(); 16 | 17 | module.exports = Booking; -------------------------------------------------------------------------------- /server/models/courseCombinations.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var MenuItem = require('./menuItems.js'); 4 | 5 | var CourseCombination = db.define('CourseCombination', 6 | { 7 | courseName: Sequelize.STRING, 8 | menuItem_ID: Sequelize.INTEGER 9 | } 10 | ); 11 | 12 | db.sync(); 13 | 14 | module.exports = CourseCombination; -------------------------------------------------------------------------------- /server/models/coursesInMenus.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var CourseCombination = require('./courseCombinations.js'); 4 | var Menu = require('./menus.js'); 5 | 6 | var CoursesInMenu = db.define('CoursesInMenu', 7 | { 8 | courseCombination_ID: Sequelize.INTEGER, 9 | courseOrder: Sequelize.INTEGER, 10 | menu_ID: Sequelize.INTEGER 11 | } 12 | ); 13 | 14 | db.sync(); 15 | 16 | module.exports = CoursesInMenu; 17 | 18 | -------------------------------------------------------------------------------- /server/models/favorites.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Room = require('./rooms.js'); 4 | var User = require('./users.js'); 5 | 6 | 7 | 8 | var Favorite = db.define('Favorite', 9 | { 10 | user_ID: Sequelize.INTEGER, 11 | room_ID: Sequelize.INTEGER 12 | } 13 | ); 14 | 15 | db.sync(); 16 | 17 | module.exports = Favorite; -------------------------------------------------------------------------------- /server/models/images.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Room = require('./rooms.js'); 4 | 5 | var Images = db.define('Images', 6 | { 7 | source: Sequelize.STRING, 8 | pictureOf: Sequelize.INTEGER 9 | } 10 | ); 11 | 12 | db.sync(); 13 | 14 | module.exports = Images; -------------------------------------------------------------------------------- /server/models/layouts.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | 5 | 6 | var Layout = db.define('Layout', 7 | { 8 | name: Sequelize.STRING, 9 | capacity: Sequelize.INTEGER 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = Layout; -------------------------------------------------------------------------------- /server/models/layoutsOffered.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Layout = require('./layouts.js'); 4 | var Room = require('./rooms.js'); 5 | 6 | var LayoutsOffered = db.define('LayoutsOffered', 7 | { 8 | layout_ID: Sequelize.INTEGER, 9 | room_ID: Sequelize.INTEGER 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = LayoutsOffered; -------------------------------------------------------------------------------- /server/models/menuItems.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | var MenuItem = db.define('MenuItem', 5 | { 6 | name: Sequelize.STRING, 7 | description: Sequelize.TEXT, 8 | minGuests: Sequelize.INTEGER, 9 | serviceStyle: Sequelize.STRING 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = MenuItem; -------------------------------------------------------------------------------- /server/models/menus.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | var Menu = db.define('Menu', 5 | { 6 | name: Sequelize.STRING, 7 | price: Sequelize.INTEGER, 8 | banquet: Sequelize.BOOLEAN, 9 | reception: Sequelize.BOOLEAN, 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = Menu; -------------------------------------------------------------------------------- /server/models/menusOffered.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Room = require('./rooms.js'); 4 | var Menu = require('./menus.js'); 5 | 6 | var MenusOffered = db.define('MenusOffered', 7 | { 8 | menu_ID: Sequelize.INTEGER, 9 | room_ID: Sequelize.INTEGER 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = MenusOffered; -------------------------------------------------------------------------------- /server/models/roomAmenities.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Room = require('./rooms.js'); 4 | var Amenity = require('./amenities.js'); 5 | 6 | var RoomAmenity = db.define('RoomAmenity', 7 | { 8 | amenities_ID: Sequelize.INTEGER, 9 | room_ID: Sequelize.INTEGER 10 | } 11 | ); 12 | 13 | db.sync(); 14 | 15 | module.exports = RoomAmenity; -------------------------------------------------------------------------------- /server/models/rooms.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var Venue = require('./venues.js'); 4 | 5 | var Room = db.define('Room', 6 | { 7 | roomName: Sequelize.STRING, 8 | type: Sequelize.STRING, 9 | size: Sequelize.INTEGER, 10 | description: Sequelize.TEXT, 11 | banquet: Sequelize.BOOLEAN, 12 | banquetCapacity: Sequelize.INTEGER, 13 | reception: Sequelize.BOOLEAN, 14 | receptionCapacity: Sequelize.INTEGER, 15 | minSpend: Sequelize.INTEGER, 16 | roomRentalFee: Sequelize.INTEGER, 17 | eventDuration: Sequelize.INTEGER, 18 | durationOverageFee: Sequelize.INTEGER, 19 | parentVenue: Sequelize.INTEGER, 20 | cleaningFee: Sequelize.INTEGER, 21 | houseRules: Sequelize.STRING, 22 | cancelPolicy: Sequelize.STRING, 23 | heroImage: Sequelize.STRING 24 | } 25 | ); 26 | 27 | db.sync(); 28 | 29 | module.exports = Room; 30 | -------------------------------------------------------------------------------- /server/models/services.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | var Service = db.define('Service', 5 | { 6 | name: Sequelize.STRING, 7 | room_ID: Sequelize.INTEGER, 8 | description: Sequelize.TEXT, 9 | price: Sequelize.INTEGER, 10 | pricedPer: Sequelize.STRING, 11 | limit: Sequelize.INTEGER, 12 | limitOverageFee: Sequelize.INTEGER, 13 | limitOveragePricedPer: Sequelize.STRING 14 | } 15 | ); 16 | 17 | db.sync(); 18 | 19 | module.exports = Service; -------------------------------------------------------------------------------- /server/models/users.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | var bcrypt = require('bcrypt-nodejs'); 4 | 5 | var User = db.define('User', 6 | { 7 | 8 | username: Sequelize.STRING, 9 | email: Sequelize.STRING, 10 | password: Sequelize.STRING 11 | 12 | 13 | }, 14 | 15 | { 16 | instanceMethods: { 17 | 18 | setPassword : function(newPassword, callback) { 19 | var self = this; 20 | bcrypt.hash(newPassword, null, null, function(err, hash){ 21 | if (!err) { 22 | self.update({password: hash}).then(callback); 23 | } 24 | }); 25 | }, 26 | 27 | checkPassword: function(attemptedPassword) { 28 | return bcrypt.compareSync(attemptedPassword, this.get('password')); 29 | } 30 | } 31 | } 32 | ) 33 | 34 | db.sync(); 35 | 36 | module.exports = User; 37 | -------------------------------------------------------------------------------- /server/models/venues.js: -------------------------------------------------------------------------------- 1 | var db = require('../config/dbConfig.js'); 2 | var Sequelize = require('sequelize'); 3 | 4 | var Venue = db.define('Venue', 5 | { 6 | venueName: Sequelize.STRING, 7 | address: Sequelize.STRING, 8 | city: Sequelize.STRING, 9 | state: Sequelize.STRING, 10 | zip: Sequelize.INTEGER, 11 | phone: Sequelize.STRING, 12 | fax: Sequelize.STRING, 13 | url: Sequelize.STRING, 14 | email: Sequelize.STRING, 15 | openTime: Sequelize.TIME, 16 | closeTime: Sequelize.TIME, 17 | contactFirstName: Sequelize.STRING, 18 | contactLastName: Sequelize.STRING, 19 | contactImage: Sequelize.STRING, 20 | contactTitle: Sequelize.STRING, 21 | taxRate: Sequelize.DECIMAL(10,2), 22 | autogratRate: Sequelize.DECIMAL, 23 | autogratMinGuests: Sequelize.INTEGER, 24 | cuisineType: Sequelize.STRING, 25 | houseRules: Sequelize.STRING, 26 | cancelPolicy: Sequelize.STRING, 27 | menuLeadTime: Sequelize.INTEGER 28 | } 29 | ); 30 | 31 | db.sync(); 32 | 33 | module.exports = Venue; 34 | 35 | -------------------------------------------------------------------------------- /test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 2, 11 | "latedef": true, 12 | "newcap": true, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "regexp": true, 16 | "undef": true, 17 | "unused": true, 18 | "strict": true, 19 | "trailing": true, 20 | "smarttabs": true, 21 | "jasmine": true, 22 | "globals": { 23 | "angular": false, 24 | "browser": false, 25 | "inject": false 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /test/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | // Generated on 2015-05-19 using 4 | // generator-karma 1.0.0 5 | 6 | module.exports = function(config) { 7 | 'use strict'; 8 | 9 | config.set({ 10 | // enable / disable watching file and executing tests whenever any file changes 11 | autoWatch: true, 12 | 13 | // base path, that will be used to resolve files and exclude 14 | basePath: '../', 15 | 16 | // testing framework to use (jasmine/mocha/qunit/...) 17 | // as well as any additional frameworks (requirejs/chai/sinon/...) 18 | frameworks: [ 19 | "jasmine" 20 | ], 21 | 22 | // list of files / patterns to load in the browser 23 | files: [ 24 | // bower:js 25 | 'bower_components/modernizr/modernizr.js', 26 | 'bower_components/jquery/dist/jquery.js', 27 | 'bower_components/angular/angular.js', 28 | 'bower_components/angular-animate/angular-animate.js', 29 | 'bower_components/angular-aria/angular-aria.js', 30 | 'bower_components/angular-cookies/angular-cookies.js', 31 | 'bower_components/angular-messages/angular-messages.js', 32 | 'bower_components/angular-resource/angular-resource.js', 33 | 'bower_components/angular-route/angular-route.js', 34 | 'bower_components/angular-sanitize/angular-sanitize.js', 35 | 'bower_components/angular-touch/angular-touch.js', 36 | 'bower_components/angular-ui-router/release/angular-ui-router.js', 37 | 'bower_components/fastclick/lib/fastclick.js', 38 | 'bower_components/jquery.cookie/jquery.cookie.js', 39 | 'bower_components/jquery-placeholder/jquery.placeholder.js', 40 | 'bower_components/foundation/js/foundation.js', 41 | 'bower_components/datetimepicker/jquery.datetimepicker.js', 42 | 'bower_components/angular-mocks/angular-mocks.js', 43 | // endbower 44 | "app/scripts/**/*.js", 45 | "test/mock/**/*.js", 46 | "test/spec/**/*.js" 47 | ], 48 | 49 | // list of files / patterns to exclude 50 | exclude: [ 51 | ], 52 | 53 | // web server port 54 | port: 8080, 55 | 56 | // Start these browsers, currently available: 57 | // - Chrome 58 | // - ChromeCanary 59 | // - Firefox 60 | // - Opera 61 | // - Safari (only Mac) 62 | // - PhantomJS 63 | // - IE (only Windows) 64 | browsers: [ 65 | "PhantomJS" 66 | ], 67 | 68 | // Which plugins to enable 69 | plugins: [ 70 | "karma-phantomjs-launcher", 71 | "karma-jasmine" 72 | ], 73 | 74 | // Continuous Integration mode 75 | // if true, it capture browsers, run tests and exit 76 | singleRun: false, 77 | 78 | colors: true, 79 | 80 | // level of logging 81 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 82 | logLevel: config.LOG_INFO, 83 | 84 | // Uncomment the following lines if you are using grunt's server to run the tests 85 | // proxies: { 86 | // '/': 'http://localhost:9000/' 87 | // }, 88 | // URL root prevent conflicts with the site root 89 | // urlRoot: '_karma_' 90 | }); 91 | }; 92 | -------------------------------------------------------------------------------- /test/spec/controllers/about.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('Controller: AboutCtrl', function () { 4 | 5 | // load the controller's module 6 | beforeEach(module('privateTableApp')); 7 | 8 | var AboutCtrl, 9 | scope; 10 | 11 | // Initialize the controller and a mock scope 12 | beforeEach(inject(function ($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | AboutCtrl = $controller('AboutCtrl', { 15 | $scope: scope 16 | }); 17 | })); 18 | 19 | it('should attach a list of awesomeThings to the scope', function () { 20 | expect(scope.awesomeThings.length).toBe(3); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/spec/controllers/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('Controller: MainCtrl', function () { 4 | 5 | // load the controller's module 6 | beforeEach(module('privateTableApp')); 7 | 8 | var MainCtrl, 9 | scope; 10 | 11 | // Initialize the controller and a mock scope 12 | beforeEach(inject(function ($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | MainCtrl = $controller('MainCtrl', { 15 | $scope: scope 16 | }); 17 | })); 18 | 19 | it('should attach a list of awesomeThings to the scope', function () { 20 | expect(scope.awesomeThings.length).toBe(3); 21 | }); 22 | }); 23 | --------------------------------------------------------------------------------