From 3e6ba7acc3291f2268cbe9c9bef0a492b557babb Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 4 Oct 2009 00:27:22 -0600 Subject: Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. --- lib/gallery.panel.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/gallery.panel.js') diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index 6115297d..8530dd9f 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -8,7 +8,7 @@ var parent = $(element).parent().parent(); var sHref = $(element).attr("href"); var parentClass = $(parent).attr("class"); - var ePanel = ""; + var ePanel = ""; // We keep track of the open vs. closed state by looking to see if there' // an orig_text attr. If that attr is missing, then the panel is closed @@ -16,12 +16,12 @@ var should_open = !$(element).attr("orig_text"); // Close any open panels and reset their button text - if ($("#gPanel").length) { - $("#gPanel").slideUp("slow").remove(); - $.each($(".gPanelLink"), + if ($("#g-panel").length) { + $("#g-panel").slideUp("slow").remove(); + $.each($(".g-panel-link"), function() { if ($(this).attr("orig_text")) { - $(this).children(".gButtonText").text($(this).attr("orig_text")); + $(this).children(".g-button-text").text($(this).attr("orig_text")); $(this).attr("orig_text", ""); } } @@ -30,15 +30,15 @@ if (should_open) { $(parent).after(ePanel); - $("#gPanel td").html(sHref); + $("#g-panel td").html(sHref); $.get(sHref, function(data) { - $("#gPanel td").html(data); + $("#g-panel td").html(data); self._ajaxify_panel(); if ($(element).attr("open_text")) { - $(element).attr("orig_text", $(element).children(".gButtonText").text()); - $(element).children(".gButtonText").text($(element).attr("open_text")); + $(element).attr("orig_text", $(element).children(".g-button-text").text()); + $(element).children(".g-button-text").text($(element).attr("open_text")); } - $("#gPanel").addClass(parentClass).show().slideDown("slow"); + $("#g-panel").addClass(parentClass).show().slideDown("slow"); }); } @@ -48,11 +48,11 @@ _ajaxify_panel: function () { var self = this; - $("#gPanel td form").ajaxForm({ + $("#g-panel td form").ajaxForm({ dataType: "json", success: function(data) { if (data.form) { - $("#gPanel td form").replaceWith(data.form); + $("#g-panel td form").replaceWith(data.form); self._ajaxify_panel(); } if (data.result == "success") { -- cgit v1.2.3