Commit Graph

108 Commits

Author SHA1 Message Date
Andrew
7ef9ad74cf fix(slidebox): refactor for performance and stability
Closes #2336. Closes #2317. Closes #2290. Closes #2228. Closes #2067.
Closes #1890. Closes #1865. Closes #1850. Closes #1755. Closes #1688.
Closes #1578. Closes #1501. Closes #1353. Closes #1342. Closes #782.
Closes #416. Closes #2288.

BREAKING CHANGE: The slideBox's API has undergone many changes.

- **`<ion-slide-box>`** attributes have changed (see
  [documentation](http://ionicframework.com/docs/api/directive/ionSlideBox)):

  * `active-slide` has changed to `selected`. Change your code from
  this:

    ```html
    <ion-slide-box active-slide="activeSlideIndex"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box selected="activeSlideIndex"></ion-slide-box>
    ```

  * `does-continue` has changed to `loop`.  Change your code from this:

    ```html
    <ion-slide-box does-continue="shouldLoop"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box loop="shouldLoop"></ion-slide-box>
    ```

  * `auto-play` and `slide-interval` have been merged into `auto-play`.
  Change your code from this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="true" slide-interval="1000">
    </ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false" slide-interval="1000">
    </ion-slide-box>
    ```

    To this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="1000"></ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false"></ion-slide-box>
    ```

  * `show-pager` and `pager-click` have been removed. Use
  a child `<ion-slide-pager>` element. See the [`ion-slide-pager`
  documentation](http://ionicframework.com/docs/api/directive/ionSlidePager).
  Change your code from this:

  ```html
  <!-- pager using default click action -->
  <ion-slide-box show-pager="true">
  </ion-slide-box>
  <!-- pager with custom click action -->
  <ion-slide-box show-pager="true" pager-click="doSomething(index)">
  </ion-slide-box>
  ```

  To this:

  ```html
  <ion-slide-box>
    <!-- pager using default click action -->
    <ion-slide-pager></ion-slide-pager>
  </ion-slide-box>
  <ion-slide-box>
    <!-- pager with custom click action -->
    <ion-slide-pager ng-click="doSomething(index)"></ion-slide-pager>
  </ion-slide-box>
  ```

- **`$ionicSlideBoxDelegate`** methods have changed (see
  [documentation](http://ionicframework.com/docs/api/service/$ionicSlideBoxDelegate)):

  - `update()` has been removed. slideBox updates on its own now.

  - `stop()` has been removed. See `autoPlay()` below.

  - `start()` hass been removed. See `autoPlay()` below.

  - `slide(newIndex[, speed])` has been renamed to `select(newIndex[,
    speed]);

  - `currentIndex()` has been renamed to `selected()`.

  - `slidesCount()` has been renamed to `count()`.

  - New method `$ionicSlideBoxDelegate.autoPlay()`. Change your code
    from this:

    ```js
    // stop auto sliding
    $ionicSlideBoxDelegate.stop();
    // later... start auto sliding
    $ionicSlideBoxDelegate.start();
    ```

    To this:

    ```js
    var autoPlaySpeed = 3000; //wait 3000 seconds between changing slide
    // stop auto sliding
    $ionicSlideBoxDelegate.autoPlay(false);
    // later... start auto sliding
    $ionicSlideBoxDelegate.autoPlay(autoPlaySpeed);
    ```

  - `previous()` now returns the index of the previous slide and does
    not select. Change your code from this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.previous();
    ```

    To this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.previous() );
    ```
  - `next()` now returns the index of the next slide and does
    not select. Change your code from this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.next();
    ```

    To this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.next() );
    ```
2014-10-08 11:09:15 -06:00
Adam Bradley
7cad00837d test(viewState): minor updates 2014-09-26 08:20:31 -05:00
Perry Govier
767ce6a3b4 fix(loading): prevent spinners in loading view from causing reflows when hidden. Closes #2013 2014-09-17 13:37:51 -05:00
Perry Govier
db27fb116c feat(refresher): Improve refresher animation. Allow pulling icon rotation to be disabled. 2014-09-16 16:22:02 -05:00
Adam Bradley
74de015c22 fix(keyboard): android scroll stuck
When a state change happens, ensure the keyboard is hidden. When a
keyboard is hidden, ensure all pending timers our cleared. When
resetting scrollView, ensure it’s only doing it when it has to.
For testing: #1670 #2192
2014-09-14 23:18:57 -05:00
Adam Bradley
b69aa5485f feat(splitView): expose side menu on large viewport
Ability to keep a left menu exposed on larger viewports, such as a
landscape tablet. Added the `expose-aside-menu` attribute directive.
2014-08-26 15:00:42 -05:00
Max Lynch
853fad19b1 New transition styles 2014-08-24 15:08:30 -05:00
Andrew
5d06c4aef8 feat(popover): support popping from bottom or top of screen
Closes #1986
2014-08-20 12:09:08 -06:00
Perry Govier
944a92b08d feat(templateCache): automatically cache template files to prevent flicker on page navigation and improve performance
State templates are cached automatically, but you can optionally cache other templates.
```js
$ionicTemplateCahce('myNgIncludeTemplate.html');
```

Optionally disable all preemptive caching with the `$ionicConfigProvider` or individual states by setting `prefetchTemplate`
in the $state definition
```js
$ionicTemplateCahce('myNgIncludeTemplate.html');
```js
  angular.module('myApp', ['ionic'])
  .config(function($stateProvider, $ionicConfigProvider) {

    // disable preemptive template caching globally
    $ionicConfigProvider.prefetchTemplates(false);

    // disable individual states
    $stateProvider
      .state('tabs', {
        url: "/tab",
        abstract: true,
        prefetchTemplate: false,
        templateUrl: "tabs-templates/tabs.html"
      })
      .state('tabs.home', {
        url: "/home",
        views: {
          'home-tab': {
            prefetchTemplate: false,
            templateUrl: "tabs-templates/home.html",
            controller: 'HomeTabCtrl'
          }
        }
      });
  });
```
2014-08-15 15:10:19 -05:00
Andrew
8c6d5f2c96 fix(collectionRepeat): simplify item reusing process to fix rare reuse error
Closes #1777.
2014-08-13 10:30:44 -06:00
Andrew
9bfa3bd18b fix(collectionRepeat): ignore spacing of hidden elements (ion-refresher)
Closes #1970
2014-08-11 10:06:31 -04:00
Andrew
7ddb57e60b feat(collectionRepeat): other children of ion-content element fit in
Closes #1920. Closes #1866. Closes #1380.
2014-08-06 10:32:40 -06:00
Adam Bradley
c1215aa300 feat(popover): created popovers 2014-07-31 14:43:29 -05:00
Andrew
537b29d0bb fix(toggle): fix ngChange being reported before model changes
Closes #1349, #1741

BREAKING CHANGE:

ion-toggle no longer has an isolate scope.
This will break your toggle only if you were relying upon the toggle
having an isolate scope: if you were referencing `$parent.value` as
the ng-disabled attribute, for example.

Change your code from this:

<ion-toggle ng-disabled="{{$parent.isDisabled}}"></ion-toggle>

To this:

<ion-toggle ng-disabled="{{isDisabled}}"></ion-toggle>
2014-07-10 23:51:55 -06:00
Perry Govier
bb6976ad54 feat(tab): options 'hidden' attribute for tabs. Closes #1666, #1673 2014-07-09 17:10:43 -05:00
Andrew
4f10a72306 fix(list): make reorder/delete button animation work well on all devices 2014-07-08 11:32:43 -06:00
Andrew
ed4f22889e feat(ionModalView): ion-modal-view to wrap template instead of <div class="modal">
Closes #1668.

`<div class="modal">` will still work, but adding an `<ion-modal-view>`
element to wrap a modal template is a more "Ionic Looking" way of doing
the same thing.
2014-07-07 13:43:12 -06:00
Joilson Marques
8f8086092f feat(ionSlideBox): add 'auto-play' attr to optionally disable auto-play
Closes #1552
2014-07-07 13:14:58 -06:00
Andrew
e3db08563b fix(sideMenu): when drag-content=false, allow drag-to-close
Closes #1419
2014-07-07 12:42:51 -06:00
Andrew
22a81fe82c test(list): use timeout.flush() 2014-07-06 14:29:33 -06:00
MGMsystems
ba56bb983f feat(ionSideMenu): add edge-drag-threshold, delegate edgeDragThreshold()
Closes #1570
2014-07-06 14:22:26 -06:00
Andrew
ba1859b308 fix(ionReorderButton): stop ngRepeat:dupes error when reordering
Closes #1601.

BREAKING CHANGE: Reordering with ion-reorder-button no longer changes the order of the items in the DOM.

This change will only break your list if you were not using the
onReorder callback as described in the documentation.

Before, while reordering an element in a list Ionic would swap the
elements underneath as the reordering happened.  This sometimes caused
errors with angular's ngRepeat directive.

Now, reordering an element in a list does not change the order of
elements in the DOM.  It is expected that the end developer will use the
index changes given in the `onReorder` callback to reorder the items
in the list. This is simple to do, see the [examples in the
ionReorderButton
documentation](http://ionicframework.com/docs/api/directive/ionReorderButton/).
2014-07-06 13:39:56 -06:00
Perry Govier
889482e048 fix(tap): fire input behavior when tap/clicking file input label. Closes #1699 2014-07-02 18:27:07 -05:00
Perry Govier
704fe402e7 fix(radio): suport ng-disabled. Closes #1684 2014-06-27 15:58:17 -05:00
Perry Govier
3e6ce1831b fix(popup): if popup is taller than the window, shrink the popup body and make it scrollable. Closes #1679 2014-06-27 11:27:06 -05:00
Adam Bradley
39a2fb7892 test(viewState): move ion-nav-buttons location 2014-06-23 09:31:27 -05:00
Perry Govier
4a2296dcae fix(header): add iOS 8 support to iOS header fix. assumes all iOS will have 7 style headers. closes #1625 2014-06-18 16:16:44 -05:00
Andrew Joslin
b2585f19ca fix(collectionRepeat): fix scroll when item bigger than viewport
Closes #1621
2014-06-17 17:42:10 +00:00
Max Lynch
0e647e77af Holding off on platform tweaks just yet 2014-06-12 13:29:01 -05:00
Adam Bradley
90b4d34630 refactor(gestures): $event local and simplify init 2014-06-12 11:40:23 -05:00
Adam Bradley
a2dcaf13cc feat(gestures): added gesture directives
Closes #829
2014-06-12 10:49:07 -05:00
Andrew Joslin
cec3a42236 fix(ionNavBackButton): stop flicker when pressing back on ios 2014-06-11 16:07:38 -06:00
Max Lynch
c30be67f65 feat(platforms): Android and iOS Specific Styles and Transitions 2014-06-11 16:48:53 -05:00
Andrew Joslin
6af5d68da4 feat(collectionRepeat): huge optimization upgrades
Closes #1597
2014-06-10 17:56:35 -06:00
Allen Hernandez
1839158979 fix(test): Use HTML5 doctype on all tests. Closes #1539, #1524 2014-06-02 13:17:30 -05:00
Max Lynch
1c3dcc1922 Much better animation for ios
Fixed duration
2014-05-26 22:19:28 -05:00
Andrew Joslin
49f06f9c3d fix(scrollView): make xy scrolling work on ionScroll and ionContent
Closes #1462
2014-05-21 13:13:29 -06:00
Andrew Joslin
cc46735c82 fix(ionReorderButton): fix onReorder not triggering angular digest 2014-05-20 08:59:34 -06:00
Andrew Joslin
90e7395e62 fix($ionicLoading): do not flicker when showing long loading messages
Closes #1252
2014-05-14 10:48:43 -06:00
Andrew Joslin
df9c0747c9 fix(listView): reordering up is more responsive, fix scrolling error
Closes #1202
2014-05-14 08:39:13 -06:00
Adam Bradley
aa15f8ed99 test(remove): Remove unused contentClick.html 2014-05-13 11:30:37 -05:00
Andrew Joslin
3c15b118ca fix(activator): properly activate elements nested inside an item.
Addresses #1373.

Before: if an `<a>`, `ng-click`, or `<button>` inside of a .item,
was clicked, the activator would walk up .item and activate it.

Now:  If an `<a>`, `ng-click`, or `<button>` inside of a
.item is clicked, the activator will activate that element.

Additionally, CSS was added so `a.item-content.activated` would look
activated.
2014-05-13 08:56:37 -06:00
Andrew Joslin
a006d89612 fix(ionCheckbox): make ng-checked and ng-change work
Closes #1349. Closes #1361

BREAKING CHANGE: ion-checkbox no longer has an isolate scope.

This will break your checkbox only if you were relying upon the
checkbox having an isolate scope: if you were referencing
`$parent.value` as the ng-disabled attribute, for example.

Change your code from this:

```html
<ion-checkbox ng-disabled="{{$parent.isDisabled}}"></ion-checkbox>
```

To this:

```html
<ion-checkbox ng-disabled="{{isDisabled}}"></ion-checkbox>
```
2014-05-13 07:19:02 -06:00
Adam Bradley
addf75a011 test(input): Update input test for pointer events 2014-05-12 15:13:44 -05:00
Max Lynch
73d2eabc69 feat(animation): Javascript Animation Service 2014-05-12 13:07:58 -05:00
Max Lynch
da00f72ca3 Shouldn't have been in there 2014-05-12 13:06:42 -05:00
Adam Bradley
5f2fdfdd07 fix(textarea): Allow scroll in textarea when focused
Closes #1280
2014-05-09 12:05:45 -05:00
Andy Joslin
203734d216 style(ionRefresher): add padding-top if refreshing-text or pulling-text
Fixes #1269
2014-05-05 12:46:13 -06:00
Andy Joslin
fc8711c7d0 feat($ionicLoading): on android, no back button action while loading
Fixes #1273
2014-05-05 12:15:32 -06:00
Adam Bradley
6b3c2b929a merge keyboard-fixes 2014-05-03 22:30:21 -05:00