Commit ea232a86f8b1ec5d3f46084d786bdea24e546474

Authored by janek@kublik
1 parent 81daac4e

filtrowanie wg źródła

--HG--
branch : beta
README-DEV
... ... @@ -3,6 +3,8 @@ dodawanie filtrów dla leksemów
3 3 1. w js/lexeme-view.js dodajemy opis do filter_fields
4 4 [opcjonalnie: generować listę wartości w dictionary/views.py]
5 5 2. dodać tłumaczenie pola do LexemeQuery.filter_field_translation
  6 + (jeśli tłumaczenie nie jest potrzebne, to trzeba dodać pole to
  7 + LexemeQuery.literal_filter_fields)
6 8 3. jeśli filtr potrzebuje specjalnej obsługi, to w LexemeQuery.apply_filter_rule
7 9 4. i już!
8 10  
... ...
dictionary/ajax_lexeme_slickgrid.py
... ... @@ -64,7 +64,7 @@ class LexemeQuery(SlickGridQuery):
64 64  
65 65 literal_filter_fields = [
66 66 'entry', 'part_of_speech', 'status', 'comment', 'qualifiers_dor',
67   - 'gloss', 'note', 'extended_note', 'pronunciation', 'valence',
  67 + 'gloss', 'note', 'extended_note', 'pronunciation', 'valence', 'source',
68 68 'lexemeav__attribute_value_id',
69 69 'inflection__pronunciation',
70 70 'value',
... ...
dictionary/static/js/lexeme-view.js
... ... @@ -237,6 +237,11 @@ $.extend(slickgrid, {
237 237 gender: 'm',
238 238 ops: eqne,
239 239 options: $dj.user_options
  240 + },
  241 + source: {
  242 + name: gettext("Source"),
  243 + gender: 'n',
  244 + ops: text_ops
240 245 }
241 246 }, extra_attr_filter_fields),
242 247  
... ...