Files
odoo_source/addons/web_editor/static/src/xml/ace.xml
T
qsm-odoo 1c1c0897e8 [REF] *: BS4, adapt dropdowns and carets
- The dropdown structure was simplified, allowing to get rid of the
  3-levels structure induced by <ul/> elements and dropdowns can now
  contain anything. The class 'dropdown-item' is now mandatory for
  each dropdown clickable element. The class 'dropdown-item-text' can
  be used to add same padding and style but without making the element
  have a clickable look.

- Dividers now use the class 'dropdown-divider'

- The way dropdowns are opened and hidden also changed (before the
  'open' class was added on the `.dropdown-menu` parent, now the
  'show' class is added on both the `.dropdown-menu` parent and the
  `.dropdown-menu` itself).

- JS-wise, no click event handlers can be put on `.dropdown-toggle`
  elements anymore (instead, use handlers for dropdown events).

- Carets are automatically put on `.dropdown-toggle` elements, so this
  commit replaces the `.caret` elements with this. This feature was
  possible to disable but would prevent us from adding a caret with
  scss. Also, this simplifies the DOM. The 'o-no-caret' class was also
  introduced to allow using the 'dropdown-toggle' class on non-caret
  elements.

- Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27 12:36:54 +02:00

45 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="web_editor.ace_view_editor">
<div class="o_ace_view_editor">
<div class="form-inline o_ace_view_editor_title">
<div class="btn-group o_ace_type_switcher">
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">XML (HTML)</button>
<div class="dropdown-menu" role="menu">
<a role="menuitem" href="#" class="dropdown-item o_ace_type_switcher_choice" data-type="xml">XML (HTML)</a>
<a role="menuitem" href="#" class="dropdown-item o_ace_type_switcher_choice" data-type="scss">SCSS (CSS)</a>
</div>
</div>
<select id="ace-view-list" class="o_res_list"/>
<select id="ace-scss-list" class="o_res_list d-none"/>
<label class="o_include_option oe_include_bundles">
<div class="o_checkbox">
<input type="checkbox" class="js_include_bundles" t-att-checked="widget.options.includeBundles ? 'checked' : undefined"/><span/>
</div>
Include Asset Bundles
</label>
<label class="o_include_option o_include_all_scss d-none">
<div class="o_checkbox">
<input type="checkbox" class="js_include_all_scss" t-att-checked="widget.options.includeAllSCSS ? 'checked' : undefined"/><span/>
</div>
Include All SCSS Files
</label>
<div class="o_button_section">
<button data-action="save" type="submit" class="btn btn-primary">Save</button>
<button data-action="close" type="button" class="btn btn-secondary">Close</button>
</div>
</div>
<div id="ace-view-id">
<span/>
<div class="pull-right">
<button data-action="reset" type="button" class="btn btn-xs btn-danger"><i class="fa fa-undo"/> Reset</button>
<button data-action="format" type="button" class="btn btn-xs btn-link">Format</button>
</div>
</div>
<div id="ace-view-editor"/>
</div>
</t>
</templates>