Skip to content

Commit

Permalink
add Clear function
Browse files Browse the repository at this point in the history
  • Loading branch information
berenjian committed Dec 24, 2015
1 parent 523186f commit f7cd44d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-bar class="positive">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
Expand Down
4 changes: 4 additions & 0 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ angular
user.TimeString = date.toLocaleTimeString();

}

$scope.clear = function (user){
user.TimeString = '';
}
})
;
13 changes: 4 additions & 9 deletions www/js/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,26 @@ angular
{
id: 0,
name: 'Ali Mihandoost',
lastText: 'You on your way?',
face: 'img/ben.png'
},
{
id: 1,
name: 'Max Lynx',
lastText: 'Hey, it\'s me',
name: 'Amirmahdi Berenjian',
face: 'img/max.png'
},
{
id: 2,
name: 'Adam Bradleyson',
lastText: 'I should buy a boat',
name: 'Hossein Behkamal',
face: 'img/adam.jpg'
},
{
id: 3,
name: 'Perry Governor',
lastText: 'Look at my mukluks!',
name: 'Mohammad Najafzade',
face: 'img/perry.png'
},
{
id: 4,
name: 'Mike Harrington',
lastText: 'This is wicked good ice cream.',
name: 'Ghasem Sadeghi',
face: 'img/mike.png'
}
]
Expand Down
8 changes: 4 additions & 4 deletions www/templates/userlist.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<ion-view view-title="User List">
<ion-view view-title="User List" class="positive">
<ion-content>
<ion-list>

<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="user in userList" type="item-text-wrap" ng-click="enter(user)" ng-class="{'user-entered': user.TimeString}">
<img ng-src="{{user.face}}" />
<h2 ng-bind="user.name"></h2>
<p ng-show="user.TimeString" ng-bind-template="Enter : {{user.TimeString}}"></p>
<!-- chera ng-show va ng-bind ? --><p ng-show="user.TimeString" ng-bind-template="Enter : {{user.TimeString}}"></p>
<i class="icon ion-chevron-right icon-accessory"></i>

<ion-option-button class="button-assertive">
Test
<ion-option-button class="button-assertive" ng-click="clear(user)">
Clear Time
</ion-option-button>
</ion-item>
</ion-list>
Expand Down

0 comments on commit f7cd44d

Please sign in to comment.