Commit Graph

536 Commits

Author SHA1 Message Date
Andy Joslin
698c93fcaf fix($ionicPopup): stop race condition with show then hide
Addresses #1100.
2014-04-10 07:48:45 -06:00
Andy Joslin
eb1dee9303 fix($ionicLoading): stop race condition with show and hide
Fixes #1100.
2014-04-10 07:47:45 -06:00
Andy Joslin
1809ce2cac style(ionRefresher): pulling-text, refreshing-text default to ' '
Fixes #1052.
2014-04-09 15:17:21 -06:00
Andy Joslin
08da6f753c fix(ionInfiniteScroll): remove listener on $destroy 2014-04-09 08:34:05 -06:00
Andy Joslin
d58fff72de fix(ionInfiniteScroll): work properly if past horizontal boundaries
Fixes #1073

ion-infinite-scroll will now fire a scroll event if the user scrolls
past the left boundaries (if they exist) or the top boundaries (if they
exists).  This means infinite scroll works for vertical, horizontal, or
vertical plus horizontal scrolling situations.
2014-04-09 07:51:14 -06:00
Andy Joslin
3b2e2c9f5e refactor($ionicLoading): cleanup deprecations 2014-04-09 07:00:15 -06:00
Andy Joslin
d36a6f3ba9 refactor($ionicLoading): opts: +template,+templateUrl, deprecate content 2014-04-09 06:55:06 -06:00
Andy Joslin
c7d7dab75f refactor($ionicLoading): make sure .hide() always happens after .show()
Fixes #1085.  Thanks @graemefoster.
2014-04-09 06:41:43 -06:00
Andy Joslin
d0b47d879f test($ionicLoading): re-add missing unit tests 2014-04-08 15:00:41 -06:00
Andy Joslin
cb1a5f6228 refactor($ionicPopup): add close() to returned promise, change closing
BREAKING CHANGE: $ionicPopup.show()'s button onTap function has changed.

When using `$ionicPopup.show()`, previously a button's onTap function
would only result in closing the popup and resolving the promise if the
 `onTap(event)` function returned a truthy value.

Now, a button's onTap event will *always* close the popup and resolve
the popup's promise, no matter the return value, by default. The only
way to prevent the popup from closing is to call
`event.preventDefault()`.

Change your code from this:

```js
$ionicPopup.show({
  buttons: [{
    onTap: function(event) {
      if (!shouldClosePopup) {
        return false;
      }
    }
  }]
});
```

To this:

```js
$ionicPopup.show({
  buttons: [{
    onTap: function(event) {
      if (!shouldClosePopup) {
        event.preventDefault();
      }
    }
  }]
});
```
2014-04-08 13:52:30 -06:00
Andy Joslin
98e7e3df46 refactor($ionicLoading,$ionicPopup): factor out common code, add tests
Also fixes $ionicLoading flickering on ios7 in beta.1.
2014-04-08 13:35:02 -06:00
Adam Bradley
8af018b1fa fix(scroll): Allow scrolling when touchstart target is an input, #1078 2014-04-08 14:28:12 -05:00
Andy Joslin
92c65f367b refactor(ionList): make sure attributes sync with delegate 2014-04-08 10:27:37 -06:00
Andy Joslin
757f181931 fix(ionTab): make sure all tab-nav attributes are re-interpolated on change
Fixes #955.

Closes #1071.
2014-04-07 11:12:32 -06:00
Adam Bradley
5c300dd3e0 refactor(platform): Rename isCordova() to isWebView()
BREAKING CHANGE: ionic.Platform.isCordova() has been renamed to
ionic.Platform.isWebView()
2014-04-07 11:56:11 -05:00
Andy Joslin
c4a3d4ccbf test(navClear): remove ddescribe 2014-04-07 10:31:38 -06:00
Andy Joslin
4dffc5f6c6 fix(navClear): only set viewOptions if click leads to state change
Closes #1043
2014-04-07 10:21:00 -06:00
Andy Joslin
d6c960c2a6 feat(ionSlideBox): add pager-click attribute
Fixes #785
2014-04-07 10:21:00 -06:00
Adam Bradley
79f6b251c3 test(tap): Tests for ignoreTapInspect, recordCoordinates, isRecentTap 2014-04-07 11:07:31 -05:00
Adam Bradley
9d83b05580 test(tap): split apart ignoreSimulateClick tests 2014-04-07 10:01:53 -05:00
Adam Bradley
b7bb0db917 test(click): fix html test 2014-04-07 09:43:41 -05:00
Adam Bradley
a977332f2b fix(tap): Do not preventDefault after input focus, #1068 2014-04-07 09:43:41 -05:00
Andy Joslin
a19e3b62f8 feat($ionicModal): pass modal instance to modal.shown/modal.hidden events
Fixes #1065
2014-04-07 08:05:11 -06:00
Adam Bradley
e3c59e96a9 test(tap): add some more tests for taps 2014-04-07 00:44:29 -05:00
Adam Bradley
cf686548da fix(tap): Remove 300ms delay when tapping select elements 2014-04-05 23:43:12 -05:00
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