Skip to content

Commit 41a879d

Browse files
committed
Fix logs for multi-task case
1 parent 02a3325 commit 41a879d

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

src/static/riot/competitions/detail/submission_modal.tag

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<div class="ui top attached inverted pointing menu" if="{logTabs.length > 0}">
4343
<div each="{tab in logTabs}"
4444
class="submission-modal item {active: tab.fullTabId === activeLogTabId}"
45-
data-tab="{tab.fullTabId}">
45+
data-tab="{tab.fullTabId}"
46+
onclick="{() => { activeLogTabId = tab.fullTabId }}">
4647
{tab.label}
4748
</div>
4849
</div>
@@ -138,6 +139,9 @@
138139
}
139140
}
140141
self.update_submission_details = () => {
142+
self.logs = {}
143+
self.rebuildLogTabs()
144+
self.update()
141145
CODALAB.api.get_submission_details(self.submission.id)
142146
.done(function (data) {
143147
self.leaderboards = data.leaderboards
@@ -153,13 +157,8 @@
153157
self.logs[item.name] = content
154158
self.rebuildLogTabs()
155159
self.update()
156-
// Rebind Semantic UI tabs after DOM update
157160
setTimeout(() => {
158-
// init tabs inside the LOGS menu
159-
$('.ui.top.attached.menu .item').tab()
160-
if (self.activeLogTabId) {
161-
$('.ui.top.attached.menu .item').tab('change tab', self.activeLogTabId)
162-
}
161+
$(self.root).find('.ui.top.attached.menu .item').tab()
163162
}, 0)
164163
})
165164
})
@@ -206,7 +205,7 @@
206205
self.update()
207206
self.update_submission_details()
208207
let path = self.submission.admin ? 'admin_downloads' : 'downloads'
209-
$('.menu .submission-modal.item').tab('change tab', path)
208+
$('.ui.large.green.pointing.menu .submission-modal.item').tab('change tab', path)
210209
})
211210
</script>
212211

@@ -225,7 +224,7 @@
225224

226225
.file-download
227226
margin-top 25px !important
228-
margin-botton 25px !important
227+
margin-bottom 25px !important
229228

230229
.graph-frame
231230
height 100%

0 commit comments

Comments
 (0)