コード例 #1
0
    def __call__(self, content, event):
        """Called by the event system."""
        if IDexterityTranslatable.providedBy(content):
            self.canonical = ITranslationManager(content).query_canonical()

            if IEditFinishedEvent.providedBy(event):
                self.handle_modified(content)
    def __call__(self, content, event):
        """Called by the event system."""
        if IDexterityTranslatable.providedBy(content):
            self.canonical = ITranslationManager(content).query_canonical()

            if event.descriptions \
               and len(event.descriptions) > 1 \
               and event.descriptions[1] == self.canonical:
                return

            if IObjectModifiedEvent.providedBy(event):
                self.handle_modified(content)
コード例 #3
0
 def __call__(self, content, event):
     """Called by the event system."""
     if IDexterityTranslatable.providedBy(content):
         if IObjectModifiedEvent.providedBy(event):
             self.handle_modified(content)