From c5be799810d33c1bedffb37d183704b5ee5ad595 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 11:58:50 -0500 Subject: [PATCH 01/20] feat(nav): popTo and popToRoot --- ionic/components/nav/nav-controller.ts | 55 ++++++++++++++++++++++++++ ionic/components/tabs/tabs.ts | 19 +++++++++ 2 files changed, 74 insertions(+) diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts index 83a88b6a3a..16254f9826 100644 --- a/ionic/components/nav/nav-controller.ts +++ b/ionic/components/nav/nav-controller.ts @@ -180,6 +180,61 @@ export class NavController extends Ion { this.views.splice(index, 0, viewCtrl); } + /** + * Pop to a specific view in the history stack + * + * @param view {Component} to pop to + * @param opts {object} pop options + */ + popTo(view, opts = {}) { + + // Get the target index of the view to pop to + let viewIndex = this.views.indexOf(view); + let targetIndex = viewIndex + 1; + let resolve; + let promise = new Promise(res => { resolve = res; }); + // Don't pop to the view if it wasn't found, or the target is beyond the view list + if(viewIndex < 0 || targetIndex > this.views.length - 1) { + resolve(); + return; + } + + + opts.direction = opts.direction || 'back'; + + // get the views to auto remove without having to do a transiton for each + // the last view (the currently active one) will do a normal transition out + if (this.views.length > 1) { + let autoRemoveItems = this.views.slice(targetIndex, this.views.length); + for (let i = 0; i < autoRemoveItems.length; i++) { + autoRemoveItems[i].shouldDestroy = true; + autoRemoveItems[i].shouldCache = false; + autoRemoveItems[i].willUnload(); + } + } + + let leavingView = this.views[this.views.length - 1]; + let enteringView = view; + + if(this.router) { + this.router.stateChange('pop', enteringView); + } + + this.transition(enteringView, leavingView, opts, () => { + resolve(); + }); + + return promise; + } + + /** + * Pop to the root view. + * @param opts extra animation options + */ + popToRoot(opts = {}) { + this.popTo(this.views[0]); + } + /** * Set the view stack to reflect the given component classes. * @param {TODO} components TODO diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index a2ed163e71..58b6255efb 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -126,6 +126,12 @@ export class Tabs extends NavController { enteringView = this.getByInstance(tab) } + // If we select the same tab as the active one, do some magic. + if(enteringView === this.getActive()) { + this._touchActive(tab); + return; + } + if (!enteringView || !enteringView.instance || !this.app.isEnabled()) { return Promise.reject(); } @@ -149,6 +155,19 @@ export class Tabs extends NavController { }); } + /** + * "Touch" the active tab, either going back to the root view of the tab + * or scrolling the tab to the top + */ + _touchActive(tab) { + let stateLen = tab.length(); + + if(stateLen > 1) { + // Pop to the root view + tab.popToRoot(); + } + } + get tabs() { return this.instances(); } From c1959cfef39afc58ccd67ef74530c56eac185dbb Mon Sep 17 00:00:00 2001 From: Drew Rygh Date: Wed, 30 Sep 2015 12:49:31 -0500 Subject: [PATCH 02/20] chore(demos): add docs demo build task --- gulpfile.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index bb764afb95..44f2681433 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -386,6 +386,12 @@ gulp.task('demos', function(){ } }) +gulp.task('copy.docs-demo', function () { + return gulp + .src('dist/demos/component-docs/*') + .pipe(gulp.dest('dist/ionic-site/docs/v2/components/demo/')) +}) + gulp.task('publish', function(done) { var version = flags.version; var ngVersion = flags.ngVersion; From 3042e7e9d095a234d7b070a7086e8d6c64d21d95 Mon Sep 17 00:00:00 2001 From: Drew Rygh Date: Wed, 30 Sep 2015 14:01:53 -0500 Subject: [PATCH 03/20] chore(demos): add local app.css to each demo --- demos/component-docs/app.css | 7 +++++ demos/component-docs/index.ts | 49 +++++++++++++++++++++++++++++++ demos/component-docs/main.html | 49 +++++++++++++++++++++++++++++++ gulpfile.js | 1 + scripts/demos/index.template.html | 2 ++ 5 files changed, 108 insertions(+) create mode 100644 demos/component-docs/app.css create mode 100644 demos/component-docs/index.ts create mode 100644 demos/component-docs/main.html diff --git a/demos/component-docs/app.css b/demos/component-docs/app.css new file mode 100644 index 0000000000..08f2652abd --- /dev/null +++ b/demos/component-docs/app.css @@ -0,0 +1,7 @@ +body { + cursor: url('http://ionicframework.com/img/finger.png'), auto; +} + +section.hidden { + display: none !important; +} diff --git a/demos/component-docs/index.ts b/demos/component-docs/index.ts new file mode 100644 index 0000000000..ec8ee55d69 --- /dev/null +++ b/demos/component-docs/index.ts @@ -0,0 +1,49 @@ +import {App, ActionSheet} from 'ionic/ionic'; + +function toTitleCase(str) { + return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); +} + +@App({ + templateUrl: 'main.html' +}) +class DemoApp { + + constructor(actionSheet: ActionSheet) { + this.actionSheet = actionSheet; + this.component = { + title: 'Action Sheet', + } + window.onmessage = (e) => { + this.component.title = toTitleCase(e.data.replace('-', ' ')); + }; + } + + openMenu() { + this.actionSheet.open({ + buttons: [ + { text: 'Share This' }, + { text: 'Move' } + ], + destructiveText: 'Delete', + titleText: 'Modify your album', + cancelText: 'Cancel', + cancel: function() { + console.log('Canceled'); + }, + destructiveButtonClicked: () => { + console.log('Destructive clicked'); + }, + buttonClicked: function(index) { + console.log('Button clicked', index); + if(index == 1) { return false; } + return true; + } + + }).then(actionSheetRef => { + this.actionSheetRef = actionSheetRef; + }); + } + + +} \ No newline at end of file diff --git a/demos/component-docs/main.html b/demos/component-docs/main.html new file mode 100644 index 0000000000..f364a7fa34 --- /dev/null +++ b/demos/component-docs/main.html @@ -0,0 +1,49 @@ + +{{ component.title }} + + + + +
+ +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
+ TODO +
+ +
diff --git a/gulpfile.js b/gulpfile.js index 44f2681433..b1f5aff1d6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,6 +58,7 @@ gulp.task('build', function(done) { 'bundle', 'e2e', 'demos', + 'copy.docs-demo', 'sass', 'fonts', done diff --git a/scripts/demos/index.template.html b/scripts/demos/index.template.html index 6c5ec2649d..bc1240c66d 100644 --- a/scripts/demos/index.template.html +++ b/scripts/demos/index.template.html @@ -6,6 +6,8 @@ + + From 3d36cc6e070a9b38497f0cb07e3f00818d33a7e1 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 30 Sep 2015 15:05:35 -0400 Subject: [PATCH 04/20] Styling some of the popups more - mostly MD mode. References #183 --- ionic/components/popup/modes/ios.scss | 4 -- ionic/components/popup/modes/md.scss | 50 +++++++++++++++------- ionic/components/popup/popup.scss | 18 +++++--- ionic/components/popup/popup.ts | 24 ++++++----- ionic/components/popup/test/basic/index.ts | 21 +++++++-- 5 files changed, 79 insertions(+), 38 deletions(-) diff --git a/ionic/components/popup/modes/ios.scss b/ionic/components/popup/modes/ios.scss index 0fd507d0e1..d54f63bd7c 100644 --- a/ionic/components/popup/modes/ios.scss +++ b/ionic/components/popup/modes/ios.scss @@ -39,10 +39,6 @@ ion-popup { color: $popup-ios-body-text-color; } -.popup-body:empty { - padding: 0; -} - .popup-buttons { padding: 0; min-height: 0; diff --git a/ionic/components/popup/modes/md.scss b/ionic/components/popup/modes/md.scss index 3b3a20846d..b895681f45 100644 --- a/ionic/components/popup/modes/md.scss +++ b/ionic/components/popup/modes/md.scss @@ -2,18 +2,20 @@ // Material Design Popups // -------------------------------------------------- -$popup-md-max-width: 280px !default; -$popup-md-background: rgba(0,0,0,0.5) !default; -$popup-md-border-radius: 2px !default; -$popup-md-background-color: #fafafa !default; -$popup-md-box-shadow: 0px 16px 20px rgba(0, 0, 0, 0.4) !default; +$popup-md-max-width: 280px !default; +$popup-md-background: rgba(0,0,0,0.5) !default; +$popup-md-border-radius: 2px !default; +$popup-md-background-color: #fafafa !default; +$popup-md-box-shadow: 0px 16px 20px rgba(0, 0, 0, 0.4) !default; -$popup-md-head-text-align: left !default; -$popup-md-title-font-size: 20px !default; -$popup-md-body-text-color: rgba(0,0,0,.5) !default; +$popup-md-head-text-align: left !default; +$popup-md-title-font-size: 20px !default; +$popup-md-body-text-color: rgba(0,0,0,.5) !default; -$popup-md-button-text-color: color(primary) !default; -$popup-md-button-min-height: 36px !default; +$popup-md-button-text-color: color(primary) !default; +$popup-md-button-min-height: 36px !default; +$popup-md-prompt-input-highlight-color: map-get($colors, primary) !default; +$popup-md-prompt-input-placeholder-color: #b9b9b9; ion-popup { @@ -42,8 +44,28 @@ ion-popup { color: $popup-md-body-text-color; } -.popup-body:empty { - padding: 0; +.prompt-input { + border-bottom: 1px solid #dedede; + + &::-webkit-input-placeholder { + color: $popup-md-prompt-input-placeholder-color; + } + + &:-moz-placeholder { /* Firefox 18- */ + color: $popup-md-prompt-input-placeholder-color; + } + + &::-moz-placeholder { /* Firefox 19+ */ + color: $popup-md-prompt-input-placeholder-color; + } + + &:-ms-input-placeholder { + color: $popup-md-prompt-input-placeholder-color; + } + + &:focus { + border-bottom: 2px solid $popup-md-prompt-input-highlight-color; + } } .popup-buttons { @@ -63,9 +85,5 @@ ion-popup { box-shadow: none; -webkit-transition: none; transition: none; - - &:last-child { - margin-right: 0; - } } } diff --git a/ionic/components/popup/popup.scss b/ionic/components/popup/popup.scss index 971dbaee28..c37c221f31 100644 --- a/ionic/components/popup/popup.scss +++ b/ionic/components/popup/popup.scss @@ -6,7 +6,7 @@ $popup-min-width: 250px !default; $popup-max-width: 100% !default; $popup-max-height: 90% !default; -$popup-sub-title-font-size: 11px !default; +$popup-sub-title-font-size: 15px !default; $popup-button-line-height: 20px !default; $popup-button-font-size: 14px !default; @@ -59,6 +59,18 @@ ion-popup { .popup-body { overflow: auto; + + // TODO is this needed? + &:empty { + padding: 0; + } +} + +.prompt-input { + border: 0; + background: inherit; + padding: 10px 0; + margin: 5px 0; } .popup-buttons { @@ -72,9 +84,5 @@ ion-popup { line-height: $popup-button-line-height; font-size: $popup-button-font-size; margin-right: $popup-button-margin-right; - - &:last-child { - margin-right: 0; - } } } diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts index ebcea5fa56..99c8ebd875 100644 --- a/ionic/components/popup/popup.ts +++ b/ionic/components/popup/popup.ts @@ -3,6 +3,8 @@ import {FORM_DIRECTIVES, NgControl, NgControlGroup, import {Overlay} from '../overlay/overlay'; import {Animation} from '../../animations/animation'; +import {Ion} from '../ion'; +import {IonInput} from '../form/input'; import * as util from 'ionic/util'; @@ -81,7 +83,7 @@ export class Popup extends Overlay { }; } let button = { - text: 'OK', + text: context.okText || 'OK', onTap: (event, popupRef) => { // Allow it to close //resolve(); @@ -112,13 +114,13 @@ export class Popup extends Overlay { } } let okButton = { - text: 'OK', + text: context.okText || 'OK', onTap: (event, popupRef) => { // Allow it to close } } let cancelButton = { - text: 'Cancel', + text: context.cancelText || 'Cancel', isCancel: true, onTap: (event, popupRef) => { // Allow it to close @@ -146,16 +148,17 @@ export class Popup extends Overlay { title: context }; } - let okButton = { - text: 'Ok', + text: context.okText || 'OK', + type: context.okType, onTap: (event, popupRef) => { // Allow it to close } } let cancelButton = { - text: 'Cancel', + text: context.cancelText || 'Cancel', + type: context.cancelType, isCancel: true, onTap: (event, popupRef) => { // Allow it to close @@ -201,14 +204,15 @@ const OVERLAY_TYPE = 'popup'; '' + '' + '' + '' + '' + '', directives: [FORM_DIRECTIVES, NgClass, NgIf, NgFor] diff --git a/ionic/components/popup/test/basic/index.ts b/ionic/components/popup/test/basic/index.ts index c5b29fc893..3d2484f43e 100644 --- a/ionic/components/popup/test/basic/index.ts +++ b/ionic/components/popup/test/basic/index.ts @@ -17,14 +17,23 @@ class E2EApp { doAlert() { this.alertOpen = true; - this.popup.alert('Alert').then(() => { + this.popup.alert({ + title: "New Friend!", + template: "Your friend, Obi wan Kenobi, just accepted your friend request!" + }).then(() => { this.alertOpen = false; }); } doPrompt() { this.promptOpen = true; - this.popup.prompt('What is your name?').then((name) => { + this.popup.prompt({ + title: "New Album", + template: "Enter a name for this new album you're so keen on adding", + inputPlaceholder: "Title", + okText: "Save", + okType: "secondary" + }).then((name) => { this.promptResult = name; this.promptOpen = false; }, () => { @@ -35,7 +44,13 @@ class E2EApp { doConfirm() { this.confirmOpen = true; - this.popup.confirm('Are you sure?').then((result, ev) => { + this.popup.confirm({ + title: "Use this lightsaber?", + subTitle: "You can't exchange lightsabers", + template: "Do you agree to use this lightsaber to do good across the intergalactic galaxy?", + cancelText: "Disagree", + okText: "Agree" + }).then((result, ev) => { console.log('CONFIRMED', result); this.confirmResult = result; this.confirmOpen = false; From 89f131b2dec28af00b315f80f8b26fe239dd06db Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 13:35:12 -0500 Subject: [PATCH 05/20] Scroll to top --- ionic/components/content/content.ts | 20 ++++++++++++++++++-- ionic/components/nav/view-controller.ts | 8 ++++++++ ionic/components/tabs/tab.ts | 7 +++++-- ionic/components/tabs/tabs.ts | 9 +++++++++ 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts index 96ebaed27e..a9ba0d6b34 100644 --- a/ionic/components/content/content.ts +++ b/ionic/components/content/content.ts @@ -1,9 +1,11 @@ -import {Component, View, ElementRef} from 'angular2/angular2'; +import {Component, View, ElementRef, Optional, Host} from 'angular2/angular2'; import {Ion} from '../ion'; import {IonicConfig} from '../../config/config'; import {IonicPlatform} from '../../platform/platform'; import {IonicComponent} from '../../config/decorators'; +import {ViewController} from '../nav/view-controller'; +import {Tab} from '../tabs/tab'; import {ScrollTo} from '../../animations/scroll-to'; @@ -38,10 +40,14 @@ export class Content extends Ion { * @param {ElementRef} elementRef A reference to the component's DOM element. * @param {IonicConfig} config The config object to change content's default settings. */ - constructor(elementRef: ElementRef, config: IonicConfig, platform: IonicPlatform) { + constructor(elementRef: ElementRef, config: IonicConfig, platform: IonicPlatform, @Optional() viewCtrl: ViewController) { super(elementRef, config); this.scrollPadding = 0; this.platform = platform; + + if(viewCtrl) { + viewCtrl.setContent(this); + } } /** @@ -107,6 +113,16 @@ export class Content extends Ion { return this._scrollTo.start(x, y, duration, tolerance); } + scrollToTop() { + if (this._scrollTo) { + this._scrollTo.dispose(); + } + + this._scrollTo = new ScrollTo(this.scrollElement); + + return this._scrollTo.start(0, 0, 300, 0); + } + /** * Returns the content and scroll elements' dimensions. * @returns {Object} dimensions The content and scroll elements' dimensions diff --git a/ionic/components/nav/view-controller.ts b/ionic/components/nav/view-controller.ts index ea13d2cd2d..9842cd61b7 100644 --- a/ionic/components/nav/view-controller.ts +++ b/ionic/components/nav/view-controller.ts @@ -23,6 +23,14 @@ export class ViewController { this.templateRefs = {}; } + setContent(content) { + this._content = content; + } + + getContent() { + return this._content; + } + /** * TODO * @param {TODO} name TODO diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts index 22b29d168d..4cdd9f2db9 100644 --- a/ionic/components/tabs/tab.ts +++ b/ionic/components/tabs/tab.ts @@ -1,8 +1,10 @@ -import {Directive, Component, View, Host, ElementRef, forwardRef, Injector, NgZone} from 'angular2/angular2'; +import {Directive, Component, View, Host, ElementRef, forwardRef, + Injector, NgZone, Query, ViewQuery, QueryList} from 'angular2/angular2'; import {NavController} from '../nav/nav-controller'; import {ViewController} from '../nav/view-controller'; import {Tabs} from './tabs'; +import {Content} from '../content/content'; /** @@ -47,7 +49,7 @@ export class Tab extends NavController { @Host() tabs: Tabs, elementRef: ElementRef, injector: Injector, - zone: NgZone + zone: NgZone, ) { // A Tab is both a container of many views, and is a view itself. // A Tab is one ViewController within it's Host Tabs (which extends NavController) @@ -141,6 +143,7 @@ class TabPaneAnchor { * @param {ElementRef} elementRef TODO */ constructor(@Host() tab: Tab, elementRef: ElementRef) { + tab.anchorElementRef(elementRef); } } diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index 58b6255efb..720128a4b7 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -166,6 +166,15 @@ export class Tabs extends NavController { // Pop to the root view tab.popToRoot(); } + /* + TODO: Uncomment to enable root scroll to top + else { + let content = tab.views[0] && tab.views[0].getContent(); + if(content) { + content.scrollToTop(); + } + } + */ } get tabs() { From b66fc45a20bc849e3a8217876a9f9746190572ce Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 15:57:05 -0500 Subject: [PATCH 06/20] chore(logs): removed bad console error --- ionic/components/app/app.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index b1869f1696..c4164b4201 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -65,6 +65,11 @@ export class IonicApp { window.addEventListener('orientationchange', (event) => { events.publish('app:rotated', event); }); + + window.addEventListener('statusTap', (event) => { + alert('Status tap!'); + console.log(event); + }) } /** @@ -176,7 +181,7 @@ export class IonicApp { */ register(id, component) { if (this.components[id] && this.components[id] !== component) { - console.error('Component id "' + id + '" already registered.'); + //console.error('Component id "' + id + '" already registered.'); } this.components[id] = component; } From 8ef7a67f553c4399d3d3db79e926f1f9081881c4 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 16:59:31 -0500 Subject: [PATCH 07/20] Removed alert --- ionic/components/app/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index c4164b4201..5a7614c3a4 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -67,8 +67,8 @@ export class IonicApp { }); window.addEventListener('statusTap', (event) => { - alert('Status tap!'); - console.log(event); + //alert('Status tap!'); + //console.log(event); }) } From 873ea742eb41669266189a16b36b1bac97256446 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 16:59:40 -0500 Subject: [PATCH 08/20] Fixed bad check bug --- ionic/platform/plugin.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ionic/platform/plugin.ts b/ionic/platform/plugin.ts index 49f4e5e6a5..c0b3ff6c48 100644 --- a/ionic/platform/plugin.ts +++ b/ionic/platform/plugin.ts @@ -5,9 +5,12 @@ export class NativePluginDecorator { cls.ifPlugin = (cb, returnType=null) => { // Convert to boolean the plugin param - var exists = !!check; + var exists; if(typeof this.config.pluginCheck === 'function') { exists = this.config.pluginCheck(); + } else { + console.error('Plugin "' + this.config.name + '" is missing a pluginCheck() function for plugin verification. Please add one."'); + return false; } if(exists) { return cb(); @@ -20,7 +23,7 @@ export class NativePluginDecorator { if(returnType) { return (typeof returnType === 'function') ? returnType() : returnType; } - + return false; }; From bb74cdc71742424982315402f2c7c45e92bb2649 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 17:26:16 -0500 Subject: [PATCH 09/20] feat(scroll): statusbar tap scroll to top --- ionic/components/app/app.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index 5a7614c3a4..d4c4afa24f 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -4,6 +4,7 @@ import {ROUTER_BINDINGS, HashLocationStrategy, LocationStrategy, Router} from 'a import {IonicConfig} from '../../config/config'; import {IonicPlatform, Platform} from '../../platform/platform'; import {ClickBlock} from '../../util/click-block'; +import {ScrollTo} from '../../animations/scroll-to'; import * as dom from '../../util/dom'; // injectables @@ -53,7 +54,7 @@ export class IonicApp { /** * Bind some global events and publish on the 'app' channel */ - bindEvents(events) { + bindEvents(platform, events) { window.addEventListener('online', (event) => { events.publish('app:online', event); }, false); @@ -66,10 +67,18 @@ export class IonicApp { events.publish('app:rotated', event); }); + // When that status taps, we respond window.addEventListener('statusTap', (event) => { - //alert('Status tap!'); - //console.log(event); - }) + // TODO: Make this more better + var el = document.elementFromPoint(platform.width() / 2, platform.height() / 2); + if(!el) { return; } + + var content = dom.closest(el, 'scroll-content'); + if(content) { + var scrollTo = new ScrollTo(content); + scrollTo.start(0, 0, 300, 0); + } + }); } /** @@ -77,6 +86,7 @@ export class IonicApp { * @param {Object} appRef TODO */ load(appRef) { + console.log('App ref', appRef); this.ref(appRef); this._zone = appRef.injector.get(NgZone); } @@ -324,7 +334,7 @@ export function ionicBootstrap(rootComponentType, views, config) { let translate = new Translate(); let navRegistry = new NavRegistry(views); - app.bindEvents(events); + app.bindEvents(platform, events); // add injectables that will be available to all child components let appBindings = Injector.resolve([ From 2f446f182f43c98c13f7590da1282a97581cbabe Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 17:29:45 -0500 Subject: [PATCH 10/20] :derp: console.log --- ionic/components/app/app.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts index d4c4afa24f..90a30a0772 100644 --- a/ionic/components/app/app.ts +++ b/ionic/components/app/app.ts @@ -86,7 +86,6 @@ export class IonicApp { * @param {Object} appRef TODO */ load(appRef) { - console.log('App ref', appRef); this.ref(appRef); this._zone = appRef.injector.get(NgZone); } From 3a0a6b6ee7597bc9b41f131786dbdf19cf2754cd Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Sep 2015 18:31:47 -0500 Subject: [PATCH 11/20] Removed right menu in basic test. #226 --- ionic/components/menu/test/basic/main.html | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/ionic/components/menu/test/basic/main.html b/ionic/components/menu/test/basic/main.html index 4905ae6c36..fed10a13e7 100644 --- a/ionic/components/menu/test/basic/main.html +++ b/ionic/components/menu/test/basic/main.html @@ -22,28 +22,5 @@ - - - - Right Menu - - - - - - - - - - - - - - - From 7c70da2212c1a80aab0a97e83a9f2afe5259bef6 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 1 Oct 2015 10:08:29 -0400 Subject: [PATCH 12/20] chore(popup): Fixed MD button so it extends the clear button References #183 --- ionic/components/popup/modes/md.scss | 14 ++++---------- ionic/components/popup/popup.ts | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ionic/components/popup/modes/md.scss b/ionic/components/popup/modes/md.scss index b895681f45..011f07613a 100644 --- a/ionic/components/popup/modes/md.scss +++ b/ionic/components/popup/modes/md.scss @@ -12,8 +12,8 @@ $popup-md-head-text-align: left !default; $popup-md-title-font-size: 20px !default; $popup-md-body-text-color: rgba(0,0,0,.5) !default; -$popup-md-button-text-color: color(primary) !default; $popup-md-button-min-height: 36px !default; +$popup-md-prompt-input-text-color: #000000; $popup-md-prompt-input-highlight-color: map-get($colors, primary) !default; $popup-md-prompt-input-placeholder-color: #b9b9b9; @@ -46,25 +46,24 @@ ion-popup { .prompt-input { border-bottom: 1px solid #dedede; + color: $popup-md-prompt-input-text-color; &::-webkit-input-placeholder { color: $popup-md-prompt-input-placeholder-color; } - &:-moz-placeholder { /* Firefox 18- */ color: $popup-md-prompt-input-placeholder-color; } - &::-moz-placeholder { /* Firefox 19+ */ color: $popup-md-prompt-input-placeholder-color; } - &:-ms-input-placeholder { color: $popup-md-prompt-input-placeholder-color; } &:focus { border-bottom: 2px solid $popup-md-prompt-input-highlight-color; + margin-bottom: 4px; } } @@ -73,17 +72,12 @@ ion-popup { justify-content: flex-end; button { + @extend button[clear]; -webkit-box-flex: initial; -webkit-flex: intiial; -ms-flex: initial; flex: initial; - background-color: transparent; - color: $popup-md-button-text-color; min-height: $popup-md-button-min-height; - - box-shadow: none; - -webkit-transition: none; - transition: none; } } diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts index 99c8ebd875..b48bca4d5e 100644 --- a/ionic/components/popup/popup.ts +++ b/ionic/components/popup/popup.ts @@ -204,7 +204,7 @@ const OVERLAY_TYPE = 'popup'; '' + '' + '' + '