Editor - Settings - Includes - Places

This view contains places in their different hierarchies Countries, Cities y dropdown options.

Controller: placesSettingsEditorCtrl

Main Model

  • countries: bring with it all the countries of the database
  • cities: Bring all the cities of all the countries
  • dropdownoptions: It contains all the dropdown options

Models for filter

  • filterCit: used to filter cities
  • filterNeig: used to filter the dropdown options

Utility functions

  • updateCountry(country): This function is used to update the countries shown in the view
  • addCountry(country): It serves to add the country if it does not exist.
  • removeCity(city): it serves to remove a city from the database
  • showCitySettings(city): Open a modal, this mode is used to add or update the information of a city.
  • removeNeighborhood(): this function is used to delete dropdown options
  • showNeighborhoodSettings(): Open a modal, this modal serves to add or update dropdownoptions.
  • updateNeighborhood(): It is used to update dropdown option data in this view.

Example of base theme

1005
  1. Cities: If something changes here, activate the function updateCountry(country)
  2. filterCit
  3. cities: If something changes here, activate the function changeCity(city,true)
  4. removeCity(city)
  5. showCitySettings(city)
  6. showCitySettings(curCity): but this for add a new city with the model curCity
  7. `filterNeig
  8. Dropdownoptions: If something changes here, activate the function updateNeighborhood(dropdownoption)
  9. showNeighborhoodSettings(dropdownoption)
  10. removeNeighborhood(dropdownoption)
  11. showNeighborhoodSettings(dropdownoption) but this for add a new dropdownoption with the model curNeighborhood.