Commit Graph

511 Commits

Author SHA1 Message Date
Adam Bradley
cb602b587b fix(tap): Prevent clicks from firing after scrolling, #579 2014-04-04 12:28:42 -05: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
4f47bf24f0 fix(navClear): be sure it runs before ngClick
Closes #1047
2014-04-04 09:32: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
0c1362861d refactor ionic.tap and start writing tests 2014-04-03 13:52:48 -05:00
Andy Joslin
ad67184800 fix(refresher): get rid of flickers except on droid-4.4
Fixes #1014.
2014-04-03 11:29:08 -06:00
Andy Joslin
972579383a feat(ionNavBar): make back button animated
Closes #1030
2014-04-02 19:35:09 -06:00
Adam Bradley
66ecec7031 fix(scroll): Fix input focus when tapped, do not scroll when target is an input, closes #1020 2014-04-02 14:22:56 -05:00
Adam Bradley
5f3a1d21c6 fix(tap): Prevent multiple clicks when overriding cordova object, closes #1022 2014-04-02 09:57:16 -05:00
Adam Bradley
8eb6257be6 remove ddescribe 2014-04-01 11:07:15 -05:00
Adam Bradley
f3bd258c9e fix(tap): Prevent "clicking" when scrolling 2014-04-01 10:34:36 -05:00
Andy Joslin
ee2b76864a fix(ionicTabBar): detect if matches state in all cases
Addresses #894.
2014-04-01 08:26:54 -06:00
Andy Joslin
0db5e85266 test(ionCheckbox): update test for new template 2014-03-31 23:04:58 -06:00
Adam Bradley
2fbdebcdea fix(range): Fix range being able to slide when in a side menu, closes #318 2014-03-31 13:53:49 -05:00
Adam Bradley
441a21c494 fix(popup): Backwards compatible remove popup from DOM, closes #851 2014-03-31 11:04:23 -05:00
flmu
f847c20847 feat($ionicScrollDelegate): add scrollBy(left,top,animate) to delegate
Closes #987
2014-03-31 05:43:13 -06:00
Andy Joslin
e9933e9920 perf(delegateService): $getByHandle tiny improvement 2014-03-28 08:05:14 -06:00
Keith D. Moore
d2e54a823a feat(ionCheckbox): allow ng-disabled attribute
Closes #939.
2014-03-28 07:41:41 -06:00
Adam Bradley
9d799059ac update ionicActivator tests 2014-03-27 21:46:00 -05:00
Andy Joslin
d53eab8197 fix(ionView): do not set navbar title if no title attr set
Fixes #915

BREAKING CHANGE: Before, if you did not have a `title` attribute set on your
ion-view, it would transition into that view and erase the navbar's current
title.

Now, if your ion-view does not have a `title` attribute set, the new
view will be transitioned in, but there will be no title change.

If you wish to have a blank title on your new view, you must now
explicitly set your `ion-view`'s title attribute to an empty string.

To migrate your code, change from this:

```html
<ion-view></ion-view>
```

To this:

```html
<ion-view title=""></ion-view>
```
2014-03-27 10:51:26 -06:00
Andy Joslin
8a940148ff test(ionContent): reword to be clearer 2014-03-27 08:17:38 -06:00
Andy Joslin
a5eb48b956 fix(ionContent): do not let child scopes inherit has-* classes
Fixes #924
2014-03-27 08:16:02 -06:00
Andy Joslin
1984dd66f3 test(viewState.html): update to use $ionicNavBarDelegate
Closes #898
2014-03-27 06:58:49 -06:00
Andy Joslin
41b73abf40 fix(ionNavBar): adjust has-header if ionNavBar is hidden
Fixes #927.
2014-03-27 06:49:18 -06:00
Andy Joslin
75290a3ea0 test(ionRefresher): fix unit test 2014-03-27 05:57:57 -06:00
Andy Joslin
5c893ab81a fix(ionRefresher): do not animate pulling-text
Closes #909
2014-03-26 21:29:14 -06:00
Andy Joslin
7eff208910 test($ionicModal): s/ddescribe/describe 2014-03-26 20:56:06 -06:00
Andy Joslin
393850086f feat($ionicModal): show/hide/remove return promises for animating 2014-03-26 20:48:53 -06:00
Andy Joslin
1c8a94736b test(menuToggle): add unit tests 2014-03-26 20:28:09 -06:00
Jay Proulx
73da93d4a4 feat(ionContent): don't wrap in a .scroll element if scroll="false"
Fixes #841. Closes #897.
2014-03-26 19:18:09 -06:00
Andy Joslin
8ec7c00f59 test(list): update with sidemenu 2014-03-26 10:33:14 -06:00
Andy Joslin
c7baba5f9a style(ionRefresher): make pulling text display:block
Addresses #909
2014-03-26 08:11:01 -06:00
Andy Joslin
270d2bfea1 update ion-side-menu-content to be element everywhere 2014-03-26 07:50:54 -06:00
Andy Joslin
38700013d8 release: 1.0.0-beta.1 2014-03-25 14:38:00 -06:00
Andy Joslin
885f32a42d test(ionicView): remove ddescribe 2014-03-25 12:18:25 -06:00
Andy Joslin
4d1b13b5ad refact(ionView): do not call setTitle with initialTitle 2014-03-25 12:16:52 -06:00
Andy Joslin
3b0af6c339 test(ionNavBar): add test for $destroy() -> $hasHeader = false 2014-03-25 07:46:25 -06:00
Andy Joslin
17416d7a07 test(ionContent): add tests for has-* classNames 2014-03-25 07:45:20 -06:00
Andy Joslin
5da74bb736 sliderView: deprecate prev, add previous 2014-03-24 21:05:32 -06:00
Andy Joslin
c6dec3c472 refactor(delegates): s/getByHandle/$getByHandle for clarity 2014-03-24 20:51:14 -06:00
Andy Joslin
5567b08c4b delegates: add tabbar, update docs 2014-03-24 20:35:55 -06:00
Andy Joslin
621a355706 docs: update delegate docs to be more concise & clear 2014-03-24 19:40:10 -06:00
Andy Joslin
ffeaab5adc ionSlideBox: add $ionicSlideBoxDelegate with new features 2014-03-24 19:40:10 -06:00
Andy Joslin
1dd7675133 delegates: allow multiple delegates of same handle
Addresses #877
2014-03-24 17:29:35 -06:00
Andy Joslin
0658699338 refactor(Delegate): use forHandle method 2014-03-24 16:58:15 -06:00
Andy Joslin
c276545180 ionSideMenu: add $ionicSideMenuDelegate with new features 2014-03-24 16:48:59 -06:00
Andy Joslin
c1d2571d5e scroll: add $ionicScrollDelegate with new pattern
Addresses #877
2014-03-24 15:58:22 -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
76a5313480 fix(tap): Reset startCoordinates on touchend/mouseup, closes #874 2014-03-24 10:52:33 -05:00