Commit Graph

56 Commits

Author SHA1 Message Date
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
Adam Bradley
3ee5ea77a6 fix(tap): Deactivate elements during scroll at the same time click is ignored, #997
Previously I disabled the activation class immediately on a touchmove,
where as the click will still work if you touchstart and touchend
within a few pixels of each other. So visually it may have looked like
the click shouldn't have worked. I just updated it so the use the same
numbers. For example, if you hold down an item and move just 5 pixels,
the item will stay active (before it wouldn't have), and the click will
fire. But at the same time, if you hold down an item, and move a larger
distance, once it realizes that it went farther than 6 pixels it'll not
allow a click to happen, AND it'll not show the item as being active.
2014-04-03 23:24:31 -05:00
Adam Bradley
f3bd258c9e fix(tap): Prevent "clicking" when scrolling 2014-04-01 10:34:36 -05:00
Andy Joslin
8ec7c00f59 test(list): update with sidemenu 2014-03-26 10:33:14 -06:00
Adam Bradley
b1a7c1990a fix(toggle): Changed tap listener to use "release", closes #882 #881 2014-03-24 16:21:44 -05:00
Adam Bradley
f1ed4b0084 fix(reorder): Prevent scroll w/ data-prevent-scroll attr on reorder btn, closes #848 2014-03-24 15:51:10 -05:00
Adam Bradley
404cc74e81 fix list item delete test 2014-03-20 14:56:45 -05:00
Adam Bradley
0027bf7612 Merge branch 'master' of https://github.com/driftyco/ionic
Conflicts:
	js/ext/angular/test/list.html
2014-03-20 14:21:54 -05:00
Adam Bradley
07c824db8d fix(item): Restructure item editing css for added reusability and organization 2014-03-20 14:18:12 -05:00
Max Lynch
7510777156 fix(listView): send index on delete. Fixes #849 2014-03-20 09:48:15 -05:00
Andy Joslin
cd5131c107 tests(): move has-* to classes for ion-content elements 2014-03-18 15:36:13 -06:00
Adam Bradley
98e7e1aa87 fix(tap): Do not trigger a click if the element was scrolled after touchstart/mousedown 2014-03-11 16:20:19 -05:00
Adam Bradley
977c1cc6e5 fix(thumbnail): Correctly apply thumbnail style to item directive, closes #509 2014-02-22 22:34:51 -06:00
Adam Bradley
e199aa8b7a cursor: pointer only for links w/ href 2014-02-20 13:55:16 -06:00
Andy Joslin
2c39a21498 feat(ionic): prefix all directives with ion-
BREAKING CHANGE: All directives are now prefixed with `ion-`.

For any directive you use, add the ionic prefix.

For example, change this HTML:

```html
<tabs>
  <tab title="home" href="/tab/home">
    <content>Hello!</content>
  </tab>
</tabs>
```

To this HTML:

```
<ion-tabs>
  <ion-tab title="home" href="/tab/home">
    <ion-content>Hello!</ion-content>
  </ion-tab>
</ion-tabs>
```
2014-02-18 16:13:00 -05:00
Andy Joslin
39ad3e0b26 fix(scrollView): allow contenteditable element to be pressed normally
Closes #421
2014-02-17 12:12:59 -05:00
Adam Bradley
8b308a1737 feat(event): Created stopEvent directive to use for certain ng-click cases, closes #550 2014-02-12 23:06:36 -06:00
Andy Joslin
9327ac71c7 fix(android): when keyboard comes up, ensure input is in view
This requires us to set fullscreen="false" in our cordova apps.

Uses the resize event to determine when the keyboard has been shown,
then broadcasts an event from the activeElement: 'scrollChildIntoView',
which is caught by the nearest parent scrollView.  The scrollView will
then see if that element is within the new device's height (since the
keyboard resizes the screen), and if not scroll it into view.

Additionally, when the keyboard resizes the screen we add a
`.hide-footer` class to the body, which will hide tabbars and footer
bars while the keyboard is opened.

For now, this is android only.

Closes #314.
2014-02-12 09:45:35 -05:00
Adam Bradley
c27427f336 fix active class for list items and complex items, closes #498 2014-02-11 17:14:13 -06:00
Andy Joslin
5d2f24cf59 chore(): make test files use ionic.bundle.js 2014-02-10 13:49:02 -05:00
Adam Bradley
a8729fb17a Remove angular-touch.js and angular-route.js references 2014-01-24 21:33:28 -06:00
Max Lynch
c949532cfd Fixed #424 - missing onReorder 2014-01-16 11:19:11 -07:00
Max Lynch
5f341635da Support for scrolling to the bottom 2014-01-16 11:10:17 -07:00
Adam Bradley
cfdefd452e update w/ ui-router 2014-01-07 19:50:39 -06:00
Max Lynch
6e62d3789a Merge pull request #329 from driftyco/328-slide-box
Revamped slide box
2013-12-16 16:24:23 -08:00
Adam Bradley
b9b842eaf9 option buttons use onTap instead of onClick 2013-12-16 10:38:56 -06:00
Max Lynch
196e015015 More slide stuff working 2013-12-16 09:52:03 -06:00
Adam Bradley
48a58d9278 removed link-item and onSelect 2013-12-13 09:52:10 -06:00
Adam Bradley
051490155c list updates 2013-12-12 20:33:37 -06:00
Adam Bradley
d9eb0440e6 list updates 2013-12-12 20:24:59 -06:00
Adam Bradley
9b2f69fd60 list updates 2013-12-12 10:46:04 -06:00
Max Lynch
0046ea2b78 Fixed on-select for list items 2013-12-09 17:17:16 -06:00
Max Lynch
d514eaa323 Fixing some old tests 2013-12-03 11:10:46 -06:00
Max Lynch
4646f5d459 Fixed #201 #215 #210 2013-11-25 14:26:34 -06:00
Max Lynch
22d10a155e LOTS OF SHIT WOW 2013-11-13 22:49:57 -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
2ffb925a97 Add list item type to directive 2013-11-11 16:09:46 -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
b3445155aa Slight tweak for item editing 2013-11-06 09:55:16 -06:00
Max Lynch
781fb241a1 Working on nav controller transitions, fixed #66 2013-11-05 20:49:18 -06:00
Max Lynch
11e0e478d1 List item updates 2013-11-04 21:24:28 -06:00
Max Lynch
aad3bb92b5 A whole lotta shit 2013-10-21 10:44:35 -05:00
Max Lynch
8d33d38c31 Hacky list refresher angular 2013-10-16 11:24:57 -05:00
Max Lynch
3ae53811a6 Basic pull to refresh shell 2013-10-16 11:22:01 -05:00
Max Lynch
1839797a24 Fixed dragging list items 2013-10-11 16:50:14 -05:00
Max Lynch
5f34979f4b Some list editing improvements 2013-10-11 16:35:00 -05:00
Max Lynch
cc40017b1a List syncing 2013-10-11 14:26:16 -05:00
Max Lynch
82ba734a73 Delete item works 2013-10-10 16:29:35 -05:00
Max Lynch
5d165a8310 Ionicons in toderp 2013-10-09 22:32:23 -05:00