Commit Graph

217 Commits

Author SHA1 Message Date
Andy Joslin
dbe4e3901d feat(ionic): remove all delegates
BREAKING CHANGE: $ionicScrollDelegate, $ionicSlideBoxDelegate, and
$ionicSideMenuDelegate have been removed.

  - $ionicScrollDelegate has been changed to $ionicScrollController.
    Documentation:
    [ionContent](
    http://ajoslin.github.io/docs/nightly/api/directive/ionContent),
    [ionScroll](
    http://ajoslin.github.io/docs/nightly/api/directive/ionScroll)

    Change your code from this:

    ```html
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope, $ionicScrollDelegate) {
      $scope.scrollBottom = function() {
        $ionicScrollDelegate.scrollBottom();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see docs -->
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.scrollBottom = function() {
        $scope.$ionicScrollController.scrollBottom();
      };
    }
    ```

  - $ionicSideMenuDelegate has been changed to
    $ionicSideMenusController. Documentation:
    [ionSideMenus](http://ajoslin.github.io/docs/nightly/api/directive/ionSideMenus)

    Change your code from this:

    ```html
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope, $ionicSideMenuDelegate) {
      $scope.toggleLeftMenu = function() {
        $ionicSideMenuDelegate.toggleLeft();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see documentation -->
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.toggleLeftMenu = function() {
        $scope.$ionicSideMenuController.toggleLeft();
      };
    }
    ```

  - $ionicSlideBoxDelegate has been removed and upgraded to
    $ionicSlideBoxController. It had only one method that
    was unneeded.  [Documentation](
    http://ajoslin.github.io/docs/nightly/api/directive/ionSlideBox)
2014-03-19 11:51:07 -06:00
Adam Bradley
8c55e280ba fix scrolling through list causes "active" class on items 2014-03-17 13:47:04 -05:00
Max Lynch
d5a695757a fix(scrollView): show bar with mouse wheel. Fixes #809 2014-03-16 21:39:40 -05:00
Max Lynch
cb686636cd fix(scrollView): don't show bars if not scrolling. Fixes #805 2014-03-16 21:24:52 -05:00
Andy Joslin
87a25a8bff feat(ionNavBar,ionHeaderBar): use declarative syntax
BREAKING CHANGE:

navBar is majorly different.  Manually write this when changelog is
released.  Add link to docs.
2014-03-15 11:49:49 -06:00
Andy Joslin
8619d5e8ec docs(): add groups by topic 2014-03-14 15:14:16 -06:00
Andy Joslin
bfcfae3747 feat(ionNavBar,ionHeaderBar): use declarative syntax
BREAKING CHANGE:

navBar is majorly different.  Manually write this when changelog is
released.  Add link to docs.
2014-03-14 13:06:10 -06:00
Max Lynch
a30b0b7d4f feat(popup): Added popup support 2014-03-13 14:57:48 -05:00
Andy Joslin
e9625ded9d docs: add services, utilities 2014-03-11 13:02:36 -06:00
Andy Joslin
f9766fcf16 docs(): Add docs for ionicViewState, polish other docs 2014-03-10 21:16:09 -06:00
Andy Joslin
68ddbdb439 docs(ionSlideView): add configurable model 2014-03-10 21:16:09 -06:00
Andy Joslin
1dd5527655 docs(ionicSlideBox): add documentation
Some methods were renamed solely to make the phrasing be the same across
the entire project (abbreviations versus not, and tabbar uses index
wording while this used position).

BREAKING CHANGE:

ionicSlideBox#getPos has been renamed to ionicSlideBox#currentIndex.

ionicSlideBox#numSlides has been renamed to ionicSlideBox#slidesCount.
2014-03-10 21:16:08 -06:00
Max Lynch
5d008a851e fix(listView) - fixed sticking and item drag: #722 and #761 2014-03-10 15:15:41 -05:00
Max Lynch
a51f30ea36 fix(sideMenuView) - bad logic #751 2014-03-09 16:57:48 -05:00
Andy Joslin
5faabb1847 test(ionBar): make tests instant 2014-03-08 13:10:54 -07:00
Adam Bradley
b593cf1be6 fix(modal): Improve slide-up/down animations, remove flickers 2014-03-04 16:44:24 -06:00
Max Lynch
1b2cd5c51c Removed console log 2014-03-04 13:36:35 -06:00
Max Lynch
1b096a4251 fix(ionContent) - Fixed embedded object click. Fixes #723 2014-03-04 13:35:10 -06:00
Max Lynch
2559acfb1b Fixed disabled mode 2014-03-03 11:11:12 -06:00
Max Lynch
74e8f18eec Increased threshold, fixed prevent default again 2014-03-03 11:03:14 -06:00
Max Lynch
00dbb3e2da Added requestAnimationFrame 2014-03-01 19:09:27 -06:00
Max Lynch
c53cd7f9d8 Added slight darkening during drag 2014-03-01 16:07:08 -06:00
Max Lynch
1974bb5342 Prevent parent scrolling 2014-03-01 16:00:08 -06:00
Max Lynch
9f15b9810f Fixed linter issues 2014-03-01 15:56:18 -06:00
Max Lynch
e538fa77c9 Draggable slider working 2014-03-01 15:52:47 -06:00
Adam Bradley
3e34a84abe Merge branch 'master' of https://github.com/driftyco/ionic
Conflicts:
	package.json
	release/js/ionic-angular.js
	release/js/ionic-angular.min.js
	release/js/ionic.bundle.js
	release/js/ionic.bundle.min.js
	release/version.json
2014-02-28 10:47:57 -06:00
Adam Bradley
2565000564 fix(list): Drag to expose list option buttons, closes #701 2014-02-28 10:42:08 -06:00
Tim Lancina
6754a83a6a fix headerBar title align 2014-02-27 16:32:08 -06:00
Andy Joslin
f6ec6a3c89 fix(slideBox): make does-continue attribute work continuously
Closes #575
2014-02-26 08:47:12 -05:00
Adam Bradley
a56bc9d8f3 sideMenu: only update zIndex (change the dom) when you need to 2014-02-23 00:07:50 -06:00
Adam Bradley
52671c18f9 fix(transform): Polyfill style.transform to work w/ non-webkit 2014-02-20 15:40:12 -06:00
Max Lynch
2e6f640b4a Added mousewheel support to scroll view 2014-02-19 16:30:39 -08:00
Andy Joslin
b137cb318c refactor(scrollView): remove test code 2014-02-18 10:09:45 -05:00
Andy Joslin
d056ad1fef perf(animations): throttle calls to requestAnimationFrame
Closes #582
2014-02-17 17:26:34 -05:00
Andy Joslin
bfefc69f3c feat(sideMenu): allow and watch attrs width & is-enabled 2014-02-17 13:03:17 -05:00
Andy Joslin
39ad3e0b26 fix(scrollView): allow contenteditable element to be pressed normally
Closes #421
2014-02-17 12:12:59 -05:00
Andy Joslin
a5d964734f fix(scrollView): fix error from checking device before ready 2014-02-17 11:57:20 -05:00
Christian Henke
7281e2abf0 fix(loading): make showDelay option work correctly
The 'showDelay' configuration option of $ionicLoading exists but
does not lead to any delay whatsoever.

This change implements that functionality.

Closes #562
2014-02-17 11:43:13 -05:00
Andy Joslin
749cd3829c fix(navBar): animations work properly
Starting a couple of versions ago, animations in navbar stopped working.
I took this as a chance to fix this, and ddo a refactor to make the code
more modular and testable.

Lots of manual dom manipulation was offloaded to angular directives, and
now we will not have bugs with end-user using interpolated class
attribute on their own nav-bar and overriding our own manually added
classes.
2014-02-17 09:11:52 -05:00
Andy Joslin
1aef593f07 fix(scrollView): do not stop scrolling if stopped beyond boundaries
Addresses #482
2014-02-13 10:10:53 -05:00
Andy Joslin
4cba7aa6a9 refactor(scrollView): use defaultPrevented 2014-02-12 13:02:26 -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
63b0a31970 refactor(scrollView): restart scroll if stopped, + or -
Addresses #482
2014-02-12 07:40:26 -05:00
Andy Joslin
eed6b19b51 fix(scrollView): start scroll again if it stops beyond boundaries
Addresses #482
2014-02-11 14:38:02 -05:00
Andy Joslin
fb5a0d4c81 fix(list): css: don't make last .list on page have margin-bottom
Addresses #425
2014-02-11 11:39:15 -05:00
Andy Joslin
4cc4a18c66 fix(scrollView): nested scrollViews now work independently
Closes #278
2014-02-10 09:53:40 -05:00
Andy Joslin
4c9a4c0c62 refactor(anchorScroll): only get element ids under scrollEl 2014-02-09 18:06:05 -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
UniRing
bc927e57e7 feat(tabs): allow badges on tabbar via bound badge attr 2014-02-05 11:38:06 -05:00
Andy Joslin
59c10d4f92 fix(scrollView): if bouncing past boundaries, do not stick.
Closes #482

Zynga Scroller slowly lowers the acceleration of scroll as soon as you pass the
boundaries. Once the acceleration reaches zero, zynga will 'flip' the
acceleration in the other direction and scroll back to within the
boundaries (bounce effect).

The problem is, sometimes as it slowly lowers the
acceleration it will get *near zero*, but not reach zero.  When
acceleration gets close enough to zero, zynga stops the scrolling
because it deems it 'too slow'.

Now, the scrolling acceleration will 'flip' and go back towards being
in boundaries (bounce) when the scrolling is below a certain minimum,
not just when it is below zero.
2014-02-03 12:06:33 -05:00