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 15:55

Télécharger (1,32 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         | 6 +++++-
 1 file changed, 5 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
            if (e.which == 2 || e.ctrlKey) {
177
                window.open($(this).data('url'), '_blank');
178
            } else {
176 179
                window.location.href = $(this).data('url');
180
            }
177 181
        });
178 182
        /* Prepopulate slug fields */
179 183
        $('#id_slug').data('_changed', false);
180
-