Skip to content

Commit cdeffeb

Browse files
committed
Resolved #74
Bug +workaround documented here: ionic-team/ionic-framework#2817
1 parent 23de0f8 commit cdeffeb

File tree

7 files changed

+75
-64
lines changed

7 files changed

+75
-64
lines changed

www/js/app.js

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ angular.module('splash',
7777
$cordovaFacebookProvider.setAppID(appID, version);
7878
}
7979

80+
// Android native scrolling
8081
if(ionic.Platform.isAndroid()) $ionicConfigProvider.scrolling.jsScrolling(false);
8182

8283
// Ionic uses AngularUI Router which uses the concept of states

www/js/ctrls/tab-account.ctrl.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
angular.module('splash.tabAccount.ctrl', [])
22

33

4-
.controller('TabAccountCtrl', function($rootScope, $scope, $q, $state, $ionicModal, $ionicLoading,
4+
.controller('TabAccountCtrl', function($scope, $q, $state, $ionicModal, $ionicLoading,
55
$ionicPopup, $cordovaFacebook, $cordovaFile,
66
$cordovaGeolocation, $localstorage, $cordovaGoogleAnalytics, $profile) {
77

@@ -41,22 +41,22 @@ angular.module('splash.tabAccount.ctrl', [])
4141

4242

4343
//EXPERIMENTAL
44-
$scope.retrieveActualCities = function() {
45-
$profile.getCities()
46-
.then(function(success) {
47-
48-
var cities = success;
49-
})
50-
}
44+
//$scope.retrieveActualCities = function() {
45+
// $profile.getCities()
46+
// .then(function(success) {
47+
//
48+
// var cities = success;
49+
// })
50+
//}
5151
//EXPERIMENTAL
5252

5353

5454
$ionicModal.fromTemplateUrl('templates/cityModal.html', function(modal) {
5555
$scope.cityModalCtrl = modal;
5656
}, {
57-
scope: $scope,
58-
animation: 'slide-in-up',
59-
focusFirstInput: true
57+
scope: $scope
58+
//animation: 'slide-in-up',
59+
//focusFirstInput: true
6060
});
6161

6262
$scope.modalData = { msg : {value: $scope.cities[0].value} };
@@ -65,7 +65,6 @@ angular.module('splash.tabAccount.ctrl', [])
6565
clientSide: $scope.cities[0].value
6666
};
6767

68-
6968
$scope.openModal = function() {
7069
$scope.cityModalCtrl.show();
7170
};

www/js/ctrls/tab-events.ctrl.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ angular.module('splash.tabEvents.ctrl', [])
88
$cordovaGoogleAnalytics.trackView('Events');
99
});
1010

11-
$scope.events = Events.all();
11+
// workaround for bug (check https://github.com/driftyco/ionic/issues/2817)
12+
$scope.$on('$ionicView.beforeEnter', function() {
13+
$ionicSlideBoxDelegate.update();
14+
});
1215

16+
$scope.events = Events.all();
17+
1318
$scope.doRefresh = function() {
1419
setTimeout(function() {
1520

www/js/services/events.js

+18-9
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ angular.module('splash.events', [])
5454
{
5555
id: 0,
5656
name:'dancing event',
57-
image: 'url(img/event1.jpg)',
57+
backImage: 'url(img/event1.jpg)',
58+
image: 'img/event1.jpg',
5859
date : 'DIC 25',
5960
users: ['313'],
6061
posSwipes : 0,
@@ -64,7 +65,8 @@ angular.module('splash.events', [])
6465
{
6566
id: 1,
6667
name:'disco event',
67-
image: 'url(img/event2.jpg)',
68+
backImage: 'url(img/event2.jpg)',
69+
image: 'img/event2.jpg',
6870
date : 'DIC 25',
6971
users: ['313', '314'],
7072
posSwipes : 0,
@@ -73,7 +75,8 @@ angular.module('splash.events', [])
7375
{
7476
id: 2,
7577
name:'electro event',
76-
image: 'url(img/event3.jpg)',
78+
backImage: 'url(img/event3.jpg)',
79+
image: 'img/event3.jpg',
7780
date : 'DIC 25',
7881
users: ['313', '314', '315'],
7982
posSwipes : 0,
@@ -82,7 +85,8 @@ angular.module('splash.events', [])
8285
{
8386
id: 3,
8487
name:'dancing event',
85-
image: 'url(img/event1.jpg)',
88+
backImage: 'url(img/event1.jpg)',
89+
image: 'img/event1.jpg',
8690
date : 'DIC 25',
8791
users: ['313'],
8892
posSwipes : 0,
@@ -92,7 +96,8 @@ angular.module('splash.events', [])
9296
{
9397
id: 4,
9498
name:'disco event',
95-
image: 'url(img/event2.jpg)',
99+
backImage: 'url(img/event2.jpg)',
100+
image: 'img/event2.jpg',
96101
date : 'DIC 25',
97102
users: ['313', '314'],
98103
posSwipes : 0,
@@ -101,7 +106,8 @@ angular.module('splash.events', [])
101106
{
102107
id: 5,
103108
name:'electro event',
104-
image: 'url(img/event3.jpg)',
109+
backImage: 'url(img/event3.jpg)',
110+
image: 'img/event3.jpg',
105111
date : 'DIC 25',
106112
users: ['313', '314', '315'],
107113
posSwipes : 0,
@@ -110,7 +116,8 @@ angular.module('splash.events', [])
110116
{
111117
id: 6,
112118
name:'dancing event',
113-
image: 'url(img/event1.jpg)',
119+
backImage: 'url(img/event1.jpg)',
120+
image: 'img/event1.jpg',
114121
date : 'DIC 25',
115122
users: ['313'],
116123
posSwipes : 0,
@@ -120,7 +127,8 @@ angular.module('splash.events', [])
120127
{
121128
id: 7,
122129
name:'disco event',
123-
image: 'url(img/event2.jpg)',
130+
backImage: 'url(img/event2.jpg)',
131+
image: 'img/event2.jpg',
124132
date : 'DIC 25',
125133
users: ['313', '314'],
126134
posSwipes : 0,
@@ -129,7 +137,8 @@ angular.module('splash.events', [])
129137
{
130138
id: 8,
131139
name:'electro event',
132-
image: 'url(img/event3.jpg)',
140+
backImage: 'url(img/event3.jpg)',
141+
image: 'img/event3.jpg',
133142
date : 'DIC 25',
134143
users: ['313', '314', '315'],
135144
posSwipes : 0,

www/templates/eventDetail.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}">
1111

1212
</ion-header-bar>
13-
<ion-content class="padding" ng-style="{'background-color':'#32506d'}">
13+
<ion-content class="padding" ng-style="{'background-color':'#fff'}">
1414
<!-- <img ng-src="{{event.image}}" style="width: 64px; height: 64px">
1515
<h3>Notes</h3>
1616
<p>

www/templates/tab-account.html

+34-34
Original file line numberDiff line numberDiff line change
@@ -52,40 +52,40 @@
5252

5353
<!--CITY SELECTOR-->
5454

55-
<div id="city-event-block" ng-style="{
56-
'margin-top': buttonBoxMarginTop
57-
}">
58-
59-
<div class="item item-input item-select"
60-
ng-style="{
61-
'height': buttonHeight,
62-
'width': buttonBoxWidth,
63-
'margin-left': 'auto',
64-
'margin-right': 'auto',
65-
'color': 'white',
66-
'border':'none',
67-
'background-color': '#062142',
68-
'border-radius' : buttonBorderRadius
69-
}">
70-
<div class="input-label"
71-
ng-style="{
72-
'color': 'white',
73-
'background-color': '#062142'
74-
}">
75-
City
76-
</div>
77-
<select ng-model="city"
78-
ng-init="city=cities[myCity.id]"
79-
ng-options="city.name for city in cities"
80-
ng-change="updateCity(city)"
81-
ng-style="{
82-
'background-color': '#062142',
83-
'color': 'white'
84-
}">
85-
86-
</select>
87-
</div>
88-
</div>
55+
<!--<div id="city-event-block" ng-style="{-->
56+
<!--'margin-top': buttonBoxMarginTop-->
57+
<!--}">-->
58+
59+
<!--<div class="item item-input item-select"-->
60+
<!--ng-style="{-->
61+
<!--'height': buttonHeight,-->
62+
<!--'width': buttonBoxWidth,-->
63+
<!--'margin-left': 'auto',-->
64+
<!--'margin-right': 'auto',-->
65+
<!--'color': 'white',-->
66+
<!--'border':'none',-->
67+
<!--'background-color': '#062142',-->
68+
<!--'border-radius' : buttonBorderRadius-->
69+
<!--}">-->
70+
<!--<div class="input-label"-->
71+
<!--ng-style="{-->
72+
<!--'color': 'white',-->
73+
<!--'background-color': '#062142'-->
74+
<!--}">-->
75+
<!--City-->
76+
<!--</div>-->
77+
<!--<select ng-model="city"-->
78+
<!--ng-init="city=cities[myCity.id]"-->
79+
<!--ng-options="city.name for city in cities"-->
80+
<!--ng-change="updateCity(city)"-->
81+
<!--ng-style="{-->
82+
<!--'background-color': '#062142',-->
83+
<!--'color': 'white'-->
84+
<!--}">-->
85+
86+
<!--</select>-->
87+
<!--</div>-->
88+
<!--</div>-->
8989

9090
<!--EVENT CATEGORIES SELECTOR-->
9191

www/templates/tab-events.html

+4-7
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
<ion-refresher on-refresh="doRefresh()"></ion-refresher>
2424

25-
<div class="list">
26-
27-
<a class="event"
25+
<a
2826
ng-repeat="event in events"
2927
href="#/app/event/{{event.id}}"
3028
ng-style="{
@@ -41,7 +39,7 @@
4139
<!--<div class="bio">-->
4240
<button class="col button button-event"
4341
ng-style="{
44-
'background-image': event.image,
42+
'background-image': event.backImage,
4543
'background-size': backgroundSize,
4644
'background-repeat':'no-repeat',
4745
'height' : cardHeight
@@ -63,7 +61,6 @@
6361

6462

6563
</a>
66-
</div>
6764

6865
</ion-content>
6966

@@ -92,7 +89,7 @@
9289
<!--<div class="bio">-->
9390
<button class="col button button-event"
9491
ng-style="{
95-
'background-image': event.image,
92+
'background-image': event.backImage,
9693
'background-size': backgroundSize,
9794
'background-repeat':'no-repeat',
9895
'height' : cardHeight
@@ -142,7 +139,7 @@
142139
<!--<div class="bio">-->
143140
<button class="col button button-event"
144141
ng-style="{
145-
'background-image': event.image,
142+
'background-image': event.backImage,
146143
'background-size': backgroundSize,
147144
'background-repeat':'no-repeat',
148145
'height' : cardHeight

0 commit comments

Comments
 (0)