PLACES PLUGIN: Address Is Displaying With Address
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Description of Error

When adding an address title to a location in the places plugin, the address is shown next to the address title. (See Attachment) The address should not display next to the address title.

The address title is intended to replace the actual address' text so that, for example, if the user wants to put "Click to Get Directions" instead of displaying the address, they can.

Note: the address title should also be clickable and take them to their native map to get directions.

Screenshots

https://drive.google.com/open?id=1DG0igmu_ddz2Jml44OujjZufWkjP3hhU

Context

BuildFire is a mobile app building platform that allows developers through HTML, JS and CSS to create plugins for the platform to extend mobile app functionality.

Learn more at https://buildfire.com and https://buildfire.com/developers

Prerequisites

  • NodeJS - download
  • npm
  • git
  • knowledge on how to create a pull-request on github

How to Install

BuildFire SDK npm i buildfire you may need to be admin or super user depending on your environment

  • Init SDK buildfire init this will install the SDK in a folder called BuildFireSDK
  • Navigate to folder cd BuildFireSDK
  • Clone plugin buildfire plugin clone placesPlugin from the repo https://github.com/BuildFire/placesPlugin

Run plugin locally

  • Run tester buildfire run this will run a web server on http://localhost:3030
  • in the Plugin input box enter in the name of your plugin. example: placesPlugin depending on your OS this could be case sensitive

Understanding the autonomy of a BuildFire Plugin

  • the Control: is the right hand side of the plugin meant to live in the BuildFire control panel/dashboard
  • the Widget: is the left hand side of the plugin meant to live in the mobile app to learn more click here

Submit a pull request

Additional Information

awarded to enderdba

Crowdsource coding tasks.

1 Solution

Winning solution

Hey,

You only need to comment out this part of the code, in the file "widget/templates/layouts/item-details-1.html"
In line 24 with <!-- --> like this:

<!--<p class="text-primary ellipsis margin-zero"><a ng-click="WidgetItem.openMap()" href="javaScript:void(0);" class="margin-bottom-zero text-primary ellipsis">{{WidgetItem.item.data.address.aName}}</a>-->

Also, you should replace the element in line 20 :

<div class="col-xs-8 text-left pull-left padding-right-zero margin-top-ten padding-bottom-five" ng-if="WidgetItem.item.data.addressTitle || WidgetItem.item.data.address.aName">

Check out that, the HTML tag is validating via angular that is NOT going to show unless aName or addressTitle is present, since aName is not visible in the HTML, it will render empty, you need to pull out the (OR) validation and replace the ng-ifwith this ng-if="WidgetItem.item.data.addressTitle"> so it only renders when the address title is on.

Can you submit a pull request for this? Thanks!
twalters 5 days ago
I should not submit a pull request for this. That because the address showing up in the initial state of the plugin is something they added to. I just gave the code to edit it. I can try if you want, however.
enderdba 5 days ago
Please do :) In our description, it gives the instructions on how to do that. Thanks!
twalters 4 days ago
Thanks for trying! But we were not looking to remove the address altogether, but instead, replace the address with the address title when the user enters an address title.
twalters 4 days ago
But the adress title already shows up
enderdba 4 days ago
The address is only supposed to appear if there is not an address title. If the address title is added, it should take the place of the address. NOTE: This should happen in both layouts
twalters 4 days ago
Also, can you check both layouts?
twalters 4 days ago
Yeah i can do, but please remake the bounty!
enderdba 3 days ago
I will if the solution works, I promise :)
twalters 3 days ago
It's done, please check the pull https://github.com/BuildFire/placesPlugin/pull/142 it works for all layouts, too.
enderdba 3 days ago