Code

Updated datepicker to position every time in dynamic layouts
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Sep 2009 13:40:37 +0000 (13:40 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Sep 2009 13:40:37 +0000 (13:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14374 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/include/datepicker.init.js [deleted file]
gosa-core/html/include/datepicker.js

diff --git a/gosa-core/html/include/datepicker.init.js b/gosa-core/html/include/datepicker.init.js
deleted file mode 100644 (file)
index 77457be..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-function initDatepickers() {\r
-       $$("*").findAll(function(node) {\r
-               return Element.hasClassName(node,'date');\r
-       }).each(function(node) {\r
-               datepickers[node.id] = new DatePicker({\r
-                       relative                        : node.id,\r
-                       language                        : 'de',\r
-                       enableCloseEffect : false,\r
-                       enableShowEffect        : true,\r
-                       closeEffect                     : 'squish',\r
-                       showEffect                      : 'appear'\r
-               });\r
-               datepickers[node.id].setDateFormat([ "dd", "mm", "yyyy" ], ".");\r
-       });\r
-}\r
-Event.observe(window, 'load', initDatepickers, false);\r
index aee1ea51b002a5bd04a863345052379ed2f1f73f..738324708c485573747fbe87aa87ca4817c1a589 100644 (file)
@@ -425,6 +425,8 @@ DatePicker.prototype        = {
        
                /* init the datepicker if it doesn't exists */
                if ( $(this._id_datepicker) == null ) this.load();
+               var a_pos = Element.cumulativeOffset($(this._relative));
+               this.setPosition(a_pos[1], a_pos[0]);
                if (!this._isPositionned && this._relativePosition) {
                        /* position the datepicker relatively to element */
                        var a_lt = Element.positionedOffset($(this._relative));