From fc1c4d5119959a4db0d49b7c0aa618749f27c740 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 28 Aug 2009 16:37:14 -0600 Subject: Button styles and event handlers weren't being applied in dialogs, fixes #669. --- lib/gallery.dialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/gallery.dialog.js') diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index ace588f6..d1ea3edf 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -30,7 +30,7 @@ $("#gDialog").html(data).gallery_show_loading(); if ($("#gDialog form").length) { - self._trigger("form_loaded", null, $("#gDialog form")); + self.form_loaded(null, $("#gDialog form")); } self._layout(); @@ -70,7 +70,7 @@ $("#gDialog").dialog('option', 'width', dialogWidth); }, - form_loaded: function event(event, ui) { + form_loaded: function(event, ui) { // Should be defined (and localized) in the theme MSG_CANCEL = MSG_CANCEL || 'Cancel'; var eCancel = '' + MSG_CANCEL + ''; @@ -78,7 +78,7 @@ $("#gDialog .submit").addClass("ui-state-default ui-corner-all"); $("#gDialog .submit").parent().append(eCancel); $("#gDialog .gCancel").click(function(event) { - $("gDialog").dialog("close"); + $("#gDialog").dialog("close"); event.preventDefault(); }); } @@ -92,7 +92,7 @@ ); }, - close_dialog: function (event, ui) { + close_dialog: function(event, ui) { var self = $("#gDialog").dialog("option", "self"); if ($("#gDialog form").length) { self._trigger("form_closing", null, $("#gDialog form")); -- cgit v1.2.3