Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0594d76
Fix the event propagation when there are nested draggable items.
Jan 5, 2016
e80e6af
ionRadio updated to match 1.1.1
Jan 9, 2016
1e3c63e
Complex state for ionItem. Complex state occurs when ionItem contains
Jan 9, 2016
b7ba546
Update README.md
Jan 31, 2016
5c94fe8
ionContent hasBounce attribute.
Feb 2, 2016
62f061f
Merge branch 'master' of https://github.com/JoeyAndres/meteor-ionic
Feb 2, 2016
1a484ad
Some copy/paste error from last commit
Feb 2, 2016
06818b1
ionScroll
Feb 4, 2016
f8548bf
Upgraded jandres:iscroll-zoom to 5.1.6 to stopPropagation
Feb 5, 2016
c685732
Some fixes, to ionScroll
Feb 6, 2016
9552e37
README logo
Feb 7, 2016
560f04b
Upgraded snap.js to pull more touch fixes
Feb 7, 2016
69a8517
page transitions more robust
Feb 8, 2016
823eed6
nav-view and header transitions.
Feb 10, 2016
9f938d3
ionNavBar documentation and bumped to 0.1.47-alpha1
Feb 11, 2016
613c134
transition fixes
Feb 12, 2016
2bf6a89
ionHeaderBar title fix
Feb 12, 2016
27473db
bumped to 0.1.47-alpha2
Feb 12, 2016
a09a68b
Update README.md
Feb 13, 2016
2cbe405
ionSpinner for android 4.0-4.3
Feb 13, 2016
3641190
Merge branch 'master' of https://github.com/JoeyAndres/meteor-ionic
Feb 13, 2016
b3411f6
Added a data passing standard in README.md
Feb 14, 2016
7dd01f2
ionInfiniteScroll implementation
Feb 14, 2016
d7a4b9e
Update README.md
Feb 14, 2016
620b9d3
ionLoading background fix
Feb 14, 2016
4a20dba
README Updated merge.
Feb 14, 2016
448b837
0.1.49
Feb 14, 2016
f419ad3
Android color bleeding fix
Feb 15, 2016
6e2549d
change ionFooterBar(add align and position support like ionHeaderBar)…
cyclops24 Feb 23, 2016
555065c
Merge pull request #46 from cyclops24/master
Feb 26, 2016
4d0f2ff
ionContent is now up to date.
Feb 27, 2016
560e15b
version bump to 0.1.50
Feb 27, 2016
3df4c44
bumped snapjs version from 2.0.8 to 2.0.9
Feb 27, 2016
70b40a8
Upgraded slip.js to be able to handle javascript scrollers (non-native).
Feb 27, 2016
1554bb9
Got rid of ionIcon
Mar 1, 2016
6d5894a
basic integration of ionic original "controllers"
Mar 3, 2016
ac7dcfd
Added original ionic controllers.
Mar 4, 2016
8a27cd8
ionSpinner now utilized original controller.
Mar 4, 2016
544c90d
scrollController is now more agnostic and utilized
Mar 4, 2016
fb62677
ionInfiniteScroll now modernized
Mar 5, 2016
1263bf2
All old custom lib files are deleted, making full use of ionic's
Mar 5, 2016
13f703c
ionContent and ionScroll now have proper jsScrolling, now needs nativ…
Mar 5, 2016
e7a1cfa
native scrolling
Mar 5, 2016
fc894b7
bumped version to 0.1.53
Mar 5, 2016
911e71f
Update GUIDE.md to reflect current code state
skirunman Mar 1, 2016
77dfea8
Update fourseven:scss dependency to v3.4.1
skirunman Mar 1, 2016
d9a3993
Made ionContent and ionScroll reactive again after making a carbon
Mar 5, 2016
a3c130e
added ionic service
Mar 5, 2016
6c74871
ionicGesture service is now NOT a angular service
Mar 5, 2016
afe3703
Removed jandres:snapjs package to utilize original controllers.
Mar 6, 2016
e62fc42
Fixed a bug with ionContent causing infinite recursion. I was
Mar 7, 2016
2976275
- Removed slick.js/slip.js for reordering and slidebox.
Mar 7, 2016
b8f727c
ionContent infinite recursion fix and template-extension bumped
Mar 8, 2016
b5bc7c9
ionInfiniteScroll is now working, plus scrollDelegate is now utilized
Mar 8, 2016
5edaa08
fix for the destroy routine, note to destroy __proto__ object of scop…
Mar 8, 2016
8a6a3ba
ionSideMenu*'s controller now contains the latest best practices
Mar 8, 2016
2ed6b50
menu-close now implemented
Mar 9, 2016
6146e3c
menuToggle and menuClose now implemented
Mar 9, 2016
237fb2d
exposeAsideWhen is now added
Mar 9, 2016
fb083cb
bumped to 0.1.57
Mar 9, 2016
9923bc5
Merge branch 'wip-sideMenuController-upgrade'
Mar 9, 2016
a1cd2da
ionSlideBox removed in favour of the new ionSlides
Mar 10, 2016
4366f17
reverted to 1554bb97b78146cc4ef237ca5775dac62882fcdc, last known stab…
Mar 21, 2016
bc9125f
bumped to 1.0.0
Mar 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/.idea
.versions
.build*
.DS_Store
49 changes: 0 additions & 49 deletions .versions

