diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 4f2d952c6d8..b1a480ae56e 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -613,7 +613,7 @@ var ImageWidget = MediaWidget.extend({ */ _onSearchInput: function (ev) { var $input = $(ev.currentTarget); - var $button = $input.next('button'); + var $button = $input.next('.input-group-append').children(); var emptyValue = ($input.val() === ''); $button.toggleClass('btn-secondary', emptyValue).toggleClass('btn-primary', !emptyValue) .prop('disabled', emptyValue); @@ -1104,7 +1104,7 @@ var MediaDialog = Dialog.extend({ events : _.extend({}, Dialog.prototype.events, { 'input input#icon-search': '_onSearchInput', 'shown.bs.tab a[data-toggle="tab"]': '_onTabChange', - 'click .pager > li > a:not(.disabled)': '_onPagerClick', + 'click .previous:not(.disabled), .next:not(.disabled)': '_onPagerClick', }), custom_events: _.extend({}, Dialog.prototype.custom_events || {}, { save_request: '_onSaveRequest', @@ -1274,9 +1274,9 @@ var MediaDialog = Dialog.extend({ _updateControlPanel: function () { var cpConfig = this.active.getControlPanelConfig(); this.$('li.search').toggleClass('d-none', !cpConfig.searchEnabled); - this.$('li.previous, li.next').toggleClass('d-none', !cpConfig.pagerEnabled); - this.$('li.previous > a').toggleClass("disabled", !cpConfig.pagerLeftEnabled); - this.$('li.next > a').toggleClass("disabled", !cpConfig.pagerRightEnabled); + this.$('.previous, .next').toggleClass('d-none', !cpConfig.pagerEnabled); + this.$('.previous').toggleClass("disabled", !cpConfig.pagerLeftEnabled); + this.$('.next').toggleClass("disabled", !cpConfig.pagerRightEnabled); }, //-------------------------------------------------------------------------- @@ -1287,7 +1287,7 @@ var MediaDialog = Dialog.extend({ * @private */ _onPagerClick: function (ev) { - this.active.goToPage(this.active.page + ($(ev.currentTarget).parent().hasClass('previous') ? -1 : 1)); + this.active.goToPage(this.active.page + ($(ev.currentTarget).hasClass('previous') ? -1 : 1)); this._updateControlPanel(); }, /** diff --git a/addons/web_editor/static/src/scss/web_editor.ui.scss b/addons/web_editor/static/src/scss/web_editor.ui.scss index 771f4a938ad..9b3c2e34853 100644 --- a/addons/web_editor/static/src/scss/web_editor.ui.scss +++ b/addons/web_editor/static/src/scss/web_editor.ui.scss @@ -1332,7 +1332,7 @@ body.editor_enable { body .modal { // SELECT MEDIA .o_select_media_dialog { - width: 80%; + max-width: 80%; .modal-body { .nav-tabs .active > a[href="#editor-media-icon"] { @@ -1340,9 +1340,6 @@ body .modal { } li.search { - ul.pager li:last-child{ - margin-left: 2px; - } .form-group { position: relative; margin: 0 10px 0 0; @@ -1359,6 +1356,8 @@ body .modal { .card { border-color: gray('200'); border-top-width: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; } .o_existing_attachment_cell { diff --git a/addons/web_editor/static/src/xml/editor.xml b/addons/web_editor/static/src/xml/editor.xml index 8659f354aee..7bac85692e2 100644 --- a/addons/web_editor/static/src/xml/editor.xml +++ b/addons/web_editor/static/src/xml/editor.xml @@ -47,30 +47,26 @@
-
+
@@ -90,26 +86,26 @@
-
+
-
-
-
-
- — or — - -
- - + — or — + +
+ +
+ +
+