Created
February 8, 2012 12:05
-
-
Save a-ignatov-parc/1768561 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkData: function(route) { | |
var user = Calc.get('User').model; | |
if (user && user.get('isLoged')) { | |
return YES; | |
} else if (this.processWrongRoute && typeof(this.processWrongRoute) === 'function') { | |
this.processWrongRoute(); | |
} | |
return NO; | |
}, | |
edit: function() { | |
var name = 'edit', | |
location = [name]; | |
if (Calc.baseLocation && this.checkData(name)) { | |
Calc | |
.navigate(location.join('/')) | |
.render('Calculator', { | |
editCurrentPolicy: YES | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment