0002-manager-remove-data-url-on-table-rows-59991.patch
src/authentic2/manager/static/authentic2/manager/js/manager.js | ||
---|---|---|
170 | 170 |
$('#id_password2').prop('disabled', false); |
171 | 171 |
} |
172 | 172 |
}); |
173 |
$(document).on('click.manager', 'table tr[data-url][rel=popup]', displayPopup); |
|
174 |
$(document).on('mouseup.manager', 'table tr[data-url]:not([rel=popup])', function (e) { |
|
175 |
var $target = $(e.target); |
|
176 |
if ($target.is('input') || $target.is('a') || $target.parents('a').length) return false; |
|
177 |
if (e.which == 2 || e.ctrlKey) { |
|
178 |
window.open($(this).data('url'), '_blank'); |
|
179 |
} else if (e.which == 3) { |
|
180 |
// right click, nothing |
|
181 |
} else { |
|
182 |
window.location.href = $(this).data('url'); |
|
183 |
} |
|
184 |
return true; |
|
185 |
}); |
|
186 | 173 |
var timer; |
187 | 174 |
$('#search-form').on('input propertychange change', 'input,select', function (e) { |
188 | 175 |
var $form = $('#search-form'); |
src/authentic2/manager/templates/authentic2/manager/table.html | ||
---|---|---|
25 | 25 |
{% if popup_edit %} |
26 | 26 |
rel="popup" |
27 | 27 |
{% endif %} |
28 |
data-url="{{ row.record.get_absolute_url }}" |
|
29 | 28 |
{% endif %}> |
30 | 29 |
{% for column, cell in row.items %} |
31 | 30 |
<td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td> |
32 |
- |