Commit 0208b844c6946d83bd8b0a6d6a1d9ea5b6d8bfb1
1 parent
29b4ed77
kwalifikatory formowe przy filtrowaniu
Showing
3 changed files
with
14 additions
and
8 deletions
.idea/jsLinters/jshint.xml
... | ... | @@ -8,22 +8,20 @@ |
8 | 8 | <option es3="false" /> |
9 | 9 | <option forin="true" /> |
10 | 10 | <option immed="false" /> |
11 | - <option latedef="false" /> | |
12 | 11 | <option newcap="false" /> |
13 | 12 | <option noarg="true" /> |
14 | 13 | <option noempty="true" /> |
15 | 14 | <option nonew="true" /> |
16 | 15 | <option plusplus="false" /> |
17 | - <option regexp="false" /> | |
18 | 16 | <option undef="true" /> |
19 | - <option unused="false" /> | |
20 | 17 | <option strict="true" /> |
21 | 18 | <option trailing="false" /> |
19 | + <option latedef="false" /> | |
20 | + <option unused="false" /> | |
22 | 21 | <option asi="false" /> |
23 | 22 | <option boss="false" /> |
24 | 23 | <option debug="false" /> |
25 | 24 | <option eqnull="false" /> |
26 | - <option es5="false" /> | |
27 | 25 | <option esnext="false" /> |
28 | 26 | <option evil="false" /> |
29 | 27 | <option expr="false" /> |
... | ... | @@ -36,8 +34,6 @@ |
36 | 34 | <option loopfunc="false" /> |
37 | 35 | <option multistr="false" /> |
38 | 36 | <option proto="false" /> |
39 | - <option onecase="false" /> | |
40 | - <option regexdash="false" /> | |
41 | 37 | <option scripturl="false" /> |
42 | 38 | <option smarttabs="false" /> |
43 | 39 | <option shadow="false" /> |
... | ... |
dictionary/views.py
... | ... | @@ -51,12 +51,20 @@ def lexeme_view(request): |
51 | 51 | for v in editable_vocabs: |
52 | 52 | vocabs.update(dict((str(q.pk), v.id) for q in v.qualifiers.all())) |
53 | 53 | qualifier_options = [(0, u'(puste)')] |
54 | + lexeme_qualifier_options = [(0, u'(puste)')] | |
55 | + form_qualifier_options = [(0, u'(puste)')] | |
54 | 56 | for vocab in visible: |
55 | 57 | qualifiers = vocab.qualifiers.all() |
56 | 58 | if qualifiers: |
57 | 59 | qualifier_options.append((0, u'--%s--' % vocab.id)) |
60 | + lexeme_qualifier_options.append((0, u'--%s--' % vocab.id)) | |
61 | + form_qualifier_options.append((0, u'--%s--' % vocab.id)) | |
58 | 62 | for q in vocab.qualifiers.all(): |
59 | 63 | qualifier_options.append((q.pk, q.label)) |
64 | + if q.type != Qualifier.TYPE_FORM: | |
65 | + lexeme_qualifier_options.append((q.pk, q.label)) | |
66 | + if q.type != Qualifier.TYPE_SCOPE: | |
67 | + form_qualifier_options.append((q.pk, q.label)) | |
60 | 68 | classifications = Classification.objects.filter( |
61 | 69 | vocabularies__in=visible).distinct() |
62 | 70 | cv_options = [] |
... | ... | @@ -112,6 +120,8 @@ def lexeme_view(request): |
112 | 120 | 'visible_vocabularies': [(v.id, v.id) for v in visible], |
113 | 121 | 'parts_of_speech': [ |
114 | 122 | (pos.symbol, pos.symbol) for pos in PartOfSpeech.objects.all()], |
123 | + 'lexeme_qualifier_options': lexeme_qualifier_options, | |
124 | + 'form_qualifier_options': form_qualifier_options, | |
115 | 125 | 'qualifier_options': qualifier_options, |
116 | 126 | 'cv_options': cv_options, |
117 | 127 | 'status_options': Lexeme.STATUS_CHOICES, |
... | ... |
media/js/lexeme-view.js
... | ... | @@ -81,13 +81,13 @@ $.extend(slickgrid, { |
81 | 81 | name: 'Kwal. leksemu', |
82 | 82 | gender: 'm', |
83 | 83 | ops: eqne, |
84 | - options: $dj.qualifier_options | |
84 | + options: $dj.lexeme_qualifier_options | |
85 | 85 | }, |
86 | 86 | lip_qualifier: { |
87 | 87 | name: 'Kwal. odmieniasia', |
88 | 88 | gender: 'm', |
89 | 89 | ops: eqne, |
90 | - options: $dj.qualifier_options | |
90 | + options: $dj.form_qualifier_options | |
91 | 91 | }, |
92 | 92 | qualifier: { |
93 | 93 | name: 'Kwal. przy dow. formie', |
... | ... |