-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix location editing: place marker for previous location T1397
Summary: - Better isolation on leaflet directive scope - Update marker and center using scope vars instead of accessing the map directly - Init the map with current location markers on it Test Plan: Go to a post (ie. posts/1) Click Edit Check the previous location is shown on the location editor Edit location(s) and save post Check location was saved Reviewers: aMoniker, spaudanjo Maniphest Tasks: T1397 Differential Revision: https://phabricator.ushahidi.com/D698
- Loading branch information
Showing
4 changed files
with
52 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<div class="input-location"> | ||
<div class="input-group"> | ||
<input class="form-control" name="{{attribute.key}}" type="text" placeholder="Enter a location.." ng-model="searchLocationTerm" ng-required="attribute.required"> | ||
<input class="form-control" name="{{name}}" type="text" placeholder="Enter a location.." ng-model="searchLocationTerm" ng-required="required"> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-info" ng-click="searchLocation($event)" translate>location.search</button> | ||
</span> | ||
</div> | ||
<leaflet id="{{attribute.key}}" markers="markers" center="center" height="265px" width="100%"></leaflet> | ||
<leaflet id="{{id}}-map" markers="markers" center="center" height="265px" width="100%"></leaflet> | ||
<p translate>location.click_map</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters