Mini Clone of AirBNB.com using MarionetteJS as Front End and Drupal as Rest Backend.
This implementation use the project http://enzolutions.com/projects/waterbed_rooms/ as Rest Server.
Download
$ git clone git@github.com:enzolutions/marionette-waterbed.git
Libraries used.
- MarionetteJS.
- BackboneJS.
- UnderscoreJS.
- Backbone Drupal.
- Underscore.string.
- jQRangeSlider.
- Basic Query Slider.
- jquery.storage.js.
- jquery-ui-map.
DEMO : http://enzolutions.com/marionette-waterbed/
Features
- Enable Filtering by Date Range
- Enable Filtering by Price Range
- Display Results and Position in Google Map
- Option to see details of property.
Installation
After doownload you must configure what is your Rest Server End Point, this definition must be located in file js/main.js. Check the following example
// Setup Drupal API Information
Backbone.Drupal.restEndpoint = {
root: 'http://waterbed-backend.com/api',
dataType: '.json'
};
If you want to use Waterbed outside the domain of your Backend Server, you must enable CORS in your Rest Server and enable Authentication using Backbone Drupal. See the following example.
// Define auth object, set crossDomain if is necessary
var Auth = new Backbone.Drupal.Auth({crossDomain: true});
// Optional Start authentication process for REST ADD/PUT/DELETE
// If credentials are valid the token will be use in further connection
var auth_status = Auth.login('admin', 'admin');