Compare commits

...

26 Commits

Author SHA1 Message Date
perry
ae0bb990c8 testing 2015-05-11 15:52:13 -05:00
Perry Govier
3684709191 Merge pull request #3681 from gberg1/patch-1
docs(tabs) Formatting error on line 38 tabsController.js
2015-05-08 11:33:37 -05:00
Perry Govier
5602982fc1 Merge pull request #3661 from aliok/patch-1
tidy(scrollController) Remove unused local variable `levelsClimbed`
2015-05-08 11:31:18 -05:00
perry
86565e2462 fix(infiniteScroll): prevent error on infinite scroll complete with native scrolling Closes #3682 2015-05-08 10:56:43 -05:00
David Goldberg
5ab697f447 Corrected error line 38 tabsController.js
Changed first letter of the first word in comment on line 38 to a capital letter to be consistent with other comments found in the file.
2015-05-07 15:39:59 -07:00
perry
adea328d1b amend(slidebox): fix typo in 08956b29b0 Closes #3675, #3589 2015-05-07 14:05:33 -05:00
perry
d684d62a24 fix(config): add support for blob image protocol. Closes #3645 2015-05-05 10:47:26 -05:00
mhartington
db730f16a7 fix(ionicConfig): allow using tel for hrefs
Closes #3647
2015-05-05 10:43:03 -04:00
Ali Ok
418cc11e6f Removed unused local variable levelsClimbed
Variable `levelsClimbed` was not used at all and is now removed.
Local variable `levelsClimbed` in `scrollController#anchorScroll`
2015-05-05 13:50:35 +02:00
perry
4e74ead5f8 fix(modal): Prevent scroll=false content from overlapping modal content. Closes #3648 2015-05-04 13:23:15 -05:00
Tim Lancina
230886e31e chore(readme): spell tim's name correctly 2015-05-04 10:21:37 -05:00
Perry Govier
9c612b4ae9 chore(readme): adding tim to core team list 2015-05-01 15:52:46 -05:00
Perry Govier
256bc93f40 chore(readme): updating core team list 2015-05-01 15:50:44 -05:00
Perry Govier
bd72a33c0d Merge pull request #3154 from Alain-Bearez/patch-1
fix(fonts): IE does not support query string cache busting in font URLs
2015-05-01 15:36:24 -05:00
Perry Govier
d34b1ea889 Merge pull request #3650 from donwilson/patch-1
docs(content): typo fix
2015-05-01 15:18:43 -05:00
perry
c5461f5a90 docs(nativeScrolling): document how to enable native scrolling gobally 2015-05-01 14:53:23 -05:00
perry
0557c3059f fix(scrolling): Collection repeat requires JS scrolling 2015-05-01 14:36:08 -05:00
Don Wilson
33face0e59 Update content.js
Typo fix
2015-05-01 02:28:13 -05:00
perry
08c37f9a98 fix(ionicConfig): fix WP scrolling regression. Closes #3634 2015-04-29 10:37:21 -05:00
Andrew Joslin
43dacd89af chore(release): remove twitter/irc 2015-04-29 09:34:41 -05:00
Perry Govier
f6ca79b9ed tests(sideMenus): remove white space for linter 2015-04-28 10:28:03 -05:00
Perry Govier
027a61f756 Merge pull request #3623 from sherwyngoh/patch-1
docs(sidemenu): clarify sidemenus structure
2015-04-28 10:16:03 -05:00
mhartington
f93393f88f fix(forms): add required and ng-required to form directives
Closes #3603
2015-04-27 22:59:29 -05:00
Perry Govier
5455f8d483 chore(changelog): fix changelog from release bug 2015-04-27 18:28:55 -05:00
Sherwyn
cfdf692c9b Update sideMenus.js
I couldn't understand the docs well until I read http://mcgivery.com/understanding-ionics-side-menu/ . I've tried to incorporate his explanation into the docs. This picture http://mcgivery.com/wp-content/uploads/2014/11/sidemenu.png was very helpful.
2015-04-27 13:14:13 +08:00
Alain Béarez
88b8236e50 fix(ionicons): append a non-versioned url for WP8 2015-02-19 15:45:10 -03:00
17 changed files with 84 additions and 1491 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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({

View File

@@ -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);

View File

@@ -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);
});

View File

@@ -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;

View File

@@ -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);

View File

@@ -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');

View File

@@ -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);

View File

@@ -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

View File

@@ -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);

View File

@@ -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\//);
}]);

View File

@@ -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) {

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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({