Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async createUI() {
- this.uiCreated = true;
- const table = document.createElement( 'table' );
- table.className = 'adsk-lmv-tftable adn-lvl-section-panel-table';
- const tbody = document.createElement( 'tbody' );
- table.appendChild( tbody );
- this.scrollContainer.appendChild( table );
- const upperRow = tbody.insertRow( -1 );
- const upperTextCell = upperRow.insertCell( 0 );
- upperTextCell.innerText = 'Upper:';
- const upperSelectCell = upperRow.insertCell( 1 );
- const lowerRow = tbody.insertRow( -1 );
- const lowerTextCell = lowerRow.insertCell( 0 );
- lowerTextCell.innerText = 'Lower:';
- const lowerSelectCell = lowerRow.insertCell( 1 );
- // ...
- const upperLvlSelector = document.createElement( 'select' );
- upperLvlSelector.id = 'adn-upper-lvl-selector';
- upperLvlSelector.className ='adn-lvl-selector';
- upperSelectCell.appendChild( upperLvlSelector );
- const lowerLvlSelector = document.createElement( 'select' );
- lowerLvlSelector.id = 'adn-lower-lvl-selector';
- lowerLvlSelector.className = 'adn-lvl-selector';
- lowerSelectCell.appendChild( lowerLvlSelector );
- const data = await this.getRemoteLevels();
- this.levels = data;
- this.createSelectOptions( data, upperLvlSelector );
- this.createSelectOptions( data, lowerLvlSelector );
- // ...
- const buttonRow = tbody.insertRow( -1 );
- const buttonCell = buttonRow.insertCell( 0 );
- buttonCell.colSpan = 2;
- const sectionButton = document.createElement( 'button' );
- sectionButton.type = 'button';
- sectionButton.textContent = 'Apply';
- buttonCell.appendChild( sectionButton );
- sectionButton.addEventListener( 'click', this.onButtonClicked );
- this.resizeToContent();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement