From 5865a73a3e4e519829190ab9be51281876c2f29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Wed, 24 Apr 2013 19:51:33 +0200 Subject: [PATCH] sortable and disableSelection are not always defined; lead to issue #615 --- openslides/agenda/static/javascript/agenda.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openslides/agenda/static/javascript/agenda.js b/openslides/agenda/static/javascript/agenda.js index ea89df59c..fd12a897d 100644 --- a/openslides/agenda/static/javascript/agenda.js +++ b/openslides/agenda/static/javascript/agenda.js @@ -76,8 +76,10 @@ $(function() { //# $('#hide_closed_items').attr('checked', true); //# } - $('#list_of_speakers').sortable({axis: "y", containment: "parent", update: function(event, ui) { - $('#speaker_list_changed_form').show(); - }}); - $('#list_of_speakers').disableSelection(); + if ($('#list_of_speakers').length > 0) { + $('#list_of_speakers').sortable({axis: "y", containment: "parent", update: function(event, ui) { + $('#speaker_list_changed_form').show(); + }}); + $('#list_of_speakers').disableSelection(); + } });