[otrs-cvs] otrs/var/httpd/htdocs/js Core.UI.Dialog.js, 1.37, 1.38 Core.Agent.Search.js, 1.50, 1.51 Core.Agent.TicketZoom.js, 1.40, 1.41

"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-serv10288/var/httpd/htdocs/js

Modified Files:
	Core.UI.Dialog.js Core.Agent.Search.js 
	Core.Agent.TicketZoom.js 
Log Message:
Fixed bug#9125 - AgentTicketSearch dialog does not expand when choosing more search criteria.

Author: mn

Index: Core.UI.Dialog.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.UI.Dialog.js,v
retrieving revision 1.37
retrieving revision 1.38
diff -2 -u -d -r1.37 -r1.38
--- Core.UI.Dialog.js	2 Jan 2013 12:55:12 -0000	1.37
+++ Core.UI.Dialog.js	7 Feb 2013 08:43:51 -0000	1.38
@@ -35,9 +35,8 @@
     /**
      * @function
-     * @private
      * @return nothing
      * @description Adjusts the scrollable inner container of the dialog after every resizing.
      */
-    function AdjustScrollableHeight() {
+    function AdjustScrollableHeight(AllowAutoGrow) {
         // Check window height and adjust the scrollable height of InnerContent
         // Calculation:
@@ -53,5 +52,6 @@
         // 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) {
+        // if AllowAutoGrow is set, auto-resizing should be possible
+        if (AllowAutoGrow || DialogHeight > 300) {
             ContentScrollHeight = WindowHeight - ((DialogTopMargin - WindowScrollTop) * 2) - 100;
         }
@@ -153,4 +153,6 @@
      *               CloseOnEscape true|false (default: false) If true, pressing escape key closes the dialog
      *               NotDraggableIE7: true|false (default: false) If true, the dialog is not draggable in IE7 (due to performance reasons)
+     *               AllowAutoGrow: true|false (default: false) If true, the InnerContent of the dialog can resize until the max window height is reached,
+     *                                                          If false (default), InnerContent of small dialogs does not resize over 200px
      *               Buttons: Array of Hashes with the following properties (buttons are placed in a div "footer" of the dialog):
      *                  Label: string Text of the button
@@ -383,5 +385,5 @@
 
         // Check window height and adjust the scrollable height of InnerContent
-        AdjustScrollableHeight();
+        AdjustScrollableHeight(Params.AllowAutoGrow);
 
         // Add event-handling
@@ -451,6 +453,6 @@
 
         // Add resize event handler for calculating the scroll height
-        $(window).unbind('resize.Dialog').bind('resize.Dialog', function (event) {
-            AdjustScrollableHeight();
+        $(window).unbind('resize.Dialog').bind('resize.Dialog', function () {
+            AdjustScrollableHeight(Params.AllowAutoGrow);
         });
 
@@ -475,5 +477,5 @@
      * @return nothing
      */
-    TargetNS.ShowContentDialog = function (HTML, Title, PositionTop, PositionLeft, Modal, Buttons, NotDraggableIE7) {
+    TargetNS.ShowContentDialog = function (HTML, Title, PositionTop, PositionLeft, Modal, Buttons, NotDraggableIE7, AllowAutoGrow) {
         TargetNS.ShowDialog({
             HTML: HTML,
@@ -485,5 +487,6 @@
             PositionLeft: PositionLeft,
             Buttons: Buttons,
-            NotDraggableIE7: NotDraggableIE7
+            NotDraggableIE7: NotDraggableIE7,
+            AllowAutoGrow: AllowAutoGrow
         });
     };

Author: mn

Index: Core.Agent.Search.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.Agent.Search.js,v
retrieving revision 1.50
retrieving revision 1.51
diff -2 -u -d -r1.50 -r1.51
--- Core.Agent.Search.js	25 Oct 2012 02:54:24 -0000	1.50
+++ Core.Agent.Search.js	7 Feb 2013 08:43:51 -0000	1.51
@@ -1,5 +1,5 @@
 // --
 // Core.Agent.Search.js - provides the special module functions for the global search
-// Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+// Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 // --
 // $Id$
@@ -221,5 +221,5 @@
                 }
 
-                Core.UI.Dialog.ShowContentDialog(HTML, Core.Config.Get('SearchMsg'), '10px', 'Center', true, undefined, true);
+                Core.UI.Dialog.ShowContentDialog(HTML, Core.Config.Get('SearchMsg'), '10px', 'Center', true, undefined, true, true);
 
                 // hide add template block

Author: mn

Index: Core.Agent.TicketZoom.js
===================================================================
RCS file: /home/cvs/otrs/var/httpd/htdocs/js/Core.Agent.TicketZoom.js,v
retrieving revision 1.40
retrieving revision 1.41
diff -2 -u -d -r1.40 -r1.41
--- Core.Agent.TicketZoom.js	23 Oct 2012 11:55:31 -0000	1.40
+++ Core.Agent.TicketZoom.js	7 Feb 2013 08:43:51 -0000	1.41
@@ -1,5 +1,5 @@
 // --
 // Core.Agent.TicketZoom.js - provides the special module functions for TicketZoom
-// Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+// Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 // --
 // $Id$
@@ -243,5 +243,5 @@
             if ($(this).attr('rel') && $('#' + $(this).attr('rel')).length) {
                 Position = $(this).offset();
-                Core.UI.Dialog.ShowContentDialog($('#' + $(this).attr('rel'))[0].innerHTML, 'Attachments', Position.top, parseInt(Position.left, 10) + 25);
+                Core.UI.Dialog.ShowContentDialog($('#' + $(this).attr('rel'))[0].innerHTML, 'Attachments', Position.top - $(window).scrollTop(), parseInt(Position.left, 10) + 25);
             }
             Event.preventDefault();
---------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.