Commit Graph

65 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
6ebfe776bc fix(popup): Ensure popup is usable on top of a modal, closes #838 2014-03-19 10:55:54 -05:00
Andy Joslin
ae57b2b81a test($ionicScrollDelegate): remove xdescribe 2014-03-18 14:58:13 -06:00
Andy Joslin
83f4776f53 chore: remove animation & type attributes, standard controller names 2014-03-18 14:54:21 -06:00
Andy Joslin
5a0efecef6 feat($ionicScrollDelegate): rememberScrollPosition, scrollToRememberedPosition
/**
 * @ngdoc method
 * @name $ionicScrollDelegate#rememberScrollPosition
 * @description
 *
 * When this scroll area is destroyed, its last scroll position will be
 * saved using the given id.
 *
 * @param {string} id The identifier for this saved scroll position.
 */

/**
 * @ngdoc method
 * @name $ionicScrollDelegate#scrollToRememberedPosition
 * @description
 *
 * If a scroll position was remembered using the given id, loads the
 * remembered scroll position and scrolls there.
 *
 * @param {string} id The identifier for this saved scroll position.
 * @param {boolean=} shouldAnimate Whether to animate the scroll.
 */
2014-03-17 08:39:23 -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
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
Adam Bradley
7d076bd55b feat(modal): Create a modal backdrop wrapper w/ internal modal directive, closes #605 2014-03-10 22:14:55 -05:00
Adam Bradley
181269a2fe do not set a platform if unknown, closes #753 2014-03-09 22:01:38 -05:00
Adam Bradley
a491f22c1f fix(backbutton): Allow only one back button listener to run per click, closes #693 2014-03-06 15:16:49 -06:00
Adam Bradley
c99427aa92 fix(history): Separate histories and views, clear other views in clearHistory(), closes #724 2014-03-06 10:58:33 -06:00
Adam Bradley
44b31e1887 fix(actionsheet): Fix slide-up animation, closes #713 2014-03-05 16:07:59 -06:00
Adam Bradley
b593cf1be6 fix(modal): Improve slide-up/down animations, remove flickers 2014-03-04 16:44:24 -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
631208f1d8 _checkPlatforms refactor 2014-02-24 22:05:00 -06:00
Adam Bradley
04e282585f another platform testing fix 2014-02-24 15:12:00 -06:00
Adam Bradley
b051fa7c9f platform test fix 2014-02-24 14:44:59 -06:00
Adam Bradley
7a3930f6ae improve platform/version/grade fallbacks with user-agents 2014-02-24 13:42:33 -06:00
Andy Joslin
49e0dac999 feat(ionContent): use child scope instead of isolate scope
Adds new '$ionicBind' service, which takes an object containing
binding definitions (similar to angular directive isolate scope
definition).  Allows binding of any directive attribute & expressions
from a scope, letting us do normal attribute -> scope binding
without having to create isolate scopes.

Closes #555. Closes #669
2014-02-24 11:11:03 -05:00
Adam Bradley
98a86f2186 tmp test fixes for Android user-agent in saucelabs 2014-02-23 23:00:21 -06:00
Adam Bradley
fcd0fa73c4 fix(platform): Update ionic.Platform.is() to check all platforms, closes #604 2014-02-23 21:58:17 -06:00
Adam Bradley
1503cc7213 fix(actionsheet): Actionsheet in modal has pointer-events enabled, closes #660 2014-02-22 21:22:35 -06:00
Emanuel Kluge
9e942f894b fix(ionicScrollDelegate): do not error if no scrollTop/Left values
Closes #659
2014-02-21 13:35:40 -05:00
Adam Bradley
b69b40c826 feat(grade): Set grade in body class depending on platform performance
First draft of how devices play out:

.grade-a:
- iOS
- >= Android 4.4

.grade-b:
- Android >= 4 && < 4.4

.grade-c:
- Android < 4
2014-02-20 20:41:48 -06:00
Andy Joslin
2c39a21498 feat(ionic): prefix all directives with ion-
BREAKING CHANGE: All directives are now prefixed with `ion-`.