This file was deleted.

58 changes: 34 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
![](http://f.cl.ly/items/391y4708420P0H001k1G/meteoric.png)
![Meteoric Logo](meteoric-logo.png)

[![Gitter](https://badges.gitter.im/JoeyAndres/meteor-ionic.svg)](https://gitter.im/JoeyAndres/meteor-ionic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

# meteor-ionic

### Build [Ionic](http://ionicframework.com/) apps in [Meteor](https://www.meteor.com/)!

## NOTE: This package is no longer being actively maintained.

If you are interested in maintaining it, contact me through [my Github profile](https://github.com/nickw). Now that Meteor is officially supporting (and actively recommending) React and Angular, I suggest using [Ionic](https://github.com/driftyco/ionic), [Ionic 2](https://github.com/driftyco/ionic2) or [Reapp](https://github.com/reapp) as alternatives for building hybrid mobile apps with Meteor.

## Overview

This is an attempt at **real Ionic and Meteor integration**. This is not just Ionic's CSS framework wrapped in a Meteor package. It aims to be a complete port of [Ionic’s Angular directives](http://ionicframework.com/docs/api/) to [Meteor Blaze](https://www.meteor.com/blaze) templates.

Note: This is a forked of meteoric:ionic, which is now not maintained. In response, I decided to fork it, and maintain this package for my own. I have written acceptance test on [JoeyAndres/ionic-demo](https://github.com/JoeyAndres/ionic-demo), which is a fork of meteoric/demo.

## Why?
[Ionic](http://ionicframework.com/) is arguably the most comprehensive, polished, cross-platform mobile framework available. But unfortunately a large portion of its functionality comes from Angular directives. [I'm not a fan of trying to force-fit Angular into Meteor](https://medium.com/space-camp/your-meteor-app-probably-doesnt-need-angular-13986a0323f6), so I wanted to see if I could rewrite Ionic specifically for Meteor.

Expand All @@ -22,14 +22,27 @@ Check out the [GUIDE.md](GUIDE.md) for a guide on how to get started.

**Beta** See the TODO section below to see which Angular Directives have been ported to Blaze.

## Install

```bash
meteor add jandres:ionic
```

## Dependencies
Rather than include compiled or CDN versions of Ionic's CSS Framework we’ve extraced it into two separate packages:

- [meteoric:ionicons-sass](http://github.com/meteoric/ionicons-sass) Ionic’s Ionicons set wrapped for Meteor.
- [meteoric:ionic-sass](http://github.com/meteoric/ionic-sass) The base Ionic CSS Framework wrapped for Meteor.
- [jandres:meteoric-sass](https://github.com/JoeyAndres/meteoric-sass/) Ionic's scss only package and currently up to date with ionic v1.2.4

## Examples

### Demo of all components
The demo app of various ionic components

[Demo](http://jandres-ionic.meteor.com/) | [Code](https://github.com/JoeyAndres/ionic-demo)

## Pre-fork Examples

The following are examples prior to this fork.

### Contacts App
A simple CRUD app to manage contacts.

Expand All @@ -40,13 +53,6 @@ A [Product Hunt](http://producthunt.com) clone built in Meteor Ionic. (In Progre

[Demo](http://meteorhunt.meteor.com/) | [Code](https://github.com/meteoric/meteorhunt)

### Demo of all components
The demo app of various meteoric components

[Demo](http://meteor-ionic.meteor.com/) | [Code](https://github.com/meteoric/demo)

You can also keep track of the various other repos from the [Meteoric team](https://github.com/meteoric)

## TODO

### Angular Directives to convert to Blaze:
Expand All @@ -67,15 +73,15 @@ You can also keep track of the various other repos from the [Meteoric team](http
* [x] ion-footer-bar
* [x] Keyboard (requires [cordova](http://cordova.apache.org/) integration)
* [ ] Lists (needs edit/remove/sort functionality)
* [ ] ion-list
* [ ] ion-item
* [ ] ion-delete-button
* [ ] ion-reorder-button
* [ ] ion-option-button
* [x] ion-list
* [x] ion-item
* [x] ion-delete-button
* [x] ion-reorder-button
* [x] ion-option-button
* [ ] collection-repeat
* [x] Loading
* [x] Modal
* [x] Navigation (requires [iron:router](https://github.com/EventedMind/iron-router) integration)
* [x] Navigation (requires [iron:router](https://github.com/EventedMind/iron-router) integration)a
* [x] ion-nav-view
* [x] ion-view
* [x] ion-nav-bar
Expand All @@ -87,9 +93,9 @@ You can also keep track of the various other repos from the [Meteoric team](http
* [x] Platform
* [x] Popover
* [x] Popup
* [ ] Scroll
* [ ] ion-scroll
* [ ] ion-infinite-scroll
* [x] Scroll
* [x] ion-scroll
* [x] ion-infinite-scroll
* [x] Side Menus
* [x] ion-side-menus
* [x] ion-side-menu-content
Expand All @@ -101,6 +107,10 @@ You can also keep track of the various other repos from the [Meteoric team](http
* [x] Tabs (requires [iron:router](https://github.com/EventedMind/iron-router) integration)
* [x] ion-tabs
* [x] ion-tab

### Code Style Change:
These are code styles that I want to impose on this forked repo.
* [ ] Get rid of all session variables.

## License
[MIT License](https://github.com/meteoric/meteor-ionic/blob/master/LICENSE)
1 change: 1 addition & 0 deletions components/ionBody/ionBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Template.registerHelper('isAndroid', function () {
return Platform.isAndroid();
});

// todo: This is a duplicate of METEORIC.PLATFORM, what to do?? Do we put the Meteor.isCordova test there?
Template.ionBody.helpers({
platformClasses: function () {
var classes = ['grade-a'];
Expand Down
33 changes: 28 additions & 5 deletions components/ionContent/ionContent.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
<template name="ionContent">
<div class="scroll-content ionic-scroll">
<div class="{{classes}}">
{{> UI.contentBlock}}
</div>
</div>
{{#if scroll}}
<ion-content class="scroll-content
ionic-scroll
{{#if hasHeader}}has-header{{/if}}
{{#if hasFooter}}has-footer{{/if}}">
{{#ionScroll
class=classes
direction=direction
locking=locking
padding=padding
overflowScroll=overflowScroll
scrollbarX=scrollbarX
scrollbarY=scrollbarY
startX=starX
startY=startY
onScroll=onScroll
onScrollComplete=onScrollComplete
hasBouncing=hasBouncing
scrollEventInterval=scrollEventInterval
stopPropagation=false}}
{{> Template.contentBlock}}
{{/ionScroll}}
</ion-content>
{{else}}
<ion-content>
{{> Template.contentBlock}}
</ion-content>
{{/if}}
</template>
123 changes: 94 additions & 29 deletions components/ionContent/ionContent.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,104 @@
let ionContentDefault = {
direction: 'y',
locking: true,
padding: true,
scroll: true,
overflowScroll: false,
scrollBarX: true,
scrollBarY: true,
startX: '0',
startY: '0',
onScroll: null,
onScrollComplete: null,
hasBouncing: true,
scrollEventInterval: 10
};

Template.ionContent.onCreated(function() {
this.direction = new ReactiveVar(ionContentDefault.direction);
this.locking = new ReactiveVar(ionContentDefault.locking);
this.padding = new ReactiveVar(ionContentDefault.padding); // todo: make this platform dependent.
this.scroll = new ReactiveVar(ionContentDefault.scroll);
this.overflowScroll = new ReactiveVar(ionContentDefault.overflowScroll); // todo: Make a Meteoric config for defaults.
this.scrollBarX = new ReactiveVar(ionContentDefault.scrollBarX);
this.scrollBarY = new ReactiveVar(ionContentDefault.scrollBarY);
this.startX = new ReactiveVar(ionContentDefault.startX);
this.startY = new ReactiveVar(ionContentDefault.startY);
this.onScroll = new ReactiveVar(ionContentDefault.onScroll);
this.onScrollComplete = new ReactiveVar(ionContentDefault.onScrollComplete);
this.hasBouncing = new ReactiveVar(ionContentDefault.hasBouncing); // tdo: Make platform dependent.
this.scrollEventInterval = new ReactiveVar(ionContentDefault.scrollEventInterval);

this.autorun(() => {
let td = Template.currentData();
if (!td) return;
this.direction.set(td.direction || ionContentDefault.direction);
this.locking.set(!!td.locking ? td.locking : ionContentDefault.locking);
this.padding.set(!!td.padding ? td.padding : ionContentDefault.padding);
this.scroll.set(!!td.scroll ? td.scroll : ionContentDefault.scroll);
this.overflowScroll.set(!!td.overflowScroll ? td.overflowScroll : ionContentDefault.overflowScroll);
this.scrollBarX.set(!!td.scrollBarX ? td.scrollBarX : ionContentDefault.scrollBarX);
this.scrollBarY.set(!!td.scrollBarY ? td.scrollBarY : ionContentDefault.scrollBarY);
this.startX.set(!!td.startX ? td.startX : ionContentDefault.startX);
this.startY.set(!!td.startX ? td.startY : ionContentDefault.startY);
this.onScroll.set(td.onScroll);
this.onScrollComplete.set(td.onScrollComplete);
this.hasBouncing.set(!!td.hasBouncing ? td.hasBouncing : ionContentDefault.hasBouncing);
this.scrollEventInterval.set(!!this.scrollEventInterval ? this.scrollEventInterval : ionContentDefault.scrollEventInterval);
});
});

Template.ionContent.helpers({
classes: function () {
var classes = ['content'];
hasHeader: function() { return METEORIC.hasHeader.get(); },

if (this.class) {
classes.push(this.class);
}
hasFooter: function() { return METEORIC.hasFooter.get(); },

if (this.scroll !== false) {
classes.push('overflow-scroll');
}
classes: function () {
var classes = ['content'];

if (Session.get('hasHeader')) {
classes.push('has-header');
}
if (this.class) {
classes.push(this.class);
}

if (Session.get('hasSubheader')) {
classes.push('has-subheader');
}
if (this.scroll !== false) {
//classes.push('overflow-scroll');
classes.push('scroll');
}

if (Session.get('hasTabs')) {
classes.push('has-tabs');
}
if (Session.get('hasSubheader')) {
classes.push('has-subheader');
}

if (Session.get('hasTabsTop')) {
classes.push('has-tabs-top');
}
if (Session.get('hasTabs')) {
classes.push('has-tabs');
}

if (Session.get('hasFooter')) {
classes.push('has-footer');
}
if (Session.get('hasTabsTop')) {
classes.push('has-tabs-top');
}

if (Session.get('hasSubfooter')) {
classes.push('has-subfooter');
}
if (Session.get('hasFooter')) {
classes.push('has-footer');
}

return classes.join(' ');
}
});
if (Session.get('hasSubfooter')) {
classes.push('has-subfooter');
}

return classes.join(' ');
},

direction: function() { return Template.instance().direction.get(); },
locking: function() { return Template.instance().locking.get(); },
padding: function() { return Template.instance().padding.get(); },
scroll: function() { return Template.instance().scroll.get(); },
overflowScroll: function() { return Template.instance().overflowScroll.get(); },
scrollBarX: function() { return Template.instance().scrollBarX.get(); },
scrollBarY: function() { return Template.instance().scrollBarY.get(); },
startX: function() { return Template.instance().startX.get(); },
startY: function() { return Template.instance().startY.get(); },
onScroll: function() { return Template.instance().onScroll.get(); },
onScrollComplete: function() { return Template.instance().onScrollComplete.get(); },
hasBouncing: function() { return Template.instance().hasBouncing.get(); },
scrollEventInterval: function() { return Template.instance().scrollEventInterval.get(); }
});
8 changes: 8 additions & 0 deletions components/ionDeleteButton/ionDeleteButton.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template name="ionDeleteButton">
<div class="item-left-edit item-delete enable-pointer-events
{{#if showDelete}}visible active{{/if}}">
<ion-delete-button
class="{{class}} button icon button-icon item-left-editable">
</ion-delete-button>
</div>
</template>
13 changes: 13 additions & 0 deletions components/ionDeleteButton/ionDeleteButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Template.ionDeleteButton.onCreated(function() {
let parent = this.parent((t) => t.view.name === "Template.ionItem", true);
if (!parent) { throw "Template.ionDeleteButton must be a descendant of Template.ionItem."; }
_.extend(this, {
showDelete: parent.showDelete
});
});

Template.ionDeleteButton.helpers({
showDelete: function() {
return Template.instance().showDelete.get();
}
});
10 changes: 6 additions & 4 deletions components/ionFooterBar/ionFooterBar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template name="ionFooterBar">
<div class="{{classes}}">
{{> UI.contentBlock}}
</div>
</template>
<div class="bar bar-footer {{classes}}">
<div class="buttons">{{> yield "footerButtonLeft"}}</div>
<div class="title">{{> yield "footerTitle"}}</div>
<div class="buttons">{{> yield "footerButtonRight"}}</div>
</div>
</template>
Loading