MCPcopy Create free account
hub / github.com/ether/etherpad / createUserRowTds

Function createUserRowTds

src/static/js/pad_userlist.ts:137–166  ·  view source on GitHub ↗
(height, data)

Source from the content-addressed store, hash-verified

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('&nbsp;')))
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)

Callers 3

animateStepFunction · 0.85
replaceUserRowContentsFunction · 0.85
insertRowFunction · 0.85

Calls 4

isNameEditableFunction · 0.85
getMethod · 0.80
appendMethod · 0.80
textMethod · 0.80

Tested by

no test coverage detected