Skip to content

Commit 9de7662

Browse files
committed
Merge branch 'master' of github.com:driftyco/ionic
2 parents 22ccc27 + 9956de4 commit 9de7662

File tree

9 files changed

+58
-14
lines changed

9 files changed

+58
-14
lines changed

js/angular/directive/slideBox.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@
3737
*/
3838
IonicModule
3939
.directive('ionSlideBox', [
40+
'$animate',
4041
'$timeout',
4142
'$compile',
4243
'$ionicSlideBoxDelegate',
4344
'$ionicHistory',
4445
'$ionicScrollDelegate',
45-
function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScrollDelegate) {
46+
function($animate, $timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScrollDelegate) {
4647
return {
4748
restrict: 'E',
4849
replace: true,
@@ -155,6 +156,9 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory, $ionicScroll
155156
'</div>',
156157

157158
link: function($scope, $element, $attr) {
159+
// Disable ngAnimate for slidebox and its children
160+
$animate.enabled(false, $element);
161+
158162
// if showPager is undefined, show the pager
159163
if (!isDefined($attr.showPager)) {
160164
$scope.showPager = true;

js/angular/directive/tabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* @usage
2727
* ```html
28-
* <ion-tabs class="tabs-positive tabs-icon-only">
28+
* <ion-tabs class="tabs-positive tabs-icon-top">
2929
*
3030
* <ion-tab title="Home" icon-on="ion-ios-filing" icon-off="ion-ios-filing-outline">
3131
* <!-- Tab 1 content -->

js/angular/service/backdrop.js

+20-3
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,39 @@
1818
* For example, if `retain` is called three times, the backdrop will be shown until `release`
1919
* is called three times.
2020
*
21+
* **Notes:**
22+
* - The backdrop service will broadcast 'backdrop.shown' and 'backdrop.hidden' events from the root scope,
23+
* this is useful for alerting native components not in html.
24+
*
2125
* @usage
2226
*
2327
* ```js
24-
* function MyController($scope, $ionicBackdrop, $timeout) {
28+
* function MyController($scope, $ionicBackdrop, $timeout, $rootScope) {
2529
* //Show a backdrop for one second
2630
* $scope.action = function() {
2731
* $ionicBackdrop.retain();
2832
* $timeout(function() {
2933
* $ionicBackdrop.release();
3034
* }, 1000);
3135
* };
36+
*
37+
* // Execute action on backdrop disappearing
38+
* $scope.$on('backdrop.hidden', function() {
39+
* // Execute action
40+
* });
41+
*
42+
* // Execute action on backdrop appearing
43+
* $scope.$on('backdrop.shown', function() {
44+
* // Execute action
45+
* });
46+
*
3247
* }
3348
* ```
3449
*/
3550
IonicModule
3651
.factory('$ionicBackdrop', [
37-
'$document', '$timeout', '$$rAF',
38-
function($document, $timeout, $$rAF) {
52+
'$document', '$timeout', '$$rAF', '$rootScope',
53+
function($document, $timeout, $$rAF, $rootScope) {
3954

4055
var el = jqLite('<div class="backdrop">');
4156
var backdropHolds = 0;
@@ -67,6 +82,7 @@ function($document, $timeout, $$rAF) {
6782
backdropHolds++;
6883
if (backdropHolds === 1) {
6984
el.addClass('visible');
85+
$rootScope.$broadcast('backdrop.shown');
7086
$$rAF(function() {
7187
// If we're still at >0 backdropHolds after async...
7288
if (backdropHolds >= 1) el.addClass('active');
@@ -76,6 +92,7 @@ function($document, $timeout, $$rAF) {
7692
function release() {
7793
if (backdropHolds === 1) {
7894
el.removeClass('active');
95+
$rootScope.$broadcast('backdrop.hidden');
7996
$timeout(function() {
8097
// If we're still at 0 backdropHolds after async...
8198
if (backdropHolds === 0) el.removeClass('visible');

js/utils/keyboard.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ var keyboardLandscapeViewportHeight = 0;
9595
*/
9696
var keyboardActiveElement;
9797

98+
/**
99+
* The previously focused input used to reset keyboard after focusing on a
100+
* new non-keyboard element
101+
*/
102+
var lastKeyboardActiveElement;
103+
98104
/**
99105
* The scroll view containing the currently focused input.
100106
*/
@@ -311,6 +317,9 @@ function keyboardFocusIn(e) {
311317
e.target.readOnly ||
312318
!ionic.tap.isKeyboardElement(e.target) ||
313319
!(scrollView = ionic.DomUtil.getParentWithClass(e.target, SCROLL_CONTAINER_CSS))) {
320+
if (keyboardActiveElement) {
321+
lastKeyboardActiveElement = keyboardActiveElement;
322+
}
314323
keyboardActiveElement = null;
315324
return;
316325
}
@@ -546,9 +555,9 @@ function keyboardHide() {
546555
ionic.keyboard.isOpen = false;
547556
ionic.keyboard.isClosing = false;
548557

549-
if (keyboardActiveElement) {
558+
if (keyboardActiveElement || lastKeyboardActiveElement) {
550559
ionic.trigger('resetScrollView', {
551-
target: keyboardActiveElement
560+
target: keyboardActiveElement || lastKeyboardActiveElement
552561
}, true);
553562
}
554563

@@ -572,6 +581,7 @@ function keyboardHide() {
572581
}
573582

574583
keyboardActiveElement = null;
584+
lastKeyboardActiveElement = null;
575585
}
576586

577587
/**

release/js/ionic-angular.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ jqLite.prototype.addClass = function(cssClasses) {
238238
el = this[x];
239239
if (el.setAttribute) {
240240

241-
if (cssClasses.indexOf(' ') < 0 && el.classList.add) {
241+
if (cssClasses.indexOf(' ') < 0 && el.classList && el.classList.add) {
242242
el.classList.add(cssClasses);
243243
} else {
244244
existingClasses = (' ' + (el.getAttribute('class') || '') + ' ')
@@ -13532,4 +13532,4 @@ IonicModule
1353213532
};
1353313533
});
1353413534

13535-
})();
13535+
})();

scss/_button-bar.scss

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
border-right-width: 1px;
5252
border-radius: 0px $button-border-radius $button-border-radius 0px;
5353
}
54+
&:only-child {
55+
border-radius: $button-border-radius;
56+
}
5457
}
5558

5659
.button-bar > .button-small {

scss/_checkbox.scss

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ input:checked + .checkbox-icon:before {
127127
height: 7px;
128128
}
129129

130+
.platform-android .item-checkbox-right .checkbox-square .checkbox-icon::after {
131+
top: 31%;
132+
}
133+
130134
.grade-c .checkbox input:after,
131135
.grade-c .checkbox-icon:after {
132136
@include rotate(0);

scss/_form.scss

+9
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ textarea {
156156
height: $line-height-computed + $font-size-base + 12px;
157157
}
158158

159+
.item-select.item-stacked-label select {
160+
position: relative;
161+
padding: 0px;
162+
max-width: 90%;
163+
direction:ltr;
164+
white-space: pre-wrap;
165+
margin: -3px;
166+
}
167+
159168
.item-floating-label {
160169
display: block;
161170
background-color: transparent;

test/html/sideMenu.html

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
<ion-side-menu-content edge-drag-threshold="true" drag-content="!$root.disableDrag">
1717
<header class="bar bar-header bar-positive">
18-
<button class="button button-icon ion-navicon" ng-click="toggleLeft()" ng-hide="$exposeAside.active"></button>
18+
<button class="button button-icon ion-navicon" menu-toggle="left" ng-hide="$exposeAside.active"></button>
1919
<h1 class="title">Slide me</h1>
20-
<button class="button button-icon ion-navicon" ng-click="toggleRight()"></button>
20+
<button class="button button-icon ion-navicon" menu-toggle="right"></button>
2121
</header>
2222
<ion-content class="has-header">
2323
<ion-toggle ng-model="$root.disableDrag">Disable Drag Content?</ion-toggle>
@@ -67,9 +67,6 @@ <h1 class="title">Right</h1>
6767

6868
.controller('MenuCtrl', function($scope, $ionicSideMenuDelegate) {
6969

70-
$scope.toggleLeft = $ionicSideMenuDelegate.toggleLeft;
71-
$scope.toggleRight = $ionicSideMenuDelegate.toggleRight;
72-
7370
$scope.list = [];
7471
for(var i = 0; i < 20; i++) {
7572
$scope.list.push({

0 commit comments

Comments
 (0)