comparison sat_frontends/tools/xmlui.py @ 2783:442ab697f831

frontends, jp, templates: added XHTMLBox widget: for jp, the XHTML is rendered for now using markdown.
author Goffi <goffi@goffi.org>
date Sat, 19 Jan 2019 11:39:02 +0100
parents 003b8b4b56a7
children 5ba98fd6c9a4
comparison
equal deleted inserted replaced
2782:b17e6fa1e607 2783:442ab697f831
114 pass 114 pass
115 115
116 116
117 class TextBoxWidget(Widget): 117 class TextBoxWidget(Widget):
118 """Input widget with require a long, possibly multilines string 118 """Input widget with require a long, possibly multilines string
119
119 often called TextArea in toolkits 120 often called TextArea in toolkits
121 """
122
123 pass
124
125
126 class XHTMLBoxWidget(Widget):
127 """Input widget specialised in XHTML editing,
128
129 a WYSIWYG or specialised editor is expected
120 """ 130 """
121 131
122 pass 132 pass
123 133
124 134
577 _xmlui_parent, value, self._isAttrSet("read_only", node) 587 _xmlui_parent, value, self._isAttrSet("read_only", node)
578 ) 588 )
579 self.ctrl_list[name] = {"type": type_, "control": ctrl} 589 self.ctrl_list[name] = {"type": type_, "control": ctrl}
580 elif type_ == "textbox": 590 elif type_ == "textbox":
581 ctrl = self.widget_factory.createTextBoxWidget( 591 ctrl = self.widget_factory.createTextBoxWidget(
592 _xmlui_parent, value, self._isAttrSet("read_only", node)
593 )
594 self.ctrl_list[name] = {"type": type_, "control": ctrl}
595 elif type_ == "xhtmlbox":
596 ctrl = self.widget_factory.createXHTMLBoxWidget(
582 _xmlui_parent, value, self._isAttrSet("read_only", node) 597 _xmlui_parent, value, self._isAttrSet("read_only", node)
583 ) 598 )
584 self.ctrl_list[name] = {"type": type_, "control": ctrl} 599 self.ctrl_list[name] = {"type": type_, "control": ctrl}
585 elif type_ == "bool": 600 elif type_ == "bool":
586 ctrl = self.widget_factory.createBoolWidget( 601 ctrl = self.widget_factory.createBoolWidget(