diff options
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/js/ace2_inner.js | 4 | ||||
-rw-r--r-- | src/static/js/chat.js | 2 | ||||
-rw-r--r-- | src/static/js/pad.js | 12 | ||||
-rw-r--r-- | src/static/js/pad_userlist.js | 12 |
4 files changed, 12 insertions, 18 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index b8b59b84..2dc6408b 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3583,7 +3583,7 @@ function Ace2Inner(){ } var specialHandled = false; - var isTypeForSpecialKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress")); + var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress")); var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress")); var stopped = false; @@ -5125,7 +5125,7 @@ function Ace2Inner(){ function initLineNumbers() { lineNumbersShown = 1; - sideDiv.innerHTML = '<table border="0" cellpadding="0" cellspacing="0" align="right">' + '<tr><td id="sidedivinner"><div>1</div></td></tr></table>'; + sideDiv.innerHTML = '<table border="0" cellpadding="0" cellspacing="0" align="right"><tr><td id="sidedivinner"><div>1</div></td></tr></table>'; sideDivInner = outerWin.document.getElementById("sidedivinner"); } diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 2dff2edf..83a487de 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -111,7 +111,7 @@ var chat = (function() var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName); - var html = "<p class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>"; + var html = "<p data-authorId='" + msg.userId + "' class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>"; if(isHistoryAdd) $(html).insertAfter('#chatloadmessagesbutton'); else diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 4b052620..60a43557 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -470,14 +470,6 @@ var pad = { userAgent: pad.getDisplayUserAgent() }; - if (clientVars.specialKey) - { - pad.myUserInfo.specialKey = clientVars.specialKey; - if (clientVars.specialKeyTranslation) - { - $("#specialkeyarea").html("mode: " + String(clientVars.specialKeyTranslation).toUpperCase()); - } - } padimpexp.init(this); padsavedrevs.init(this); @@ -663,8 +655,8 @@ var pad = { { alertBar.displayMessage(function(abar) { - abar.find("#servermsgdate").html(" (" + padutils.simpleDateTime(new Date) + ")"); - abar.find("#servermsgtext").html(m.text); + abar.find("#servermsgdate").text(" (" + padutils.simpleDateTime(new Date) + ")"); + abar.find("#servermsgtext").text(m.text); }); } if (m.js) diff --git a/src/static/js/pad_userlist.js b/src/static/js/pad_userlist.js index 962595d2..77ebb190 100644 --- a/src/static/js/pad_userlist.js +++ b/src/static/js/pad_userlist.js @@ -116,12 +116,12 @@ var paduserlist = (function() 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 + '"> </div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join(''); + return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + padutils.escapeHtml(data.color) + '"> </div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join(''); } - function getRowHtml(id, innerHtml) + function getRowHtml(id, innerHtml, authorId) { - return '<tr id="' + id + '">' + innerHtml + '</tr>'; + return '<tr data-authorId="'+authorId+'" id="' + id + '">' + innerHtml + '</tr>'; } function rowNode(row) @@ -191,18 +191,20 @@ var paduserlist = (function() domId: domId, animationPower: animationPower }; + var authorId = data.id; + handleRowData(row); rowsPresent.splice(position, 0, row); var tr; if (animationPower == 0) { - tr = $(getRowHtml(domId, getUserRowHtml(getAnimationHeight(0), data))); + tr = $(getRowHtml(domId, getUserRowHtml(getAnimationHeight(0), data), authorId)); row.animationStep = 0; } else { rowsFadingIn.push(row); - tr = $(getRowHtml(domId, getEmptyRowHtml(getAnimationHeight(ANIMATION_START)))); + tr = $(getRowHtml(domId, getEmptyRowHtml(getAnimationHeight(ANIMATION_START)), authorId)); } handleRowNode(tr, data); if (position == 0) |