web/views/tableview.py
changeset 8042 27ab1649bd71
parent 8032 bcb87336c7d2
child 8046 bdd555df7a91
equal deleted inserted replaced
8041:81794aa0c8b4 8042:27ab1649bd71
   942         self.w(u'</div>\n')
   942         self.w(u'</div>\n')
   943         if self.initial_load:
   943         if self.initial_load:
   944             self.w(u'</div>\n')
   944             self.w(u'</div>\n')
   945 
   945 
   946     def page_navigation_url(self, navcomp, path, params):
   946     def page_navigation_url(self, navcomp, path, params):
       
   947         """Build an url to the current view using the <navcomp> attributes
       
   948 
       
   949         :param navcomp: a NavigationComponent to call an url method on.
       
   950         :param path:    expected to be json here ?
       
   951         :param params: params to give to build_url method
       
   952 
       
   953         this is called by :class:`cubiweb.web.component.NavigationComponent`
       
   954         """
   947         if hasattr(self, 'divid'):
   955         if hasattr(self, 'divid'):
       
   956             # XXX this assert a single call
   948             params['divid'] = self.divid
   957             params['divid'] = self.divid
   949         params['vid'] = self.__regid__
   958         params['vid'] = self.__regid__
   950         return navcomp.ajax_page_url(**params)
   959         return navcomp.ajax_page_url(**params)
   951 
   960 
   952     def show_hide_actions(self, divid, currentlydisplayed=False):
   961     def show_hide_actions(self, divid, currentlydisplayed=False):
  1021     def render_cell(self, cellvid, row, col, w):
  1030     def render_cell(self, cellvid, row, col, w):
  1022         self._cw.view('cell', self.cw_rset, row=row, col=col, cellvid=cellvid, w=w)
  1031         self._cw.view('cell', self.cw_rset, row=row, col=col, cellvid=cellvid, w=w)
  1023 
  1032 
  1024     def get_rows(self):
  1033     def get_rows(self):
  1025         return self.cw_rset
  1034         return self.cw_rset
  1026 
       
  1027     def page_navigation_url(self, navcomp, path, params):
       
  1028         """Build an url to the current view using the <navcomp> attributes
       
  1029 
       
  1030         :param navcomp: a NavigationComponent to call an url method on.
       
  1031         :param path:    expected to be json here ?
       
  1032         :param params: params to give to build_url method
       
  1033 
       
  1034         this is called by :class:`cubiweb.web.component.NavigationComponent`
       
  1035         """
       
  1036         if hasattr(self, 'divid'):
       
  1037             # XXX this assert a single call
       
  1038             params['divid'] = self.divid
       
  1039         params['vid'] = self.__regid__
       
  1040         return navcomp.ajax_page_url(**params)
       
  1041 
  1035 
  1042     @htmlescape
  1036     @htmlescape
  1043     @jsonize
  1037     @jsonize
  1044     @limitsize(10)
  1038     @limitsize(10)
  1045     def sortvalue(self, row, col):
  1039     def sortvalue(self, row, col):