{% block extra_head %}
{% load i18n %}
<script>
function openCancelDialog(node, cancel_url, delete_url, event){
  event.stopPropagation();
  var btns = {"{% trans "This" %}":function(){window.location=cancel_url;}, "{% trans "All" %}":function(){window.location=delete_url}, "{% trans "Do nothing" %}":function(){$(this).dialog("destroy");}};
  dia = $("#delete_dialog").dialog({'buttons':btns, 'modal':true});
  dia.dialog('open');
  return false;
}

function openEditDialog(node, occurrence_url, event_url, event){
  event.stopPropagation();
  var btns = {"{% trans "This" %}":function(){window.location=occurrence_url;}, "{% trans "All" %}":function(){window.location=event_url}, "{% trans "Do nothing" %}":function(){$(this).dialog("destroy");}};
  dia = $("#edit_dialog").dialog({'buttons':btns, 'modal':true});
  dia.dialog('open');
  return false;
}

function openDetail(node){
  var btns = { "{% trans "Close" %}":function(){$(this).dialog("destroy");}};
  dia = $($(node).attr("href")).dialog({'buttons':btns, 'modal':true, 'title':'Details'});
  dia.dialog('open');
  return false;
}

function openURL(url, event){
    event.stopPropagation();
    window.location=url;
}
</script>
{% endblock %}


<div style="display:none;" id="delete_dialog" title="Question">
  {% trans "Do you want to cancel this occurrence or delete all occurrences of this event?" %}
</div>

<div style="display:none;" id="edit_dialog" title="This is a recurring event">
  {% trans "Do you want to edit this occurrence or all occurrences?" %}
</div>

