Commit Graph

42 Commits

Author SHA1 Message Date
Andy Joslin
90da2da66f fix(ionList): make reorder position work if list is offset
Addresses #1202
2014-04-25 07:05:27 -06:00
Andy Joslin
986dbac893 refactor(ionList): more expressive, declarative (breaking change)
Closes #1024.

BREAKING CHANGE: ion-list syntax has changed in favor of simplicity &
flexibility.

Relevant documentation:
[ionList](http://ionicframework.com/docs/api/directive/ionList),
[ionItem](http://ionicframework.com/docs/api/directive/ionItem),
[ionOptionButton](http://ionicframework.com/docs/api/directive/ionOptionButton),
[ionReorderButton](http://ionicframework.com/docs/api/directive/ionReorderButton),
[ionDeleteButton](http://ionicframework.com/docs/api/directive/ionDeleteButton),
[$ionicListDelegate](http://ionicframework.com/docs/api/service/$ionicListDelegate).

To migrate, change your code from this:

```html
<ion-list option-buttons="[{text:'hello',type:'button-positive',onTap:tap()}]"
          on-delete="onDelete(el)"
          delete-icon="ion-minus-circled"
          can-delete="true"
          show-delete="shouldShowDelete"
          on-reorder="onReorder(el, startIndex, toIndex)"
          reorder-icon="ion-navicon"
          can-reorder="true"
          show-reorder="shouldShowReorder">
  <ion-item ng-repeat="item in items">
    {{item}}
  </ion-item>
</ion-list>
```

To this:

```html
<ion-list show-delete="shouldShowDelete"
          show-reorder="shouldShowReorder">
  <ion-item ng-repeat="item in items">
    {{item}}
    <ion-delete-button class="ion-minus-circled"
                       ng-click="onDelete(item)">
    </ion-delete-button>
    <ion-reorder-button class="ion-navicon"
                       ng-click="onReorder(item, $fromIndex, $toIndex)">
    </ion-reorder-button>
    <ion-option-button class="button-positive" ng-click="tap()">
      Hello
    </ion-option-button>
  </ion-item>
</ion-list>
```
2014-04-04 10:12:16 -06:00
Andy Joslin
c653e83cec fix(ionList): only stop side menu drag if canSwipe
Closes #709
2014-03-21 07:08:26 -05:00
Adam Bradley
fe44a7d98b rename .item-drag to .item-reorder, further standardize item editing 2014-03-20 16:02:50 -05:00
Max Lynch
73b750fb37 fix(listView): only allow one swipeable item open. Fixes #763 2014-03-19 17:44:37 -05:00
Max Lynch
4e605979ec fix(listView): No slide drag if no hidden buttons. Fixes #847 2014-03-19 16:47:52 -05:00
Adam Bradley
8c55e280ba fix scrolling through list causes "active" class on items 2014-03-17 13:47:04 -05:00
Max Lynch
5d008a851e fix(listView) - fixed sticking and item drag: #722 and #761 2014-03-10 15:15:41 -05:00
Adam Bradley
2565000564 fix(list): Drag to expose list option buttons, closes #701 2014-02-28 10:42:08 -06:00
Adam Bradley
52671c18f9 fix(transform): Polyfill style.transform to work w/ non-webkit 2014-02-20 15:40:12 -06:00
Andy Joslin
d056ad1fef perf(animations): throttle calls to requestAnimationFrame
Closes #582
2014-02-17 17:26:34 -05:00
Andy Joslin
7f4b28d9da feat(list): reordering scrolls page, reordering performance better
Fixes #521. Reordering now uses webkitTransform instead of
element.style.left.  Additionally, as you drag the drag-element to the
top or bottom of the scroll-area, it will scroll it up or down as
allowed.

Refactors necessary: Common code from `<content>` and `<scroll>` moved
into js/ext/angular/controllers/ionicScrollController.  Then `<content>`
and `<scroll>` expose the controller, and `<list>` can require it.

`<list>` then uses the controller (if exists) to pass the scrollView and
scrollEl to ReorderDrag, and ReorderDrag uses that to scroll.

Additionally, js/ext/angular/test/controller/ionicScrollController tests
much functionality that was untested before.
2014-02-06 15:04:23 -05:00
Adam Bradley
2779609766 improve list animations, closes #105 2013-12-13 22:33:17 -06:00
Max Lynch
ecbafa4bb6 Fixed reordering for #319 2013-12-12 20:24:59 -06:00
Max Lynch
3f4fac80b7 Making some progress 2013-12-02 15:34:58 -06:00
Adam Bradley
e56a1a9608 added parseInt radix 2013-11-27 10:45:15 -06:00
Max Lynch
0d5bd759a1 Fixed #172 - list item reorder persistence 2013-11-22 10:39:36 -06:00
Max Lynch
262a4cc9a8 Fixed #113 - scroll bouncing regardless of window size, fixes pull to refresh 2013-11-11 16:54:01 -06:00
Max Lynch
6058afeb51 Fixed #98 - list active state 2013-11-08 17:44:24 -06:00
Max Lynch
32d0f48e21 Fixed #99 with requestAnimationFrame polyfill 2013-11-07 19:24:55 -06:00
Max Lynch
d37ec6fca2 Pull to refresh work for scroll #56 2013-11-07 17:38:35 -06:00
Max Lynch
6c4a5177be Fixed list drag subclassing #27 2013-11-07 12:55:13 -06:00
Max Lynch
afba3f1deb Removed listViewScroll, renmaed to new listView.js 2013-11-07 11:23:00 -06:00
Max Lynch
2798630b39 Scroll stuff 2013-11-06 13:01:06 -06:00
Max Lynch
aad3bb92b5 A whole lotta shit 2013-10-21 10:44:35 -05:00
Max Lynch
3ae53811a6 Basic pull to refresh shell 2013-10-16 11:22:01 -05:00
Max Lynch
1828379217 use strict 2013-10-15 14:59:26 -05:00
Max Lynch
6ac2cd3797 Progress on #37 2013-10-15 14:33:49 -05:00
Max Lynch
b0923f84b5 Fixes for tab demo 2013-10-14 16:10:59 -05:00
Max Lynch
38b8c6e4b1 List item reordering! 2013-10-14 12:05:25 -05:00
Max Lynch
c6d33bfb72 List item dragging mainly working 2013-10-14 11:59:46 -05:00
Max Lynch
07ccf9ef9a Little drag sheels 2013-10-11 17:49:31 -05:00
Max Lynch
7496347f6b Better drag interface, start of reorder dragging 2013-10-11 17:44:07 -05:00
Max Lynch
1839797a24 Fixed dragging list items 2013-10-11 16:50:14 -05:00
Max Lynch
82ba734a73 Delete item works 2013-10-10 16:29:35 -05:00
Max Lynch
92c0d2315b List item drag improvements 2013-10-10 16:21:22 -05:00
Max Lynch
dedc5e9b87 List items animation and some other shit 2013-10-10 15:08:31 -05:00
Max Lynch
57333bb714 Toderp side list 2013-10-09 15:45:55 -05:00
Max Lynch
2fafea1da3 Made animation clearer 2013-10-09 14:18:36 -05:00
Max Lynch
2da25bf5d2 Cleanup some stuff 2013-10-09 14:15:54 -05:00
Max Lynch
fb6d657f88 Swipe left swipe right yo! 2013-10-09 14:10:16 -05:00
Max Lynch
5af636989b Swipe left for list items in the works 2013-10-09 13:30:44 -05:00