diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js
index 5a9635369a..2b3ebcfe71 100644
--- a/dist/js/ionic-angular.js
+++ b/dist/js/ionic-angular.js
@@ -560,10 +560,10 @@ angular.module('ionic.ui.content', [])
angular.module('ionic.ui.list', ['ngAnimate'])
-.directive('listItem', ['$timeout', function($timeout) {
+.directive('item', ['$timeout', function($timeout) {
return {
restrict: 'E',
- require: ['?^list', '?^virtualList'],
+ require: ['?^list'],
replace: true,
transclude: true,
scope: {
@@ -574,8 +574,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
canReorder: '@',
canSwipe: '@',
buttons: '=',
+ type: '@'
},
- template: '\
+ template: '\
\
\
\
@@ -589,20 +590,6 @@ angular.module('ionic.ui.list', ['ngAnimate'])
\
',
- /*
- template: '
\
- \
- \
-
\
- \
-
\
- \
- \
-
\
- \
- \
-
\
- ',*/
link: function($scope, $element, $attr, list) {
// Grab the parent list controller
if(list[0]) {
@@ -611,6 +598,13 @@ angular.module('ionic.ui.list', ['ngAnimate'])
list = list[1];
}
+ // Add the list item type class
+ $element.addClass($attr.type || 'item-slider');
+
+ if($attr.type !== 'item-slider') {
+ $scope.canSwipe = false;
+ }
+
$scope.isEditing = false;
$scope.deleteIcon = list.scope.deleteIcon;
$scope.reorderIcon = list.scope.reorderIcon;
diff --git a/js/ext/angular/src/directive/ionicList.js b/js/ext/angular/src/directive/ionicList.js
index c5fd09d2ec..2dbbf3bbfe 100644
--- a/js/ext/angular/src/directive/ionicList.js
+++ b/js/ext/angular/src/directive/ionicList.js
@@ -3,10 +3,10 @@
angular.module('ionic.ui.list', ['ngAnimate'])
-.directive('listItem', ['$timeout', function($timeout) {
+.directive('item', ['$timeout', function($timeout) {
return {
restrict: 'E',
- require: ['?^list', '?^virtualList'],
+ require: ['?^list'],
replace: true,
transclude: true,
scope: {
@@ -17,8 +17,9 @@ angular.module('ionic.ui.list', ['ngAnimate'])
canReorder: '@',
canSwipe: '@',
buttons: '=',
+ type: '@'
},
- template: '\
+ template: '\
\
\
\
@@ -32,20 +33,6 @@ angular.module('ionic.ui.list', ['ngAnimate'])
\
',
- /*
- template: '\
- \
- \
-
\
- \
-
\
- \
- \
-
\
- \
- \
-
\
- ',*/
link: function($scope, $element, $attr, list) {
// Grab the parent list controller
if(list[0]) {
@@ -54,6 +41,13 @@ angular.module('ionic.ui.list', ['ngAnimate'])
list = list[1];
}
+ // Add the list item type class
+ $element.addClass($attr.type || 'item-slider');
+
+ if($attr.type !== 'item-slider') {
+ $scope.canSwipe = false;
+ }
+
$scope.isEditing = false;
$scope.deleteIcon = list.scope.deleteIcon;
$scope.reorderIcon = list.scope.reorderIcon;
diff --git a/js/ext/angular/test/list.html b/js/ext/angular/test/list.html
index acf6b55c85..4ba5bb714a 100644
--- a/js/ext/angular/test/list.html
+++ b/js/ext/angular/test/list.html
@@ -67,16 +67,18 @@
-
+
{{item.text}}
-
+
diff --git a/js/ext/angular/test/tabs.html b/js/ext/angular/test/tabs.html
index f7fde31dc3..1e726f0e24 100644
--- a/js/ext/angular/test/tabs.html
+++ b/js/ext/angular/test/tabs.html
@@ -60,7 +60,7 @@
Tasks
-
+
@@ -68,7 +68,7 @@
-
-
+
@@ -500,6 +500,8 @@
return false;
});
+
+