Summary: Port the remaining JS parts of IPR tool, still missing some
templates though - Legacy-Id: 8901
This commit is contained in:
parent
1124d6d018
commit
2ac96942b3
|
@ -12,6 +12,7 @@ from ietf.ipr.models import (IprDocRel, IprDisclosureBase, HolderIprDisclosure,
|
|||
GenericIprDisclosure, ThirdPartyIprDisclosure, NonDocSpecificIprDisclosure,
|
||||
IprLicenseTypeName, IprDisclosureStateName)
|
||||
from ietf.message.models import Message
|
||||
from ietf.utils.fields import DatepickerDateField
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Globals
|
||||
|
@ -232,7 +233,7 @@ class GenericIprDisclosureForm(IprDisclosureFormBase):
|
|||
exclude = [ 'by','docs','state','rel' ]
|
||||
|
||||
class MessageModelForm(forms.ModelForm):
|
||||
response_due = forms.DateField(required=False,help_text='The date which a response is due')
|
||||
response_due = DatepickerDateField(date_format="yyyy-mm-dd", picker_settings={"autoclose": "1" }, required=False, help_text='The date which a response is due')
|
||||
|
||||
class Meta:
|
||||
model = Message
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load bootstrap3 %}
|
||||
|
||||
{% block pagehead %}
|
||||
<link rel="stylesheet" href="/facelift/css/lib/datepicker3.css"></link>
|
||||
<link rel="stylesheet" href="/facelift/css/lib/datepicker3.css"></link>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Make last call for {{ doc.name }}{% endblock %}
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
{% block js %}
|
||||
<script src="/facelift/js/lib/bootstrap-datepicker.js"></script>
|
||||
<script src="/facelift/js/lib/bootstrap-datepicker.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
|
|
@ -283,8 +283,3 @@
|
|||
{% endif %}
|
||||
|
||||
{% endblock %} <!-- tab_content -->
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="/js/jquery-ui-1.8.11.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/js/ipr-view.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
{% block title %}IPR Email{% endblock %}
|
||||
|
||||
{% block pagehead %}
|
||||
<link rel="stylesheet" type="text/css" href="/css/jquery-ui-themes/jquery-ui-1.8.11.custom.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
<link rel="stylesheet" href="/facelift/css/lib/datepicker3.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -38,6 +38,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="/js/jquery-ui-1.8.11.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/js/ipr-email.js"></script>
|
||||
{% endblock %}
|
||||
<script src="/facelift/js/lib/bootstrap-datepicker.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "ietf.html" %}
|
||||
|
||||
{% block pagehead %}
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}IPR search{% endblock %}
|
||||
|
@ -11,6 +11,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="/js/lib/jquery-1.8.2.min.js"></script>
|
||||
<script type="text/javascript" src="/js/ipr-search.js"></script>
|
||||
<script type="text/javascript" src="/facelift/js/ipr-search.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<h1>IPR Search</h1>
|
||||
|
||||
<form role="form">
|
||||
<form class="ipr-search" role="form">
|
||||
{% if user|has_role:"Secretariat" %}
|
||||
<div class="col-md-12">
|
||||
<h2>State Filter</h2>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block title %}IPR disclosures{% endblock %}
|
||||
|
||||
{% block pagehead %}
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
<link rel="stylesheet" type="text/css" href="/css/ipr.css"></link>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -82,5 +82,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="/js/ipr-search.js"></script>
|
||||
<script type="text/javascript" src="/facelift/js/ipr-search.js"></script>
|
||||
{% endblock %}
|
||||
|
|
23
static/facelift/js/ipr-search.js
Normal file
23
static/facelift/js/ipr-search.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
$(document).ready(function() {
|
||||
// hack the "All States" check box
|
||||
$("#id_state input[value!=all]").change(function(e) {
|
||||
if (this.checked) {
|
||||
$("#id_state input[value=all]").prop('checked',false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#id_state_0").change(function(e) {
|
||||
if (this.checked) {
|
||||
$("#id_state input[value!=all]").prop('checked',false);
|
||||
}
|
||||
});
|
||||
|
||||
$("form.ipr-search input,select").keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$(this).next('button[type=submit]').click();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue