diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-01-06 12:02:01 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-01-06 12:02:17 -0800 |
commit | 600e04b58cb19c53871e60abfe4a4d9deab6dc1e (patch) | |
tree | 38a074458d86d8821bc23023ff1907f1cd444258 /modules | |
parent | fc6907dcfe35f2341528620ccedf2db02a30d065 (diff) |
Lock the drag zone if the album is not editable so that users don't
start illegal drags.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/organize/controllers/organize.php | 1 | ||||
-rw-r--r-- | modules/organize/views/organize_frame.html.php | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 82f74c9e..c53e7f66 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -55,6 +55,7 @@ class Organize_Controller extends Controller { $data = array( "sort_column" => $album->sort_column, "sort_order" => $album->sort_order, + "editable" => access::can("edit", $album), "children" => array()); foreach ($album->viewable()->children() as $child) { diff --git a/modules/organize/views/organize_frame.html.php b/modules/organize/views/organize_frame.html.php index cfc3933c..5516d7d8 100644 --- a/modules/organize/views/organize_frame.html.php +++ b/modules/organize/views/organize_frame.html.php @@ -53,6 +53,11 @@ thumb_data_view.bindStore(store); sort_column_combobox.setValue(album_info.sort_column); sort_order_combobox.setValue(album_info.sort_order); + if (album_info.editable) { + thumb_data_view.dragZone.unlock(); + } else { + thumb_data_view.dragZone.lock(); + } }, failure: show_generic_error }); |