Exemplo n.º 1
0
	def addRow(self,Entry,r, row):
		#Window.alert(r['thumbimg'])
		title = HTML("<span title=\""+r['title']+"\"; style=\"color:black;\">"+r['title']+"</span>")
		title.setStyleName("pointer")
		author = HTML("<span title=\""+r['author']+"\" style=\"color:grey\">"+"Author(s): "+r['author']+"</span>")
		#asin = r['asin']
		img = r['thumbnail']
		nsellers = HTML("<span style=\"color:green\">"+"Sellers: "+str(r['numsellers'])+"</span>")
		isbn = HTML("<span style=\"color:#483D8B\">"+"ISBN: "+str(r['isbn'])+"</span>")
		onSell = r['onSell']
		onWish = r['onWish']
		if(img == "N/A"):
			img = "#"
		imghtml = HTML("<img src='"+img+"' alt='No Thumbnail'/>")
		imghtml.setStyleName("pointer")
		
		title.setWidth(str(self.table_width)+"px")
		author.setWidth(str(self.table_width)+"px")
		info_wrapper = VerticalPanel()
		info_wrapper.add(title)
		info_wrapper.add(isbn)
		info_wrapper.add(author)
		info_wrapper.add(nsellers)
		
		
		Entry.setWidget(row,0,imghtml)
		Entry.setWidget(row, 1, info_wrapper)
		Entry.getRowFormatter().addStyleName(row,"comments")
		#Entry.setWidget(row,1,title)
		#Entry.setText(row,2,nsellers)
		
		def _get_book_data_Click(event):
			self.remote.search_check(self,r)
		title.addClickListener(_get_book_data_Click)
		title.addStyleName("pointer")
		imghtml.addClickListener(_get_book_data_Click)
		imghtml.addStyleName("pointer")
		'''
Exemplo n.º 2
0
 def newPositioner(self, context):
     positioner = HTML("&#x203B;")
     positioner.addStyleName(CSS_DRAGDROP_FLOW_PANEL_POSITIONER)
     return positioner