shoefiti

Check-in [9971bce308]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix message pane displaying only latest message
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9971bce3082ae79df3080c91adce7ec7ae0219721bc28cb2c959ce8a507941ac
User & Date: i5ivem@gmail.com 2010-04-04 22:37:02
Context
2010-04-06
15:17
Playing about with re-using list drop downs check-in: 6475c16072 user: i5ivem@gmail.com tags: trunk
2010-04-04
22:37
Fix message pane displaying only latest message check-in: 9971bce308 user: i5ivem@gmail.com tags: trunk
2010-03-24
14:46
First attempt at UI layout, email bodies load

* Laying out application as desired, with scrolling message pane
* Message bodies are now returned, have to check for plain text messages
and mutlipart messages. check-in: 23acb16814 user: i5ivem@gmail.com tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to shoefiti.rb.

81
82
83
84
85
86
87


88
89
90
91
92
93
94
95
96
97
98
...
100
101
102
103
104
105
106

107
108
109
110
111
112
113
			day = day.to_s
		end
		url = "http://librelist.com/archives/"+list+"/"+year.to_s+"/"+month.to_s+"/"+day.to_s+"/json/"
		#debug(url)
		download(url) do |data|
			emails = eval(data.response.body)[1]
			#debug(emails.length)


			emails.each do |message|
				download(url+message) do |data|
					js = JSON.parse(data.response.body)
					@messagelist.clear{
						stack :margin => 30, :width => 550 do
								border black, :strokewidth => 2 
								inscription js["headers"]["Date"]
								inscription js["headers"]["From"]
								inscription js["headers"]["Subject"]
								#message body can end up in one of two places
								if js["body"] 
................................................................................
								else 
									para js["parts"][0]["body"].to_s
								end
						end
					}
				end
			end

		end
	end

	
	def drawmailpane
		@messagelist = stack :height => 425, :scroll => true 
	end







>
>



|







 







>







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
			day = day.to_s
		end
		url = "http://librelist.com/archives/"+list+"/"+year.to_s+"/"+month.to_s+"/"+day.to_s+"/json/"
		#debug(url)
		download(url) do |data|
			emails = eval(data.response.body)[1]
			#debug(emails.length)
			@messagelist.clear{
			stack  do
			emails.each do |message|
				download(url+message) do |data|
					js = JSON.parse(data.response.body)
					@messagelist.append{
						stack :margin => 30, :width => 550 do
								border black, :strokewidth => 2 
								inscription js["headers"]["Date"]
								inscription js["headers"]["From"]
								inscription js["headers"]["Subject"]
								#message body can end up in one of two places
								if js["body"] 
................................................................................
								else 
									para js["parts"][0]["body"].to_s
								end
						end
					}
				end
			end
			end}
		end
	end

	
	def drawmailpane
		@messagelist = stack :height => 425, :scroll => true 
	end