mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
Merge branch '2.0' into loading
This commit is contained in:
@ -178,7 +178,6 @@ export class InfiniteScroll {
|
||||
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
|
||||
if (distanceFromInfinite < 0) {
|
||||
this._zone.run(() => {
|
||||
console.debug('infinite scroll');
|
||||
this.state = STATE_LOADING;
|
||||
this.infinite.emit(this);
|
||||
});
|
||||
|
@ -251,7 +251,6 @@ export class Refresher {
|
||||
// this method can get called like a bazillion times per second,
|
||||
// so it's built to be as efficient as possible, and does its
|
||||
// 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 (ev.touches && ev.touches.length > 1) {
|
||||
|
12
ionic/components/slides/swiper-widget.d.ts
vendored
12
ionic/components/slides/swiper-widget.d.ts
vendored
@ -4,9 +4,9 @@ export declare class Swiper {
|
||||
activeIndex: number;
|
||||
isEnd: boolean;
|
||||
isBeginning: boolean;
|
||||
|
||||
update();
|
||||
slideNext();
|
||||
slidePrev();
|
||||
|
||||
}
|
||||
|
||||
update():any;
|
||||
slideNext():any;
|
||||
slidePrev():any;
|
||||
|
||||
}
|
||||
|
@ -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/
|
||||
* @see {@link ../../navbar/Navbar/ Navbar API Docs}
|
||||
*/
|
||||
|
@ -91,25 +91,25 @@ export let CSS: {
|
||||
|
||||
export function transitionEnd(el: HTMLElement, callback: Function) {
|
||||
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 => {
|
||||
el.addEventListener(eventName, onEvent);
|
||||
});
|
||||
|
||||
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) {
|
||||
@ -124,17 +124,17 @@ export function ready(callback?: Function) {
|
||||
callback();
|
||||
|
||||
} else {
|
||||
function completed() {
|
||||
document.removeEventListener('DOMContentLoaded', completed, false);
|
||||
window.removeEventListener('load', completed, false);
|
||||
callback();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', completed, false);
|
||||
window.addEventListener('load', completed, false);
|
||||
}
|
||||
|
||||
return promise;
|
||||
|
||||
function completed() {
|
||||
document.removeEventListener('DOMContentLoaded', completed, false);
|
||||
window.removeEventListener('load', completed, false);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
export function windowLoad(callback?: Function) {
|
||||
@ -149,15 +149,16 @@ export function windowLoad(callback?: Function) {
|
||||
callback();
|
||||
|
||||
} else {
|
||||
function completed() {
|
||||
window.removeEventListener('load', completed, false);
|
||||
callback();
|
||||
}
|
||||
|
||||
window.addEventListener('load', completed, false);
|
||||
}
|
||||
|
||||
return promise;
|
||||
|
||||
function completed() {
|
||||
window.removeEventListener('load', completed, false);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
export function pointerCoord(ev: any): {x: number, y: number} {
|
||||
|
@ -39,11 +39,11 @@ function run {
|
||||
|
||||
# if no changes, don't commit
|
||||
if [[ "$CHANGES" == "" ]]; then
|
||||
ls
|
||||
echo "-- No changes detected in docs for $VERSION_NAME; docs not updated."
|
||||
echo "-- No changes detected for the following commit, docs not updated."
|
||||
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
else
|
||||
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
|
||||
|
||||
echo "-- Updated docs for $VERSION_NAME succesfully!"
|
||||
|
@ -21,6 +21,10 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
.replace('/index.md','')
|
||||
.replace('//home/ubuntu/ionic/ionic', '')
|
||||
.replace('//', '/');
|
||||
if (docs[i].relativePath) {
|
||||
docs[i].relativePath = doc.relativePath
|
||||
.replace('/home/ubuntu/ionic', '');
|
||||
}
|
||||
});
|
||||
|
||||
docs.push({
|
||||
|
2
scripts/docs/templates/common.template.html
vendored
2
scripts/docs/templates/common.template.html
vendored
@ -147,7 +147,7 @@ Delegate: <$ doc.delegate $>
|
||||
|
||||
</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
|
||||
</a>
|
||||
|
||||
|
@ -16,6 +16,8 @@ function run {
|
||||
ARGS="--branch=${BRANCH:-master}"
|
||||
if [[ "$DEPTH" != "" ]]; then
|
||||
ARGS="$ARGS --depth=$DEPTH"
|
||||
else
|
||||
ARGS="$ARGS --depth=2"
|
||||
fi
|
||||
git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS
|
||||
cd $DIRECTORY
|
||||
|
Reference in New Issue
Block a user