Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply track-session linking to bulk judgment
  • Loading branch information
mvidalgarcia committed Oct 31, 2017
1 parent 688f77a commit f66fd42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions indico/htdocs/js/indico/modules/abstracts.js
Expand Up @@ -141,9 +141,10 @@
trackSessionMap: {}
}, options);

$('#accepted_track').on('change', function() {
$('body').on('change', '#accepted_track', function() {
var sessionId = options.trackSessionMap[$(this).val()];
$('#session').val(sessionId || "__None");
}).trigger('change');
});
$('#accepted_track').trigger('change');
};
})(window);
4 changes: 4 additions & 0 deletions indico/modules/events/abstracts/controllers/abstract_list.py
Expand Up @@ -95,6 +95,10 @@ class RHAbstractList(DisplayAbstractListMixin, RHAbstractListBase):
template = 'management/abstract_list.html'
view_class = WPManageAbstracts

def _render_template(self, **kwargs):
kwargs['track_session_map'] = {track.id: track.default_session_id for track in self.event.tracks}
return super(RHAbstractList, self)._render_template(**kwargs)


class RHAbstractListCustomize(CustomizeAbstractListMixin, RHAbstractListBase):
view_class = WPManageAbstracts
Expand Down
Expand Up @@ -215,5 +215,8 @@
{% endif %}

setupAbstractList();
setupAbstractJudgment({
trackSessionMap: {{ track_session_map|tojson }}
});
</script>
{% endblock %}

0 comments on commit f66fd42

Please sign in to comment.