From: Jan Schneider Date: Wed, 18 Mar 2009 12:56:57 +0000 (+0100) Subject: Only allow dragging if event is editable. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7319cc25ca165da21d62ce16561c569c4ac580a8;p=horde.git Only allow dragging if event is editable. --- diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index 456f9bf66..30c30e148 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -599,7 +599,9 @@ KronolithCore = { .observe('mouseover', div.addClassName.curry('kronolithSelected')) .observe('mouseout', div.removeClassName.curry('kronolithSelected')); $('kronolithMonthDay' + date.key).insert(div); - new Drag('kronolithEventmonth' + r.response.cal + event.key, { parentElement: function() { return $('kronolithViewMonth').select('.kronolithViewBody')[0]; }, snapToParent: true }); + if (event.value.e) { + new Drag('kronolithEventmonth' + r.response.cal + event.key, { parentElement: function() { return $('kronolithViewMonth').select('.kronolithViewBody')[0]; }, snapToParent: true }); + } break; } }, this); diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index a6e156d00..75b1f2ea6 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1003,6 +1003,7 @@ class Kronolith_Event $json->c = $this->getCalendar(); $json->bg = $this->_backgroundColor; $json->fg = $this->_foregroundColor; + $json->e = $this->hasPermission(PERMS_EDIT); return $json; }