',{
- 'id': rowId,
- 'class': 'kind-' + rows[i].kind
- });
- // Row #
- $td = $('| ').text(rowNum);
- $tr.append($td);
-
- // Kind
- $td = $(' | ',{
- 'contenteditable': 'true'
- }).text(rows[i].kind);
- $tr.append($td);
-
- // Start
- $td = $(' | ',{
- 'contenteditable': 'true'
- }).text(rows[i].start);
- $tr.append($td);
-
- // End
- $td = $(' | ',{
- 'contenteditable': 'true'
- }).text(rows[i].end);
- $tr.append($td);
-
- // Content
- $td = $(' | ',{
- 'contenteditable': 'true'
- }).text(rows[i].content); // TODO: Preserve tags
- $tr.append($td);
-
- // Actions
- $td = this.addVtsActionButtons(rowNum,rows.length);
- $tr.append($td);
-
- $table.append($tr);
- }
- $('#able-vts').append($table);
-
- // Add credit for action button SVG icons
- $('#able-vts').append(this.getIconCredit());
-
- };
-
- AblePlayer.prototype.addVtsActionButtons = function(rowNum,numRows) {
-
- // rowNum is the number of the current table row (starting with 1)
- // numRows is the total number of rows (excluding the header row)
- // TODO: Position buttons so they're vertically aligned, even if missing an Up or Down button
- var thisObj, $td, buttons, i, button, $button, $svg, $g, pathString, pathString2, $path, $path2;
- thisObj = this;
- $td = $(' | ');
- buttons = ['up','down','insert','delete'];
-
- for (i=0; i < buttons.length; i++) {
- button = buttons[i];
- if (button === 'up') {
- if (rowNum > 1) {
- $button = $(' |