diff --git a/README-DEV b/README-DEV index 74860b6..4037e8e 100644 --- a/README-DEV +++ b/README-DEV @@ -3,6 +3,8 @@ dodawanie filtrów dla leksemów 1. w js/lexeme-view.js dodajemy opis do filter_fields [opcjonalnie: generować listę wartości w dictionary/views.py] 2. dodać tłumaczenie pola do LexemeQuery.filter_field_translation + (jeśli tłumaczenie nie jest potrzebne, to trzeba dodać pole to + LexemeQuery.literal_filter_fields) 3. jeśli filtr potrzebuje specjalnej obsługi, to w LexemeQuery.apply_filter_rule 4. i już! diff --git a/dictionary/ajax_lexeme_slickgrid.py b/dictionary/ajax_lexeme_slickgrid.py index da5e246..eefd19f 100644 --- a/dictionary/ajax_lexeme_slickgrid.py +++ b/dictionary/ajax_lexeme_slickgrid.py @@ -64,7 +64,7 @@ class LexemeQuery(SlickGridQuery): literal_filter_fields = [ 'entry', 'part_of_speech', 'status', 'comment', 'qualifiers_dor', - 'gloss', 'note', 'extended_note', 'pronunciation', 'valence', + 'gloss', 'note', 'extended_note', 'pronunciation', 'valence', 'source', 'lexemeav__attribute_value_id', 'inflection__pronunciation', 'value', diff --git a/dictionary/static/js/lexeme-view.js b/dictionary/static/js/lexeme-view.js index 884afee..08bba6e 100644 --- a/dictionary/static/js/lexeme-view.js +++ b/dictionary/static/js/lexeme-view.js @@ -237,6 +237,11 @@ $.extend(slickgrid, { gender: 'm', ops: eqne, options: $dj.user_options + }, + source: { + name: gettext("Source"), + gender: 'n', + ops: text_ops } }, extra_attr_filter_fields),