Skip to content

Commit

Permalink
FIX: Prompting the user for full name
Browse files Browse the repository at this point in the history
This continues 3beb91d and 690ae1c
  • Loading branch information
christophe-lejeune committed Sep 12, 2022
1 parent 67250b0 commit aba8ed2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions app/_attachments/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ function createUserDoc(user, sponsor, success, error) {
if (u.rows.length > 0) fullname += ' ('+user+')';
var obj = {
'_id': user,
'activity': [],
'contributors': [user],
'fullname': fullname
'fullname': fullname,
'order': []
};
if (sponsor && sponsor.length > 0) obj.readers = sponsor;
$.ajax({
url: '../'+user,
url: relpath+user,
type: 'PUT',
contentType: 'application/json',
data: JSON.stringify(obj)
Expand Down
6 changes: 3 additions & 3 deletions app/templates/diary.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h1 class="editable"> <span id="size" class="badge badge-pill" title="{{i18n.i_m
</svg>
</a>
</nav>
{{^logged_fullname}}{{>storing_fullname_dialog}}{{/logged_fullname}}
{{#by}}{{^logged_fullname}}{{>storing_fullname_dialog}}{{/logged_fullname}}{{/by}}
{{>script}}
{{#list}}<script src="../script/showdown.min.js"></script>{{/list}}
{{^list}}<script src="../script/vis.min.js"></script>{{/list}}
Expand Down Expand Up @@ -160,9 +160,9 @@ <h1 class="editable"> <span id="size" class="badge badge-pill" title="{{i18n.i_m
});
announceMaintenance(maintenance, maintenance_in_progress);
{{#logged}}
{{^logged_fullname}}
{{#by}}{{^logged_fullname}}
$('#storing_fullname_dialog').modal('show')
{{/logged_fullname}}
{{/logged_fullname}}{{/by}}
for (var m of memos) {
var j = activity.map(function(a){return a.doc}).indexOf(m.id);
if (activity.length > -1 && j > -1) {
Expand Down
3 changes: 2 additions & 1 deletion app/templates/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ <h1>{{i18n.i_register}}</h1>
</div>
{{>script}}
<script>
var email = fullname = sponsor = "";
var email = fullname = sponsor = "",
relpath = '../';
$(document).ready(function() {
$.ajax({
type: 'DELETE',
Expand Down
1 change: 1 addition & 0 deletions app/templates/todo.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ <h2 id='ungrounded' class="hidden">{{i18n.i_ungrounded}}</h2>
if ($('.ungrounded').length > 0) $('#ungrounded').removeClass('hidden');
});

function showMore(){}
{{>layoutscript}}
{{>logscript}}
</script>
Expand Down

0 comments on commit aba8ed2

Please sign in to comment.