From a6140897f2fbb0f59a639a931e23751fb93719a2 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 8 Jul 2026 11:57:32 +0200 Subject: Whitespace fixes --- public/javascripts/admin_interface.js | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'public/javascripts/admin_interface.js') diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index cb32d5a..67bfc02 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js @@ -12,7 +12,7 @@ function hide_all() { $(document).ready(function () { admin_search.initialize(); - + tinymce.init({ selector: 'textarea.with_editor', license_key: 'gpl', @@ -29,24 +29,24 @@ $(document).ready(function () { cccms.setup_autosave(); }); } - }); + }); if ($("#menu_search_term").length != 0) { menu_items.initialize_search(); } - + if ($("#menu_item_list").length != 0) { menu_item_sorter.initialize(); } - + if ($("#metadata").length != 0) { meta_data.initialize(); } - + if ($("#parent_search_term").length != 0) { parent_search.initialize_search(); } - + if ($("#move_to_search_term").length != 0) { move_to_search.initialize_search(); } @@ -59,14 +59,14 @@ $(document).ready(function () { hide_all(); $('#recent_changes_toggle').attr("class", "selected"); $('#recent_changes_table').show(); - + $('#recent_changes_toggle').bind("click", function(){ hide_all(); $('#recent_changes_toggle').attr("class", "selected"); $('#recent_changes_table').show(); return false; }); - + $('#my_work_toggle').bind("click", function(){ hide_all(); $('#my_work_toggle').attr("class", "selected"); @@ -80,7 +80,7 @@ $(document).ready(function () { $('#my_work_table').show(); return false; }); - + $('#current_drafts_toggle').bind("click", function(){ hide_all(); $('#current_drafts_toggle').attr("class", "selected"); @@ -102,18 +102,18 @@ $(document).ready(function () { return false; }); } - - jQuery.ajaxSetup({ + + jQuery.ajaxSetup({ 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");} }); - + $(document).ajaxSend(function(event, request, settings) { if (typeof(AUTH_TOKEN) == "undefined") return; // settings.data is a serialized string like "foo=bar&baz=boink" (or null) settings.data = settings.data || ""; settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN); }); - + }); @@ -143,50 +143,50 @@ meta_data = { cccms = { setup_autosave : function() { - + var elements = { title : $('#page_title'), abstract : $('#page_abstract'), body : $('#page_body_ifr').contents().find('#tinymce'), } - - var page = { + + var page = { cached_title : elements.title.val(), cached_abstract : elements.abstract.val(), cached_body : elements.body.html(), - + title_has_changed : function() { return (elements.title.val() != this.cached_title) }, - + abstract_has_changed : function() { return (elements.abstract.val() != this.cached_abstract) }, - + body_has_changed : function() { return elements.body.html() != this.cached_body } } - + jQuery.fn.submitWithAjax = function(options) { if (page.title_has_changed() || page.abstract_has_changed() || page.body_has_changed()) { - + page.cached_title = elements.title.val(); page.cached_abstract = elements.abstract.val(); page.cached_body = elements.body.html(); - + $("#flash").append(""); $.post(this.attr("action"), $(this).serialize(), null, "script"); - + } }; - + setInterval('$("#page_editor > form").submitWithAjax()', 7000); } } menu_item_sorter = { - + initialize : function() { $("#menu_item_list").sortable({ axis: 'y', @@ -209,24 +209,24 @@ menu_item_sorter = { } }); }, - + placeholder_helper : function(e,ui) { $(".ui-state-highlight").html(""); } } 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(); + image_interface.bind_image_browser_toggle(); }, - - + + set_droppable_behavior : function() { $("ul#image_box").droppable({ out : function(event, ui) { @@ -242,7 +242,7 @@ image_interface = { } }); }, - + connect_browser_and_box : function() { $("#image_browser ul li").draggable({ connectToSortable : 'ul#image_box', @@ -250,9 +250,9 @@ image_interface = { revert : 'invalid' }); }, - + initialize_sortable_image_box : function() { - + $("ul#image_box").sortable({ revert : true, update : function(event, ui) { @@ -267,9 +267,9 @@ image_interface = { } }); } - }); + }); }, - + bind_image_browser_toggle : function() { $("#image_browser_toggle").bind("click", function(){ if ($("#image_browser_toggle").attr("class") == "unselected") { -- cgit v1.3