]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: date range filter for project builds page
authorDavid Reyna <David.Reyna@windriver.com>
Thu, 16 Apr 2015 03:37:38 +0000 (20:37 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Apr 2015 10:53:34 +0000 (11:53 +0100)
Port date range filter initialization code to the project builds page.

[YOCTO #7578]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
lib/toaster/toastergui/templates/projectbuilds.html

index 07595f2376c2a571e445fa6081283029f86d3b77..18b24955d09dafce533084635067f77513419feb 100644 (file)
@@ -6,8 +6,24 @@
 <li>Project builds</li>
 {% endblock %}
 
+{% block extraheadcontent %}
+<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
+<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
+<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
+<script src="/static/js/jquery-ui.min.js"></script>
+<script src="/static/js/filtersnippet.js"></script>
+{% endblock %}
+
 {% block projectinfomain %}
 
+<script>
+    // initialize the date range controls
+    $(document).ready(function () {
+        date_init('created','{{last_date_from}}','{{last_date_to}}','{{dateMin_created}}','{{dateMax_created}}','{{daterange_selected}}');
+        date_init('updated','{{last_date_from}}','{{last_date_to}}','{{dateMin_updated}}','{{dateMax_updated}}','{{daterange_selected}}');
+    });
+</script>
+
     <div class="page-header">
       <h1>
         {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}