diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-12-12 13:07:09 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-01-16 17:03:16 +0100 |
| commit | 285d95e946e5a15139c961e30dbe3598e0d99f6a (patch) | |
| tree | 73a9f631d0a601b69fada0f7e56f9a0e65d1fae9 /addons/web_editor/static/src/xml/editor.xml | |
| parent | abde8bddf8ec45cf12aab59e95c330321158cfba (diff) | |
[IMP] website: more intuitive image and link edition
- Remove useless snippet background suggestions (only one button to
open the media dialog directly)
- Show meaningful-only tabs in the media dialog (no document as
background, ...)
- When editing a background shows the background suggestions first and
show the background suggestions last for standard images. Technically,
this is done by filtering on the name/fname of the attachments and
adding magic name parts to the fname on image upload (e.g. when
uploading an image from the media dialog when customizing a bg, the
uploaded image will automatically be marked as a background). Note:
there were discussions to implement this feature with a tag system for
ir.attachment/s but the implementation's cost was too great in regards
to the feature.
- When editing an existing link or creating one from selected text, do
not show the "Link Label" field in the dialog; it was confusing. Only
show that field when adding a link at the cursor location with no
selected text.
Diffstat (limited to 'addons/web_editor/static/src/xml/editor.xml')
| -rw-r--r-- | addons/web_editor/static/src/xml/editor.xml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/web_editor/static/src/xml/editor.xml b/addons/web_editor/static/src/xml/editor.xml index f64d8595549..81abb435f2b 100644 --- a/addons/web_editor/static/src/xml/editor.xml +++ b/addons/web_editor/static/src/xml/editor.xml @@ -47,10 +47,10 @@ <!-- Media Dialog (allows to choose an img/pictogram/video) --> <div t-name="web_editor.dialog.media"> <ul class="nav nav-tabs"> - <li class="active"><a href="#editor-media-image" data-toggle="tab">Image</a></li> - <li><a href="#editor-media-document" data-toggle="tab" t-att-class="widget.onlyImages ? 'hidden' : ''">Document</a></li> - <li><a href="#editor-media-icon" data-toggle="tab" t-att-class="widget.onlyImages ? 'hidden' : ''">Pictogram</a></li> - <li><a href="#editor-media-video" data-toggle="tab" t-att-class="widget.onlyImages ? 'hidden' : ''">Video</a></li> + <li class="active"><a href="#editor-media-image" data-toggle="tab" t-att-class="widget.noImages ? 'hidden' : ''">Image</a></li> + <li><a href="#editor-media-document" data-toggle="tab" t-att-class="widget.noDocuments ? 'hidden' : ''">Document</a></li> + <li><a href="#editor-media-icon" data-toggle="tab" t-att-class="widget.noIcons ? 'hidden' : ''">Pictogram</a></li> + <li><a href="#editor-media-video" data-toggle="tab" t-att-class="widget.noVideos ? 'hidden' : ''">Video</a></li> <li class="search pull-right"> <ul class="pager mb0 mt0"> <li class="previous"> @@ -85,6 +85,7 @@ enctype="multipart/form-data" target="fileframe"> <input type="hidden" name="csrf_token" t-att-value="csrf_token"/> + <input type="hidden" name="filters" t-att-value="widget.firstFilters.join('_')"/> <div class="well"> <div class="form-group pull-left"> <input type="file" class="hidden" name="upload" t-att-accept="widget.accept" multiple="multiple"/> @@ -234,7 +235,7 @@ <div t-name="web_editor.dialog.link" class="o_link_dialog"> <div class="row"> <form class="col-md-8 form-horizontal"> - <div class="form-group"> + <div t-attf-class="form-group#{widget.needLabel ? '' : ' hidden'}"> <label class="control-label col-sm-3" for="o_link_dialog_label_input">Link Label</label> <div class="col-sm-9"> <input type="text" name="label" class="form-control" id="o_link_dialog_label_input" required="required" t-att-value="widget.data.text"/> |
