[otrs-cvs] otrs/var/httpd/htdocs/js Core.UI.Dialog.js, 1.35.2.1, 1.35.2.2
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/var/httpd/htdocs/js
In directory lancelot:/tmp/cvs-serv32499/var/httpd/htdocs/js
Modified Files:
Tag: rel-3_1
Core.UI.Dialog.js
Log Message:
Fixed handling of small dialogs (e.g. Attachment dialog in TicketZoom).
Author: mn
Index: Core.UI.Dialog.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.UI.Dialog.js,v
retrieving revision 1.35.2.1
retrieving revision 1.35.2.2
diff -2 -u -d -r1.35.2.1 -r1.35.2.2
--- Core.UI.Dialog.js 17 Dec 2012 12:30:23 -0000 1.35.2.1
+++ Core.UI.Dialog.js 2 Jan 2013 12:57:22 -0000 1.35.2.2
@@ -1,5 +1,5 @@
// --
// Core.UI.Dialog.js - Dialogs
-// Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+// Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
// --
// $Id$
@@ -43,12 +43,20 @@
// Calculation:
// Window height
- // - top margin of dialog twice (for top and bottom)
+ // - top margin of dialog twice (for top and bottom) - only use this for big dialog windows
// - some static pixels for Header and Footer of dialog
var ContentScrollHeight = 0,
WindowHeight = $(window).height(),
WindowScrollTop = $(window).scrollTop(),
- DialogTopMargin = $('.Dialog:visible').offset().top;
+ DialogTopMargin = $('.Dialog:visible').offset().top,
+ DialogHeight = $('.Dialog:visible').height();
- ContentScrollHeight = WindowHeight - ((DialogTopMargin - WindowScrollTop) * 2) - 100;
+ // if dialog height is more than 300px recalculate width of InnerContent to make it scrollable
+ // if dialog is smaller than 300px this is not necessary
+ if (DialogHeight > 300) {
+ ContentScrollHeight = WindowHeight - ((DialogTopMargin - WindowScrollTop) * 2) - 100;
+ }
+ else {
+ ContentScrollHeight = 200;
+ }
$('.Dialog:visible .Content .InnerContent').css('max-height', ContentScrollHeight);
}
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log