fix hidden sidebars in cordova
This commit is contained in:
parent
856ebce534
commit
4be558d143
5 changed files with 17 additions and 7 deletions
|
|
@ -63,7 +63,9 @@ angular.module('copayApp.controllers').controller('CreateController',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootScope.$digest();
|
$timeout(function(){
|
||||||
|
$rootScope.$digest();
|
||||||
|
},1);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,9 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
||||||
$scope.askForPin = 1;
|
$scope.askForPin = 1;
|
||||||
$rootScope.starting = false;
|
$rootScope.starting = false;
|
||||||
$rootScope.hideNavigation = true;
|
$rootScope.hideNavigation = true;
|
||||||
$rootScope.$digest();
|
$timeout(function(){
|
||||||
|
$rootScope.$digest();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// no mobile
|
// no mobile
|
||||||
|
|
|
||||||
|
|
@ -113,12 +113,12 @@ angular
|
||||||
$idleProvider.warningDuration(40); // in seconds
|
$idleProvider.warningDuration(40); // in seconds
|
||||||
$keepaliveProvider.interval(30); // in seconds
|
$keepaliveProvider.interval(30); // in seconds
|
||||||
})
|
})
|
||||||
.run(function($rootScope, $location, $idle, gettextCatalog, uriHandler) {
|
.run(function($rootScope, $location, $idle, gettextCatalog, uriHandler, isCordova) {
|
||||||
|
|
||||||
gettextCatalog.currentLanguage = config.defaultLanguage;
|
gettextCatalog.currentLanguage = config.defaultLanguage;
|
||||||
|
|
||||||
// Register URI handler, not for mobileApp
|
// Register URI handler, not for mobileApp
|
||||||
if (!window.cordova) {
|
if (!isCordova) {
|
||||||
$idle.watch();
|
$idle.watch();
|
||||||
uriHandler.register();
|
uriHandler.register();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.services')
|
angular.module('copayApp.services')
|
||||||
.factory('applicationService', function($rootScope, $location, $timeout, go) {
|
.factory('applicationService', function($rootScope, $location, $timeout, go, isCordova) {
|
||||||
var root = {};
|
var root = {};
|
||||||
var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id;
|
var isChromeApp = window.chrome && chrome.runtime && chrome.runtime.id;
|
||||||
|
|
||||||
root.restart = function() {
|
root.restart = function() {
|
||||||
if (1 || window.cordova !== undefined) {
|
if (isCordova) {
|
||||||
$rootScope.iden = $rootScope.wallet = undefined;
|
$rootScope.iden = $rootScope.wallet = undefined;
|
||||||
go.go('/');
|
go.go('/');
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,21 @@ angular.module('copayApp.services').factory('go', function($window, $location) {
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
var hideSidebars = function() {
|
var hideSidebars = function() {
|
||||||
|
if (typeof document === 'undefined')
|
||||||
|
return;
|
||||||
|
|
||||||
// hack to hide sidebars and use ng-click (no href=)
|
// hack to hide sidebars and use ng-click (no href=)
|
||||||
var win = angular.element($window);
|
var win = angular.element($window);
|
||||||
var elem = win.find('#off-canvas-wrap');
|
console.log('[go.js.8:win:]',win); //TODO
|
||||||
|
var elem = angular.element(document.querySelector('#off-canvas-wrap'))
|
||||||
|
console.log('[go.js.10:elem:]',elem); //TODO
|
||||||
elem.removeClass('move-right');
|
elem.removeClass('move-right');
|
||||||
elem.removeClass('move-left');
|
elem.removeClass('move-left');
|
||||||
};
|
};
|
||||||
|
|
||||||
root.go = function(path) {
|
root.go = function(path) {
|
||||||
var parts = path.split('#');
|
var parts = path.split('#');
|
||||||
|
console.log('[go.js.15:parts:]',parts); //TODO
|
||||||
$location.path(parts[0]);
|
$location.path(parts[0]);
|
||||||
if (parts[1])
|
if (parts[1])
|
||||||
$location.hash(parts[1]);
|
$location.hash(parts[1]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue