Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Redraw calendar each time |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d43fb93b4f2b9744c64828214a27a2d5 |
User & Date: | i5ivem@gmail.com 2010-04-07 16:12:43 |
Context
2010-04-15
| ||
15:59 |
Fix rendering of mailpane when new calendar
* Removed commented out old code | |
2010-04-07
| ||
16:12 | Redraw calendar each time check-in: d43fb93b4f user: i5ivem@gmail.com tags: trunk | |
2010-04-06
| ||
16:16 | Started making less-clever, but more usuable lists check-in: c2b66f1570 user: i5ivem@gmail.com tags: trunk | |
Changes
Changes to shoefiti.rb.
︙ | ︙ | |||
99 100 101 102 103 104 105 106 107 108 | #Need to clear and redraw like mailpane def drawcalendar(month, year, list, maildays) off=Date.new(year, month, 01).wday-1 #Offset, not sure why I need the -1 here, but I do. mdays=(Date.new(year, 12, 31) << (12-month)).day #Days in the month rows=((mdays+off+1).to_f/7.0).ceil #Number of rows in calendar, plus 1 to compensate for -1 above. Have confused myself days = %w{Su Mo Tu We Th Fr Sa} days.each do |column| i = days.index(column) row = 0 | > | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | #Need to clear and redraw like mailpane def drawcalendar(month, year, list, maildays) off=Date.new(year, month, 01).wday-1 #Offset, not sure why I need the -1 here, but I do. mdays=(Date.new(year, 12, 31) << (12-month)).day #Days in the month rows=((mdays+off+1).to_f/7.0).ceil #Number of rows in calendar, plus 1 to compensate for -1 above. Have confused myself days = %w{Su Mo Tu We Th Fr Sa} @stack_cal.clear{ days.each do |column| i = days.index(column) row = 0 stack :left => i*40+250, :top => -100 do para column until row == rows do calday = i-off+7*row if (1..mdays) === calday #Only want to draw if greater than zero and less than max days if calday.to_s.length == 1 caldaystr = "0"+calday.to_s #need "0" in front of single digits else caldaystr = calday.to_s end if maildays.include?(caldaystr+"/") para make_date_link(list, year, month, calday) else para calday end else para "" end row += 1 end end end} end def make_date_link(list, year, month, day) #http://thread.gmane.org/gmane.comp.lib.shoes/4042/focus=4044 link(day){getmails(list, year, month, day)} end |
︙ | ︙ | |||
197 198 199 200 201 202 203 204 205 206 207 208 | @listurl = "" @stack_list.hide @stack_year.hide @stack_day.hide init end | > > > | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | @listurl = "" @stack_list.hide @stack_year.hide @stack_day.hide @stack_cal = stack do end init end |