This commit is contained in:
yumoqing 2020-09-19 11:30:14 +08:00
parent 650b0da43a
commit 28ca60b807

View File

@ -32,6 +32,7 @@ class BoxViewer(BoxLayout):
self.parenturl = None self.parenturl = None
self.dataloader = None self.dataloader = None
self.initflag = False self.initflag = False
self.selected_box = None
remind = ['toolbar', remind = ['toolbar',
'dataloader', 'dataloader',
'orientation', 'orientation',
@ -137,8 +138,14 @@ class BoxViewer(BoxLayout):
self.dataloader.loadPreviousPage() self.dataloader.loadPreviousPage()
def select_record(self,o,v=None): def select_record(self,o,v=None):
if self.selected_box:
self.selected_box.unselected()
o.selected()
self.selected_box = o
self.selected_data = o.getRecord() self.selected_data = o.getRecord()
d = { d = {
"target":self.selected_box,
"page_rows":1, "page_rows":1,
"page":self.selected_data['__posInSet__'], "page":self.selected_data['__posInSet__'],
"dataurl":self.options['dataloader']['options']['dataurl'], "dataurl":self.options['dataloader']['options']['dataurl'],