Fixed "unnamed" and "enter your name" in userlist

pull/1407/head
mluto 2013-01-25 10:32:09 +01:00
parent 557b5c1ad0
commit 7812d93e74
3 changed files with 9 additions and 4 deletions

View File

@ -78,6 +78,12 @@ var padeditor = (function()
html10n.bind('localized', function() {
$("#languagemenu").val(html10n.getLanguage());
$('input[data-l10n-id]').each(function(key, input)
{
input = $(input);
if(input.hasClass("editempty"))
input.val(_(input.attr("data-l10n-id")));
});
})
$("#languagemenu").val(html10n.getLanguage());
$("#languagemenu").change(function() {

View File

@ -118,7 +118,7 @@ var paduserlist = (function()
}
else
{
nameHtml = '<input type="text" class="editempty newinput" value="'+_('pad.userlist.unnamed')+'" ' + (isNameEditable(data) ? '' : 'disabled="disabled" ') + '/>';
nameHtml = '<input data-l10n-id="pad.userlist.unnamed" type="text" class="editempty newinput" value="'+_('pad.userlist.unnamed')+'" ' + (isNameEditable(data) ? '' : 'disabled="disabled" ') + '/>';
}
return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + data.color + '">&nbsp;</div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join('');
@ -710,8 +710,7 @@ var paduserlist = (function()
{
if (myUserInfo.name)
{
$("#myusernameedit").removeClass("editempty").val(
myUserInfo.name);
$("#myusernameedit").removeClass("editempty").val(myUserInfo.name);
}
else
{

View File

@ -163,7 +163,7 @@
<span id="mycolorpickerpreview" class="myswatchboxhoverable"></span>
</div>
<div id="myswatchbox"><div id="myswatch"></div></div>
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled"></div>
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" data-l10n-id="pad.userlist.entername"></div>
<div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled"></div>
</div>
<div id="otherusers">