Merge branch 'master' into list-border-refactor

Conflicts:
	ionic/util/dom.ts
This commit is contained in:
Brandy Carney
2015-11-05 19:16:24 -05:00
10 changed files with 72 additions and 48 deletions

View File

@ -0,0 +1,18 @@
.md .ion-md-share {
color: #ED4248;
}
.md .ion-md-arrow-dropright-circle {
color: #508AE4;
}
.md .ion-md-heart-outline {
color: #31D55F;
}
.md .action-sheet-destructive {
margin-top: 2px;
padding-top: 1px;
}
.md .action-sheet-cancel icon, .md .action-sheet-destructive icon {
color: #757575;
}

View File

@ -10,10 +10,12 @@ $colors: (
$font-path: '../../dist/fonts';
@import "../../ionic/ionic";
@import "action-sheets/basic/styles";
@import "cards/background/styles";
@import "cards/advanced-weather/styles";
@import "cards/advanced-map/styles";
@import "icons/basic/styles";
@import "menus/basic/styles";
@import "slides/basic/styles";
@ -63,25 +65,6 @@ section.hidden {
height: 100%;
}
.md .ion-md-share {
color: #ED4248;
}
.md .ion-md-arrow-dropright-circle {
color: #508AE4;
}
.md .ion-md-heart-outline {
color: #31D55F;
}
.md .action-sheet-destructive {
margin-top: 2px;
padding-top: 1px;
}
.md .action-sheet-cancel icon, .md .action-sheet-destructive icon {
color: #757575;
}
#card-wireframe {
width: 100%;
margin-bottom: 2.7em;
@ -185,15 +168,3 @@ body.ios img#ios-only {
z-index: 50;
}
.item-bold {
font-weight: bold;
color: #32DB64;
}
.item-subtle {
color: #656565;
margin-left: -3px !important;
}
.item-subtle:before {
padding-right: 5px;
}

View File

@ -22,4 +22,16 @@ ion-card .icon-avatar {
color: #444444;
font-size: 1.8em;
text-align: center;
}
}
.item-bold {
font-weight: bold;
color: #32DB64;
}
.item-subtle {
color: #656565;
margin-left: -3px !important;
}
.item-subtle:before {
padding-right: 5px;
}

View File

@ -28,9 +28,14 @@ class DemoApp {
window.addEventListener('message', (e) => {
zone.run(() => {
if (e.data) {
var data = JSON.parse(e.data);
if (data.hash) {
this.nextPage = helpers.getPageFor(data.hash.replace('#', ''));
this.app.getComponent('leftMenu').enable(false);
if (data.hash === 'menus') {
this.app.getComponent('leftMenu').enable(true);
}
} else {
this.nextPage = actionSheets.BasicPage;
}

View File

@ -0,0 +1,3 @@
body.md ion-menu#leftMenu {
width: 304px;
}

View File

@ -206,6 +206,7 @@ class AnotherPage {
@App({
pages: [FirstPage, FullPage, PrimaryHeaderPage, AnotherPage],
template: `<ion-nav [root]="root"></ion-nav>`
})
class E2EApp {

View File

@ -20,9 +20,12 @@ import {initTapClick} from '../components/tap-click/tap-click';
import * as dom from '../util/dom';
export function ionicProviders(config) {
export function ionicProviders(args) {
let app = new IonicApp();
let platform = new Platform();
let navRegistry = new NavRegistry(args.pages);
var config = args.config;
if (!(config instanceof Config)) {
config = new Config(config);
@ -50,6 +53,7 @@ export function ionicProviders(config) {
provide(Platform, {useValue: platform}),
provide(FeatureDetect, {useValue: featureDetect}),
provide(Events, {useValue: events}),
provide(NavRegistry, {useValue: navRegistry}),
Form,
Keyboard,
OverlayController,
@ -57,7 +61,6 @@ export function ionicProviders(config) {
Modal,
Popup,
Translate,
NavRegistry,
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy}),
HTTP_PROVIDERS,

View File

@ -135,7 +135,7 @@ export function App(args={}) {
Reflect.defineMetadata('annotations', annotations, cls);
console.time('bootstrap');
bootstrap(cls, ionicProviders(args.config)).then(() => {
bootstrap(cls, ionicProviders(args)).then(() => {
console.timeEnd('bootstrap');
});

View File

@ -244,13 +244,20 @@ export function getDimensions(ion, ele) {
let dimensions = dimensionCache[ion._dimId];
if (!dimensions) {
ele = ele || ion.getNativeElement();
dimensions = dimensionCache[ion._dimId] = {
width: ele.offsetWidth,
height: ele.offsetHeight,
left: ele.offsetLeft,
top: ele.offsetTop
};
let ele = ion.getNativeElement();
// make sure we got good values before caching
if (ele.offsetWidth && ele.offsetHeight) {
dimensions = dimensionCache[ion._dimId] = {
width: ele.offsetWidth,
height: ele.offsetHeight,
left: ele.offsetLeft,
top: ele.offsetTop
};
} else {
// do not cache bad values
return { width: 0, height: 0, left: 0, top: 0 };
}
}
return dimensions;
@ -258,10 +265,16 @@ export function getDimensions(ion, ele) {
export function windowDimensions() {
if (!dimensionCache.win) {
dimensionCache.win = {
width: window.innerWidth,
height: window.innerHeight
};
// make sure we got good values before caching
if (window.innerWidth && window.innerHeight) {
dimensionCache.win = {
width: window.innerWidth,
height: window.innerHeight
};
} else {
// do not cache bad values
return { width: 0, height: 0 };
}
}
return dimensionCache.win;
}

View File

@ -3,8 +3,6 @@ module.exports = {
"es6-shim",
"zone.js",
"reflect-metadata",
"angular2/angular2",
"ionic/ionic",
"web-animations.min",
],
module: {