mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Compare commits
26 Commits
v1.0.0-rc.
...
testing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0bb990c8 | ||
|
|
3684709191 | ||
|
|
5602982fc1 | ||
|
|
86565e2462 | ||
|
|
5ab697f447 | ||
|
|
adea328d1b | ||
|
|
d684d62a24 | ||
|
|
db730f16a7 | ||
|
|
418cc11e6f | ||
|
|
4e74ead5f8 | ||
|
|
230886e31e | ||
|
|
9c612b4ae9 | ||
|
|
256bc93f40 | ||
|
|
bd72a33c0d | ||
|
|
d34b1ea889 | ||
|
|
c5461f5a90 | ||
|
|
0557c3059f | ||
|
|
33face0e59 | ||
|
|
08c37f9a98 | ||
|
|
43dacd89af | ||
|
|
f6ca79b9ed | ||
|
|
027a61f756 | ||
|
|
f93393f88f | ||
|
|
5455f8d483 | ||
|
|
cfdf692c9b | ||
|
|
88b8236e50 |
1484
CHANGELOG.md
1484
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -66,7 +66,7 @@ For most cases, you'll need AngularJS as well. This is bundled in `js/angular/`
|
||||
|
||||
## Authors
|
||||
|
||||
Originally created by [Adam Bradley](http://twitter.com/adamdbradley), [Ben Sperry](http://twitter.com/benjsperry), and [Max Lynch](http://twitter.com/maxlynch), Ionic has seen hundreds of great [contributors](https://github.com/driftyco/ionic/graphs/contributors) from around the world, including Ionic Team Members [Andrew Joslin](http://twitter.com/andrewtjoslin), [Perry Govier](http://twitter.com/perrygovier), and [Mike Hartington](http://twitter.com/mhartington).
|
||||
Originally created by [Adam Bradley](http://twitter.com/adamdbradley), [Ben Sperry](http://twitter.com/benjsperry), and [Max Lynch](http://twitter.com/maxlynch), Ionic has seen hundreds of great [contributors](https://github.com/driftyco/ionic/graphs/contributors) from around the world, including Ionic Team Members [Perry Govier](http://twitter.com/perrygovier), [Mike Hartington](http://twitter.com/mhartington), and [Tim Lancina](http://twitter.com/dopernicus).
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ gulp.task('bundle', [
|
||||
'scripts',
|
||||
'scripts-ng',
|
||||
'vendor',
|
||||
'version',
|
||||
'version'
|
||||
], function() {
|
||||
gulp.src(buildConfig.ionicBundleFiles.map(function(src) {
|
||||
return src.replace(/.js$/, '.min.js');
|
||||
@@ -225,6 +225,7 @@ gulp.task('version', function() {
|
||||
.pipe(gulp.dest(buildConfig.dist));
|
||||
});
|
||||
|
||||
/*
|
||||
gulp.task('release-tweet', function(done) {
|
||||
var oauth = {
|
||||
consumerKey: process.env.TWITTER_CONSUMER_KEY,
|
||||
@@ -245,7 +246,9 @@ gulp.task('release-tweet', function(done) {
|
||||
done
|
||||
);
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
gulp.task('release-irc', function(done) {
|
||||
var client = irc({
|
||||
host: 'irc.freenode.net',
|
||||
@@ -260,6 +263,7 @@ gulp.task('release-irc', function(done) {
|
||||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
gulp.task('release-github', function(done) {
|
||||
var github = new GithubApi({
|
||||
|
||||
@@ -45,7 +45,8 @@ function($scope, $attrs, $element, $timeout) {
|
||||
$timeout(function() {
|
||||
if (self.jsScrolling) self.scrollView.resize();
|
||||
// only check bounds again immediately if the page isn't cached (scroll el has height)
|
||||
if (self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) {
|
||||
if ((self.jsScrolling && self.scrollView.__container && self.scrollView.__container.offsetHeight > 0) ||
|
||||
!self.jsScrolling) {
|
||||
self.checkBounds();
|
||||
}
|
||||
}, 30, false);
|
||||
|
||||
3
js/angular/controller/scrollController.js
vendored
3
js/angular/controller/scrollController.js
vendored
@@ -152,12 +152,11 @@ function($scope,
|
||||
return;
|
||||
}
|
||||
var curElm = elm;
|
||||
var scrollLeft = 0, scrollTop = 0, levelsClimbed = 0;
|
||||
var scrollLeft = 0, scrollTop = 0;
|
||||
do {
|
||||
if (curElm !== null) scrollLeft += curElm.offsetLeft;
|
||||
if (curElm !== null) scrollTop += curElm.offsetTop;
|
||||
curElm = curElm.offsetParent;
|
||||
levelsClimbed++;
|
||||
} while (curElm.attributes != self.element.attributes && curElm.offsetParent);
|
||||
scrollView.scrollTo(scrollLeft, scrollTop, !!shouldAnimate);
|
||||
});
|
||||
|
||||
2
js/angular/controller/tabsController.js
vendored
2
js/angular/controller/tabsController.js
vendored
@@ -35,7 +35,7 @@ function($scope, $element, $ionicHistory) {
|
||||
self.deselect(tab);
|
||||
//Try to select a new tab if we're removing a tab
|
||||
if (self.tabs.length === 1) {
|
||||
//do nothing if there are no other tabs to select
|
||||
//Do nothing if there are no other tabs to select
|
||||
} else {
|
||||
//Select previous tab if it's the last tab, else select next tab
|
||||
var newTabIndex = tabIndex === self.tabs.length - 1 ? tabIndex - 1 : tabIndex + 1;
|
||||
|
||||
4
js/angular/directive/checkbox.js
vendored
4
js/angular/directive/checkbox.js
vendored
@@ -41,7 +41,9 @@ IonicModule
|
||||
'ng-disabled': attr.ngDisabled,
|
||||
'ng-true-value': attr.ngTrueValue,
|
||||
'ng-false-value': attr.ngFalseValue,
|
||||
'ng-change': attr.ngChange
|
||||
'ng-change': attr.ngChange,
|
||||
'ng-required': attr.ngRequired,
|
||||
'required': attr.required
|
||||
}, function(value, name) {
|
||||
if (isDefined(value)) {
|
||||
input.attr(name, value);
|
||||
|
||||
14
js/angular/directive/content.js
vendored
14
js/angular/directive/content.js
vendored
@@ -19,7 +19,7 @@
|
||||
* directive.
|
||||
*
|
||||
* If there is any dynamic content inside the ion-content, be sure to call `.resize()` with {@link ionic.service:$ionicScrollDelegate}
|
||||
* after the content as been added.
|
||||
* after the content has been added.
|
||||
*
|
||||
* Be aware that this directive gets its own child scope. If you do not understand why this
|
||||
* is important, you can read [https://docs.angularjs.org/guide/scope](https://docs.angularjs.org/guide/scope).
|
||||
@@ -32,7 +32,7 @@
|
||||
* of the content. Defaults to true on iOS, false on Android.
|
||||
* @param {boolean=} scroll Whether to allow scrolling of content. Defaults to true.
|
||||
* @param {boolean=} overflow-scroll Whether to use overflow-scrolling instead of
|
||||
* Ionic scroll.
|
||||
* Ionic scroll. See {@link ionic.provider:$ionicConfigProvider} to set this as the global default.
|
||||
* @param {boolean=} scrollbar-x Whether to show the horizontal scrollbar. Default true.
|
||||
* @param {boolean=} scrollbar-y Whether to show the vertical scrollbar. Default true.
|
||||
* @param {string=} start-x Initial horizontal scroll position. Default 0.
|
||||
@@ -71,6 +71,13 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
|
||||
element.addClass('scroll-content-false');
|
||||
}
|
||||
|
||||
var nativeScrolling = attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling();
|
||||
|
||||
// collection-repeat requires JS scrolling
|
||||
if (nativeScrolling) {
|
||||
nativeScrolling = !element[0].querySelector('[collection-repeat]');
|
||||
}
|
||||
|
||||
return { pre: prelink };
|
||||
function prelink($scope, $element, $attr) {
|
||||
var parentScope = $scope.$parent;
|
||||
@@ -116,7 +123,8 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
|
||||
} else {
|
||||
var scrollViewOptions = {};
|
||||
|
||||
if (attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling()) {
|
||||
// determined in compile phase above
|
||||
if (nativeScrolling) {
|
||||
// use native scrolling
|
||||
$element.addClass('overflow-scroll');
|
||||
|
||||
|
||||
4
js/angular/directive/radio.js
vendored
4
js/angular/directive/radio.js
vendored
@@ -52,7 +52,9 @@ IonicModule
|
||||
'ng-value': attr.ngValue,
|
||||
'ng-model': attr.ngModel,
|
||||
'ng-disabled': attr.ngDisabled,
|
||||
'ng-change': attr.ngChange
|
||||
'ng-change': attr.ngChange,
|
||||
'ng-required': attr.ngRequired,
|
||||
'required': attr.required
|
||||
}, function(value, name) {
|
||||
if (isDefined(value)) {
|
||||
input.attr(name, value);
|
||||
|
||||
10
js/angular/directive/sideMenus.js
vendored
10
js/angular/directive/sideMenus.js
vendored
@@ -38,9 +38,9 @@ IonicModule
|
||||
* - {@link ionic.directive:exposeAsideWhen}
|
||||
*
|
||||
* @usage
|
||||
* To use side menus, add an `<ion-side-menus>` parent element,
|
||||
* an `<ion-side-menu-content>` for the center content,
|
||||
* and one or more `<ion-side-menu>` directives.
|
||||
* To use side menus, add an `<ion-side-menus>` parent element. This will encompass all pages that have a
|
||||
* side menu, and have at least 2 child elements: 1 `<ion-side-menu-content>` for the center content,
|
||||
* and one or more `<ion-side-menu>` directives for each side menu(left/right) that you wish to place.
|
||||
*
|
||||
* ```html
|
||||
* <ion-side-menus>
|
||||
@@ -55,6 +55,10 @@ IonicModule
|
||||
* <!-- Right menu -->
|
||||
* <ion-side-menu side="right">
|
||||
* </ion-side-menu>
|
||||
*
|
||||
* <ion-side-menu-content>
|
||||
* <!-- Main content, usually <ion-nav-view> -->
|
||||
* </ion-side-menu-content>
|
||||
* </ion-side-menus>
|
||||
* ```
|
||||
* ```js
|
||||
|
||||
4
js/angular/directive/toggle.js
vendored
4
js/angular/directive/toggle.js
vendored
@@ -54,7 +54,9 @@ function($timeout, $ionicConfig) {
|
||||
'ng-disabled': attr.ngDisabled,
|
||||
'ng-true-value': attr.ngTrueValue,
|
||||
'ng-false-value': attr.ngFalseValue,
|
||||
'ng-change': attr.ngChange
|
||||
'ng-change': attr.ngChange,
|
||||
'ng-required': attr.ngRequired,
|
||||
'required': attr.required
|
||||
}, function(value, name) {
|
||||
if (isDefined(value)) {
|
||||
input.attr(name, value);
|
||||
|
||||
19
js/angular/service/ionicConfig.js
vendored
19
js/angular/service/ionicConfig.js
vendored
@@ -88,6 +88,15 @@
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ionicConfigProvider#scrolling.jsScrolling
|
||||
* @description Whether to use JS or Native scrolling. Defaults to JS scrolling. Setting this to
|
||||
* `false` has the same effect as setting each `ion-content` to have `overflow-scroll='true'`.
|
||||
* @param {boolean} value Defaults to `true`
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ionicConfigProvider#backButton.icon
|
||||
@@ -346,9 +355,9 @@ IonicModule
|
||||
// Windows Phone
|
||||
// -------------------------
|
||||
setPlatformConfig('windowsphone', {
|
||||
scrolling: {
|
||||
jsScrolling: false
|
||||
}
|
||||
//scrolling: {
|
||||
// jsScrolling: false
|
||||
//}
|
||||
});
|
||||
|
||||
|
||||
@@ -619,6 +628,6 @@ IonicModule
|
||||
// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/
|
||||
// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
|
||||
.config(['$compileProvider', function($compileProvider) {
|
||||
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);
|
||||
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|ms-appx|x-wmapp0):|data:image\//);
|
||||
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|tel|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);
|
||||
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|tel|ftp|file|blob|ms-appx|x-wmapp0):|data:image\//);
|
||||
}]);
|
||||
|
||||
@@ -551,7 +551,7 @@ ionic.views.Slider = ionic.views.View.inherit({
|
||||
element.style.left = '';
|
||||
|
||||
// reset slides so no refs are held on to
|
||||
slides && (slides.length = []);
|
||||
slides && (slides = []);
|
||||
|
||||
// removed event listeners
|
||||
if (browser.addEventListener) {
|
||||
|
||||
@@ -37,8 +37,8 @@ function run {
|
||||
./scripts/release/publish.sh
|
||||
node_modules/.bin/gulp release-discourse
|
||||
node_modules/.bin/gulp release-github
|
||||
node_modules/.bin/gulp release-tweet
|
||||
node_modules/.bin/gulp release-irc
|
||||
# node_modules/.bin/gulp release-tweet
|
||||
# node_modules/.bin/gulp release-irc
|
||||
fi
|
||||
;;
|
||||
1)
|
||||
|
||||
@@ -74,7 +74,6 @@ body.grade-c {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.scroll-content-false,
|
||||
.menu .scroll-content.scroll-content-false{
|
||||
z-index: $z-index-scroll-content-false;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"),
|
||||
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff") format("woff"), /* for WP8 */
|
||||
url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
@@ -24,4 +25,4 @@
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,16 @@ describe('collectionRepeat', function() {
|
||||
expect(scrollView.options.getContentHeight).toBe(originalGetContentHeight);
|
||||
}));
|
||||
|
||||
it('should force JS scrolling', inject(function($compile, $rootScope) {
|
||||
var scope = $rootScope.$new();
|
||||
var content = $compile('<ion-content overflow-scroll="true">' +
|
||||
' <div collection-repeat="item in items" item-height="5" item-width="5"></div>' +
|
||||
' </ion-content')(scope);
|
||||
var scrollCtrl = content.data('$$ionicScrollController');
|
||||
$rootScope.$apply()
|
||||
expect(scrollCtrl.isNative()).toBe(false)
|
||||
}));
|
||||
|
||||
describe('automatic dimensions', function() {
|
||||
it('should use computed width/height', inject(function($window) {
|
||||
spyOn($window, 'getComputedStyle').andReturn({
|
||||
|
||||
Reference in New Issue
Block a user