Skip to content

Commit

Permalink
Maps Sidepanel: Added button to go to this Spot page
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicagood committed Aug 13, 2018
1 parent 84da5ec commit cce58c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/app/spot/spot/spot-popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<ion-item ng-click='vm.copyThisSpot()'>
<i class="icon ion-ios-copy"></i> Copy this Spot
</ion-item>
<ion-item ng-hide='vm.isState("app.spotTab.spot")' ng-click='vm.goToSpot()'>
<i class="icon ion-document-text"></i> Go To this Spot Page
</ion-item>
</ion-list>
</ion-content>
</ion-popover-view>
10 changes: 10 additions & 0 deletions www/app/spot/spot/spot.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
vm.fieldChanged = fieldChanged;
vm.goBack = goBack;
vm.goToBackHistoryUrl = goToBackHistoryUrl;
vm.goToSpot = goToSpot;
vm.goToTag = goToTag;
vm.isState = isState;
vm.loadTab = loadTab;
vm.saveSpot = saveSpot;
vm.showTab = showTab;
Expand Down Expand Up @@ -410,10 +412,18 @@
vm.backHistoriesPopover.hide();
}

function goToSpot() {
$location.path('app/spotTab/' + vm.spot.properties.id + '/spot');
}

function goToTag(id) {
submit('/app/tags/' + id);
}

function isState(stateName) {
return stateName === $state.current.name;
}

function isTagChecked(tag) {
if (vm.spot) {
if (vm.stateName === 'app.spotTab.tags' || vm.stateName === 'app.spotTab.spot') {
Expand Down

0 comments on commit cce58c6

Please sign in to comment.