Commit Graph

556 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
Adam Bradley
f744d9ebcf feat(navclear): Ability to disable the next view transition and back button 2014-03-18 21:51:32 -05:00
Adam Bradley
ad86651531 created menuClose and navClear directives 2014-03-18 21:44:59 -05:00
Andy Joslin
532d473e35 feat(ion-content): watch padding attribute 2014-03-18 15:03:42 -06: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
5117d5673a refactor(ionContent): remove has-* classes
BREAKING CHANGE: ion-content's has-header/footer/tabs attributes
no longer work.

Use the classes 'has-header', 'has-subheader', 'has-footer', and
'has-tabs' to modify the positioning of the ion-content relative
to surrounding elements.

Before: `<ion-content has-header="true">`

After: `<ion-content class="has-header">`
2014-03-18 14:49:12 -06:00
Andy Joslin
7b410eaa61 refactor(ionicBar): fix controller being assigned to parent scope 2014-03-18 14:49:12 -06:00
Adam Bradley
85b69fd2c4 sideMenu menuNav directive to stop next view animation and close side-menu 2014-03-17 23:06:46 -05:00
Max Lynch
25f8829949 Cleanup whitespace 2014-03-17 19:43:38 -05:00
Max Lynch
dddc34d8d2 fix(popup): focus popup. Fixes #820 2014-03-17 19:41:36 -05:00
Andy Joslin
b630214fdf refactor(ionTabBar): remove tab.shown and tab.hidden events
Instead, use `on-select` and `on-deselect` attribute callbacks.

Alternatively, listen for $scope.$on('$destroy') in a controller inside
your tab.
2014-03-17 14:41:51 -06:00
Andy Joslin
e9bf43a813 docs: sort by groups by default 2014-03-17 14:22:16 -06:00
Andy Joslin
cdcbea3860 refactor(ionNavButtons): remove elements from bar on scope destroy 2014-03-17 12:18:08 -06:00
Andy Joslin
6662f6effd docs: simplify apis where possible 2014-03-17 11:56:21 -06:00
Andy Joslin
bd66fc8b28 docs(): remove group tag 2014-03-17 10:24:28 -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
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
aa30faf863 fix(ionTab): stop browser-tooltip from appearing due to title attr
Closes #804
2014-03-15 18:57:10 -06:00
Andy Joslin
af7515bdfe docs(ionNavBackButton): add previous title back button example 2014-03-15 13:42:10 -06:00
Andy Joslin
215b1c1ea0 feat(ionicNavBar): add getTitle() and getPreviousTitle() methods 2014-03-15 13:41:02 -06:00
Andy Joslin
9bd78efa34 docs(navigation): add navigation group 2014-03-15 13:40:40 -06:00
Andy Joslin
66d28c46b8 refactor(ionNavBackButton): make click handler use $ionicNgClick service
Closes #802
2014-03-15 11:51:16 -06: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
bef0cfe7fd chore(gulp): fix strip-debug task 2014-03-15 11:10:15 -06:00
Andy Joslin
64b98beb4b chore(): prepare for 0.9.27 - last alpha release 2014-03-15 10:50:48 -06:00
Andy Joslin
4427e8778c feat(ionTab): allow custom ngClick expression that doesnt select tab
Closes #784
2014-03-15 09:45:32 -06:00
Andy Joslin
0ffb748fc7 refactor(ionNavBackButton): make click handler use $ionicNgClick service
Closes #802
2014-03-15 09:25:05 -06:00
Andy Joslin
90f360c827 refactor(ionicTouch): factor ngClick logic out to reusable service
Addresses #802
2014-03-15 09:24:59 -06:00
Andy Joslin
12e47134cd ionicView: fix typo 2014-03-14 15:42:42 -06:00
Max Lynch
fd379de382 Fixed a spelling issue 2014-03-14 16:31:53 -05: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
880ae7dd23 Removed picture 2014-03-14 09:45:55 -05:00
Max Lynch
66eb93bf87 Updated code pen link for popup docs 2014-03-14 09:37:47 -05:00
Adam Bradley
ba2a40c845 feat(modal): On larger displays modals will be inset and centered, not full width/height, closes #783 2014-03-13 22:14:30 -05:00
Max Lynch
a30b0b7d4f feat(popup): Added popup support 2014-03-13 14:57:48 -05:00
Adam Bradley
cd1830898e ionic.views.Modal.prototype.show was not being called 2014-03-12 14:36:57 -05: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
f3ca78620e docs(ionContent): update to match new ionRefresher 2014-03-11 16:40:12 -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
762af94176 refact(ionInfiniteScroll): remove unused variable 2014-03-11 14:01:08 -06:00
Andy Joslin
5f2c32ea9b feat(ionInfiniteScroll): allow configuration of icon 2014-03-11 13:56:08 -06:00
Andy Joslin
703f68fb0b test(ionicView): update 2014-03-11 13:26:21 -06:00
Andy Joslin
e9625ded9d docs: add services, utilities 2014-03-11 13:02:36 -06:00
Andy Joslin
a8e1524ce8 refact(ionBar): interpolate title instead of binding
BREAKING CHANGE:

ionHeaderBar's title attribute is now interpolated.

Change this code: `<ion-header-bar title="myTitleVar"></ion-header-bar>`

To this code: `<ion-header-bar title="{{myTitleVar}}"></ion-header-bar>`
2014-03-11 09:54:02 -06:00
Andy Joslin
f9766fcf16 docs(): Add docs for ionicViewState, polish other docs 2014-03-10 21:16:09 -06:00