diff options
Diffstat (limited to 'modules/organize')
-rw-r--r-- | modules/organize/controllers/organize.php | 8 | ||||
-rw-r--r-- | modules/organize/css/organize.css | 5 | ||||
-rw-r--r-- | modules/organize/js/organize.js | 10 |
3 files changed, 14 insertions, 9 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 4639777c..08c80de3 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -45,16 +45,20 @@ class Organize_Controller extends Controller { access::verify_csrf(); $target_album = ORM::factory("item", $target_album_id); + access::required("view", $target_album); + access::required("add", $target_album); + foreach ($this->input->post("source_ids") as $source_id) { $source = ORM::factory("item", $source_id); if (!$source->contains($target_album)) { + access::required("edit", $source); item::move($source, $target_album); } } print json_encode( - array("tree" => self::_expanded_tree(ORM::factory("item", 1), $album)->__toString(), - "grid" => self::_get_micro_thumb_grid($album, 0)->__toString())); + array("tree" => self::_expanded_tree(ORM::factory("item", 1), $target_album)->__toString(), + "grid" => self::_get_micro_thumb_grid($target_album, 0)->__toString())); } function rearrange($target_id, $before_or_after) { diff --git a/modules/organize/css/organize.css b/modules/organize/css/organize.css index 15b5538d..b1cef33c 100644 --- a/modules/organize/css/organize.css +++ b/modules/organize/css/organize.css @@ -102,12 +102,13 @@ width: 9em; } -.gOrganizeMicroThumbGridCell.ui-state-selected { +.gOrganizeMicroThumbGridCell.ui-selecting, +.gOrganizeMicroThumbGridCell.ui-selected { margin: 2px; border: 2px solid #13A; } -.ui-selectable-lasso { +.ui-selectable-helper { z-index: 2000 !important; border: 1px dashed #00F; opacity: 0.25; diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index c30f89e0..cfaff01c 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -1,12 +1,12 @@ (function($) { $.organize = { micro_thumb_draggable: { - handle: ".ui-state-selected", + handle: ".ui-selected", distance: 10, cursorAt: { left: -10, top: -10}, appendTo: "#gOrganizeMicroThumbPanel", helper: function(event, ui) { - var selected = $(".ui-draggable.ui-state-selected img"); + var selected = $(".ui-draggable.ui-selected img"); if (selected.length) { var set = $('<div class="gDragHelper"></div>') .css({ @@ -37,7 +37,7 @@ }, start: function(event, ui) { - $("#gOrganizeMicroThumbPanel .ui-state-selected").hide(); + $("#gOrganizeMicroThumbPanel .ui-selected").hide(); }, drag: function(event, ui) { @@ -80,7 +80,7 @@ greedy: true, drop: function(event, ui) { if ($(event.target).hasClass("gViewOnly")) { - $(".ui-state-selected").show(); + $(".ui-selected").show(); $(".gOrganizeMicroThumbGridCell").css("borderStyle", "none"); } else { $.organize.do_drop({ @@ -142,7 +142,7 @@ $("#gDialog").bind("dialogopen", function(event, ui) { $("#gOrganize").height($("#gDialog").innerHeight() - 20); $("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90); - $("#gOrganizeAlbumTree").height($("#gDialog").innerHeight() - 59); + $("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59); }); $("#gDialog").bind("dialogclose", function(event, ui) { |