2019-05-03 10:33:22 +02:00
<templates >
2023-04-21 07:51:00 +02:00
<div t-name= "TabbedEditor" class= "tabbed-editor" t-att-style= "props.style" >
2019-05-03 10:33:22 +02:00
<div class= "tabBar" t-att-class= "{resizeable: props.resizeable}" t-on-mousedown= "onMouseDown" >
2021-11-17 18:41:01 +01:00
<t t-foreach= "['js', 'xml', 'css']" t-as= "tab" t-key= "tab" >
<a t-ref= "{{tab}}" t-if= "props[tab] !== false" t-key= "tab" class= "tab flash" t-att-class= "{active: state.currentTab===tab}" t-on-click= "() => setTab(tab)" >
2019-05-16 12:04:50 +02:00
<t t-esc= "tab" />
</a>
</t>
2019-05-03 10:33:22 +02:00
</div>
2019-05-28 13:17:38 +02:00
<div class= "code-editor" t-ref= "editor" > </div>
2019-05-03 10:33:22 +02:00
</div>
2023-04-24 15:47:09 +02:00
<div t-name= "Playground" class= "playground" >
2019-06-04 10:06:05 +02:00
<div class= "left-bar" t-att-class= "{split: state.splitLayout}"
2021-11-17 18:41:01 +01:00
t-att-style= "leftPaneStyle" >
2019-05-03 10:33:22 +02:00
<div class= "menubar" >
<a class= "btn run-code flash" t-on-click= "runCode" title= "Execute this Code" > ▶ Run</a>
2023-04-21 07:51:00 +02:00
<select t-on-change= "onSampleChange" >
<option t-foreach= "samples" t-as= "sample" t-key= "sample_index" >
2019-05-03 10:33:22 +02:00
<t t-esc= "sample.description" />
</option>
</select>
2023-04-21 07:51:00 +02:00
<a class= "btn flash" t-on-click= "exportStandaloneApp" title= "Download zip that bundles this app with a tiny python web server" > <i class= "fas fa-download" > </i> </a>
2019-05-03 10:33:22 +02:00
<a class= "layout-selector flash" t-on-click= "toggleLayout" title= "Toggle Layout" > <i class= "fas" t-att-class= "state.splitLayout ? 'fa-toggle-on' : 'fa-toggle-off'" > </i> </a>
2023-04-06 11:43:28 +02:00
<a class= "btn flash share-code" t-on-click= "shareCode" title= "Copy a link to this playground" > <span > Share</span> <span class= "copied-notification" t-if= "state.copied" > Copied link to clipboard!</span> </a>
2019-05-03 10:33:22 +02:00
</div>
2019-06-18 09:24:52 +02:00
<TabbedEditor
2019-06-04 09:14:57 +02:00
js= "state.js"
css= "!state.splitLayout and state.css"
2019-06-24 15:03:00 +02:00
xml= "!state.splitLayout and state.xml"
2021-11-17 18:41:01 +01:00
style= "topEditorStyle"
updateCode= "updateCode" />
2019-05-16 11:23:02 +02:00
<t t-if= "state.splitLayout" >
<div class= "separator horizontal" />
2019-10-30 15:15:32 +01:00
<TabbedEditor
2019-06-04 09:14:57 +02:00
js= "false"
css= "state.css"
xml= "state.xml"
resizeable= "true"
2023-04-21 07:51:00 +02:00
updatePanelHeight.bind= "updatePanelHeight"
2021-11-17 18:41:01 +01:00
updateCode= "updateCode" />
2019-05-03 10:33:22 +02:00
</t>
</div>
<div class= "separator vertical" t-on-mousedown= "onMouseDown" />
2023-04-21 07:51:00 +02:00
<div class= "right-pane" >
2019-05-03 10:33:22 +02:00
<div class= "welcome" t-if= "state.displayWelcome" >
<div > 🦉 Odoo Web Library 🦉</div>
<div > v<t t-esc= "version" /> </div>
<div class= "url" > <a href= "https://github.com/odoo/owl" > https://github.com/odoo/owl</a> </div>
2019-10-01 21:37:36 +02:00
<div class= "note" >
2023-04-21 07:51:00 +02:00
<p >
Note: these examples make use of recent features of Javascript, and require a recent browser to work without a transpilation step! Among other things, it uses class fields and import maps. If you encounter issues, make sure your browser is up to date.
2019-10-01 21:37:36 +02:00
</p>
</div>
2019-05-03 10:33:22 +02:00
</div>
2019-05-28 13:17:38 +02:00
<div class= "content" t-ref= "content" />
2019-05-03 10:33:22 +02:00
</div>
</div>
</templates>