mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed on-select for list items
This commit is contained in:
6
dist/js/ionic-angular.js
vendored
6
dist/js/ionic-angular.js
vendored
@@ -719,7 +719,7 @@ angular.module('ionic.ui.content', [])
|
||||
$timeout(function() {
|
||||
sv = new ionic.views.Scroll({
|
||||
el: $element[0],
|
||||
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 40,
|
||||
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 20,
|
||||
scrollingComplete: function() {
|
||||
$scope.onScrollComplete({
|
||||
scrollTop: this.__scrollTop,
|
||||
@@ -816,7 +816,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
type: '@',
|
||||
href: '@'
|
||||
},
|
||||
template: '<a href="{{href}}" class="item">\
|
||||
template: '<a href="{{href}}" ng-click="onSelect()" class="item">\
|
||||
<div class="item-edit" ng-if="canDelete && isEditing">\
|
||||
<button class="button button-icon icon" ng-class="deleteIcon" ng-click="onDelete()"></button>\
|
||||
</div>\
|
||||
@@ -895,7 +895,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
buttons: '=',
|
||||
type: '@',
|
||||
},
|
||||
template: '<li class="item">\
|
||||
template: '<li ng-click="onSelect()" class="item">\
|
||||
<div class="item-edit" ng-if="canDelete && isEditing">\
|
||||
<button class="button button-icon icon" ng-class="deleteIcon" ng-click="onDelete()"></button>\
|
||||
</div>\
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<content id="content" push-search>
|
||||
<div id="photos" class="clearfix">
|
||||
<div class="photo" ng-repeat="photo in photos.items">
|
||||
<div class="photo" ng-repeat="photo in photos.items" ng-style="photoStyle">
|
||||
<img ng-src="{{ photo.media.m }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@ angular.module('myApp', ['ionic', 'ngResource'])
|
||||
Flickr.search(query).then(function(resp) {
|
||||
$scope.photos = resp;
|
||||
});
|
||||
}, 300);
|
||||
}, 500);
|
||||
|
||||
$scope.search = function() {
|
||||
doSearch($scope.query);
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
}
|
||||
|
||||
#photos {
|
||||
-webkit-flex-wrap: wrap;
|
||||
-webkit-flex-direction: row;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.photo {
|
||||
@@ -17,6 +16,8 @@
|
||||
.photo img {
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
max-width: 150%;
|
||||
max-height: 150%;
|
||||
}
|
||||
|
||||
#search-bar {
|
||||
@@ -34,4 +35,5 @@
|
||||
#content {
|
||||
top: 44px;
|
||||
padding-top: 45px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
2
js/ext/angular/src/directive/ionicContent.js
vendored
2
js/ext/angular/src/directive/ionicContent.js
vendored
@@ -95,7 +95,7 @@ angular.module('ionic.ui.content', [])
|
||||
$timeout(function() {
|
||||
sv = new ionic.views.Scroll({
|
||||
el: $element[0],
|
||||
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 40,
|
||||
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 20,
|
||||
scrollingComplete: function() {
|
||||
$scope.onScrollComplete({
|
||||
scrollTop: this.__scrollTop,
|
||||
|
||||
4
js/ext/angular/src/directive/ionicList.js
vendored
4
js/ext/angular/src/directive/ionicList.js
vendored
@@ -20,7 +20,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
type: '@',
|
||||
href: '@'
|
||||
},
|
||||
template: '<a href="{{href}}" class="item">\
|
||||
template: '<a href="{{href}}" ng-click="onSelect()" class="item">\
|
||||
<div class="item-edit" ng-if="canDelete && isEditing">\
|
||||
<button class="button button-icon icon" ng-class="deleteIcon" ng-click="onDelete()"></button>\
|
||||
</div>\
|
||||
@@ -99,7 +99,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
buttons: '=',
|
||||
type: '@',
|
||||
},
|
||||
template: '<li class="item">\
|
||||
template: '<li ng-click="onSelect()" class="item">\
|
||||
<div class="item-edit" ng-if="canDelete && isEditing">\
|
||||
<button class="button button-icon icon" ng-class="deleteIcon" ng-click="onDelete()"></button>\
|
||||
</div>\
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
can-delete="true"
|
||||
can-reorder="true"
|
||||
can-swipe="true"
|
||||
on-delete="deleteProject(project)"
|
||||
on-select="selectProject(project)">
|
||||
on-delete="deleteProject(item)"
|
||||
on-select="selectProject(item)">
|
||||
<i class="icon ion-email ion-primary"></i>
|
||||
{{item.text}}
|
||||
<i class="{{item.icon}}"></i>
|
||||
@@ -106,6 +106,10 @@
|
||||
$scope.items.splice($scope.items.indexOf(item), 1);
|
||||
};
|
||||
|
||||
$scope.selectProject = function(project) {
|
||||
console.log('Selected project', project);
|
||||
};
|
||||
|
||||
$scope.almostRefreshing = function() {
|
||||
console.log('HOLDING FOR REFRESH');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user