class PlaylistBuilderController {
constructor () {
this.div = document.createElement('div');
this.div.className = 'modal';
this.contentDiv = document.createElement('div');
this.contentDiv.className = 'modal-content';
document.body.appendChild(this.div);
this.div.appendChild(this.contentDiv);
this.callList = [];
this.updateHtml();
}
updateHtml () {
var html = ' Close
';
html += 'Playlist Builder
';
//console.log(this.callList.length);
if (this.callList.length == 0) {
html += 'No calls have been added. Go add some!';
} else {
html += ' Select All ';
html += ' Select None ';
html += ' Create Playlist
';
html += '
| Start | Dur | Talkgroup | Talker | Transcription | '; html += ' | ' + pdate(this.callList[i]['start_time']) + ' | '; html += '' + this.callList[i]['precise_dur'].toFixed(1) + ' | '; html += '' + this.callList[i]['tg_name'] + ' | '; html += '' + this.callList[i]['talker_id'] + ' | '; html += '' + this.callList[i]['transcription'] + ' | '; html += ''; } html += '