Skip to content
Browse files

update profile widget to put username on profile

  • Loading branch information...
1 parent 14f9043 commit 97c07300948c6ea694d14c553912f5e541140c1c @jchris jchris committed Mar 1, 2010
View
2 tests/test_cli.py
@@ -29,7 +29,7 @@ class CliTestCase(unittest.TestCase):
def setUp(self):
self.ui = ui = UI()
- self.db = Database(ui, 'http://127.0.0.1:5984/couchapp-test', create=True)
+ self.db = Database(ui, 'http://jchris:jchris@127.0.0.1:5984/couchapp-test', create=True)
self.tempdir = _tempdir()
os.makedirs(self.tempdir)
View
3 vendor/evently/profile/loggedIn.js
@@ -8,6 +8,9 @@ function(e, r) {
success : function(userDoc) {
var profile = userDoc["couch.app.profile"];
if (profile) {
+ // we copy the name to the profile so it can be used later
+ // without publishing the entire userdoc (roles, pass, etc)
+ profile.name = userDoc.name;
$$(widget).profile = profile;
widget.trigger("profileReady", [profile]);
} else {
View
1 vendor/evently/profile/noProfile/selectors/form/submit.js
@@ -25,6 +25,7 @@ function() {
userDoc["couch.app.profile"] = newProfile;
db.saveDoc(userDoc, {
success : function() {
+ newProfile.name = userDoc.name;
$$(widget).profile = newProfile;
widget.trigger("profileReady", [newProfile]);
}
View
3 vendor/evently/profile/profileReady/after.js
@@ -0,0 +1,3 @@
+function(e, p) {
+ $$(this).profile = p;
+};
View
2 vendor/evently/profile/profileReady/mustache.html
@@ -1,5 +1,5 @@
<div class="avatar">
- {{#avatar_url}}<img src="{{{avatar_url}}}"/>{{/avatar_url}}
+ {{#avatar_url}}<img src="{{avatar_url}}"/>{{/avatar_url}}
<div class="name">
{{nickname}}
</div>

0 comments on commit 97c0730

Please sign in to comment.
Something went wrong with that request. Please try again.