Skip to content

Commit 4c3f607

Browse files
committed
Hide back button when side navigation is open.
1 parent 7458147 commit 4c3f607

File tree

5 files changed

+125
-66
lines changed

5 files changed

+125
-66
lines changed

IonicProjectStarter/IonicProjectStarter.xdk

Lines changed: 97 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"project": {
3-
"projectSettingsVersion": "1.2",
3+
"projectSettingsVersion": "2.0.0",
44
"creationData": {
55
"type": "App Designer",
66
"projectTypeName": "com.intel.xdk.projecttype.jsapp",
77
"src": "appDesigner",
88
"projectGuid": "093974b2-eba3-4a42-94c0-d840844ca468",
9-
"lastModifiedDate": 1441118193282,
9+
"lastModifiedDate": 1443622939641,
1010
"creationDate": 1441118193189
1111
},
1212
"XDK-app-designer": "true",
@@ -25,7 +25,10 @@
2525
"data": {},
2626
"paramvals": {},
2727
"dependsOn": [],
28-
"dependedBy": []
28+
"dependedBy": [],
29+
"originType": "cordova.io",
30+
"origin": "org.apache.cordova.device",
31+
"permissions": {}
2932
},
3033
{
3134
"id": "org.apache.cordova.splashscreen",
@@ -34,7 +37,10 @@
3437
"data": {},
3538
"paramvals": {},
3639
"dependsOn": [],
37-
"dependedBy": []
40+
"dependedBy": [],
41+
"originType": "cordova.io",
42+
"origin": "org.apache.cordova.splashscreen",
43+
"permissions": {}
3844
}
3945
],
4046
"buildConfigurations": {
@@ -50,11 +56,14 @@
5056
"isActive_": true,
5157
"appName_": "IonicProjectStarter",
5258
"appID_": "xdk.intel.blank.ad.template.crosswalk",
53-
"appAccess_": [
54-
{
55-
"origin": "*"
56-
}
57-
],
59+
"appAccess_": {
60+
"mode": "legacy",
61+
"network": [
62+
"*"
63+
],
64+
"intents": [],
65+
"navigation": []
66+
},
5867
"icons_": [],
5968
"splashes_": [],
6069
"addlPermissions_": "",
@@ -79,11 +88,14 @@
7988
"isActive_": true,
8089
"appName_": "IonicProjectStarter",
8190
"appID_": "xdk.intel.blank.ad.template",
82-
"appAccess_": [
83-
{
84-
"origin": "*"
85-
}
86-
],
91+
"appAccess_": {
92+
"mode": "legacy",
93+
"network": [
94+
"*"
95+
],
96+
"intents": [],
97+
"navigation": []
98+
},
8799
"icons_": [],
88100
"splashes_": [],
89101
"addlPermissions_": "",
@@ -107,11 +119,14 @@
107119
"isActive_": true,
108120
"appName_": "IonicProjectStarter",
109121
"appID_": "xdk.intel.blank.ad.template",
110-
"appAccess_": [
111-
{
112-
"origin": "*"
113-
}
114-
],
122+
"appAccess_": {
123+
"mode": "legacy",
124+
"network": [
125+
"*"
126+
],
127+
"intents": [],
128+
"navigation": []
129+
},
115130
"icons_": [],
116131
"splashes_": [],
117132
"addlPermissions_": "",
@@ -134,11 +149,14 @@
134149
"isActive_": true,
135150
"appName_": "IonicProjectStarter",
136151
"appID_": "xdk.intel.blank.ad.template",
137-
"appAccess_": [
138-
{
139-
"origin": "*"
140-
}
141-
],
152+
"appAccess_": {
153+
"mode": "legacy",
154+
"network": [
155+
"*"
156+
],
157+
"intents": [],
158+
"navigation": []
159+
},
142160
"icons_": [],
143161
"splashes_": [],
144162
"addlPermissions_": "",
@@ -158,11 +176,14 @@
158176
"isActive_": false,
159177
"appName_": "IonicProjectStarter",
160178
"appID_": "not.yet.specified",
161-
"appAccess_": [
162-
{
163-
"origin": "*"
164-
}
165-
],
179+
"appAccess_": {
180+
"mode": "legacy",
181+
"network": [
182+
"*"
183+
],
184+
"intents": [],
185+
"navigation": []
186+
},
166187
"icons_": [],
167188
"splashes_": [],
168189
"addlPermissions_": "",
@@ -178,11 +199,14 @@
178199
"isActive_": false,
179200
"appName_": "IonicProjectStarter",
180201
"appID_": "not.yet.specified",
181-
"appAccess_": [
182-
{
183-
"origin": "*"
184-
}
185-
],
202+
"appAccess_": {
203+
"mode": "legacy",
204+
"network": [
205+
"*"
206+
],
207+
"intents": [],
208+
"navigation": []
209+
},
186210
"icons_": [],
187211
"splashes_": [],
188212
"addlPermissions_": "",
@@ -198,11 +222,14 @@
198222
"isActive_": false,
199223
"appName_": "IonicProjectStarter",
200224
"appID_": "not.yet.specified",
201-
"appAccess_": [
202-
{
203-
"origin": "*"
204-
}
205-
],
225+
"appAccess_": {
226+
"mode": "legacy",
227+
"network": [
228+
"*"
229+
],
230+
"intents": [],
231+
"navigation": []
232+
},
206233
"icons_": [],
207234
"splashes_": [],
208235
"addlPermissions_": "",
@@ -218,21 +245,46 @@
218245
"isActive_": false,
219246
"appName_": "IonicProjectStarter",
220247
"appID_": "not.yet.specified",
221-
"appAccess_": [
222-
{
223-
"origin": "*"
224-
}
225-
],
248+
"appAccess_": {
249+
"mode": "legacy",
250+
"network": [
251+
"*"
252+
],
253+
"intents": [],
254+
"navigation": []
255+
},
226256
"icons_": [],
227257
"splashes_": [],
228258
"addlPermissions_": "",
229259
"excludedLibraries_": "",
230260
"appAuthor_": "Intel XDK",
231261
"appVersion_": "0.0.1"
262+
},
263+
"WP81": {
264+
"platform_": "wp81",
265+
"runtime_": "Cordova 3.x",
266+
"name_": "WP81",
267+
"preferences_": {},
268+
"isActive_": true,
269+
"appName_": "IonicProjectStarter",
270+
"appID_": "not.yet.specified",
271+
"appAccess_": {
272+
"mode": "legacy",
273+
"network": [],
274+
"intents": [],
275+
"navigation": []
276+
},
277+
"icons_": [],
278+
"splashes_": [],
279+
"addlPermissions_": "",
280+
"excludedLibraries_": "",
281+
"appVersion_": "0.0.0.1",
282+
"cordovaCLIVersion_": "5.1.1"
232283
}
233284
},
234285
"gameAssetDirectory": "asset",
235286
"gameMetadata": {},
236-
"projectTags": []
287+
"projectTags": [],
288+
"testDirectory": "test"
237289
}
238290
}

IonicProjectStarter/www/index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
@-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; } @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
3434
@-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; } @viewport { user-zoom: fixed ; min-zoom: 100% ; }
3535
/*@-ms-viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; } @viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; }*/
36-
3736
</style>
3837

3938
<link rel="stylesheet" href="css/app.css">
@@ -88,11 +87,15 @@ <h1 class="title">Navigation</h1>
8887
<ion-item class="item widget" ng-click="display.alert('Developing innovative solutions for everyone!', 'Reinsys.com')" data-uib="ionic/list_item">About</ion-item>
8988
</ion-list>
9089
</ion-content>
90+
<ion-footer-bar class="bar-default bar-footer">
91+
<h1 class="title">Powered by Reinsys.</h1>
92+
<button class="button button-icon icon ion-information-circled button-clear button-dark" ng-click="display.alert('Developing innovative solutions for everyone!', 'Reinsys.com')"></button>
9193

94+
</ion-footer-bar>
9295
</ion-side-menu>
9396
<ion-side-menu-content>
9497
<ion-nav-bar>
95-
<ion-nav-back-button class="button-clear">
98+
<ion-nav-back-button class="button-clear" ng-show="!display.menuIsOpen()">
9699
<i class="ion-arrow-left-c"></i> Back
97100
</ion-nav-back-button>
98101
<ion-nav-buttons side="left">
@@ -101,7 +104,8 @@ <h1 class="title">Navigation</h1>
101104
</ion-nav-buttons>
102105
<ion-nav-buttons side="right">
103106
<!-- Toggle left side menu -->
104-
<button class="button button-icon icon widget ion ion-search" data-uib="ionic/button" ng-click="display.goToPath('/search')"></button>
107+
<button style="position: absolute; right: 0px; background-color: #ffffff" class="button button-icon icon widget ion ion-search" data-uib="ionic/button" ng-click="display.goToPath('/search')" ng-show="display.currentStateName() == 'index'"></button>
108+
<button style="position: absolute; right: 0px; background-color: #ffffff" class="button widget button-icon icon ion ion-home" data-uib="ionic/button" ng-click="display.goToPath('/')" ng-show="display.currentStateName() != 'index'"></button>
105109
</ion-nav-buttons>
106110
</ion-nav-bar>
107111
<ion-nav-view name="index"></ion-nav-view>

