Skip to content

Commit

Permalink
add interstitial
Browse files Browse the repository at this point in the history
  • Loading branch information
mgasner committed Nov 22, 2017
1 parent 8b01cd0 commit f801305
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
10 changes: 10 additions & 0 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ angular.module(
}
})

.state('tab.add-4', {
url: '/add/4',
views: {
'tab-add': {
templateUrl: 'templates/tab-add-4.html',
controller: 'AddCtrl'
}
}
})

.state('tab.friends', {
url: '/friends',
views: {
Expand Down
12 changes: 10 additions & 2 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ angular.module('treephone.controllers', [])
};
})

.controller('AddCtrl', function($scope, $location, Friends, Auth, $anchorScroll) {
.controller('AddCtrl', function(
$scope, $location, Friends, Auth, $anchorScroll) {
var next, back;
if ($location.url() == '/tab/add/1') {
next = '/tab/add/2';
Expand All @@ -68,7 +69,10 @@ angular.module('treephone.controllers', [])
back = '/tab/add/2'
}

console.log(Friends.editing);
$scope.go = function ( path ) {
console.log(path);
$location.path( path );
};


$scope.addContact = function (contact) {
Expand All @@ -93,6 +97,10 @@ angular.module('treephone.controllers', [])
function () { return; }
)
};
$scope.scrollTo = function (hash) {
$location.hash(hash);
$anchorScroll();
}
})

.controller('DashCtrl', function($scope, $location, Rpc, Auth, Friends) {
Expand Down
12 changes: 5 additions & 7 deletions www/templates/tab-add-3.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<ion-view title="Add Contact" cache-view="false">
<ion-content class="padding">
<small><strong>Notes</strong></small><br />
<form ng-submit="editContact(contact)" id="notes" promise-btn>
<textarea style="background-color: #eeeeee; width: 100%;" form ="notes" rows="10" wrap="soft" ng-model="contact.freeform_notes"></textarea>
<button ion-button round type="submit">{{ rpc.pending ? '...' : 'Save' }}</button>
</form><br />
Write a quick note to help you remember who you just signed up.
Only you will see these notes -- the person you signed up won't.
<h4>Thanks!</h4>
Hand this phone back to its owner. You'll get a text
from Local Politics in a second. Open it and install the
app on your homescreen!
<button ng-click="go('/tab/add/4')">Next</buteton><br />
</ion-content>
</ion-view>
11 changes: 11 additions & 0 deletions www/templates/tab-add-4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<ion-view title="Add Contact" cache-view="false">
<ion-content class="padding">
<small><strong>Notes</strong></small><br />
<form ng-submit="editContact(contact)" id="notes" promise-btn>
<textarea style="background-color: #eeeeee; width: 100%;" form ="notes" rows="10" wrap="soft" ng-model="contact.freeform_notes"></textarea>
<button ion-button round type="submit">{{ rpc.pending ? '...' : 'Save' }}</button>
</form><br />
Write a quick note to help you remember who you just signed up.
Only you will see these notes -- the person you signed up won't.
</ion-content>
</ion-view>

0 comments on commit f801305

Please sign in to comment.