summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.dialog.js26
-rw-r--r--themes/admin_wind/css/screen.css2
-rw-r--r--themes/wind/css/screen.css2
3 files changed, 17 insertions, 13 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js
index 80f4f81d..b4557493 100644
--- a/lib/gallery.dialog.js
+++ b/lib/gallery.dialog.js
@@ -1,5 +1,12 @@
(function($) {
$.widget("ui.gallery_dialog", {
+ options: {
+ autoOpen: false,
+ autoResize: true,
+ modal: true,
+ resizable: false,
+ position: "center"
+ },
_init: function() {
var self = this;
if (!self.options.immediate) {
@@ -82,7 +89,7 @@
} else if ($("#g-dialog .g-dialog-panel").length) {
dialogWidth = size.width() - 100;
$("#g-dialog").dialog("option", "height", size.height() - 100);
- } else if (childWidth == "" || childWidth > 300) {
+ } else {
dialogWidth = 500;
}
$("#g-dialog").dialog('option', 'width', dialogWidth);
@@ -132,6 +139,13 @@
},
success: function(data) {
if (data.html) {
+ if (data.result == "error") {
+ // This is an odd case that arises from the watermarks module. This is because we
+ // have a fake xhr, and we rawurlencode the results because the JS code that uploads
+ // the file buffers it in an iframe which entitizes the HTML and makes it difficult
+ // for the JS to process. See ticket #797.
+ data.html = unescape(data.html);
+ }
$("#g-dialog").html(data.html);
$("#g-dialog").dialog("option", "position", "center");
$("#g-dialog form :submit").removeClass("ui-state-disabled")
@@ -174,14 +188,4 @@
form_closing: function(event, ui) {},
dialog_closing: function(event, ui) {}
});
-
- $.extend($.ui.gallery_dialog, {
- defaults: {
- autoOpen: false,
- autoResize: true,
- modal: true,
- resizable: false,
- position: "center"
- }
- });
})(jQuery);
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index 58942387..23d319b2 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -989,7 +989,7 @@ div#g-action-status {
}
#g-dialog .g-cancel {
- margin: .4em 1em;
+ margin: .59em 1em;
}
#g-panel {
diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css
index 0e4819ee..e19427f3 100644
--- a/themes/wind/css/screen.css
+++ b/themes/wind/css/screen.css
@@ -1048,7 +1048,7 @@ div#g-action-status {
}
#g-dialog .g-cancel {
- margin: .4em 1em;
+ margin: .59em 1em;
}
#g-panel {