Profiles showing up at web page
This commit is contained in:
1 parent
481b8fb2d8
commit
9b9dc4d645
2 files changed
+27
-19
No files matched your search
+26
-6
@@ -101,7 +101,7 @@ function newWebApp() {
|
||||
*/
|
||||
queryMessage = {
|
||||
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILES,
|
||||
emitterUserProfileId: undefined,
|
||||
emitterUserProfileId: undefined,
|
||||
initialIndex: 'Last',
|
||||
amountRequested: 10,
|
||||
direction: 'Past'
|
||||
@@ -120,12 +120,9 @@ function newWebApp() {
|
||||
|
||||
async function showProfiles(profiles) {
|
||||
console.log(profiles)
|
||||
document.getElementById('context-cell')
|
||||
|
||||
for (let i = 0; i < profiles.length; i++) {
|
||||
let profile = profiles[i]
|
||||
|
||||
console.log(profile)
|
||||
}
|
||||
fillWhoToFollowTable(profiles)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -135,4 +132,27 @@ function newWebApp() {
|
||||
console.log('[ERROR] Query not executed. ' + errorMessage)
|
||||
}
|
||||
}
|
||||
|
||||
function fillWhoToFollowTable(profiles) {
|
||||
|
||||
let contextCell = document.getElementById('context-cell')
|
||||
let table = document.createElement("table")
|
||||
let tblBody = document.createElement("tbody")
|
||||
|
||||
for (let i = 0; i < profiles.length; i++) {
|
||||
let profile = profiles[i]
|
||||
let row = document.createElement("tr")
|
||||
|
||||
let cell = document.createElement("td")
|
||||
let cellText = document.createTextNode(profile.userProfileHandle)
|
||||
cell.appendChild(cellText)
|
||||
row.appendChild(cell)
|
||||
|
||||
tblBody.appendChild(row)
|
||||
}
|
||||
|
||||
table.appendChild(tblBody)
|
||||
contextCell.appendChild(table)
|
||||
table.setAttribute("class", "who-to-follow-table")
|
||||
}
|
||||
}
|
||||
@@ -122,25 +122,13 @@
|
||||
<td class="search-cell">SEARCH</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="context-cell">
|
||||
<table id="who-to-follow-table" class="who-to-follow-table">
|
||||
<tr>
|
||||
<td class="menu-item-cell">User Profile 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">User Profile 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="menu-item-cell">User Profile 3</td>
|
||||
</tr>
|
||||
</table>
|
||||
<td id="context-cell" class="context-cell">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user