<a href="#" onclick="sheetInstance.cellStyleToggle('styleLineThrough', 'styleUnderline'); return false;" title="Strikethrough"> <img alt="Strikethrough" src="/static/actions/spreadsheet/text_strikethrough.png"/></a> <a href="#" onclick="sheetInstance.cellStyleToggle('styleLeft', 'styleCenter styleRight'); return false;" title="Align Left"> <img alt="Align Left" src="/static/actions/spreadsheet/text_align_left.png"/></a> <a href="#" onclick="sheetInstance.cellStyleToggle('styleCenter', 'styleLeft styleRight'); return false;" title="Align Center"> <img alt="Align Center" src="/static/actions/spreadsheet/text_align_center.png"/></a> <a href="#" onclick="sheetInstance.cellStyleToggle('styleRight', 'styleLeft styleCenter'); return false;" title="Align Right"> <img alt="Align Right" src="/static/actions/spreadsheet/text_align_right.png"/></a> <a href="#" onclick="sheetInstance.fillUpOrDown(); return false;" title="Fill Down"> <img alt="Fill Down" src="/static/actions/spreadsheet/arrow_down.png"/></a> <a href="#" onclick="sheetInstance.fillUpOrDown(true); return false;" title="Fill Up"> <img alt="Fill Up" src="/static/actions/spreadsheet/arrow_up.png"/></a> <span class="colorPickers"> <input title="Foreground color" class="colorPickerFont" style="background-image: url('/static/actions/spreadsheet/palette.png') ! important; width: 16px; height: 16px;"/> <input title="Background Color" class="colorPickerCell" style="background-image: url('/static/actions/spreadsheet/palette_bg.png') ! important; width: 16px; height: 16px;"/> </span> <a href="#" onclick="var c=sheetInstance.cellLast.td; sheetInstance.evt.cellEditAbandon(); ui.ask_user('Enter address or path', 'Add link to:', function(val) { sheetInstance.cellEdit(c); sheetInstance.obj.formula().val('=HYPERLINK(\\''+val+'\\')'); sheetInstance.evt.cellEditDone(true)}); return false;" title="HyperLink"> <img alt="Web Link" src="/static/actions/spreadsheet/page_link.png"/></a> <a href="#" onclick="sheetInstance.toggleFullScreen(); $('#lockedMenu').toggle(); return false;" title="Toggle Full Screen"> <img alt="Web Link" src="/static/actions/spreadsheet/arrow_out.png"/></a><!--<a href="#" onclick="insertAt('jSheetControls_formula', '~np~text~'+'/np~');return false;" title="Non-parsed"><img alt="Non-parsed" src="/static/actions/spreadsheet/noparse.png"/></a>--> </span> </span> '''%self.title drink.update_property(drink.Page, SpreadSheet, 'loaders', {'view': 'init_spreadsheet()'}) # Override property for convenience SpreadSheet.content = ''' <table class="jSheet ui-widget-content" id="jSheet_0_0" border="1px" cellpadding="0" cellspacing="0" style="width: 1200px; "><colgroup><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"><col style="width: 120px; " width="120px"></colgroup><tbody><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r0"></td><td id="0_table0_cell_c1_r0"></td><td id="0_table0_cell_c2_r0"></td><td id="0_table0_cell_c3_r0"></td><td id="0_table0_cell_c4_r0"></td><td id="0_table0_cell_c5_r0"></td><td id="0_table0_cell_c6_r0"></td><td id="0_table0_cell_c7_r0"></td><td id="0_table0_cell_c8_r0"></td><td id="0_table0_cell_c9_r0"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r1"></td><td id="0_table0_cell_c1_r1"></td><td id="0_table0_cell_c2_r1"></td><td id="0_table0_cell_c3_r1"></td><td id="0_table0_cell_c4_r1"></td><td id="0_table0_cell_c5_r1"></td><td id="0_table0_cell_c6_r1"></td><td id="0_table0_cell_c7_r1"></td><td id="0_table0_cell_c8_r1"></td><td id="0_table0_cell_c9_r1"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r2"></td><td id="0_table0_cell_c1_r2"></td><td id="0_table0_cell_c2_r2"></td><td id="0_table0_cell_c3_r2"></td><td id="0_table0_cell_c4_r2"></td><td id="0_table0_cell_c5_r2"></td><td id="0_table0_cell_c6_r2"></td><td id="0_table0_cell_c7_r2"></td><td id="0_table0_cell_c8_r2"></td><td id="0_table0_cell_c9_r2"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r3"></td><td id="0_table0_cell_c1_r3"></td><td id="0_table0_cell_c2_r3"></td><td id="0_table0_cell_c3_r3"></td><td id="0_table0_cell_c4_r3"></td><td id="0_table0_cell_c5_r3"></td><td id="0_table0_cell_c6_r3"></td><td id="0_table0_cell_c7_r3"></td><td id="0_table0_cell_c8_r3"></td><td id="0_table0_cell_c9_r3"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r4"></td><td id="0_table0_cell_c1_r4"></td><td id="0_table0_cell_c2_r4"></td><td id="0_table0_cell_c3_r4"></td><td id="0_table0_cell_c4_r4"></td><td id="0_table0_cell_c5_r4"></td><td id="0_table0_cell_c6_r4"></td><td id="0_table0_cell_c7_r4"></td><td id="0_table0_cell_c8_r4"></td><td id="0_table0_cell_c9_r4"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r5"></td><td id="0_table0_cell_c1_r5"></td><td id="0_table0_cell_c2_r5"></td><td id="0_table0_cell_c3_r5"></td><td id="0_table0_cell_c4_r5"></td><td id="0_table0_cell_c5_r5"></td><td id="0_table0_cell_c6_r5"></td><td id="0_table0_cell_c7_r5"></td><td id="0_table0_cell_c8_r5"></td><td id="0_table0_cell_c9_r5"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r6"></td><td id="0_table0_cell_c1_r6"></td><td id="0_table0_cell_c2_r6"></td><td id="0_table0_cell_c3_r6"></td><td id="0_table0_cell_c4_r6"></td><td id="0_table0_cell_c5_r6"></td><td id="0_table0_cell_c6_r6"></td><td id="0_table0_cell_c7_r6"></td><td id="0_table0_cell_c8_r6"></td><td id="0_table0_cell_c9_r6"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r7"></td><td id="0_table0_cell_c1_r7"></td><td id="0_table0_cell_c2_r7"></td><td id="0_table0_cell_c3_r7"></td><td id="0_table0_cell_c4_r7"></td><td id="0_table0_cell_c5_r7"></td><td id="0_table0_cell_c6_r7"></td><td id="0_table0_cell_c7_r7"></td><td id="0_table0_cell_c8_r7"></td><td id="0_table0_cell_c9_r7"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r8"></td><td id="0_table0_cell_c1_r8"></td><td id="0_table0_cell_c2_r8"></td><td id="0_table0_cell_c3_r8"></td><td id="0_table0_cell_c4_r8"></td><td id="0_table0_cell_c5_r8"></td><td id="0_table0_cell_c6_r8"></td><td id="0_table0_cell_c7_r8"></td><td id="0_table0_cell_c8_r8"></td><td id="0_table0_cell_c9_r8"></td></tr><tr style="height: 18px; " height="18px"><td id="0_table0_cell_c0_r9"></td><td id="0_table0_cell_c1_r9"></td><td id="0_table0_cell_c2_r9"></td><td id="0_table0_cell_c3_r9"></td><td id="0_table0_cell_c4_r9"></td><td id="0_table0_cell_c5_r9"></td><td id="0_table0_cell_c6_r9"></td><td id="0_table0_cell_c7_r9"></td><td id="0_table0_cell_c8_r9"></td><td id="0_table0_cell_c9_r9"></td></tr><tr style="height: 18px; "><td id="0_table0_cell_c0_r10"></td><td id="0_table0_cell_c1_r10"></td><td id="0_table0_cell_c2_r10"></td><td id="0_table0_cell_c3_r10"></td><td id="0_table0_cell_c4_r10"></td><td id="0_table0_cell_c5_r10"></td><td id="0_table0_cell_c6_r10"></td><td id="0_table0_cell_c7_r10"></td><td id="0_table0_cell_c8_r10"></td><td id="0_table0_cell_c9_r10"></td></tr><tr style="height: 18px; "><td id="0_table0_cell_c0_r11"></td><td id="0_table0_cell_c1_r11"></td><td id="0_table0_cell_c2_r11"></td><td id="0_table0_cell_c3_r11"></td><td id="0_table0_cell_c4_r11"></td><td id="0_table0_cell_c5_r11"></td><td id="0_table0_cell_c6_r11"></td><td id="0_table0_cell_c7_r11"></td><td id="0_table0_cell_c8_r11"></td><td id="0_table0_cell_c9_r11"></td></tr><tr style="height: 18px; "><td id="0_table0_cell_c0_r12"></td><td id="0_table0_cell_c1_r12"></td><td id="0_table0_cell_c2_r12"></td><td id="0_table0_cell_c3_r12"></td><td id="0_table0_cell_c4_r12"></td><td id="0_table0_cell_c5_r12"></td><td id="0_table0_cell_c6_r12"></td><td id="0_table0_cell_c7_r12"></td><td id="0_table0_cell_c8_r12"></td><td id="0_table0_cell_c9_r12"></td></tr><tr style="height: 18px; "><td id="0_table0_cell_c0_r13"></td><td id="0_table0_cell_c1_r13"></td><td id="0_table0_cell_c2_r13"></td><td id="0_table0_cell_c3_r13"></td><td id="0_table0_cell_c4_r13"></td><td id="0_table0_cell_c5_r13"></td><td id="0_table0_cell_c6_r13"></td><td id="0_table0_cell_c7_r13"></td><td id="0_table0_cell_c8_r13"></td><td id="0_table0_cell_c9_r13"></td></tr><tr style="height: 18px; "><td id="0_table0_cell_c0_r14"></td><td id="0_table0_cell_c1_r14"></td><td id="0_table0_cell_c2_r14"></td><td id="0_table0_cell_c3_r14"></td><td id="0_table0_cell_c4_r14"></td><td id="0_table0_cell_c5_r14"></td><td id="0_table0_cell_c6_r14"></td><td id="0_table0_cell_c7_r14"></td><td id="0_table0_cell_c8_r14"></td><td id="0_table0_cell_c9_r14"></td></tr></tbody></table>'''
'id': an_event.id.text, 'title': an_event.title.text, 'start': an_event.when[0].start, 'end': an_event.when[0].end, 'allDay': False, 'href': an_event.link[0].href, 'description': an_event.content.text, } all_feeds = getattr(self, '_v_all_feeds', None) or None # Try a gcalendar connection 2 times for n in xrange(2): try: all_feeds = client.GetAllCalendarsFeed().entry log.error("failed %d", n) except Exception: pass else: self._v_all_feeds = all_feeds break return chain(*(DateRangeQuery(client, feed, start.isoformat() if start else None, end.isoformat() if end else None) for feed in all_feeds)) drink.update_property(drink.Page, TODOList, 'loaders', {'view': 'init_calendar()'}) drink.update_property(drink.Page, TODOList, 'add_hooks', {'view': 'task_added(entry)'})