For any directive you use, add the ionic prefix.

For example, change this HTML:

```html
<tabs>
  <tab title="home" href="/tab/home">
    <content>Hello!</content>
  </tab>
</tabs>
```

To this HTML:

```
<ion-tabs>
  <ion-tab title="home" href="/tab/home">
    <ion-content>Hello!</ion-content>
  </ion-tab>
</ion-tabs>
```
2014-02-18 16:13:00 -05:00
Andy Joslin
d056ad1fef perf(animations): throttle calls to requestAnimationFrame
Closes #582
2014-02-17 17:26:34 -05:00
Adam Bradley
97f4f6eace feat(angular): Update to Angular v1.2.13, closes #600 2014-02-17 16:15:15 -06:00
Andy Joslin
70d952499a fix(ionicScrollDelegate): tapScrollToTop won't fire for button tap
Closes #557
2014-02-17 11:40:16 -05:00
Andy Joslin
9bc928f031 fix(modal): do not click buttons underneath modal 2014-02-17 10:16:03 -05:00
Andy Joslin
e1b6fd4f84 fix(scrollView): cancel scrollTop every time hash is set
Before it, only cancelled scrollTop the first time the hash was set.

Addresses #618
2014-02-17 09:10:23 -05:00
Andy Joslin
e106457e61 feat(modal): add .isShown() method to modal instances
Closes #320
2014-02-13 14:42:35 -05:00
Andy Joslin
110ff9f475 feat(modal): $broadcast 'modal.shown/hidden/removed' from parent scope
Closes #243
2014-02-13 14:40:54 -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
1c4d4a8b90 fix(browser): on first hash-set, dont set scrollTop 2014-02-11 09:44:59 -05:00
Andy Joslin
36691bbaeb feat($ionicScrollDelegate): allow anchorScroll to animate with param
Addresses #508
2014-02-11 09:16:29 -05:00
Andy Joslin
38c756b750 refactor(anchorScroll): use getElementById instead of querySelector to fix number ids
Addresses #508
2014-02-10 09:26:45 -05:00
Andy Joslin
4c9a4c0c62 refactor(anchorScroll): only get element ids under scrollEl 2014-02-09 18:06:05 -05:00
Andy Joslin
c2bbd9e96e feat($ionicScrollDelegate): add .anchorScroll() function
Scrolls to the location of element with id matching $location.hash(). If
$location.hash() is blank or the id does not exist, it will scroll to
the top.
2014-02-09 11:37:30 -05:00
Andy Joslin
dc67300547 test(angularOverrides): add tests from jqLite, pass jshint 2014-02-09 11:31:00 -05:00
Andy Joslin
ea289b81c6 fix(ionicScrollDelegate): trigger resize before scrolling to top/bottom
Closes #522
2014-02-06 09:51:35 -05:00
Andy Joslin
40fcd01e9b fix(ionicView): erase saved scroll for a view on back 2014-02-05 10:42:14 -05:00
Andy Joslin
456dc2b9f2 chore(build): more ci server automation 2014-02-04 22:33:42 -05:00
Adam Bradley
7352be9010 set major and minor platform versions in body css 2014-01-31 20:57:26 -06:00
Adam Bradley
f37b196ff8 refactor ionic.Platform methods 2014-01-31 20:36:39 -06:00
Adam Bradley
95c8ddf301 Update $ionicPlatform.ready() 2014-01-31 10:31:42 -06:00
Adam Bradley
bcee7f268b remove tests no longer needed 2014-01-24 17:21:37 -06:00
Max Lynch
766f97d94b Fixed #464 - side menu delegate 2014-01-23 12:55:40 -06:00
Max Lynch
5ded0a3708 Scroll delegate unit tests 2014-01-23 12:25:44 -06:00
Adam Bradley
5c80fc1cd9 update platform ready listeners 2014-01-16 00:25:04 -06:00