From bd7863dbeffc2d5b41a58f8138e5691b60fc63f3 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 21 Jul 2026 15:31:49 +0200 Subject: Remove unreachable image_box drag-and-drop UI image_interface and meta_data (admin_interface.js), the sort_images action and route, and their admin.css rules -- the old vertical image_browser sidebar this all depended on isn't rendered by any current view. related_assets.js and the star-toggle sidebar fully supersede what this did. Confirmed unreachable via full grep across app/, config/routes.rb, and admin_bundle.js before removal -- route, controller action, and JS handler were all individually real and functional, just with nothing left anywhere that could ever trigger them. --- public/javascripts/admin_interface.js | 83 ----------------------------------- 1 file changed, 83 deletions(-) (limited to 'public/javascripts/admin_interface.js') diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index f378c46..f6d915f 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js @@ -45,10 +45,6 @@ $(document).ready(function () { menu_item_sorter.initialize(); } - if ($("#metadata").length != 0) { - meta_data.initialize(); - } - if ($("#parent_search_term").length != 0) { parent_search.initialize_search(); } @@ -110,14 +106,6 @@ $(document).ready(function () { }); -meta_data = { - initialize : function() { - document.getElementById("metadata_details").addEventListener("toggle", function() { - if (this.open) image_interface.initialize(); - }); - } -}; - cccms = { setup_autosave : function() { @@ -364,77 +352,6 @@ menu_item_sorter = { } } -image_interface = { - - initialize : function() { - - $("#image_browser").hide(); - image_interface.initialize_sortable_image_box(); - image_interface.connect_browser_and_box(); - image_interface.set_droppable_behavior(); - image_interface.bind_image_browser_toggle(); - }, - - - set_droppable_behavior : function() { - $("ul#image_box").droppable({ - out : function(event, ui) { - $(ui.draggable).fadeTo("fast", 0.4); - - $(ui.draggable).bind("mouseup", function() { - $(this).remove(); - }); - }, - over : function(event, ui) { - $(ui.draggable).fadeTo("fast", 1.0); - $(ui.draggable).unbind("mouseup"); - } - }); - }, - - connect_browser_and_box : function() { - $("#image_browser ul li").draggable({ - connectToSortable : 'ul#image_box', - helper : 'clone', - revert : 'invalid' - }); - }, - - initialize_sortable_image_box : function() { - - $("ul#image_box").sortable({ - revert : true, - update : function(event, ui) { - images = $("ul#image_box").sortable("serialize", {attribute : "rel"}); - - $.ajax({ - type : "POST", - url : "/pages/" + $("ul#image_box").attr("rel") + "/sort_images", - dataType : "json", - data : images + "&_method=put", - success : function() { - } - }); - } - }); - }, - - bind_image_browser_toggle : function() { - $("#image_browser_toggle").bind("click", function(){ - if ($("#image_browser_toggle").attr("class") == "unselected") { - $("#image_browser_toggle").attr("class", "selected"); - $("#image_browser").show(); - } - else { - $("#image_browser_toggle").attr("class", "unselected"); - $("#image_browser").hide(); - } - - return false; - }); - } -} - rrule_builder = { initialize : function() { rrule_builder.try_populate_from_rrule($("#event_rrule").val()); -- cgit v1.3