mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-25 22:09:11 -04:00
Make the organize dialog open properly in IE8, Chrome and FF. For some reason (probably a timing thing) the height of the contents was not being set correctly in FF. So we just hard code an estimate of the size of the Draw handle, and message areas.
This commit is contained in:
@@ -59,10 +59,14 @@
|
||||
var dialogHeight = $("#gDialog").height();
|
||||
var cssWidth = new String($("#gDialog form").css("width"));
|
||||
var childWidth = cssWidth.replace(/[^0-9]/g,"");
|
||||
var size = $.gallery_get_viewport_size();
|
||||
if ($("#gDialog iframe").length) {
|
||||
dialogWidth = $(window).width() - 100;
|
||||
dialogWidth = size.width() - 100;
|
||||
// Set the iframe width and height
|
||||
$("#gDialog iframe").width("100%").height($(window).height() - 100);
|
||||
$("#gDialog iframe").width("100%").height(size.height() - 100);
|
||||
} else if ($("#gDialog form").length == 0) {
|
||||
dialogWidth = size.width() - 100;
|
||||
$("#gDialog").dialog("option", "height", size.height() - 100);
|
||||
} else if (childWidth == "" || childWidth > 300) {
|
||||
dialogWidth = 500;
|
||||
}
|
||||
|
||||
@@ -4,21 +4,19 @@
|
||||
* Dynamically initialize the organize dialog when it is displayed
|
||||
*/
|
||||
init: function(data) {
|
||||
// Resize with 50 pixels padding all around
|
||||
var size = $.getViewportSize();
|
||||
$("#gDialog").dialog("option", "height", size.height() - 100)
|
||||
.dialog("option", "width", size.width() - 100)
|
||||
.dialog("option", "position", "center");
|
||||
|
||||
// Deal with ui.jquery bug: http://dev.jqueryui.com/ticket/4475 (target 1.8?)
|
||||
$(".sf-menu li.sfHover ul").css("z-index", 70);
|
||||
|
||||
var height = $("#gOrganizeDetail").innerHeight();
|
||||
$("#gMicroThumbPanel").height(height - $("#gOrganizeEditDrawerHandle").outerHeight());
|
||||
$("#gDialog").bind("dialogopen", function(event, ui) {
|
||||
$("#gMicroThumbPanel").height($("#gDialog").innerHeight() - 90);
|
||||
});
|
||||
|
||||
$("#gDialog").bind("dialogclose", function(event, ui) {
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$("#gDialog #gMicroThumbDone").click(function(event) {
|
||||
$("#gDialog").dialog("close");
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$(".gBranchText span").click($.organize.collapse_or_expand_tree);
|
||||
|
||||
@@ -41,7 +41,5 @@
|
||||
|
||||
<script type="text/javascript" src="<?= url::file("modules/organize/js/organize.js") ?>"></script>
|
||||
<script type="text/javascript">
|
||||
setTimeout(function() {
|
||||
$.organize.init();
|
||||
}, 0);
|
||||
$("#gOrganize").ready($.organize.init);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user