(height, data)
| 135 | }; |
| 136 | |
| 137 | const createUserRowTds = (height, data) => { |
| 138 | let name; |
| 139 | if (data.name) { |
| 140 | name = document.createTextNode(data.name); |
| 141 | } else { |
| 142 | name = $('<input>') |
| 143 | .attr('data-l10n-id', 'pad.userlist.unnamed') |
| 144 | .attr('type', 'text') |
| 145 | .addClass('editempty') |
| 146 | .addClass('newinput') |
| 147 | .attr('value', html10n.get('pad.userlist.unnamed')); |
| 148 | if (isNameEditable(data)) name.attr('disabled', 'disabled'); |
| 149 | } |
| 150 | return $() |
| 151 | .add($('<td>') |
| 152 | .css('height', `${height}px`) |
| 153 | .addClass('usertdswatch') |
| 154 | .append($('<div>') |
| 155 | .addClass('swatch') |
| 156 | .css('background', padutils.escapeHtml(data.color)) |
| 157 | .html(' '))) |
| 158 | .add($('<td>') |
| 159 | .css('height', `${height}px`) |
| 160 | .addClass('usertdname') |
| 161 | .append(name)) |
| 162 | .add($('<td>') |
| 163 | .css('height', `${height}px`) |
| 164 | .addClass('activity') |
| 165 | .text(data.activity)); |
| 166 | }; |
| 167 | |
| 168 | const createRow = (id, contents, authorId) => $('<tr>') |
| 169 | .attr('data-authorId', authorId) |
no test coverage detected