1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<tal:open-tag replace="structure view/open_tag"/><span
class="yui3-editable_text-text"><tal:text replace="view/value"/></span>
<a tal:condition="view/can_write"
tal:attributes="href view/edit_url;
title view/edit_title"
class="yui3-editable_text-trigger sprite edit"></a>
<tal:close-tag replace="structure view/close_tag"/>
<script tal:condition="view/can_write"
tal:content="structure string:
LPS.use('lazr.editor', 'lp.client.plugins', function (Y) {
var widget = new Y.EditableText({
contentBox: ${view/widget_css_selector},
accept_empty: ${view/accept_empty},
width: ${view/width},
initial_value_override: ${view/initial_value_override}
});
widget.editor.plug({
fn: Y.lp.client.plugins.PATCHPlugin, cfg: {
patch: ${view/json_attribute},
resource: ${view/json_resource_uri}
}});
widget.render();
});
"/>
|