mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
remove refresh code from list
This commit is contained in:
31
dist/js/ionic-angular.js
vendored
31
dist/js/ionic-angular.js
vendored
@@ -900,10 +900,6 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
canSwipe: '@',
|
||||
showDelete: '=',
|
||||
showReorder: '=',
|
||||
hasPullToRefresh: '@',
|
||||
onRefresh: '&',
|
||||
onRefreshOpening: '&',
|
||||
refreshComplete: '=',
|
||||
onDelete: '&',
|
||||
onReorder: '&',
|
||||
optionButtons: '&',
|
||||
@@ -919,34 +915,11 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
},
|
||||
|
||||
link: function($scope, $element, $attr) {
|
||||
var lv = new ionic.views.ListView({
|
||||
$scope.listView = new ionic.views.ListView({
|
||||
el: $element[0],
|
||||
listEl: $element[0].children[0],
|
||||
hasPullToRefresh: ($scope.hasPullToRefresh !== 'false'),
|
||||
onRefresh: function() {
|
||||
$scope.onRefresh();
|
||||
$scope.$parent.$broadcast('scroll.onRefresh');
|
||||
},
|
||||
onRefreshOpening: function(amt) {
|
||||
$scope.onRefreshOpening({amount: amt});
|
||||
$scope.$parent.$broadcast('scroll.onRefreshOpening', amt);
|
||||
},
|
||||
onReorder: function(el, oldIndex, newIndex) {
|
||||
$scope.$apply(function() {
|
||||
$scope.onReorder({el: el, start: oldIndex, end: newIndex});
|
||||
});
|
||||
}
|
||||
listEl: $element[0].children[0]
|
||||
});
|
||||
|
||||
$scope.listView = lv;
|
||||
|
||||
if($attr.refreshComplete) {
|
||||
$scope.refreshComplete = function() {
|
||||
lv.doneRefreshing();
|
||||
$scope.$parent.$broadcast('scroll.onRefreshComplete');
|
||||
};
|
||||
}
|
||||
|
||||
if($attr.animation) {
|
||||
$element[0].classList.add($attr.animation);
|
||||
}
|
||||
|
||||
31
js/ext/angular/src/directive/ionicList.js
vendored
31
js/ext/angular/src/directive/ionicList.js
vendored
@@ -102,10 +102,6 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
canSwipe: '@',
|
||||
showDelete: '=',
|
||||
showReorder: '=',
|
||||
hasPullToRefresh: '@',
|
||||
onRefresh: '&',
|
||||
onRefreshOpening: '&',
|
||||
refreshComplete: '=',
|
||||
onDelete: '&',
|
||||
onReorder: '&',
|
||||
optionButtons: '&',
|
||||
@@ -121,34 +117,11 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
},
|
||||
|
||||
link: function($scope, $element, $attr) {
|
||||
var lv = new ionic.views.ListView({
|
||||
$scope.listView = new ionic.views.ListView({
|
||||
el: $element[0],
|
||||
listEl: $element[0].children[0],
|
||||
hasPullToRefresh: ($scope.hasPullToRefresh !== 'false'),
|
||||
onRefresh: function() {
|
||||
$scope.onRefresh();
|
||||
$scope.$parent.$broadcast('scroll.onRefresh');
|
||||
},
|
||||
onRefreshOpening: function(amt) {
|
||||
$scope.onRefreshOpening({amount: amt});
|
||||
$scope.$parent.$broadcast('scroll.onRefreshOpening', amt);
|
||||
},
|
||||
onReorder: function(el, oldIndex, newIndex) {
|
||||
$scope.$apply(function() {
|
||||
$scope.onReorder({el: el, start: oldIndex, end: newIndex});
|
||||
});
|
||||
}
|
||||
listEl: $element[0].children[0]
|
||||
});
|
||||
|
||||
$scope.listView = lv;
|
||||
|
||||
if($attr.refreshComplete) {
|
||||
$scope.refreshComplete = function() {
|
||||
lv.doneRefreshing();
|
||||
$scope.$parent.$broadcast('scroll.onRefreshComplete');
|
||||
};
|
||||
}
|
||||
|
||||
if($attr.animation) {
|
||||
$element[0].classList.add($attr.animation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user