comparison browser_side/richtext.py @ 282:ae3ec654836d

browser_side: added blog item modification/deletion
author souliane <souliane@mailoo.org>
date Tue, 10 Dec 2013 09:07:03 +0100
parents 36ce989c73a5
children 05e264e96a1c
comparison
equal deleted inserted replaced
281:36ce989c73a5 282:ae3ec654836d
171 label.addStyleName("richTextFormatLabel") 171 label.addStyleName("richTextFormatLabel")
172 toolbar.add(label) 172 toolbar.add(label)
173 self.getFlexCellFormatter().setColSpan(offset1 + count, 0, 2) 173 self.getFlexCellFormatter().setColSpan(offset1 + count, 0, 2)
174 self.setWidget(offset1 + count, 0, toolbar) 174 self.setWidget(offset1 + count, 0, toolbar)
175 count += 1 175 count += 1
176
177 @property
178 def format(self):
179 """Get the current text format"""
180 return self._format if hasattr(self, '_format') else None
176 181
177 def addToolbarButton(self, toolbar, _format, key): 182 def addToolbarButton(self, toolbar, _format, key):
178 """Add a button with the defined parameters.""" 183 """Add a button with the defined parameters."""
179 button = Button('<img src="%s" class="richTextIcon" />' % 184 button = Button('<img src="%s" class="richTextIcon" />' %
180 composition.RICH_BUTTONS[key]["icon"]) 185 composition.RICH_BUTTONS[key]["icon"])