IonicProjectStarter/www/js/index_init_services.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ var app = angular.module('myApp',['ionic','ngCordova']);
99
app.config(['$controllerProvider', function($controllerProvider) {
1010
$controllerProvider.allowGlobals();
1111
}]);
12+
app.config(function($ionicConfigProvider) {
13+
//$ionicConfigProvider.views.transition('none');
14+
//$ionicConfigProvider.navBar.transition('none');
15+
});
1216
app.config(function($stateProvider, $urlRouterProvider) {
1317
$stateProvider
1418
.state('index', {

IonicProjectStarter/www/js/services.js

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
app.factory('display', ['$filter','$q','$ionicPopup', function($filter, $q, $ionicPopup, $ionicPlatform, $cordovaLocalNotification) {
1+
app.factory('display', ['$filter','$q','$ionicPopup','$ionicSideMenuDelegate','$ionicHistory', function($filter, $q, $ionicPopup, $ionicSideMenuDelegate, $ionicHistory) {
22
return {
33
alert : function(message, title, button, callback){
44
if(!callback) var callback = function(){return;}
@@ -17,23 +17,6 @@ app.factory('display', ['$filter','$q','$ionicPopup', function($filter, $q, $ion
1717
});
1818
alertPopup.then(callback);
1919
},
20-
sendNotification : function(notification){
21-
/*requires $cordovaLocalNotification add the plugin from cordova directory*/
22-
$ionicPlatform.ready(function() {
23-
/*
24-
Sample notification
25-
{
26-
id: 1,
27-
title: "Production Jour fixe",
28-
text: "Duration 1h",
29-
firstAt: alarmTime,
30-
every: "hour",
31-
data: { meetingId:"123" }
32-
}
33-
*/
34-
$cordovaLocalNotification.schedule(notification);
35-
});
36-
},
3720
goToPath : function(pathLink){
3821
var path = "index.html#" + pathLink;
3922
window.location = path;
@@ -46,6 +29,12 @@ app.factory('display', ['$filter','$q','$ionicPopup', function($filter, $q, $ion
4629
deffered.resolve(template);
4730
});
4831
return deffered.promise;
32+
},
33+
menuIsOpen : function(){
34+
return ($ionicSideMenuDelegate.isOpenLeft()) ? true : false;
35+
},
36+
currentStateName : function(){
37+
return $ionicHistory.currentStateName();
4938
}
5039
}
5140

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"__comment__": "/*This file is auto-generated by the Intel® XDK.*/",
3+
"signatureVersion": 1,
4+
"xdkVersion": "2496",
5+
"usesAppDesigner": "true",
6+
"projectGuid": "093974b2-eba3-4a42-94c0-d840844ca468",
7+
"projectTypeName": "com.intel.xdk.projecttype.jsapp",
8+
"src": "appDesigner",
9+
"type": "App Designer"
10+
}

0 commit comments

Comments
 (0)