Merge branch '2.0' into loading

This commit is contained in:
Brandy Carney
2016-04-01 15:05:48 -04:00
9 changed files with 42 additions and 36 deletions

View File

@ -178,7 +178,6 @@ export class InfiniteScroll {
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY; let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
if (distanceFromInfinite < 0) { if (distanceFromInfinite < 0) {
this._zone.run(() => { this._zone.run(() => {
console.debug('infinite scroll');
this.state = STATE_LOADING; this.state = STATE_LOADING;
this.infinite.emit(this); this.infinite.emit(this);
}); });

View File

@ -251,7 +251,6 @@ export class Refresher {
// this method can get called like a bazillion times per second, // this method can get called like a bazillion times per second,
// so it's built to be as efficient as possible, and does its // so it's built to be as efficient as possible, and does its
// best to do any DOM read/writes only when absolutely necessary // best to do any DOM read/writes only when absolutely necessary
console.debug('Pull-to-refresh, onMove', ev.type);
// if multitouch then get out immediately // if multitouch then get out immediately
if (ev.touches && ev.touches.length > 1) { if (ev.touches && ev.touches.length > 1) {

View File

@ -4,9 +4,9 @@ export declare class Swiper {
activeIndex: number; activeIndex: number;
isEnd: boolean; isEnd: boolean;
isBeginning: boolean; isBeginning: boolean;
update(); update():any;
slideNext(); slideNext():any;
slidePrev(); slidePrev():any;
} }

View File

@ -92,7 +92,8 @@ export class ToolbarBase extends Ion {
* *
* ``` * ```
* *
* @property {any} [position] - set position of the toolbar, top or bottom. If not set, defautls to top. * @property {any} [position] - set position of the toolbar, `top` or `bottom`.
* Default `top`.
* @demo /docs/v2/demos/toolbar/ * @demo /docs/v2/demos/toolbar/
* @see {@link ../../navbar/Navbar/ Navbar API Docs} * @see {@link ../../navbar/Navbar/ Navbar API Docs}
*/ */

View File

@ -91,25 +91,25 @@ export let CSS: {
export function transitionEnd(el: HTMLElement, callback: Function) { export function transitionEnd(el: HTMLElement, callback: Function) {
if (el) { if (el) {
function unregister() {
CSS.transitionEnd.split(' ').forEach(eventName => {
el.removeEventListener(eventName, onEvent);
});
}
function onEvent(ev) {
if (el === ev.target) {
unregister();
callback(ev);
}
}
CSS.transitionEnd.split(' ').forEach(eventName => { CSS.transitionEnd.split(' ').forEach(eventName => {
el.addEventListener(eventName, onEvent); el.addEventListener(eventName, onEvent);
}); });
return unregister; return unregister;
} }
function unregister() {
CSS.transitionEnd.split(' ').forEach(eventName => {
el.removeEventListener(eventName, onEvent);
});
}
function onEvent(ev) {
if (el === ev.target) {
unregister();
callback(ev);
}
}
} }
export function ready(callback?: Function) { export function ready(callback?: Function) {
@ -124,17 +124,17 @@ export function ready(callback?: Function) {
callback(); callback();
} else { } else {
function completed() {
document.removeEventListener('DOMContentLoaded', completed, false);
window.removeEventListener('load', completed, false);
callback();
}
document.addEventListener('DOMContentLoaded', completed, false); document.addEventListener('DOMContentLoaded', completed, false);
window.addEventListener('load', completed, false); window.addEventListener('load', completed, false);
} }
return promise; return promise;
function completed() {
document.removeEventListener('DOMContentLoaded', completed, false);
window.removeEventListener('load', completed, false);
callback();
}
} }
export function windowLoad(callback?: Function) { export function windowLoad(callback?: Function) {
@ -149,15 +149,16 @@ export function windowLoad(callback?: Function) {
callback(); callback();
} else { } else {
function completed() {
window.removeEventListener('load', completed, false);
callback();
}
window.addEventListener('load', completed, false); window.addEventListener('load', completed, false);
} }
return promise; return promise;
function completed() {
window.removeEventListener('load', completed, false);
callback();
}
} }
export function pointerCoord(ev: any): {x: number, y: number} { export function pointerCoord(ev: any): {x: number, y: number} {

View File

@ -39,11 +39,11 @@ function run {
# if no changes, don't commit # if no changes, don't commit
if [[ "$CHANGES" == "" ]]; then if [[ "$CHANGES" == "" ]]; then
ls echo "-- No changes detected for the following commit, docs not updated."
echo "-- No changes detected in docs for $VERSION_NAME; docs not updated." echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
else else
git add -A git add -A
git commit -am "docs: update for $VERSION" git commit -am "Automated build of ionic v$VERSION driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
git push origin master git push origin master
echo "-- Updated docs for $VERSION_NAME succesfully!" echo "-- Updated docs for $VERSION_NAME succesfully!"

View File

@ -21,6 +21,10 @@ module.exports = function jekyll(renderDocsProcessor) {
.replace('/index.md','') .replace('/index.md','')
.replace('//home/ubuntu/ionic/ionic', '') .replace('//home/ubuntu/ionic/ionic', '')
.replace('//', '/'); .replace('//', '/');
if (docs[i].relativePath) {
docs[i].relativePath = doc.relativePath
.replace('/home/ubuntu/ionic', '');
}
}); });
docs.push({ docs.push({

View File

@ -147,7 +147,7 @@ Delegate: <$ doc.delegate $>
</h1> </h1>
<a class="improve-v2-docs" href="http://github.com/driftyco/ionic/edit/2.0/<$ doc.fileInfo.relativePath|replace('//','/') $>#L<$ doc.location.start.line $>"> <a class="improve-v2-docs" href="http://github.com/driftyco/ionic/edit/2.0/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
Improve this doc Improve this doc
</a> </a>

View File

@ -16,6 +16,8 @@ function run {
ARGS="--branch=${BRANCH:-master}" ARGS="--branch=${BRANCH:-master}"
if [[ "$DEPTH" != "" ]]; then if [[ "$DEPTH" != "" ]]; then
ARGS="$ARGS --depth=$DEPTH" ARGS="$ARGS --depth=$DEPTH"
else
ARGS="$ARGS --depth=2"
fi fi
git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS
cd $DIRECTORY cd $DIRECTORY