summaryrefslogtreecommitdiff
path: root/public/javascripts
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-21 15:31:49 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-21 15:31:49 +0200
commitbd7863dbeffc2d5b41a58f8138e5691b60fc63f3 (patch)
tree3694e458a866d9d55a224f2616cde5d8d49a1053 /public/javascripts
parentb54f70cb35df91d51b7829a10b8294ae5f28b7f5 (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/javascripts')
-rw-r--r--public/javascripts/admin_interface.js83
1 files changed, 0 insertions, 83 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
113meta_data = {
114 initialize : function() {
115 document.getElementById("metadata_details").addEventListener("toggle", function() {
116 if (this.open) image_interface.initialize();
117 });
118 }
119};
120
121cccms = { 109cccms = {
122 setup_autosave : function() { 110 setup_autosave : function() {
123 111
@@ -364,77 +352,6 @@ menu_item_sorter = {
364 } 352 }
365} 353}
366 354
367image_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
438rrule_builder = { 355rrule_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());