Ejemplo n.º 1
0
 def onEntryActivated(self, event):
     index = event.GetIndex()
     docIDO = self.model.getEntry(index)
     blogId = None
     if self.blog is not None:
         blogId = self.blog.getId()
     actionContext = ZBlogPostActionContext(self, docIDO, blogId)
     self.openAction.runAction(actionContext)
     event.Skip()
Ejemplo n.º 2
0
 def createActionContext(self):
     docIDO = None
     blogId = None
     selection = self.entriesListView.getSelection()
     if selection:
         index = selection[0]
         docIDO = self.model.getEntry(index)
         if self.blog is not None:
             blogId = self.blog.getId()
     return ZBlogPostActionContext(self, docIDO, blogId)
Ejemplo n.º 3
0
 def onEntryRightClick(self, event):
     index = event.GetIndex()
     docIDO = self.blogPostsListQueryModel.getDocumentIDO(index)
     actionContext = ZBlogPostActionContext(self, docIDO)
     provider = ZModelBasedMenuContentProvider(self.blogPostContextMenu,
                                               actionContext)
     handler = ZModelBasedMenuEventHandler(self.blogPostContextMenu,
                                           actionContext)
     menu = ZMenu(self, self.blogPostContextMenu.getRootNode(), provider,
                  handler)
     self.PopupMenu(menu)
     event.Skip()
Ejemplo n.º 4
0
 def onEntryRightClick(self, event):
     index = event.GetIndex()
     docIDO = self.model.getEntry(index)
     blogId = None
     if self.blog is not None:
         blogId = self.blog.getId()
     actionContext = ZBlogPostActionContext(self, docIDO, blogId)
     provider = ZModelBasedMenuContentProvider(self.blogPostContextMenu,
                                               actionContext)
     handler = ZModelBasedMenuEventHandler(self.blogPostContextMenu,
                                           actionContext)
     menu = ZMenu(self, self.blogPostContextMenu.getRootNode(), provider,
                  handler)
     self.PopupMenu(menu)
     event.Skip()
Ejemplo n.º 5
0
 def onEntryActivated(self, event):
     index = event.GetIndex()
     docIDO = self.blogPostsListQueryModel.getDocumentIDO(index)
     actionContext = ZBlogPostActionContext(self, docIDO)
     self.openAction.runAction(actionContext)