98 lines
2.9 KiB
HTML
98 lines
2.9 KiB
HTML
{% extends "base.html" %}
|
|
{# Copyright The IETF Trust 2015, All Rights Reserved #}
|
|
{% load origin ietf_filters staticfiles %}
|
|
|
|
{% block title %}{{ meeting }} : {{ acronym }}{% endblock %}
|
|
|
|
{% block morecss %}
|
|
.ui-sortable tr {
|
|
cursor:pointer;
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% origin %}
|
|
|
|
|
|
|
|
<h1>{{ meeting }} : {{ acronym }}
|
|
{% if meeting.date >= thisweek %}
|
|
<a class="regular pull-right" title="icalendar entry for {{acronym}}@{{meeting.number}}" href="{% url 'ietf.meeting.views.ical_agenda' num=meeting.number acronym=acronym %}"><span class="fa fa-calendar"></span></a>
|
|
{% endif %}
|
|
</h1>
|
|
|
|
|
|
{% with use_panels=unscheduled_sessions %}
|
|
{% if use_panels %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Scheduled Sessions</div>
|
|
<div class="panel-body">
|
|
{% endif %}
|
|
{% include 'meeting/session_details_panel.html' with sessions=scheduled_sessions %}
|
|
{% if use_panels %}
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-warning">
|
|
<div class="panel-heading">Uncheduled Sessions</div>
|
|
<div class="panel-body">
|
|
{% endif %}
|
|
{% include 'meeting/session_details_panel.html' with sessions=unscheduled_sessions %}
|
|
{% if use_panels %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% endblock %}
|
|
|
|
{# TODO don't rely on secr/js version of jquery-ui #}
|
|
{# Sorting based loosely on the original secr upload sorting and on http://www.avtex.com/blog/2015/01/27/drag-and-drop-sorting-of-table-rows-in-priority-order/ #}
|
|
{% block js %}
|
|
{% if can_manage_materials %}
|
|
<script type="text/javascript" src="{% static 'jquery/jquery.min.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'secr/js/jquery-ui-1.11.4.custom.min.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'jquery.cookie/jquery.cookie.js' %}"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$.ajaxSetup({
|
|
crossDomain: false,
|
|
beforeSend: function(xhr, settings) {
|
|
if (!csrfSafeMethod(settings.type)) {
|
|
xhr.setRequestHeader("X-CSRFToken", $.cookie('csrftoken'));
|
|
}
|
|
}
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
var rowWidthHelper = function (e, tr) {
|
|
var $originals = tr.children();
|
|
var $helper = tr.clone();
|
|
$helper.children().each(function(index)
|
|
{
|
|
$(this).width($originals.eq(index).width())
|
|
});
|
|
return $helper;
|
|
};
|
|
|
|
$(".slides tbody").sortable({
|
|
helper: rowWidthHelper,
|
|
stop: function(event,ui) {adjustDatabase(ui.item.parent())}
|
|
}).disableSelection();
|
|
});
|
|
|
|
function adjustDatabase(tbody) {
|
|
tbody.find('tr').each(function() {
|
|
count = $(this).parent().children().index($(this)) + 1;
|
|
old_order = $(this).attr("data-order");
|
|
if ( count != old_order ) {
|
|
$(this).attr("data-order", count);
|
|
$.post($(this).attr("data-url"),{'order':count});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
{% endif %}
|
|
{% endblock %}
|