Skip to content

Commit bd23a60

Browse files
committed
fix: actions showed up in /add/, they shouldn't
1 parent 1cd14a7 commit bd23a60

File tree

1 file changed

+7
-1
lines changed
  • django_object_actions/templates/django_object_actions

1 file changed

+7
-1
lines changed

Diff for: django_object_actions/templates/django_object_actions/include.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ admin staticfiles.
1414
{% endcomment %}
1515
*/
1616
/* global: $ */
17-
$('li.objectaction-item').prependTo($('#content-main ul.object-tools'));
17+
var $items = $('li.objectaction-item'),
18+
$container = $('#content-main ul.object-tools');
19+
if ($container.length){
20+
$items.prependTo($container);
21+
} else {
22+
$items.remove();
23+
}

0 commit comments

Comments
 (0)