Exemple #1
0
    def phrase (self, phrase):
        """
        Устанавливает искомую фразу
        """
        self._phrase = phrase

        phraseOption = StringOption (self.params, self.paramsSection, u"phrase", u"")
        try:
            phraseOption.value = phrase
        except ReadonlyException:
            # Ничего страшного, если поисковая фраза не сохранится
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
Exemple #2
0
    def phrase (self, phrase):
        """
        Устанавливает искомую фразу
        """
        self._phrase = phrase

        phraseOption = StringOption (self.params, self.paramsSection, u"phrase", u"")
        try:
            phraseOption.value = phrase
        except ReadonlyException:
            # Ничего страшного, если поисковая фраза не сохранится
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
Exemple #3
0
    def searchTags (self, tags):
        """
        Выбрать теги для поиска
        """
        self._searchTags = tags
        tags_str = getTagsString (tags)

        tagsOption = StringOption (self.params, self.paramsSection, u"tags", u"")

        try:
            tagsOption.value = tags_str
        except ReadonlyException:
            # Ну не сохранятся искомые теги, ничего страшного
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
Exemple #4
0
    def strategy (self, strategy):
        if strategy == AllTagsSearchStrategy:
            strategyCode = 1
        else:
            strategyCode = 0

        self._strategy = strategy
        strategyOption = IntegerOption (self.params, self.paramsSection, u"strategy", 0)

        try:
            strategyOption.value = strategyCode
        except ReadonlyException:
            # Ничего страшного
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
Exemple #5
0
    def searchTags (self, tags):
        """
        Выбрать теги для поиска
        """
        self._searchTags = tags
        tags_str = getTagsString (tags)

        tagsOption = StringOption (self.params, self.paramsSection, u"tags", u"")

        try:
            tagsOption.value = tags_str
        except ReadonlyException:
            # Ну не сохранятся искомые теги, ничего страшного
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
Exemple #6
0
    def strategy (self, strategy):
        if strategy == AllTagsSearchStrategy:
            strategyCode = 1
        else:
            strategyCode = 0

        self._strategy = strategy
        strategyOption = IntegerOption (self.params, self.paramsSection, u"strategy", 0)

        try:
            strategyOption.value = strategyCode
        except ReadonlyException:
            # Ничего страшного
            pass

        Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)