do not trim output in debuging
This commit is contained in:
parent
0bdb92b583
commit
460b65d9ea
1 changed files with 30 additions and 20 deletions
|
|
@ -28,7 +28,7 @@ angular
|
|||
var orig = $delegate[level];
|
||||
$delegate[level] = function() {
|
||||
|
||||
if (level=='error')
|
||||
if (level == 'error')
|
||||
console.log(arguments);
|
||||
|
||||
var args = [].slice.call(arguments);
|
||||
|
|
@ -43,9 +43,13 @@ angular
|
|||
else
|
||||
v = JSON.stringify(v);
|
||||
}
|
||||
v = v.toString();
|
||||
if (v.length > 200)
|
||||
v = v.substr(0, 197) + '...';
|
||||
// Trim output in mobile
|
||||
if ( window.cordova ) {
|
||||
v = v.toString();
|
||||
if (v.length > 1000) {
|
||||
v = v.substr(0, 997) + '...';
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error at log decorator:', e);
|
||||
v = 'undefined';
|
||||
|
|
@ -85,7 +89,9 @@ angular
|
|||
$scope.create = function(noWallet) {
|
||||
$scope.creatingProfile = true;
|
||||
|
||||
profileService.create({noWallet: noWallet}, function(err) {
|
||||
profileService.create({
|
||||
noWallet: noWallet
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
$scope.creatingProfile = false;
|
||||
$log.warn(err);
|
||||
|
|
@ -100,7 +106,8 @@ angular
|
|||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$stateProvider
|
||||
.state('disclaimer', {
|
||||
url: '/disclaimer',
|
||||
|
|
@ -111,14 +118,14 @@ angular
|
|||
controller: function($scope, $timeout, storageService, applicationService, go) {
|
||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||
$scope.agreed = val;
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
$scope.agree = function() {
|
||||
storageService.setCopayDisclaimerFlag(function(err) {
|
||||
$timeout(function(){
|
||||
$timeout(function() {
|
||||
applicationService.restart();
|
||||
}, 1000);
|
||||
});
|
||||
|
|
@ -256,8 +263,8 @@ angular
|
|||
},
|
||||
}
|
||||
})
|
||||
|
||||
.state('preferencesAdvanced', {
|
||||
|
||||
.state('preferencesAdvanced', {
|
||||
url: '/preferencesAdvanced',
|
||||
templateUrl: 'views/preferencesAdvanced.html',
|
||||
walletShouldBeComplete: true,
|
||||
|
|
@ -438,10 +445,12 @@ angular
|
|||
if (nodeWebkit.isDefined()) {
|
||||
var gui = require('nw.gui');
|
||||
var win = gui.Window.get();
|
||||
var nativeMenuBar = new gui.Menu({ type: "menubar" });
|
||||
var nativeMenuBar = new gui.Menu({
|
||||
type: "menubar"
|
||||
});
|
||||
try {
|
||||
nativeMenuBar.createMacBuiltin("Copay");
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
$log.debug('This is not OSX');
|
||||
}
|
||||
win.menu = nativeMenuBar;
|
||||
|
|
@ -516,7 +525,8 @@ angular
|
|||
*/
|
||||
|
||||
function cleanUpLater(e, e2) {
|
||||
var cleanedUp = false, timeoutID;
|
||||
var cleanedUp = false,
|
||||
timeoutID;
|
||||
var cleanUp = function() {
|
||||
if (cleanedUp) return;
|
||||
cleanedUp = true;
|
||||
|
|
@ -526,7 +536,7 @@ angular
|
|||
cachedBackPanel = null;
|
||||
cachedTransitionState = '';
|
||||
if (timeoutID) {
|
||||
timeoutID=null;
|
||||
timeoutID = null;
|
||||
window.clearTimeout(timeoutID);
|
||||
}
|
||||
};
|
||||
|
|
@ -551,7 +561,7 @@ angular
|
|||
|
||||
var fromName = fromState.name;
|
||||
var toName = toState.name;
|
||||
if (!fromName || !toName)
|
||||
if (!fromName || !toName)
|
||||
return true;
|
||||
|
||||
var fromWeight = pageWeight[fromName];
|
||||
|
|
@ -569,7 +579,7 @@ angular
|
|||
entering = 'CslideInRight';
|
||||
}
|
||||
|
||||
// Vertical Slide Animation?
|
||||
// Vertical Slide Animation?
|
||||
} else if (fromName && fromWeight >= 0 && toWeight >= 0) {
|
||||
if (toWeight) {
|
||||
entering = 'CslideInUp';
|
||||
|
|
@ -577,7 +587,7 @@ angular
|
|||
leaving = 'CslideOutDown';
|
||||
}
|
||||
|
||||
// no Animation ?
|
||||
// no Animation ?
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -596,8 +606,8 @@ angular
|
|||
} else {
|
||||
var sc;
|
||||
// Keep prefDiv scroll
|
||||
var contentDiv = e.getElementsByClassName('content');
|
||||
if (contentDiv && contentDiv[0])
|
||||
var contentDiv = e.getElementsByClassName('content');
|
||||
if (contentDiv && contentDiv[0])
|
||||
sc = contentDiv[0].scrollTop;
|
||||
|
||||
cachedBackPanel = e.cloneNode(true);
|
||||
|
|
@ -606,7 +616,7 @@ angular
|
|||
c.appendChild(cachedBackPanel);
|
||||
|
||||
if (sc)
|
||||
cachedBackPanel.getElementsByClassName('content')[0].scrollTop = sc;
|
||||
cachedBackPanel.getElementsByClassName('content')[0].scrollTop = sc;
|
||||
|
||||
cachedTransitionState = desiredTransitionState;
|
||||
//console.log('CACHing animation', cachedTransitionState);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue