Projet

Général

Profil

0001-manager-open-in-new-tab-on-ctrl-middle-click-on-row-.patch

Frédéric Péters, 25 juillet 2020 16:37

Télécharger (1,44 ko)

Voir les différences:

Subject: [PATCH] manager: open in new tab on ctrl/middle-click on row (#45339)

 .../manager/static/authentic2/manager/js/manager.js      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
src/authentic2/manager/static/authentic2/manager/js/manager.js
172 172
            }
173 173
        });
174 174
        $(document).on('click.manager', 'table tr[data-url][rel=popup]', displayPopup);
175
        $(document).on('click.manager', 'table tr[data-url]:not([rel=popup])', function (e) {
175
        $(document).on('mouseup.manager', 'table tr[data-url]:not([rel=popup])', function (e) {
176
            var $target = $(event.target);
177
            if ($target.is('a')) return false;
178
            if (e.which == 2 || e.ctrlKey) {
179
                window.open($(this).data('url'), '_blank');
180
            } else {
176 181
                window.location.href = $(this).data('url');
182
            }
183
            return true;
177 184
        });
178 185
        /* Prepopulate slug fields */
179 186
        $('#id_slug').data('_changed', false);
180
-