Commit Graph

14 Commits

Author SHA1 Message Date
Andy Joslin
cc0a4ef775 test(sideMenu2): update test to reflect changes 2014-03-17 07:48:56 -06:00
Andy Joslin
4715a118e0 refactor($ionicScrollDelegate): make it a factory from current scope
BREAKING CHANGE: $ionicScrollDelegate no longer works globally; you must
create a new instance of each time you use it.  The actual methods on
each instance of $ionicScrollDelegate are the same, however.

Change your code from this:

```js
function MyController($scope, $ionicScrollDelegate) {
  $scope.scrollTop = function() {
    $ionicScrollDelegate.scrollTop();
  };
}
```

To this:

```js
function MyController($scope, $ionicScrollDelegate) {
  var delegate = $ionicScrollDelegate($scope);
  $scope.scrollTop = function() {
    delegate.scrollTop();
  };
}
```
2014-03-17 07:21:20 -06:00
Andy Joslin
4980d09fb3 refact(ionContent): make docs match src 2014-03-11 19:34:30 -06:00
Andy Joslin
69e54fe44e chore(ionicScrollController): remove accidental test-code 2014-03-11 16:49:29 -06:00
Andy Joslin
573df56db4 feat(ionRefresher): allow custom text & icons
Closes #760

BREAKING CHANGE: on-refresh and on-refresh-opening are no longer on the
ion-content directive.  They are on the ion-refresher. In addition,
on-refresh-opening has been renamed to on-pulling.

Change your code from this:

```html
<ion-content on-refresh="onRefresh()"
  on-refresh-opening="onRefreshOpening()">
  <ion-refresher></ion-refresher>
</ion-content>
```

To this:

```html
<ion-content>
  <ion-refresher on-refresh="onRefresh()"
    on-pulling="onRefreshOpening()">
  </ion-refresher>
</ion-content>
```
2014-03-11 16:40:12 -06:00
Andy Joslin
f9766fcf16 docs(): Add docs for ionicViewState, polish other docs 2014-03-10 21:16:09 -06:00
Andy Joslin
b406305b19 refactor(ionicContent): use $-prefix for onRefresh and onScroll events
Closes #675
2014-02-25 11:18:25 -05:00
Adam Bradley
a5471aeeb5 change classList fallback for multiple args 2014-02-18 22:58:21 -06:00
Adam Bradley
42f39bbf3c remove two classNames in one call 2014-02-18 20:34:12 -06:00
Andy Joslin
a5d964734f fix(scrollView): fix error from checking device before ready 2014-02-17 11:57:20 -05: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
Andy Joslin
c119498d1b feat($ionicScrollDelegate): add scrollTo(left,top,animate) to delegate
Also moves $ionicScrollDelegate.register to $ionicScroll controller,
and makes `<scroll>` directive be registered with $ionicScrollDelegate.
2014-02-11 13:40:45 -05:00
Andy Joslin
c41e5371e7 refactor(scroll): make refresher be detected after timeout 2014-02-07 12:07:41 -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