From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1Sq8kt-0003oJ-HO for garchives@archives.gentoo.org; Sat, 14 Jul 2012 20:15:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4730E0768; Sat, 14 Jul 2012 20:15:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6415EE0768 for ; Sat, 14 Jul 2012 20:15:38 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78F8E1B414C for ; Sat, 14 Jul 2012 20:15:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 34304E5442 for ; Sat, 14 Jul 2012 20:15:35 +0000 (UTC) From: "Slava Bacherikov" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Slava Bacherikov" Message-ID: <1342296505.223727ad8d3d091bfc580750b3abf00727bf901e.bacher09@gentoo> Subject: [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/templatetags/, gpackages/static/js/, ... X-VCS-Repository: proj/gentoo-packages X-VCS-Files: gpackages/apps/packages/templatetags/packages.py gpackages/static/js/modals.js gpackages/templates/base.html gpackages/templates/filtering_modal.html X-VCS-Directories: gpackages/apps/packages/templatetags/ gpackages/static/js/ gpackages/templates/ X-VCS-Committer: bacher09 X-VCS-Committer-Name: Slava Bacherikov X-VCS-Revision: 223727ad8d3d091bfc580750b3abf00727bf901e X-VCS-Branch: master Date: Sat, 14 Jul 2012 20:15:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 618c311d-1a63-4b6e-8e1a-845f940184ca X-Archives-Hash: 35d52765c93a7d8864b8b1711b4f7d43 commit: 223727ad8d3d091bfc580750b3abf00727bf901e Author: Slava Bacherikov bacher09 org> AuthorDate: Sat Jul 14 20:08:25 2012 +0000 Commit: Slava Bacherikov bacherikov org ua> CommitDate: Sat Jul 14 20:08:25 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoo-packag= es.git;a=3Dcommit;h=3D223727ad Add filtering modal --- gpackages/apps/packages/templatetags/packages.py | 7 +++- gpackages/static/js/modals.js | 53 ++++++++++++++++= ------ gpackages/templates/base.html | 8 +++- gpackages/templates/filtering_modal.html | 24 ++++++++++ 4 files changed, 75 insertions(+), 17 deletions(-) diff --git a/gpackages/apps/packages/templatetags/packages.py b/gpackages= /apps/packages/templatetags/packages.py index ed70efe..62e067a 100644 --- a/gpackages/apps/packages/templatetags/packages.py +++ b/gpackages/apps/packages/templatetags/packages.py @@ -5,7 +5,7 @@ register =3D template.Library() =20 from ..models import RepositoryModel, EbuildModel from ..views import arches -from ..forms import ArchChoiceForm +from ..forms import ArchChoiceForm, FilteringForm =20 @register.inclusion_tag('last_updated.html') def last_updated(): @@ -46,3 +46,8 @@ def arch_choice_modal(context): arches_s =3D arches_s or arches return {'form': ArchChoiceForm(initial =3D {'arches': arches_s}), 'arches': arches_s} + +@register.inclusion_tag('filtering_modal.html') +def filtering_modal(): + form =3D FilteringForm() + return {'form': form } diff --git a/gpackages/static/js/modals.js b/gpackages/static/js/modals.j= s index 93847ac..77c4813 100644 --- a/gpackages/static/js/modals.js +++ b/gpackages/static/js/modals.js @@ -1,7 +1,7 @@ - +var ModalsShow =3D function(link_id_l, modal_id_l){ var old_link =3D window.location.pathname; - function show_modal(modal){ =20 + function show_modal(modal){ modal.modal("show"); modal.on('hide', function(){ modal.off("hide"); @@ -14,23 +14,48 @@ modal.off('hide'); modal.modal('hide'); } + function obj_cache(){ + var list =3D [] + for(var i=3D0; i {% recent_ebuilds %} @@ -144,7 +144,11 @@ {% endblock scripts %} -{% arch_choice_modal %} + + {% block modals %} + {% arch_choice_modal %} + {% filtering_modal %} + {% endblock modals %} {% endblock body %} diff --git a/gpackages/templates/filtering_modal.html b/gpackages/templat= es/filtering_modal.html new file mode 100644 index 0000000..66719e7 --- /dev/null +++ b/gpackages/templates/filtering_modal.html @@ -0,0 +1,24 @@ +{% load url from future %} +{% load static %} +{% get_static_prefix as STATIC_URL %} +
+
+ +

Filter

+
+
+ {% csrf_token %} +
+ {{ form.as_ul }}=20 +
+
+ Close + +
+
+
+ + +