Skip to content

Commit 7be9b35

Browse files
committed
major rename
1 parent 73cce40 commit 7be9b35

File tree

7 files changed

+19
-42
lines changed

7 files changed

+19
-42
lines changed

_attachments/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ <h1>Generated CouchApp</h1>
2323
<script src="/_utils/script/json2.js"></script>
2424
<script src="/_utils/script/jquery.js"></script>
2525
<script src="/_utils/script/jquery.couch.js"></script>
26-
<script src="script/requires.js"></script>
27-
<script src="script/jquery.couchLogin.js"></script>
28-
<script src="script/jquery.couchProfile.js"></script>
29-
<script src="script/jquery.couchForm.js"></script>
30-
<script src="script/jquery.mustache.js"></script>
26+
<script src="vendor/couchapp/jquery.couchLogin.js"></script>
27+
<script src="vendor/couchapp/jquery.couchProfile.js"></script>
28+
<script src="vendor/couchapp/md5.js"></script>
29+
<script src="vendor/couchapp/jquery.couchForm.js"></script>
30+
<script src="vendor/couchapp/jquery.mustache.js"></script>
3131

3232
<script id="new-message" type="text/x-mustache" charset="utf-8">
3333
<div class="avatar">

_attachments/script/requires.js

-21
This file was deleted.

_attachments/script/jquery.couchProfile.js vendor/couchapp/_attachments/jquery.couchProfile.js

+14-16
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,20 @@
6464
function newProfile(userCtx) {
6565
widget.html($.mustache(templates.newProfile, userCtx));
6666
widget.find("form").submit(function(e) {
67-
e.preventDefault();
68-
var form = this;
69-
requires("script/md5.js", function() {
70-
var name = $("input[name=userCtxName]",form).val();
71-
var newProfile = {
72-
rand : Math.random().toString(),
73-
nickname : $("input[name=nickname]",form).val(),
74-
email : $("input[name=email]",form).val(),
75-
url : $("input[name=url]",form).val()
76-
};
77-
// setup gravatar_url
78-
if (hex_md5) {
79-
newProfile.gravatar_url = 'http://www.gravatar.com/avatar/'+hex_md5(newProfile.email || newProfile.rand)+'.jpg?s=40&d=identicon';
80-
}
81-
storeProfileOnUserDoc(newProfile);
82-
});
67+
e.preventDefault();
68+
var form = this;
69+
var name = $("input[name=userCtxName]",form).val();
70+
var newProfile = {
71+
rand : Math.random().toString(),
72+
nickname : $("input[name=nickname]",form).val(),
73+
email : $("input[name=email]",form).val(),
74+
url : $("input[name=url]",form).val()
75+
};
76+
// setup gravatar_url if md5.js is loaded
77+
if (hex_md5) {
78+
newProfile.gravatar_url = 'http://www.gravatar.com/avatar/'+hex_md5(newProfile.email || newProfile.rand)+'.jpg?s=40&d=identicon';
79+
}
80+
storeProfileOnUserDoc(newProfile);
8381
return false;
8482
});
8583
};
File renamed without changes.

0 commit comments

Comments
 (0)