diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-21 15:31:49 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-21 15:31:49 +0200 |
| commit | bd7863dbeffc2d5b41a58f8138e5691b60fc63f3 (patch) | |
| tree | 3694e458a866d9d55a224f2616cde5d8d49a1053 /public | |
| parent | b54f70cb35df91d51b7829a10b8294ae5f28b7f5 (diff) | |
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.
Diffstat (limited to 'public')
| -rw-r--r-- | public/javascripts/admin_interface.js | 83 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 29 |
2 files changed, 0 insertions, 112 deletions
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 () { | |||
| 45 | menu_item_sorter.initialize(); | 45 | menu_item_sorter.initialize(); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | if ($("#metadata").length != 0) { | ||
| 49 | meta_data.initialize(); | ||
| 50 | } | ||
| 51 | |||
| 52 | if ($("#parent_search_term").length != 0) { | 48 | if ($("#parent_search_term").length != 0) { |
| 53 | parent_search.initialize_search(); | 49 | parent_search.initialize_search(); |
| 54 | } | 50 | } |
| @@ -110,14 +106,6 @@ $(document).ready(function () { | |||
| 110 | }); | 106 | }); |
| 111 | 107 | ||
| 112 | 108 | ||
| 113 | meta_data = { | ||
| 114 | initialize : function() { | ||
| 115 | document.getElementById("metadata_details").addEventListener("toggle", function() { | ||
| 116 | if (this.open) image_interface.initialize(); | ||
| 117 | }); | ||
| 118 | } | ||
| 119 | }; | ||
| 120 | |||
| 121 | cccms = { | 109 | cccms = { |
| 122 | setup_autosave : function() { | 110 | setup_autosave : function() { |
| 123 | 111 | ||
| @@ -364,77 +352,6 @@ menu_item_sorter = { | |||
| 364 | } | 352 | } |
| 365 | } | 353 | } |
| 366 | 354 | ||
| 367 | image_interface = { | ||
| 368 | |||
| 369 | initialize : function() { | ||
| 370 | |||
| 371 | $("#image_browser").hide(); | ||
| 372 | image_interface.initialize_sortable_image_box(); | ||
| 373 | image_interface.connect_browser_and_box(); | ||
| 374 | image_interface.set_droppable_behavior(); | ||
| 375 | image_interface.bind_image_browser_toggle(); | ||
| 376 | }, | ||
| 377 | |||
| 378 | |||
| 379 | set_droppable_behavior : function() { | ||
| 380 | $("ul#image_box").droppable({ | ||
| 381 | out : function(event, ui) { | ||
| 382 | $(ui.draggable).fadeTo("fast", 0.4); | ||
| 383 | |||
| 384 | $(ui.draggable).bind("mouseup", function() { | ||
| 385 | $(this).remove(); | ||
| 386 | }); | ||
| 387 | }, | ||
| 388 | over : function(event, ui) { | ||
| 389 | $(ui.draggable).fadeTo("fast", 1.0); | ||
| 390 | $(ui.draggable).unbind("mouseup"); | ||
| 391 | } | ||
| 392 | }); | ||
| 393 | }, | ||
| 394 | |||
| 395 | connect_browser_and_box : function() { | ||
| 396 | $("#image_browser ul li").draggable({ | ||
| 397 | connectToSortable : 'ul#image_box', | ||
| 398 | helper : 'clone', | ||
| 399 | revert : 'invalid' | ||
| 400 | }); | ||
| 401 | }, | ||
| 402 | |||
| 403 | initialize_sortable_image_box : function() { | ||
| 404 | |||
| 405 | $("ul#image_box").sortable({ | ||
| 406 | revert : true, | ||
| 407 | update : function(event, ui) { | ||
| 408 | images = $("ul#image_box").sortable("serialize", {attribute : "rel"}); | ||
| 409 | |||
| 410 | $.ajax({ | ||
| 411 | type : "POST", | ||
| 412 | url : "/pages/" + $("ul#image_box").attr("rel") + "/sort_images", | ||
| 413 | dataType : "json", | ||
| 414 | data : images + "&_method=put", | ||
| 415 | success : function() { | ||
| 416 | } | ||
| 417 | }); | ||
| 418 | } | ||
| 419 | }); | ||
| 420 | }, | ||
| 421 | |||
| 422 | bind_image_browser_toggle : function() { | ||
| 423 | $("#image_browser_toggle").bind("click", function(){ | ||
| 424 | if ($("#image_browser_toggle").attr("class") == "unselected") { | ||
| 425 | $("#image_browser_toggle").attr("class", "selected"); | ||
| 426 | $("#image_browser").show(); | ||
| 427 | } | ||
| 428 | else { | ||
| 429 | $("#image_browser_toggle").attr("class", "unselected"); | ||
| 430 | $("#image_browser").hide(); | ||
| 431 | } | ||
| 432 | |||
| 433 | return false; | ||
| 434 | }); | ||
| 435 | } | ||
| 436 | } | ||
| 437 | |||
| 438 | rrule_builder = { | 355 | rrule_builder = { |
| 439 | initialize : function() { | 356 | initialize : function() { |
| 440 | rrule_builder.try_populate_from_rrule($("#event_rrule").val()); | 357 | rrule_builder.try_populate_from_rrule($("#event_rrule").val()); |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 88c9c8b..ef6cb11 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -1042,10 +1042,6 @@ div#page_editor { | |||
| 1042 | select { | 1042 | select { |
| 1043 | font-size: 1.5rem; | 1043 | font-size: 1.5rem; |
| 1044 | } | 1044 | } |
| 1045 | |||
| 1046 | #metadata ul#image_box { | ||
| 1047 | width: 100% !important; | ||
| 1048 | } | ||
| 1049 | } | 1045 | } |
| 1050 | 1046 | ||
| 1051 | /* ============================================================ | 1047 | /* ============================================================ |
| @@ -1264,31 +1260,6 @@ div#draft_list table td.actions a { | |||
| 1264 | Image box / browser | 1260 | Image box / browser |
| 1265 | ============================================================ */ | 1261 | ============================================================ */ |
| 1266 | 1262 | ||
| 1267 | #metadata ul#image_box { | ||
| 1268 | box-sizing: border-box; | ||
| 1269 | margin: 0; | ||
| 1270 | padding: 10px 5px 10px 5px; | ||
| 1271 | height: 100px; | ||
| 1272 | width: 702px; | ||
| 1273 | border: 1px solid #989898; | ||
| 1274 | } | ||
| 1275 | |||
| 1276 | #metadata ul#image_box li { | ||
| 1277 | float: left; | ||
| 1278 | list-style-type: none; | ||
| 1279 | margin: 5px; | ||
| 1280 | } | ||
| 1281 | |||
| 1282 | div#image_browser { | ||
| 1283 | position: absolute; | ||
| 1284 | top: 40px; | ||
| 1285 | left: 800px; | ||
| 1286 | } | ||
| 1287 | |||
| 1288 | div#image_browser ul li { | ||
| 1289 | list-style-type: none; | ||
| 1290 | } | ||
| 1291 | |||
| 1292 | .thumbnail_list { | 1263 | .thumbnail_list { |
| 1293 | display: flex; | 1264 | display: flex; |
| 1294 | flex-wrap: wrap; | 1265 | flex-wrap: wrap; |
