mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
Merge branch 'master' into list-border-refactor
Conflicts: ionic/util/dom.ts
This commit is contained in:
18
demos/component-docs/action-sheets/basic/styles.scss
Normal file
18
demos/component-docs/action-sheets/basic/styles.scss
Normal 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;
|
||||||
|
}
|
@ -10,10 +10,12 @@ $colors: (
|
|||||||
$font-path: '../../dist/fonts';
|
$font-path: '../../dist/fonts';
|
||||||
|
|
||||||
@import "../../ionic/ionic";
|
@import "../../ionic/ionic";
|
||||||
|
@import "action-sheets/basic/styles";
|
||||||
@import "cards/background/styles";
|
@import "cards/background/styles";
|
||||||
@import "cards/advanced-weather/styles";
|
@import "cards/advanced-weather/styles";
|
||||||
@import "cards/advanced-map/styles";
|
@import "cards/advanced-map/styles";
|
||||||
@import "icons/basic/styles";
|
@import "icons/basic/styles";
|
||||||
|
@import "menus/basic/styles";
|
||||||
@import "slides/basic/styles";
|
@import "slides/basic/styles";
|
||||||
|
|
||||||
|
|
||||||
@ -63,25 +65,6 @@ section.hidden {
|
|||||||
height: 100%;
|
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 {
|
#card-wireframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 2.7em;
|
margin-bottom: 2.7em;
|
||||||
@ -185,15 +168,3 @@ body.ios img#ios-only {
|
|||||||
z-index: 50;
|
z-index: 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-bold {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #32DB64;
|
|
||||||
}
|
|
||||||
.item-subtle {
|
|
||||||
color: #656565;
|
|
||||||
margin-left: -3px !important;
|
|
||||||
}
|
|
||||||
.item-subtle:before {
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -23,3 +23,15 @@ ion-card .icon-avatar {
|
|||||||
font-size: 1.8em;
|
font-size: 1.8em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-bold {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #32DB64;
|
||||||
|
}
|
||||||
|
.item-subtle {
|
||||||
|
color: #656565;
|
||||||
|
margin-left: -3px !important;
|
||||||
|
}
|
||||||
|
.item-subtle:before {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
@ -28,9 +28,14 @@ class DemoApp {
|
|||||||
window.addEventListener('message', (e) => {
|
window.addEventListener('message', (e) => {
|
||||||
zone.run(() => {
|
zone.run(() => {
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
|
|
||||||
var data = JSON.parse(e.data);
|
var data = JSON.parse(e.data);
|
||||||
if (data.hash) {
|
if (data.hash) {
|
||||||
this.nextPage = helpers.getPageFor(data.hash.replace('#', ''));
|
this.nextPage = helpers.getPageFor(data.hash.replace('#', ''));
|
||||||
|
this.app.getComponent('leftMenu').enable(false);
|
||||||
|
if (data.hash === 'menus') {
|
||||||
|
this.app.getComponent('leftMenu').enable(true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.nextPage = actionSheets.BasicPage;
|
this.nextPage = actionSheets.BasicPage;
|
||||||
}
|
}
|
||||||
|
3
demos/component-docs/menus/basic/styles.scss
Normal file
3
demos/component-docs/menus/basic/styles.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
body.md ion-menu#leftMenu {
|
||||||
|
width: 304px;
|
||||||
|
}
|
@ -206,6 +206,7 @@ class AnotherPage {
|
|||||||
|
|
||||||
|
|
||||||
@App({
|
@App({
|
||||||
|
pages: [FirstPage, FullPage, PrimaryHeaderPage, AnotherPage],
|
||||||
template: `<ion-nav [root]="root"></ion-nav>`
|
template: `<ion-nav [root]="root"></ion-nav>`
|
||||||
})
|
})
|
||||||
class E2EApp {
|
class E2EApp {
|
||||||
|
@ -20,9 +20,12 @@ import {initTapClick} from '../components/tap-click/tap-click';
|
|||||||
import * as dom from '../util/dom';
|
import * as dom from '../util/dom';
|
||||||
|
|
||||||
|
|
||||||
export function ionicProviders(config) {
|
export function ionicProviders(args) {
|
||||||
let app = new IonicApp();
|
let app = new IonicApp();
|
||||||
let platform = new Platform();
|
let platform = new Platform();
|
||||||
|
let navRegistry = new NavRegistry(args.pages);
|
||||||
|
|
||||||
|
var config = args.config;
|
||||||
|
|
||||||
if (!(config instanceof Config)) {
|
if (!(config instanceof Config)) {
|
||||||
config = new Config(config);
|
config = new Config(config);
|
||||||
@ -50,6 +53,7 @@ export function ionicProviders(config) {
|
|||||||
provide(Platform, {useValue: platform}),
|
provide(Platform, {useValue: platform}),
|
||||||
provide(FeatureDetect, {useValue: featureDetect}),
|
provide(FeatureDetect, {useValue: featureDetect}),
|
||||||
provide(Events, {useValue: events}),
|
provide(Events, {useValue: events}),
|
||||||
|
provide(NavRegistry, {useValue: navRegistry}),
|
||||||
Form,
|
Form,
|
||||||
Keyboard,
|
Keyboard,
|
||||||
OverlayController,
|
OverlayController,
|
||||||
@ -57,7 +61,6 @@ export function ionicProviders(config) {
|
|||||||
Modal,
|
Modal,
|
||||||
Popup,
|
Popup,
|
||||||
Translate,
|
Translate,
|
||||||
NavRegistry,
|
|
||||||
ROUTER_PROVIDERS,
|
ROUTER_PROVIDERS,
|
||||||
provide(LocationStrategy, {useClass: HashLocationStrategy}),
|
provide(LocationStrategy, {useClass: HashLocationStrategy}),
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
|
@ -135,7 +135,7 @@ export function App(args={}) {
|
|||||||
Reflect.defineMetadata('annotations', annotations, cls);
|
Reflect.defineMetadata('annotations', annotations, cls);
|
||||||
|
|
||||||
console.time('bootstrap');
|
console.time('bootstrap');
|
||||||
bootstrap(cls, ionicProviders(args.config)).then(() => {
|
bootstrap(cls, ionicProviders(args)).then(() => {
|
||||||
console.timeEnd('bootstrap');
|
console.timeEnd('bootstrap');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -244,13 +244,20 @@ export function getDimensions(ion, ele) {
|
|||||||
|
|
||||||
let dimensions = dimensionCache[ion._dimId];
|
let dimensions = dimensionCache[ion._dimId];
|
||||||
if (!dimensions) {
|
if (!dimensions) {
|
||||||
ele = ele || ion.getNativeElement();
|
let ele = ion.getNativeElement();
|
||||||
dimensions = dimensionCache[ion._dimId] = {
|
// make sure we got good values before caching
|
||||||
width: ele.offsetWidth,
|
if (ele.offsetWidth && ele.offsetHeight) {
|
||||||
height: ele.offsetHeight,
|
dimensions = dimensionCache[ion._dimId] = {
|
||||||
left: ele.offsetLeft,
|
width: ele.offsetWidth,
|
||||||
top: ele.offsetTop
|
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;
|
return dimensions;
|
||||||
@ -258,10 +265,16 @@ export function getDimensions(ion, ele) {
|
|||||||
|
|
||||||
export function windowDimensions() {
|
export function windowDimensions() {
|
||||||
if (!dimensionCache.win) {
|
if (!dimensionCache.win) {
|
||||||
dimensionCache.win = {
|
// make sure we got good values before caching
|
||||||
width: window.innerWidth,
|
if (window.innerWidth && window.innerHeight) {
|
||||||
height: window.innerHeight
|
dimensionCache.win = {
|
||||||
};
|
width: window.innerWidth,
|
||||||
|
height: window.innerHeight
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// do not cache bad values
|
||||||
|
return { width: 0, height: 0 };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return dimensionCache.win;
|
return dimensionCache.win;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ module.exports = {
|
|||||||
"es6-shim",
|
"es6-shim",
|
||||||
"zone.js",
|
"zone.js",
|
||||||
"reflect-metadata",
|
"reflect-metadata",
|
||||||
"angular2/angular2",
|
|
||||||
"ionic/ionic",
|
|
||||||
"web-animations.min",
|
"web-animations.min",
|
||||||
],
|
],
|
||||||
module: {
|
module: {
|
||||||
|
Reference in New Issue
Block a user