From 5ac8d0e6fd7f64272b52c0ad898ffe8aeaaee006 Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Fri, 3 Aug 2007 11:57:52 +0000 Subject: [PATCH] =?UTF-8?q?Changement=20de=20g=E9n=E9rateur=20de=20tooltip?= =?UTF-8?q?=20Ajax=20-=20exemple=20toujours=20sur=20les=20lignes=20produit?= =?UTF-8?q?s=20d'une=20propale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/propal.php | 2 +- htdocs/html.form.class.php | 23 +- htdocs/includes/scriptaculous/src/prototip.js | 248 --- .../scriptaculous/src/window/MIT-LICENSE | 19 + .../includes/scriptaculous/src/window/README | 182 ++ .../scriptaculous/src/window/debug.js | 137 ++ .../src/window/extended_debug.js | 113 + .../scriptaculous/src/window/tooltip.js | 241 +++ .../scriptaculous/src/window/window.js | 1843 +++++++++++++++++ .../src/window/window_effects.js | 157 ++ .../scriptaculous/src/window/window_ext.js | 115 + htdocs/main.inc.php | 10 +- htdocs/theme/auguria/auguria.css.php | 19 - htdocs/theme/common/window/alphacube.css | 150 ++ .../common/window/alphacube/bottom-left-c.gif | Bin 0 -> 60 bytes .../common/window/alphacube/bottom-middle.gif | Bin 0 -> 50 bytes .../window/alphacube/bottom-right-c.gif | Bin 0 -> 61 bytes .../window/alphacube/button-close-focus.gif | Bin 0 -> 699 bytes .../window/alphacube/button-max-focus.gif | Bin 0 -> 765 bytes .../window/alphacube/button-min-focus.gif | Bin 0 -> 472 bytes .../common/window/alphacube/frame-left.gif | Bin 0 -> 64 bytes .../common/window/alphacube/frame-right.gif | Bin 0 -> 64 bytes .../common/window/alphacube/left-top.gif | Bin 0 -> 171 bytes .../common/window/alphacube/right-top.gif | Bin 0 -> 168 bytes .../common/window/alphacube/top-middle.gif | Bin 0 -> 97 bytes htdocs/theme/common/window/default.css | 155 ++ .../common/window/default/bottom_left.gif | Bin 0 -> 187 bytes .../common/window/default/bottom_mid.gif | Bin 0 -> 68 bytes .../common/window/default/bottom_right.gif | Bin 0 -> 187 bytes .../window/default/bottom_right_resize.gif | Bin 0 -> 201 bytes .../common/window/default/center_left.gif | Bin 0 -> 52 bytes .../common/window/default/center_right.gif | Bin 0 -> 49 bytes htdocs/theme/common/window/default/clear.gif | Bin 0 -> 1014 bytes htdocs/theme/common/window/default/close.gif | Bin 0 -> 1012 bytes .../theme/common/window/default/inspect.gif | Bin 0 -> 556 bytes .../theme/common/window/default/maximize.gif | Bin 0 -> 1024 bytes .../theme/common/window/default/minimize.gif | Bin 0 -> 1023 bytes .../theme/common/window/default/overlay.png | Bin 0 -> 2818 bytes htdocs/theme/common/window/default/resize.gif | Bin 0 -> 138 bytes htdocs/theme/common/window/default/sizer.gif | Bin 0 -> 201 bytes .../theme/common/window/default/top_left.gif | Bin 0 -> 358 bytes .../theme/common/window/default/top_mid.gif | Bin 0 -> 149 bytes .../theme/common/window/default/top_right.gif | Bin 0 -> 357 bytes htdocs/theme/eldy/eldy.css.php | 19 - 44 files changed, 3133 insertions(+), 300 deletions(-) delete mode 100644 htdocs/includes/scriptaculous/src/prototip.js create mode 100644 htdocs/includes/scriptaculous/src/window/MIT-LICENSE create mode 100644 htdocs/includes/scriptaculous/src/window/README create mode 100644 htdocs/includes/scriptaculous/src/window/debug.js create mode 100644 htdocs/includes/scriptaculous/src/window/extended_debug.js create mode 100644 htdocs/includes/scriptaculous/src/window/tooltip.js create mode 100644 htdocs/includes/scriptaculous/src/window/window.js create mode 100644 htdocs/includes/scriptaculous/src/window/window_effects.js create mode 100644 htdocs/includes/scriptaculous/src/window/window_ext.js create mode 100644 htdocs/theme/common/window/alphacube.css create mode 100644 htdocs/theme/common/window/alphacube/bottom-left-c.gif create mode 100644 htdocs/theme/common/window/alphacube/bottom-middle.gif create mode 100644 htdocs/theme/common/window/alphacube/bottom-right-c.gif create mode 100644 htdocs/theme/common/window/alphacube/button-close-focus.gif create mode 100644 htdocs/theme/common/window/alphacube/button-max-focus.gif create mode 100644 htdocs/theme/common/window/alphacube/button-min-focus.gif create mode 100644 htdocs/theme/common/window/alphacube/frame-left.gif create mode 100644 htdocs/theme/common/window/alphacube/frame-right.gif create mode 100644 htdocs/theme/common/window/alphacube/left-top.gif create mode 100644 htdocs/theme/common/window/alphacube/right-top.gif create mode 100644 htdocs/theme/common/window/alphacube/top-middle.gif create mode 100644 htdocs/theme/common/window/default.css create mode 100644 htdocs/theme/common/window/default/bottom_left.gif create mode 100644 htdocs/theme/common/window/default/bottom_mid.gif create mode 100644 htdocs/theme/common/window/default/bottom_right.gif create mode 100644 htdocs/theme/common/window/default/bottom_right_resize.gif create mode 100644 htdocs/theme/common/window/default/center_left.gif create mode 100644 htdocs/theme/common/window/default/center_right.gif create mode 100644 htdocs/theme/common/window/default/clear.gif create mode 100644 htdocs/theme/common/window/default/close.gif create mode 100644 htdocs/theme/common/window/default/inspect.gif create mode 100644 htdocs/theme/common/window/default/maximize.gif create mode 100644 htdocs/theme/common/window/default/minimize.gif create mode 100644 htdocs/theme/common/window/default/overlay.png create mode 100644 htdocs/theme/common/window/default/resize.gif create mode 100644 htdocs/theme/common/window/default/sizer.gif create mode 100644 htdocs/theme/common/window/default/top_left.gif create mode 100644 htdocs/theme/common/window/default/top_mid.gif create mode 100644 htdocs/theme/common/window/default/top_right.gif diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e50c2903807..beb9cab5c47 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1075,7 +1075,7 @@ if ($_GET['propalid'] > 0) } else { - print $html->textwithtooltip($text,$objp->description,4,'','',$i+1,$objp->ref.' - '.nl2br(stripslashes($objp->product))); + print $html->textwithtooltip($text,$objp->description,4,'','',$i,$objp->ref.' - '.nl2br(stripslashes($objp->product))); } print_date_range($objp->date_start,$objp->date_end); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 0f9d7765ef3..f5070c1d7d5 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -68,14 +68,14 @@ class Form \brief Affiche un texte+picto avec tooltip sur texte ou sur picto \param text Texte � afficher \param htmltext Contenu html du tooltip, cod� en html - \param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip ajax + \param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip Ajax \param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est apr�s \param img Code img du picto \return string Code html du texte,picto */ function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$option='') { - global $conf; + global $conf,$langs; if (! $htmltext) return $text; @@ -88,15 +88,16 @@ class Form if ($conf->use_ajax && $tooltipon == 4) { - $s = '<script type=\'text/javascript\'> - function init() { - //<![CDATA[ - new Tip(\'tip'.$i.'\', \''.$htmltext.'\',{title : \''.$option.'\'}); - //]]> - } - Event.observe(window, \'load\', init, false);'; - $s.= '</script>'; - $s.= '<span id="tip'.$i.'">'.$text.'</span>'; + $s = '<div id="tip'.$i.'">'."\n"; + $s.= $text; + $s.= '</div>'."\n"; + $s.= '<div id="tooltip_content" style="display:none">'."\n"; + $s.= $htmltext."\n"; + $s.= '</div>'."\n"; + $s.= '<script type=\'text/javascript\'>'."\n"; + $s.= 'TooltipManager.init("","",{width:500, shiftX:50});'."\n"; + $s.= 'TooltipManager.addHTML("tip'.$i.'", "tooltip_content");'."\n"; + $s.= '</script>'."\n"; } else { diff --git a/htdocs/includes/scriptaculous/src/prototip.js b/htdocs/includes/scriptaculous/src/prototip.js deleted file mode 100644 index 60b9053bc73..00000000000 --- a/htdocs/includes/scriptaculous/src/prototip.js +++ /dev/null @@ -1,248 +0,0 @@ -// Prototip 1.0.1.1 -// by Nick Stakenburg - http://www.nickstakenburg.com -// 25-07-2007 -// -// More information on this project: -// http://www.nickstakenburg.com/projects/prototip/ -// -// Licensed under the Creative Commons Attribution 3.0 License -// http://creativecommons.org/licenses/by/3.0/ -// - -var Tip = Class.create(); -Tip.prototype = { - - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - this.options = Object.extend({ - className: 'tooltip', - duration: 0.3, // duration of the effect - effect: false, // false, 'appear' or 'blind' - hook: false, // { element: {'topLeft|topRight|bottomLeft|bottomRight'}, tip: {'topLeft|topRight|bottomLeft|bottomRight'} - offset: (arguments[2] && arguments[2].hook) ? {x:0, y:0} : {x:16, y:16}, - fixed: false, // follow the mouse if false - target: this.element, // or another element - title: false, - viewport: true, // keep within viewport if mouse is followed - zIndex: 1200 - }, arguments[2] || {}); - - this.target = $(this.options.target); - - if (this.options.hook) { - this.options.fixed = true; - this.options.viewport = false; - } - - if (this.options.effect) { - this.queue = { position: 'end', limit: 1, scope: ''} - var c = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; - for (var i=0; i<6; i++) { - var r = Math.floor(Math.random() * c.length); - this.queue.scope += c.substring(r,r+1); - } - } - - this.setup(); - }, - - setup: function() { - this.element.observe('mousemove', this.showTip.safeBind(this)); - this.element.observe('mouseout', this.hideTip.safeBind(this)); - }, - - buildTip: function() { - // IE select fix, this is placed first in case zIndex fails - if (Prototype.Browser.IE) { - this.underlay = document.createElement('iframe'); - Element.setStyle(this.underlay, { - position: 'absolute', - display: 'none', - border: 0, - margin: 0, - opacity: 0.01, - padding: 0, - background: 'none', - zIndex: this.options.zIndex - }); - document.body.appendChild(this.underlay); - } - - // create a wrapper - this.wrapper = document.createElement('div'); - Element.setStyle(this.wrapper, { - position: 'absolute', - zIndex: this.options.zIndex+1, - display: 'none' - }); - if (this.options.width) this.wrapper.setStyle({ width: this.options.width+'px' }); - - // add the tooltip - this.tooltip = this.wrapper.appendChild(document.createElement('div')); - this.tooltip.className = this.options.className; - this.tooltip.style.position = 'relative'; - - // add the title - if (this.options.title) { - this.title = this.tooltip.appendChild(document.createElement('div')); - this.title.className = 'title'; - Element.update(this.title, this.options.title); - } - - // content - this.tip = this.tooltip.appendChild(document.createElement('div')); - this.tip.className = 'content'; - Element.update(this.tip, this.content); - - // add wrapper to the body - document.body.appendChild(this.wrapper); - - // prepare for effects - var w = this.wrapper.getDimensions(); - this.wrapper.setStyle({ width: w.width+'px', height: w.height+'px' }); - if (Prototype.Browser.IE) this.underlay.setStyle({ width: w.width+'px', height: w.height+'px' }); - Element.hide(this.tooltip); - }, - - showTip: function(event){ - if (!this.wrapper) this.buildTip(); - this.positionTip(event); // follow mouse - if (this.wrapper.visible() && this.options.effect != 'appear') return; - - if (Prototype.Browser.IE) this.underlay.show(); // IE select fix - this.wrapper.show(); - - if (!this.options.effect) { - this.tooltip.show(); - } else { - // stop running effect - if (this.activeEffect) Effect.Queues.get(this.queue.scope).remove(this.activeEffect); - // start new - this.activeEffect = Effect[Effect.PAIRS[this.options.effect][0]](this.tooltip, { duration: this.options.duration, queue: this.queue}); - } - }, - - hideTip: function(event){ - if(!this.wrapper.visible()) return; - - if (!this.options.effect) { - if (Prototype.Browser.IE) { this.underlay.hide(); } // select fix - this.tooltip.hide(); - this.wrapper.hide(); - } - else { - // stop running effect - if (this.activeEffect) Effect.Queues.get(this.queue.scope).remove(this.activeEffect); - // start new - this.activeEffect = Effect[Effect.PAIRS[this.options.effect][1]](this.tooltip, { duration: this.options.duration, queue: this.queue, afterFinish: function(){ - if (Prototype.Browser.IE) this.underlay.hide(); // select fix - this.wrapper.hide(); - }.bind(this)}); - } - }, - - positionTip: function(event){ - // calculate - var offset = {'left': this.options.offset.x,'top': this.options.offset.y}; - var targetPosition = Position.cumulativeOffset(this.target); - var tipd = this.wrapper.getDimensions(); - var pos = { - 'left': (this.options.fixed) ? targetPosition[0] : Event.pointerX(event), - 'top': (this.options.fixed) ? targetPosition[1] : Event.pointerY(event) - } - - // add offsets - pos.left += offset.left; - pos.top += offset.top; - - if (this.options.hook) { - var dims = {'target': this.target.getDimensions(), 'tip': tipd} - var hooks = {'target': Position.cumulativeOffset(this.target), 'tip': Position.cumulativeOffset(this.target)} - - for(var z in hooks) { - switch(this.options.hook[z]){ - case 'topRight': - hooks[z][0] += dims[z].width; - break; - case 'bottomLeft': - hooks[z][1] += dims[z].height; - break; - case 'bottomRight': - hooks[z][0] += dims[z].width; - hooks[z][1] += dims[z].height; - break; - } - } - - // move based on hooks - pos.left += -1*(hooks.tip[0] - hooks.target[0]); - pos.top += -1*(hooks.tip[1] - hooks.target[1]); - } - - // move tooltip when there is a different target when following mouse - if (!this.options.fixed && this.element !== this.target) { - var elementPosition = Position.cumulativeOffset(this.element); - pos.left += -1*(elementPosition[0] - targetPosition[0]); - pos.top += -1*(elementPosition[1] - targetPosition[1]); - } - - if (!this.options.fixed && this.options.viewport) { - var scroll = this.getScrollOffsets(); - var viewport = this.viewportSize(); - var pair = {'left': 'width', 'top': 'height'}; - - for(var z in pair) { - if ((pos[z] + tipd[pair[z]] - scroll[z]) > viewport[pair[z]]) { - pos[z] = pos[z] - tipd[pair[z]] - 2*offset[z]; - } - } - } - - // position - this.wrapper.setStyle({ - left: pos.left + 'px', - top: pos.top + 'px' - }); - - if (Prototype.Browser.IE) this.underlay.setStyle({ left: pos.left+'px', top: pos.top+'px' }); - }, - - // Functions below hopefully won't be needed with prototype 1.6 - viewportWidth: function(){ - if (Prototype.Browser.Opera) return document.body.clientWidth; - return document.documentElement.clientWidth; - }, - - viewportHeight: function(){ - if (Prototype.Browser.Opera) return document.body.clientHeight; - if (Prototype.Browser.WebKit) return this.innerHeight; - return document.documentElement.clientHeight; - }, - - viewportSize : function(){ - return {'height': this.viewportHeight(), 'width': this.viewportWidth()}; - }, - - getScrollLeft: function(){ - return this.pageXOffset || document.documentElement.scrollLeft; - }, - - getScrollTop: function(){ - return this.pageYOffset || document.documentElement.scrollTop; - }, - - getScrollOffsets: function(){ - return {'left': this.getScrollLeft(), 'top': this.getScrollTop()} - } -} - -/* fix for $A is not defined on Firefox */ -Function.prototype.safeBind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - if (typeof $A == 'function') - return __method.apply(object, args.concat($A(arguments))); - } -} \ No newline at end of file diff --git a/htdocs/includes/scriptaculous/src/window/MIT-LICENSE b/htdocs/includes/scriptaculous/src/window/MIT-LICENSE new file mode 100644 index 00000000000..5bcdad1bd74 --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/MIT-LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/htdocs/includes/scriptaculous/src/window/README b/htdocs/includes/scriptaculous/src/window/README new file mode 100644 index 00000000000..e2cb9608345 --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/README @@ -0,0 +1,182 @@ +== Installation/Usage + +Just copy windows.js in your javascript directory, and default.css + default directory in your stylesheets directory +See samples/index.html for more details and go on my web page : http://prototype-window.xilinus.com + +== Change log +- 04/23/07 V 1.3 + - Added: getTitle + - Added: blur/focus function on Windows module + - Added: onBlur event + - Fixed: WindowCloseKey works with URL content (iframe) + - Fixed: Modal window with a parent != document.body + - Updated: prototype 1.5RC3 + - Updated: Dialog handle resizable,minimizable, maximizable, draggable and closable options +- 02/27/07 V 1.2 + - Added: gridX and gridY constructor's options to snap move and resize + - Added: Effect on modal overlay (fade/appear) only if effects.js in included. + You can change effect options (Windows.overlayShowEffectOptions and Windows.overlayHideEffectOptions). + + - Fixed: Multimodal mode. + - Fixed: Works on WebKit. + + - Beta: effects on minimize and maximize. You need to include window_effects.js to have them. + +- 02/17/07 V 1.1 + - Constructor has been simplified, now you can just do win = new Window(). By default id is automatically generated and can be passed as options + win = new Window({id: "my_id", width: 100, height: 100}) + Backward compatibility with old constructor win = new Window("my_id", {width: 100, height: 100}) + - Observer event can be passed as window option: win = new Window({onClose: function() {alert('close')}}) + - parent option can be id or element + - delegate has been removed (not really usefull) and0 setCloseCallback has been addedinstead. (It could be also passed as a constructor's option closeCallback: your_callcabck) + your_callcabck must return true to be able to close the window + - add onMove event + - fix constraint for minimized window + - destroyOnClose could be passed as constructor's option: win = new Window({destroyOnClose: true}) + - constraint works for maximized windows + - Dialog ok and cancel parameters has been renamed to onOk and onCancel for coherence (ok and cancel still works) + - Update to Prototype 1.5 and script.aculo.us 1.7 + +- 01/14/07 V 1.00 + - add changeClassName to change look and feel dynamically. + - add constraint move. Constraint can be on a div or document. + - full top and bottom bar are use to move window. + - fixed computation of window width or height. + - add setURL/getURL/refresh and setHTMLContent. Content can be change dynamically. + - add tooltip.js add on. It's an add-on to add dynamically tooltips on a webpage (see samples/tooltips/tooltip.html) + Thanks to Jonathan Modell of 2moromedia.com. + +- 12/06/06 V 0.99 + - remove addClass that automatically tries to include default.css + - add wired move/resize + - fix recenterAuto + - add show to WindowStore to be able to open a window the first time, wihtout any cookie (check samples/window_store/html) + +- 11/06/06 V 0.98 + - new optional behavior for multi-level modal window. + - Two new add-ons (in window_ext.js file) + + WindowStore to save open/close window status. + + WindowCloseKey to handle escape key (or any keys) to close windows/dialogs + +- 10/26/06 V 0.97 + - add recenterModal to constructor + - setAjaxContent eval response request + - modal window multi level + - fix close/closeAll issues + - add addCss (auto add default.css) + +- 09/26/06 V 0.96.3 + - Fixed onClose, no more memory leak and nore issues with sound on IE (even on dialogs) + - add getLocation + - Debug select problem on Firefox + - change mouseup event to onclick event + - Fixed event propagation on mininize/maximize/close + - Add frameborder=0 + - Add prototype_window_class_helper.rb by Jorge Díaz (http://xurde.info) + +- 07/22/06 V 0.96.2 + - Fixed select issue in modal window + +- 07/15/06 V 0.96.1 + - Bugs fixed + - Add isVisible() + - Update debug.js + +- 07/11/06 V 0.96 + - New events onShow, onHide, onFocus + - isVisible() + - Autofit width or height if width or (NOT AND) height is set to null in the constructor + - updateWidth / updateHeight if you need to update width or height (useful after changing window content if you do not want scrollbars) + - Add top, left to showCenter(modal, top, left) optional arguments if you need to center only left or top value. + +- 06/30/06 V 0.95 + - Now you can set windows or dialogs content with an Ajax request!! + - Fixed IE issue when you destroy window with an url that embeds mp3. + - Fixed buttonClass issue for Dialog. + - Update samples + +- 06/24/06 V 0.90 + - Valid XHTML 1.0 Strict! + - Fixed minimize function + - Fixed destroy on window without hide effects + - No more text selection while dragging + - Add onMinimize/onMaximize event + +- 06/19/06 V 0.85.2 + - Remove undeclared vars + - Set top/left to 0 if not specify + - Destroy objet after hide effect instead of before effect instead + - getSize + - add extended_debug.js (from Jason Pollard) + +- 06/13/06 V 0.85.1 + - IE bug fixed + +- 06/12/06 V 0.85 + - Autofit width or height for Dialog + - Better Move/Resize over + - Allow select in modal window (even on IE) + - WARNING, ok callback for Dialog should returns true to close the dialog + - better window HTML code (no more div inside the td) + - Add themes + +- 05/23/06 V 0.80 + - Add setTitle + - Add setStatusBar + - Store minimize/maximize in the cookie (Thanks to Ifran) + - Add onload constructor parameter (Thanks to Ifran) + - Add button class for dialog (Thanks to Felix Shnir) + +- 05/09/06 V 0.75 + - Update with Script.aculo.us 1.6.1 and Prototype 1.5.0_rc1 + - Remove PNG for dialog overlay, use opacity as done in lightbox V2 + - Add Windows.focusedWindow and Windows.closeAll + - Add name to iframe in case of url window + - Clean up code, use _ for private function (just name convention) + - Add Dialog.info function, usefull for for submit or notice info (in Rails) + - Add minimize and maximize buttons + - Add alert_lite.css without any images + - Debug + +- 04/15/06 V 0.70 + - Add autoposition in setContent. The window will at the element location + - Add draggable/closable parameter if you need to specify is the window is draggable/closable or not + - Add parent parameter if you need a specific parent instead of body + - Better resize + - Add setCookie to store window location/size in a cookie + - Add parent.html sample + +- 04/05/06 V 0.65 + - Update to Prototype 1.5.0_pre1, script.aculo.us 1.6.0 + - Add setDestoyOnClose + - Add Windows Observer with onStartResize(), onEndResize(), onStartMove(), onEndMove(), onClose(), onDestroy() events + - Add setContent(id, autoresize) + +- 03/29/06 V 0.6 + - Add Window delegate to manage close action + - Add modal mode and Dialog class with common panels: alert, confirm + - Clean HTML code and change caracters to lowercase to be XHTML compliant (thanks to nuxygen and Joseph) + - Add showEffectOptions, hideEffectOptions, effectOptions to Window constructor (thanks to Jon) + - Fix checkbox IE bug (big thanks to JCA) + - Fix other little bugs (thanks to nuxygen, Dennis, and all who sent me emails) + - Update samples/index.html + - Add new sample usng frame (samples/inset.html and samples/inframe.html but use only samples/inset.html) + +- 03/27/06 V 0.51 + - New CSS theme structure + - Add url: constructor parameter to have a window with an URL content + - Add bottom/right constructor parameters + - Update sample files. + +- 03/24/06 V 0.50 Initial revision + + +== License + +it is licensed under the terms of the MIT License, see the included MIT-LICENSE file. + +== Thanks +To all of you who sent me bugs, patches and feature requests + +http://www.ciudadmovil.com.co/q/mod/mapa/conexion.php +http://www.desyr.net/ \ No newline at end of file diff --git a/htdocs/includes/scriptaculous/src/window/debug.js b/htdocs/includes/scriptaculous/src/window/debug.js new file mode 100644 index 00000000000..3d8f338836e --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/debug.js @@ -0,0 +1,137 @@ +var debugWindow = null; +function debug(text, reverse) { + if (debugWindow == null) + return; + + time = "-"; //new Date(); + if (reverse) { + $('debug').innerHTML = time + " " + text + "<br>"+ $('debug').innerHTML; + debugWindow.getContent().scrollTop=0; + } + else { + $('debug').innerHTML += time + " " + text + "<br>"; + debugWindow.getContent().scrollTop=10000; // Far away + } +} + +function hideDebug() { + if (debugWindow) { + debugWindow.destroy(); + debugWindow = null; + } +} + +function showDebug(bShow) { + if (debugWindow == null) { + debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"}) + debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div id='debug'></div>"; + date=new Date; + date.setMonth(date.getMonth()+3); + + //debugWindow.setCookie(null, date); + } + if( typeof bShow == 'undefined' || bShow)debugWindow.show() +} + + +function clearDebug() { + if (debugWindow == null) + return; + $('debug').innerHTML = ""; +} + +/** + * document.createElement convenience wrapper + * + * The data parameter is an object that must have the "tag" key, containing + * a string with the tagname of the element to create. It can optionally have + * a "children" key which can be: a string, "data" object, or an array of "data" + * objects to append to this element as children. Any other key is taken as an + * attribute to be applied to this tag. + * + * Available under an MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * @param {Object} data The data representing the element to create + * @return {Element} The element created. + */ +function $E(data) { + var el; + if ('string'==typeof data) { + el=document.createTextNode(data); + } else { + //create the element + el=document.createElement(data.tag); + delete(data.tag); + + //append the children + if ('undefined'!=typeof data.children) { + if ('string'==typeof data.children ||'undefined'==typeof data.children.length) { + //strings and single elements + el.appendChild($E(data.children)); + } else { + //arrays of elements + for (var i=0, child=null; 'undefined'!=typeof (child=data.children[i]); i++) { + el.appendChild($E(child)); + } + } + delete(data.children); + } + + //any other data is attributes + for (attr in data) { + el[attr]=data[attr]; + } + } + + return el; +} + +// FROM Nick Hemsley +var Debug = { + inspectOutput: function (container, within) { + within = within || debugWindow.getContent() + + if (debugWindow == null) + return; + + within.appendChild(container) + }, + + inspect: function(object) { + var cont = $E({tag: "div", className: "inspector"}) + Debug.inspectObj(object, cont) + debugWindow.getContent().appendChild(cont) + }, + + inspectObj: function (object, container) { + for (prop in object) { + Debug.inspectOutput(Debug.inspectable(object, prop), container) + } + }, + + inspectable: function(object, prop) { + cont = $E({tag: 'div', className: 'inspectable', children: [prop + " value: " + object[prop] ]}) + cont.toInspect = object[prop] + Event.observe(cont, 'click', Debug.inspectClicked, false) + return cont + }, + + inspectClicked: function(e) { + Debug.inspectContained(Event.element(e)) + Event.stop(e) + }, + + inspectContained: function(container) { + if (container.opened) { + container.parentNode.removeChild(container.opened) + delete(container.opened) + } else { + sibling = container.parentNode.insertBefore($E({tag: "div", className: "child"}), container.nextSibling) + if (container.toInspect) + Debug.inspectObj(container.toInspect, sibling) + container.opened = sibling + } + } +} +var inspect = Debug.inspect; diff --git a/htdocs/includes/scriptaculous/src/window/extended_debug.js b/htdocs/includes/scriptaculous/src/window/extended_debug.js new file mode 100644 index 00000000000..2b935b1b7dd --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/extended_debug.js @@ -0,0 +1,113 @@ +var commandHistory; +var historyIndex; + +function showExtendedDebug() { + if (debugWindow != null) { + hideDebug(); + } + + if (debugWindow == null) { + commandHistory = new Array(); + historyIndex = 0; + + debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, minWidth:250, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"}) + debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div font='monaco' id='debug' style='padding:3px;color:#0F0;font-family:monaco'></div>"; + + //create hourglass icon and attach events to it. + var cont = "<div id=\"debug_window_inspect\" style=\"width: 15px; height: 15px; background: transparent url(themes/default/inspect.gif) no-repeat 0 0; position:absolute; top:5px; left:70px; cursor:pointer; z-index:3000;\"></div>"; + + new Insertion.After('debug_window_maximize', cont); + Event.observe('debug_window_inspect', 'click', enterInspectionMode, false); + + //create command text box + cont = "Eval:<input id=\"debug_window_command\" type=\"textbox\" style=\"width:150px; height: 12px; color: black;\">" + debugWindow.setStatusBar(cont); + + Event.observe('debug_window_command', 'mousedown', donothing); + Event.observe('debug_window_command', 'keypress', evalJS, false); + } + debugWindow.show(); +} + +function donothing(evt){ + Field.activate('debug_window_command'); + return false; +} + +function evalJS(evt){ + if(evt.keyCode == Event.KEY_RETURN){ + var js = $F('debug_window_command'); + try{ + var ret = eval(js); + if(ret != null) + debug(ret); + }catch(e){ + debug(e); + } + $('debug_window_command').value = ''; + + Field.activate('debug_window_command'); + commandHistory.push(js); + historyIndex = 0; + } + + if(evt.keyCode == Event.KEY_UP){ + if(commandHistory.length > historyIndex){ + historyIndex++; + var js = commandHistory[commandHistory.length-historyIndex]; + $('debug_window_command').value = js; + Event.stop(evt); + Field.activate('debug_window_command'); + } + } + + if(evt.keyCode == Event.KEY_DOWN){ + if(commandHistory.length >= historyIndex && historyIndex > 1){ + historyIndex--; + var js = commandHistory[commandHistory.length-historyIndex]; + $('debug_window_command').value = js; + Event.stop(evt); + Field.activate('debug_window_command'); + } + } +} + +function enterInspectionMode(evt){ + //stop observing magnifying glass + Event.stopObserving('debug_window_inspect', 'click', enterInspectionMode, false); + //change pointer + document.body.style.cursor='help'; + //start observing mouse clicks + Event.observe(window, 'click', inspectItem, false); +} + +function inspectItem(evt){ + // the element that triggered the event + var element = Event.element(evt); + if(element.id!="debug_window_inspect"){ + clearDebug() + //change pointer + document.body.style.cursor='default'; + debug(element.id); + inspect(element); + //stop observing mouse clicks + Event.stopObserving(window, 'click', inspectItem, false); + //alert('doing something'); + //start observing mag + Event.observe('debug_window_inspect', 'click', enterInspectionMode, false); + } +} + +function clearDebug() { + var win = $('debug'); + if (win == null) + return; + + win.innerHTML=" "; + //clear inspections too + var divs = document.getElementsByClassName('inspector'); + divs.each(function(div){ + Element.remove(div); + }); +} + diff --git a/htdocs/includes/scriptaculous/src/window/tooltip.js b/htdocs/includes/scriptaculous/src/window/tooltip.js new file mode 100644 index 00000000000..65e6106034c --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/tooltip.js @@ -0,0 +1,241 @@ +// Singleton class TooltipWindow +// This class works with special className. The tooltip content could be in your HTML page as an hidden element or +// can be retreive by an AJAX call. +// +// To work, You just need to set two class name on elements that should show tooltips +// - One to say to TooltipManager that this element must have a tooltip ('tooltip' by default) +// - Another to indicate how to find the tooltip content +// It could be html_XXXX if tootltip content is somewhere hidden in your page, XXX must be DOM ID of this hidden element +// It could be ajax_XXXX if tootltip content must be find by an ajax request, XXX will be the string send as id parameter to your server. +// Check samples/tooltips/tooltip.html to see how it works +// +TooltipManager = { + options: {cssClassName: 'tooltip', delayOver: 200, delayOut: 1000, shiftX: 10, shiftY: 10, + className: 'alphacube', width: 200, height: null, + draggable: false, minimizable: false, maximizable: false, showEffect: Element.show, hideEffect: Element.hide}, + ajaxInfo: null, + elements: null, + showTimer: null, + hideTimer: null, + + // Init tooltip manager + // parameters: + // - cssClassName (string) : CSS class name where tooltip should be shown. + // - ajaxOptions (hash) : Ajax options for ajax tooltip. + // For examples {url: "/tooltip/get.php", options: {method: 'get'}} + // see Ajax.Request documentation for details + //- tooltipOptions (hash) : available keys + // - delayOver: int in ms (default 10) delay before showing tooltip + // - delayOut: int in ms (default 1000) delay before hidding tooltip + // - shiftX: int in pixels (default 10) left shift of the tooltip window + // - shiftY: int in pixels (default 10) top shift of the tooltip window + // and All window options like showEffect: Element.show, hideEffect: Element.hide to remove animation + // default: {className: 'alphacube', width: 200, height: null, draggable: false, minimizable: false, maximizable: false} + + init: function(cssClassName, ajaxInfo, tooltipOptions) { + TooltipManager.options = Object.extend(TooltipManager.options, tooltipOptions || {}); + + cssClassName = TooltipManager.options.cssClassName || "tooltip"; + TooltipManager.ajaxInfo = ajaxInfo; + TooltipManager.elements = $$("." + cssClassName); + TooltipManager.elements.each(function(element) { + element = $(element) + var info = TooltipManager._getInfo(element); + if (info.ajax) { + element.ajaxId = info.id; + element.ajaxInfo = ajaxInfo; + } + else { + element.tooltipElement = $(info.id); + } + element.observe("mouseover", TooltipManager._mouseOver); + element.observe("mouseout", TooltipManager._mouseOut); + }); + Windows.addObserver(this); + }, + + addHTML: function(element, tooltipElement) { + element = $(element); + tooltipElement = $(tooltipElement); + element.tooltipElement = tooltipElement; + + element.observe("mouseover", TooltipManager._mouseOver); + element.observe("mouseout", TooltipManager._mouseOut); + }, + + addAjax: function(element, ajaxInfo) { + element = $(element); + element.ajaxInfo = ajaxInfo; + element.observe("mouseover", TooltipManager._mouseOver); + element.observe("mouseout", TooltipManager._mouseOut); + }, + + addURL: function(element, url, width, height) { + element = $(element); + element.url = url; + element.frameWidth = width; + element.frameHeight = height; + element.observe("mouseover", TooltipManager._mouseOver); + element.observe("mouseout", TooltipManager._mouseOut); + }, + + close: function() { + if (TooltipManager.tooltipWindow) + TooltipManager.tooltipWindow.hide(); + }, + + preloadImages: function(path, images, extension) { + if (!extension) + extension = ".gif"; + + //preload images + $A(images).each(function(i) { + var image = new Image(); + image.src= path + "/" + i + extension; + }); + }, + + _showTooltip: function(element) { + if (this.element == element) + return; + // Get original element + while (element && (!element.tooltipElement && !element.ajaxInfo && !element.url)) + element = element.parentNode; + this.element = element; + + TooltipManager.showTimer = null; + if (TooltipManager.hideTimer) + clearTimeout(TooltipManager.hideTimer); + + var position = Position.cumulativeOffset(element); + var dimension = element.getDimensions(); + + if (! this.tooltipWindow) + this.tooltipWindow = new Window("__tooltip__", TooltipManager.options); + + this.tooltipWindow.hide(); + this.tooltipWindow.setLocation(position[1] + dimension.height + TooltipManager.options.shiftY, position[0] + TooltipManager.options.shiftX); + + Event.observe(this.tooltipWindow.element, "mouseover", function(event) {TooltipManager._tooltipOver(event, element)}); + Event.observe(this.tooltipWindow.element, "mouseout", function(event) {TooltipManager._tooltipOut(event, element)}); + + // Reset width/height for computation + this.tooltipWindow.height = TooltipManager.options.height; + this.tooltipWindow.width = TooltipManager.options.width; + + // Ajax content + if (element.ajaxInfo) { + var p = element.ajaxInfo.options.parameters; + var saveParam = p; + + // Set by CSS + if (element.ajaxId) { + if (p) + p += "&id=" + element.ajaxId; + else + p = "id=" + element.ajaxId; + } + element.ajaxInfo.options.parameters = p || ""; + this.tooltipWindow.setHTMLContent(""); + this.tooltipWindow.setAjaxContent(element.ajaxInfo.url, element.ajaxInfo.options); + element.ajaxInfo.options.parameters = saveParam; + } + // URL content + else if (element.url) { + this.tooltipWindow.setURL(element.url); + this.tooltipWindow.setSize(element.frameWidth, element.frameHeight); + + // Set tooltip size + this.tooltipWindow.height = element.frameHeight; + this.tooltipWindow.width = element.frameWidth; + } + // HTML content + else + this.tooltipWindow.setHTMLContent(element.tooltipElement.innerHTML); + + if (!element.ajaxInfo) { + this.tooltipWindow.show(); + this.tooltipWindow.toFront(); + } + }, + + _hideTooltip: function(element) { + if (this.tooltipWindow) { + this.tooltipWindow.hide(); + this.element = null; + } + }, + + _mouseOver: function (event) { + var element = Event.element(event); + if (TooltipManager.showTimer) + clearTimeout(TooltipManager.showTimer); + + TooltipManager.showTimer = setTimeout(function() {TooltipManager._showTooltip(element)}, TooltipManager.options.delayOver) + }, + + _mouseOut: function(event) { + var element = Event.element(event); + if (TooltipManager.showTimer) { + clearTimeout(TooltipManager.showTimer); + TooltipManager.showTimer = null; + return; + } + if (TooltipManager.tooltipWindow) + TooltipManager.hideTimer = setTimeout(function() {TooltipManager._hideTooltip(element)}, TooltipManager.options.delayOut) + }, + + _tooltipOver: function(event, element) { + if (TooltipManager.hideTimer) { + clearTimeout(TooltipManager.hideTimer); + TooltipManager.hideTimer = null; + } + }, + + _tooltipOut: function(event, element) { + if (TooltipManager.hideTimer == null) + TooltipManager.hideTimer = setTimeout(function() {TooltipManager._hideTooltip(element)}, TooltipManager.options.delayOut) + }, + + _getInfo: function(element) { + // Find html_ for static content + var id = element.className.split(' ').detect(function(name) {return name.indexOf("html_") == 0}); + var ajax = true; + if (id) + ajax = false; + else + // Find ajax_ for ajax content + id = element.className.split(' ').detect(function(name) {return name.indexOf("ajax_") == 0}); + + id = id.substr(id.indexOf('_')+1, id.length) + return id ? {ajax: ajax, id: id} : null; + }, + + onBeforeShow: function(eventName, win) { + var top = parseFloat(win.getLocation().top); + var dim = win.element.getDimensions(); + + if (top + dim.height > TooltipManager._getScrollTop() + TooltipManager._getPageHeight()) { + var position = Position.cumulativeOffset(this.element); + + var top = position[1] - TooltipManager.options.shiftY - dim.height; + win.setLocation(top, position[0] + TooltipManager.options.shiftX) + } + }, + + _getPageWidth: function(){ + return window.innerWidth || document.documentElement.clientWidth || 0; + }, + + _getPageHeight: function(){ + return window.innerHeight || document.documentElement.clientHeight || 0; + }, + + _getScrollTop: function(){ + return document.documentElement.scrollTop || window.pageYOffset || 0; + }, + + _getScrollLeft: function(){ + return document.documentElement.scrollLeft || window.pageXOffset || 0; + } +}; diff --git a/htdocs/includes/scriptaculous/src/window/window.js b/htdocs/includes/scriptaculous/src/window/window.js new file mode 100644 index 00000000000..5fc2533f879 --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/window.js @@ -0,0 +1,1843 @@ +// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// VERSION 1.3 + +var Window = Class.create(); + +Window.keepMultiModalWindow = false; +Window.hasEffectLib = (typeof Effect != 'undefined'); +Window.resizeEffectDuration = 0.4; + +Window.prototype = { + // Constructor + // Available parameters : className, blurClassName, title, minWidth, minHeight, maxWidth, maxHeight, width, height, top, left, bottom, right, resizable, zIndex, opacity, recenterAuto, wiredDrag + // hideEffect, showEffect, showEffectOptions, hideEffectOptions, effectOptions, url, draggable, closable, minimizable, maximizable, parent, onload + // add all callbacks (if you do not use an observer) + // onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose + + initialize: function() { + var id; + var optionIndex = 0; + // For backward compatibility like win= new Window("id", {...}) instead of win = new Window({id: "id", ...}) + if (arguments.length > 0) { + if (typeof arguments[0] == "string" ) { + id = arguments[0]; + optionIndex = 1; + } + else + id = arguments[0] ? arguments[0].id : null; + } + + // Generate unique ID if not specified + if (!id) + id = "window_" + new Date().getTime(); + + if ($(id)) + alert("Window " + id + " is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor"); + + this.options = Object.extend({ + className: "dialog", + blurClassName: null, + minWidth: 100, + minHeight: 20, + resizable: true, + closable: true, + minimizable: true, + maximizable: true, + draggable: true, + userData: null, + showEffect: (Window.hasEffectLib ? Effect.Appear : Element.show), + hideEffect: (Window.hasEffectLib ? Effect.Fade : Element.hide), + showEffectOptions: {}, + hideEffectOptions: {}, + effectOptions: null, + parent: document.body, + title: " ", + url: null, + onload: Prototype.emptyFunction, + width: 200, + height: 300, + opacity: 1, + recenterAuto: true, + wiredDrag: false, + closeCallback: null, + destroyOnClose: false, + gridX: 1, + gridY: 1 + }, arguments[optionIndex] || {}); + if (this.options.blurClassName) + this.options.focusClassName = this.options.className; + + if (typeof this.options.top == "undefined" && typeof this.options.bottom == "undefined") + this.options.top = this._round(Math.random()*500, this.options.gridY); + if (typeof this.options.left == "undefined" && typeof this.options.right == "undefined") + this.options.left = this._round(Math.random()*500, this.options.gridX); + + if (this.options.effectOptions) { + Object.extend(this.options.hideEffectOptions, this.options.effectOptions); + Object.extend(this.options.showEffectOptions, this.options.effectOptions); + if (this.options.showEffect == Element.Appear) + this.options.showEffectOptions.to = this.options.opacity; + } + if (Window.hasEffectLib) { + if (this.options.showEffect == Effect.Appear) + this.options.showEffectOptions.to = this.options.opacity; + + if (this.options.hideEffect == Effect.Fade) + this.options.hideEffectOptions.from = this.options.opacity; + } + if (this.options.hideEffect == Element.hide) + this.options.hideEffect = function(){ Element.hide(this.element); if (this.options.destroyOnClose) this.destroy(); }.bind(this) + + if (this.options.parent != document.body) + this.options.parent = $(this.options.parent); + + this.element = this._createWindow(id); + this.element.win = this; + + // Bind event listener + this.eventMouseDown = this._initDrag.bindAsEventListener(this); + this.eventMouseUp = this._endDrag.bindAsEventListener(this); + this.eventMouseMove = this._updateDrag.bindAsEventListener(this); + this.eventOnLoad = this._getWindowBorderSize.bindAsEventListener(this); + this.eventMouseDownContent = this.toFront.bindAsEventListener(this); + this.eventResize = this._recenter.bindAsEventListener(this); + + this.topbar = $(this.element.id + "_top"); + this.bottombar = $(this.element.id + "_bottom"); + this.content = $(this.element.id + "_content"); + + Event.observe(this.topbar, "mousedown", this.eventMouseDown); + Event.observe(this.bottombar, "mousedown", this.eventMouseDown); + Event.observe(this.content, "mousedown", this.eventMouseDownContent); + Event.observe(window, "load", this.eventOnLoad); + Event.observe(window, "resize", this.eventResize); + Event.observe(window, "scroll", this.eventResize); + Event.observe(this.options.parent, "scroll", this.eventResize); + + if (this.options.draggable) { + var that = this; + [this.topbar, this.topbar.up().previous(), this.topbar.up().next()].each(function(element) { + element.observe("mousedown", that.eventMouseDown); + element.addClassName("top_draggable"); + }); + [this.bottombar.up(), this.bottombar.up().previous(), this.bottombar.up().next()].each(function(element) { + element.observe("mousedown", that.eventMouseDown); + element.addClassName("bottom_draggable"); + }); + + } + + if (this.options.resizable) { + this.sizer = $(this.element.id + "_sizer"); + Event.observe(this.sizer, "mousedown", this.eventMouseDown); + } + + this.useLeft = null; + this.useTop = null; + if (typeof this.options.left != "undefined") { + this.element.setStyle({left: parseFloat(this.options.left) + 'px'}); + this.useLeft = true; + } + else { + this.element.setStyle({right: parseFloat(this.options.right) + 'px'}); + this.useLeft = false; + } + + if (typeof this.options.top != "undefined") { + this.element.setStyle({top: parseFloat(this.options.top) + 'px'}); + this.useTop = true; + } + else { + this.element.setStyle({bottom: parseFloat(this.options.bottom) + 'px'}); + this.useTop = false; + } + + this.storedLocation = null; + + this.setOpacity(this.options.opacity); + if (this.options.zIndex) + this.setZIndex(this.options.zIndex) + + if (this.options.destroyOnClose) + this.setDestroyOnClose(true); + + this._getWindowBorderSize(); + this.width = this.options.width; + this.height = this.options.height; + this.visible = false; + + this.constraint = false; + this.constraintPad = {top: 0, left:0, bottom:0, right:0}; + + if (this.width && this.height) + this.setSize(this.options.width, this.options.height); + this.setTitle(this.options.title) + Windows.register(this); + }, + + // Destructor + destroy: function() { + this._notify("onDestroy"); + Event.stopObserving(this.topbar, "mousedown", this.eventMouseDown); + Event.stopObserving(this.bottombar, "mousedown", this.eventMouseDown); + Event.stopObserving(this.content, "mousedown", this.eventMouseDownContent); + + Event.stopObserving(window, "load", this.eventOnLoad); + Event.stopObserving(window, "resize", this.eventResize); + Event.stopObserving(window, "scroll", this.eventResize); + + Event.stopObserving(this.content, "load", this.options.onload); + + if (this._oldParent) { + var content = this.getContent(); + var originalContent = null; + for(var i = 0; i < content.childNodes.length; i++) { + originalContent = content.childNodes[i]; + if (originalContent.nodeType == 1) + break; + originalContent = null; + } + if (originalContent) + this._oldParent.appendChild(originalContent); + this._oldParent = null; + } + + if (this.sizer) + Event.stopObserving(this.sizer, "mousedown", this.eventMouseDown); + + if (this.options.url) + this.content.src = null + + if(this.iefix) + Element.remove(this.iefix); + + Element.remove(this.element); + Windows.unregister(this); + }, + + // Sets close callback, if it sets, it should return true to be able to close the window. + setCloseCallback: function(callback) { + this.options.closeCallback = callback; + }, + + // Gets window content + getContent: function () { + return this.content; + }, + + // Sets the content with an element id + setContent: function(id, autoresize, autoposition) { + var element = $(id); + if (null == element) throw "Unable to find element '" + id + "' in DOM"; + this._oldParent = element.parentNode; + + var d = null; + var p = null; + + if (autoresize) + d = Element.getDimensions(element); + if (autoposition) + p = Position.cumulativeOffset(element); + + var content = this.getContent(); + // Clear HTML (and even iframe) + this.setHTMLContent(""); + content = this.getContent(); + + content.appendChild(element); + element.show(); + if (autoresize) + this.setSize(d.width, d.height); + if (autoposition) + this.setLocation(p[1] - this.heightN, p[0] - this.widthW); + }, + + setHTMLContent: function(html) { + // It was an url (iframe), recreate a div content instead of iframe content + if (this.options.url) { + this.content.src = null; + this.options.url = null; + + var content ="<div id=\"" + this.getId() + "_content\" class=\"" + this.options.className + "_content\"> </div>"; + $(this.getId() +"_table_content").innerHTML = content; + + this.content = $(this.element.id + "_content"); + } + + this.getContent().innerHTML = html; + }, + + setAjaxContent: function(url, options, showCentered, showModal) { + this.showFunction = showCentered ? "showCenter" : "show"; + this.showModal = showModal || false; + + options = options || {}; + + // Clear HTML (and even iframe) + this.setHTMLContent(""); + + this.onComplete = options.onComplete; + if (! this._onCompleteHandler) + this._onCompleteHandler = this._setAjaxContent.bind(this); + options.onComplete = this._onCompleteHandler; + + new Ajax.Request(url, options); + options.onComplete = this.onComplete; + }, + + _setAjaxContent: function(originalRequest) { + Element.update(this.getContent(), originalRequest.responseText); + if (this.onComplete) + this.onComplete(originalRequest); + this.onComplete = null; + this[this.showFunction](this.showModal) + }, + + setURL: function(url) { + // Not an url content, change div to iframe + if (this.options.url) + this.content.src = null; + this.options.url = url; + var content= "<iframe frameborder='0' name='" + this.getId() + "_content' id='" + this.getId() + "_content' src='" + url + "' width='" + this.width + "' height='" + this.height + "'> </iframe>"; + $(this.getId() +"_table_content").innerHTML = content; + + this.content = $(this.element.id + "_content"); + }, + + getURL: function() { + return this.options.url ? this.options.url : null; + }, + + refresh: function() { + if (this.options.url) + $(this.element.getAttribute('id') + '_content').src = this.options.url; + }, + + // Stores position/size in a cookie, by default named with window id + setCookie: function(name, expires, path, domain, secure) { + name = name || this.element.id; + this.cookie = [name, expires, path, domain, secure]; + + // Get cookie + var value = WindowUtilities.getCookie(name) + // If exists + if (value) { + var values = value.split(','); + var x = values[0].split(':'); + var y = values[1].split(':'); + + var w = parseFloat(values[2]), h = parseFloat(values[3]); + var mini = values[4]; + var maxi = values[5]; + + this.setSize(w, h); + if (mini == "true") + this.doMinimize = true; // Minimize will be done at onload window event + else if (maxi == "true") + this.doMaximize = true; // Maximize will be done at onload window event + + this.useLeft = x[0] == "l"; + this.useTop = y[0] == "t"; + + this.element.setStyle(this.useLeft ? {left: x[1]} : {right: x[1]}); + this.element.setStyle(this.useTop ? {top: y[1]} : {bottom: y[1]}); + } + }, + + // Gets window ID + getId: function() { + return this.element.id; + }, + + // Detroys itself when closing + setDestroyOnClose: function() { + this.options.destroyOnClose = true; + }, + + setConstraint: function(bool, padding) { + this.constraint = bool; + this.constraintPad = Object.extend(this.constraintPad, padding || {}); + // Reset location to apply constraint + if (this.useTop && this.useLeft) + this.setLocation(parseFloat(this.element.style.top), parseFloat(this.element.style.left)); + }, + + // initDrag event + + _initDrag: function(event) { + // No resize on minimized window + if (Event.element(event) == this.sizer && this.isMinimized()) + return; + + // No move on maximzed window + if (Event.element(event) != this.sizer && this.isMaximized()) + return; + + if (Prototype.Browser.IE && this.heightN == 0) + this._getWindowBorderSize(); + + // Get pointer X,Y + this.pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)]; + if (this.options.wiredDrag) + this.currentDrag = this._createWiredElement(); + else + this.currentDrag = this.element; + + // Resize + if (Event.element(event) == this.sizer) { + this.doResize = true; + this.widthOrg = this.width; + this.heightOrg = this.height; + this.bottomOrg = parseFloat(this.element.getStyle('bottom')); + this.rightOrg = parseFloat(this.element.getStyle('right')); + this._notify("onStartResize"); + } + else { + this.doResize = false; + + // Check if click on close button, + var closeButton = $(this.getId() + '_close'); + if (closeButton && Position.within(closeButton, this.pointer[0], this.pointer[1])) { + this.currentDrag = null; + return; + } + + this.toFront(); + + if (! this.options.draggable) + return; + this._notify("onStartMove"); + } + // Register global event to capture mouseUp and mouseMove + Event.observe(document, "mouseup", this.eventMouseUp, false); + Event.observe(document, "mousemove", this.eventMouseMove, false); + + // Add an invisible div to keep catching mouse event over iframes + WindowUtilities.disableScreen('__invisible__', '__invisible__', this.overlayOpacity); + + // Stop selection while dragging + document.body.ondrag = function () { return false; }; + document.body.onselectstart = function () { return false; }; + + this.currentDrag.show(); + Event.stop(event); + }, + + _round: function(val, round) { + return round == 1 ? val : val = Math.floor(val / round) * round; + }, + + // updateDrag event + _updateDrag: function(event) { + var pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)]; + var dx = pointer[0] - this.pointer[0]; + var dy = pointer[1] - this.pointer[1]; + + // Resize case, update width/height + if (this.doResize) { + var w = this.widthOrg + dx; + var h = this.heightOrg + dy; + + dx = this.width - this.widthOrg + dy = this.height - this.heightOrg + + // Check if it's a right position, update it to keep upper-left corner at the same position + if (this.useLeft) + w = this._updateWidthConstraint(w) + else + this.currentDrag.setStyle({right: (this.rightOrg -dx) + 'px'}); + // Check if it's a bottom position, update it to keep upper-left corner at the same position + if (this.useTop) + h = this._updateHeightConstraint(h) + else + this.currentDrag.setStyle({bottom: (this.bottomOrg -dy) + 'px'}); + + this.setSize(w , h); + this._notify("onResize"); + } + // Move case, update top/left + else { + this.pointer = pointer; + + if (this.useLeft) { + var left = parseFloat(this.currentDrag.getStyle('left')) + dx; + var newLeft = this._updateLeftConstraint(left); + // Keep mouse pointer correct + this.pointer[0] += newLeft-left; + this.currentDrag.setStyle({left: newLeft + 'px'}); + } + else + this.currentDrag.setStyle({right: parseFloat(this.currentDrag.getStyle('right')) - dx + 'px'}); + + if (this.useTop) { + var top = parseFloat(this.currentDrag.getStyle('top')) + dy; + var newTop = this._updateTopConstraint(top); + // Keep mouse pointer correct + this.pointer[1] += newTop - top; + this.currentDrag.setStyle({top: newTop + 'px'}); + } + else + this.currentDrag.setStyle({bottom: parseFloat(this.currentDrag.getStyle('bottom')) - dy + 'px'}); + + this._notify("onMove"); + } + if (this.iefix) + this._fixIEOverlapping(); + + this._removeStoreLocation(); + Event.stop(event); + }, + + // endDrag callback + _endDrag: function(event) { + // Remove temporary div over iframes + WindowUtilities.enableScreen('__invisible__'); + + if (this.doResize) + this._notify("onEndResize"); + else + this._notify("onEndMove"); + + // Release event observing + Event.stopObserving(document, "mouseup", this.eventMouseUp,false); + Event.stopObserving(document, "mousemove", this.eventMouseMove, false); + + Event.stop(event); + + this._hideWiredElement(); + + // Store new location/size if need be + this._saveCookie() + + // Restore selection + document.body.ondrag = null; + document.body.onselectstart = null; + }, + + _updateLeftConstraint: function(left) { + if (this.constraint && this.useLeft && this.useTop) { + var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width; + + if (left < this.constraintPad.left) + left = this.constraintPad.left; + if (left + this.width + this.widthE + this.widthW > width - this.constraintPad.right) + left = width - this.constraintPad.right - this.width - this.widthE - this.widthW; + } + return left; + }, + + _updateTopConstraint: function(top) { + if (this.constraint && this.useLeft && this.useTop) { + var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height; + + var h = this.height + this.heightN + this.heightS; + + if (top < this.constraintPad.top) + top = this.constraintPad.top; + if (top + h > height - this.constraintPad.bottom) + top = height - this.constraintPad.bottom - h; + } + return top; + }, + + _updateWidthConstraint: function(w) { + if (this.constraint && this.useLeft && this.useTop) { + var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width; + var left = parseFloat(this.element.getStyle("left")); + + if (left + w + this.widthE + this.widthW > width - this.constraintPad.right) + w = width - this.constraintPad.right - left - this.widthE - this.widthW; + } + return w; + }, + + _updateHeightConstraint: function(h) { + if (this.constraint && this.useLeft && this.useTop) { + var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height; + var top = parseFloat(this.element.getStyle("top")); + + if (top + h + this.heightN + this.heightS > height - this.constraintPad.bottom) + h = height - this.constraintPad.bottom - top - this.heightN - this.heightS; + } + return h; + }, + + + // Creates HTML window code + _createWindow: function(id) { + var className = this.options.className; + var win = document.createElement("div"); + win.setAttribute('id', id); + win.className = "dialog"; + + var content; + if (this.options.url) + content= "<iframe frameborder=\"0\" name=\"" + id + "_content\" id=\"" + id + "_content\" src=\"" + this.options.url + "\"> </iframe>"; + else + content ="<div id=\"" + id + "_content\" class=\"" +className + "_content\"> </div>"; + + var closeDiv = this.options.closable ? "<div class='"+ className +"_close' id='"+ id +"_close' onclick='Windows.close(\""+ id +"\", event)'> </div>" : ""; + var minDiv = this.options.minimizable ? "<div class='"+ className + "_minimize' id='"+ id +"_minimize' onclick='Windows.minimize(\""+ id +"\", event)'> </div>" : ""; + var maxDiv = this.options.maximizable ? "<div class='"+ className + "_maximize' id='"+ id +"_maximize' onclick='Windows.maximize(\""+ id +"\", event)'> </div>" : ""; + var seAttributes = this.options.resizable ? "class='" + className + "_sizer' id='" + id + "_sizer'" : "class='" + className + "_se'"; + var blank = "../themes/default/blank.gif"; + + win.innerHTML = closeDiv + minDiv + maxDiv + "\ + <table id='"+ id +"_row1' class=\"top table_window\">\ + <tr>\ + <td class='"+ className +"_nw'></td>\ + <td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\ + <td class='"+ className +"_ne'></td>\ + </tr>\ + </table>\ + <table id='"+ id +"_row2' class=\"mid table_window\">\ + <tr>\ + <td class='"+ className +"_w'></td>\ + <td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\ + <td class='"+ className +"_e'></td>\ + </tr>\ + </table>\ + <table id='"+ id +"_row3' class=\"bot table_window\">\ + <tr>\ + <td class='"+ className +"_sw'></td>\ + <td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>\ + <td " + seAttributes + "></td>\ + </tr>\ + </table>\ + "; + Element.hide(win); + this.options.parent.insertBefore(win, this.options.parent.firstChild); + Event.observe($(id + "_content"), "load", this.options.onload); + return win; + }, + + + changeClassName: function(newClassName) { + var className = this.options.className; + var id = this.getId(); + $A(["_close", "_minimize", "_maximize", "_sizer", "_content"]).each(function(value) { this._toggleClassName($(id + value), className + value, newClassName + value) }.bind(this)); + this._toggleClassName($(id + "_top"), className + "_title", newClassName + "_title"); + $$("#" + id + " td").each(function(td) {td.className = td.className.sub(className,newClassName); }); + this.options.className = newClassName; + }, + + _toggleClassName: function(element, oldClassName, newClassName) { + if (element) { + element.removeClassName(oldClassName); + element.addClassName(newClassName); + } + }, + + // Sets window location + setLocation: function(top, left) { + top = this._updateTopConstraint(top); + left = this._updateLeftConstraint(left); + + var e = this.currentDrag || this.element; + e.setStyle({top: top + 'px'}); + e.setStyle({left: left + 'px'}); + + this.useLeft = true; + this.useTop = true; + }, + + getLocation: function() { + var location = {}; + if (this.useTop) + location = Object.extend(location, {top: this.element.getStyle("top")}); + else + location = Object.extend(location, {bottom: this.element.getStyle("bottom")}); + if (this.useLeft) + location = Object.extend(location, {left: this.element.getStyle("left")}); + else + location = Object.extend(location, {right: this.element.getStyle("right")}); + + return location; + }, + + // Gets window size + getSize: function() { + return {width: this.width, height: this.height}; + }, + + // Sets window size + setSize: function(width, height, useEffect) { + width = parseFloat(width); + height = parseFloat(height); + + // Check min and max size + if (!this.minimized && width < this.options.minWidth) + width = this.options.minWidth; + + if (!this.minimized && height < this.options.minHeight) + height = this.options.minHeight; + + if (this.options. maxHeight && height > this.options. maxHeight) + height = this.options. maxHeight; + + if (this.options. maxWidth && width > this.options. maxWidth) + width = this.options. maxWidth; + + + if (this.useTop && this.useLeft && Window.hasEffectLib && Effect.ResizeWindow && useEffect) { + new Effect.ResizeWindow(this, null, null, width, height, {duration: Window.resizeEffectDuration}); + } else { + this.width = width; + this.height = height; + var e = this.currentDrag ? this.currentDrag : this.element; + + e.setStyle({width: width + this.widthW + this.widthE + "px"}) + e.setStyle({height: height + this.heightN + this.heightS + "px"}) + + // Update content size + if (!this.currentDrag || this.currentDrag == this.element) { + var content = $(this.element.id + '_content'); + content.setStyle({height: height + 'px'}); + content.setStyle({width: width + 'px'}); + } + } + }, + + updateHeight: function() { + this.setSize(this.width, this.content.scrollHeight, true); + }, + + updateWidth: function() { + this.setSize(this.content.scrollWidth, this.height, true); + }, + + // Brings window to front + toFront: function() { + if (this.element.style.zIndex < Windows.maxZIndex) + this.setZIndex(Windows.maxZIndex + 1); + if (this.iefix) + this._fixIEOverlapping(); + }, + + getBounds: function(insideOnly) { + if (! this.width || !this.height || !this.visible) + this.computeBounds(); + var w = this.width; + var h = this.height; + + if (!insideOnly) { + w += this.widthW + this.widthE; + h += this.heightN + this.heightS; + } + var bounds = Object.extend(this.getLocation(), {width: w + "px", height: h + "px"}); + return bounds; + }, + + computeBounds: function() { + if (! this.width || !this.height) { + var size = WindowUtilities._computeSize(this.content.innerHTML, this.content.id, this.width, this.height, 0, this.options.className) + if (this.height) + this.width = size + 5 + else + this.height = size + 5 + } + + this.setSize(this.width, this.height); + if (this.centered) + this._center(this.centerTop, this.centerLeft); + }, + + // Displays window modal state or not + show: function(modal) { + this.visible = true; + if (modal) { + // Hack for Safari !! + if (typeof this.overlayOpacity == "undefined") { + var that = this; + setTimeout(function() {that.show(modal)}, 10); + return; + } + Windows.addModalWindow(this); + + this.modal = true; + this.setZIndex(Windows.maxZIndex + 1); + Windows.unsetOverflow(this); + } + else + if (!this.element.style.zIndex) + this.setZIndex(Windows.maxZIndex + 1); + + // To restore overflow if need be + if (this.oldStyle) + this.getContent().setStyle({overflow: this.oldStyle}); + + this.computeBounds(); + + this._notify("onBeforeShow"); + if (this.options.showEffect != Element.show && this.options.showEffectOptions) + this.options.showEffect(this.element, this.options.showEffectOptions); + else + this.options.showEffect(this.element); + + this._checkIEOverlapping(); + WindowUtilities.focusedWindow = this + this._notify("onShow"); + }, + + // Displays window modal state or not at the center of the page + showCenter: function(modal, top, left) { + this.centered = true; + this.centerTop = top; + this.centerLeft = left; + + this.show(modal); + }, + + isVisible: function() { + return this.visible; + }, + + _center: function(top, left) { + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + var pageSize = WindowUtilities.getPageSize(this.options.parent); + if (typeof top == "undefined") + top = (pageSize.windowHeight - (this.height + this.heightN + this.heightS))/2; + top += windowScroll.top + + if (typeof left == "undefined") + left = (pageSize.windowWidth - (this.width + this.widthW + this.widthE))/2; + left += windowScroll.left + this.setLocation(top, left); + this.toFront(); + }, + + _recenter: function(event) { + if (this.centered) { + var pageSize = WindowUtilities.getPageSize(this.options.parent); + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + + // Check for this stupid IE that sends dumb events + if (this.pageSize && this.pageSize.windowWidth == pageSize.windowWidth && this.pageSize.windowHeight == pageSize.windowHeight && + this.windowScroll.left == windowScroll.left && this.windowScroll.top == windowScroll.top) + return; + this.pageSize = pageSize; + this.windowScroll = windowScroll; + // set height of Overlay to take up whole page and show + if ($('overlay_modal')) + $('overlay_modal').setStyle({height: (pageSize.pageHeight + 'px')}); + + if (this.options.recenterAuto) + this._center(this.centerTop, this.centerLeft); + } + }, + + // Hides window + hide: function() { + this.visible = false; + if (this.modal) { + Windows.removeModalWindow(this); + Windows.resetOverflow(); + } + // To avoid bug on scrolling bar + this.oldStyle = this.getContent().getStyle('overflow') || "auto" + this.getContent().setStyle({overflow: "hidden"}); + + this.options.hideEffect(this.element, this.options.hideEffectOptions); + + if(this.iefix) + this.iefix.hide(); + + if (!this.doNotNotifyHide) + this._notify("onHide"); + }, + + close: function() { + // Asks closeCallback if exists + if (this.visible) { + if (this.options.closeCallback && ! this.options.closeCallback(this)) + return; + + if (this.options.destroyOnClose) { + var destroyFunc = this.destroy.bind(this); + if (this.options.hideEffectOptions.afterFinish) { + var func = this.options.hideEffectOptions.afterFinish; + this.options.hideEffectOptions.afterFinish = function() {func();destroyFunc() } + } + else + this.options.hideEffectOptions.afterFinish = function() {destroyFunc() } + } + Windows.updateFocusedWindow(); + + this.doNotNotifyHide = true; + this.hide(); + this.doNotNotifyHide = false; + this._notify("onClose"); + } + }, + + minimize: function() { + if (this.resizing) + return; + + var r2 = $(this.getId() + "_row2"); + + if (!this.minimized) { + this.minimized = true; + + var dh = r2.getDimensions().height; + this.r2Height = dh; + var h = this.element.getHeight() - dh; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, null, null, null, this.height -dh, {duration: Window.resizeEffectDuration}); + } else { + this.height -= dh; + this.element.setStyle({height: h + "px"}); + r2.hide(); + } + + if (! this.useTop) { + var bottom = parseFloat(this.element.getStyle('bottom')); + this.element.setStyle({bottom: (bottom + dh) + 'px'}); + } + } + else { + this.minimized = false; + + var dh = this.r2Height; + this.r2Height = null; + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, null, null, null, this.height + dh, {duration: Window.resizeEffectDuration}); + } + else { + var h = this.element.getHeight() + dh; + this.height += dh; + this.element.setStyle({height: h + "px"}) + r2.show(); + } + if (! this.useTop) { + var bottom = parseFloat(this.element.getStyle('bottom')); + this.element.setStyle({bottom: (bottom - dh) + 'px'}); + } + this.toFront(); + } + this._notify("onMinimize"); + + // Store new location/size if need be + this._saveCookie() + }, + + maximize: function() { + if (this.isMinimized() || this.resizing) + return; + + if (Prototype.Browser.IE && this.heightN == 0) + this._getWindowBorderSize(); + + if (this.storedLocation != null) { + this._restoreLocation(); + if(this.iefix) + this.iefix.hide(); + } + else { + this._storeLocation(); + Windows.unsetOverflow(this); + + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + var pageSize = WindowUtilities.getPageSize(this.options.parent); + var left = windowScroll.left; + var top = windowScroll.top; + + if (this.options.parent != document.body) { + windowScroll = {top:0, left:0, bottom:0, right:0}; + var dim = this.options.parent.getDimensions(); + pageSize.windowWidth = dim.width; + pageSize.windowHeight = dim.height; + top = 0; + left = 0; + } + + if (this.constraint) { + pageSize.windowWidth -= Math.max(0, this.constraintPad.left) + Math.max(0, this.constraintPad.right); + pageSize.windowHeight -= Math.max(0, this.constraintPad.top) + Math.max(0, this.constraintPad.bottom); + left += Math.max(0, this.constraintPad.left); + top += Math.max(0, this.constraintPad.top); + } + + var width = pageSize.windowWidth - this.widthW - this.widthE; + var height= pageSize.windowHeight - this.heightN - this.heightS; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, top, left, width, height, {duration: Window.resizeEffectDuration}); + } + else { + this.setSize(width, height); + this.element.setStyle(this.useLeft ? {left: left} : {right: left}); + this.element.setStyle(this.useTop ? {top: top} : {bottom: top}); + } + + this.toFront(); + if (this.iefix) + this._fixIEOverlapping(); + } + this._notify("onMaximize"); + + // Store new location/size if need be + this._saveCookie() + }, + + isMinimized: function() { + return this.minimized; + }, + + isMaximized: function() { + return (this.storedLocation != null); + }, + + setOpacity: function(opacity) { + if (Element.setOpacity) + Element.setOpacity(this.element, opacity); + }, + + setZIndex: function(zindex) { + this.element.setStyle({zIndex: zindex}); + Windows.updateZindex(zindex, this); + }, + + setTitle: function(newTitle) { + if (!newTitle || newTitle == "") + newTitle = " "; + + Element.update(this.element.id + '_top', newTitle); + }, + + getTitle: function() { + return $(this.element.id + '_top').innerHTML; + }, + + setStatusBar: function(element) { + var statusBar = $(this.getId() + "_bottom"); + + if (typeof(element) == "object") { + if (this.bottombar.firstChild) + this.bottombar.replaceChild(element, this.bottombar.firstChild); + else + this.bottombar.appendChild(element); + } + else + this.bottombar.innerHTML = element; + }, + + _checkIEOverlapping: function() { + if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && (navigator.userAgent.indexOf('Opera')<0) && (this.element.getStyle('position')=='absolute')) { + new Insertion.After(this.element.id, '<iframe id="' + this.element.id + '_iefix" '+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>'); + this.iefix = $(this.element.id+'_iefix'); + } + if(this.iefix) + setTimeout(this._fixIEOverlapping.bind(this), 50); + }, + + _fixIEOverlapping: function() { + Position.clone(this.element, this.iefix); + this.iefix.style.zIndex = this.element.style.zIndex - 1; + this.iefix.show(); + }, + + _getWindowBorderSize: function(event) { + // Hack to get real window border size!! + var div = this._createHiddenDiv(this.options.className + "_n") + this.heightN = Element.getDimensions(div).height; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_s") + this.heightS = Element.getDimensions(div).height; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_e") + this.widthE = Element.getDimensions(div).width; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_w") + this.widthW = Element.getDimensions(div).width; + div.parentNode.removeChild(div); + + var div = document.createElement("div"); + div.className = "overlay_" + this.options.className ; + document.body.appendChild(div); + //alert("no timeout:\nopacity: " + div.getStyle("opacity") + "\nwidth: " + document.defaultView.getComputedStyle(div, null).width); + var that = this; + + // Workaround for Safari!! + setTimeout(function() {that.overlayOpacity = ($(div).getStyle("opacity")); div.parentNode.removeChild(div);}, 10); + + // Workaround for IE!! + if (Prototype.Browser.IE) { + this.heightS = $(this.getId() +"_row3").getDimensions().height; + this.heightN = $(this.getId() +"_row1").getDimensions().height; + } + + // Safari size fix + if (Prototype.Browser.WebKit && Prototype.Browser.WebKitVersion < 420) + this.setSize(this.width, this.height); + if (this.doMaximize) + this.maximize(); + if (this.doMinimize) + this.minimize(); + }, + + _createHiddenDiv: function(className) { + var objBody = document.body; + var win = document.createElement("div"); + win.setAttribute('id', this.element.id+ "_tmp"); + win.className = className; + win.style.display = 'none'; + win.innerHTML = ''; + objBody.insertBefore(win, objBody.firstChild); + return win; + }, + + _storeLocation: function() { + if (this.storedLocation == null) { + this.storedLocation = {useTop: this.useTop, useLeft: this.useLeft, + top: this.element.getStyle('top'), bottom: this.element.getStyle('bottom'), + left: this.element.getStyle('left'), right: this.element.getStyle('right'), + width: this.width, height: this.height }; + } + }, + + _restoreLocation: function() { + if (this.storedLocation != null) { + this.useLeft = this.storedLocation.useLeft; + this.useTop = this.storedLocation.useTop; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) + new Effect.ResizeWindow(this, this.storedLocation.top, this.storedLocation.left, this.storedLocation.width, this.storedLocation.height, {duration: Window.resizeEffectDuration}); + else { + this.element.setStyle(this.useLeft ? {left: this.storedLocation.left} : {right: this.storedLocation.right}); + this.element.setStyle(this.useTop ? {top: this.storedLocation.top} : {bottom: this.storedLocation.bottom}); + this.setSize(this.storedLocation.width, this.storedLocation.height); + } + + Windows.resetOverflow(); + this._removeStoreLocation(); + } + }, + + _removeStoreLocation: function() { + this.storedLocation = null; + }, + + _saveCookie: function() { + if (this.cookie) { + var value = ""; + if (this.useLeft) + value += "l:" + (this.storedLocation ? this.storedLocation.left : this.element.getStyle('left')) + else + value += "r:" + (this.storedLocation ? this.storedLocation.right : this.element.getStyle('right')) + if (this.useTop) + value += ",t:" + (this.storedLocation ? this.storedLocation.top : this.element.getStyle('top')) + else + value += ",b:" + (this.storedLocation ? this.storedLocation.bottom :this.element.getStyle('bottom')) + + value += "," + (this.storedLocation ? this.storedLocation.width : this.width); + value += "," + (this.storedLocation ? this.storedLocation.height : this.height); + value += "," + this.isMinimized(); + value += "," + this.isMaximized(); + WindowUtilities.setCookie(value, this.cookie) + } + }, + + _createWiredElement: function() { + if (! this.wiredElement) { + if (Prototype.Browser.IE) + this._getWindowBorderSize(); + var div = document.createElement("div"); + div.className = "wired_frame " + this.options.className + "_wired_frame"; + + div.style.position = 'absolute'; + this.options.parent.insertBefore(div, this.options.parent.firstChild); + this.wiredElement = $(div); + } + if (this.useLeft) + this.wiredElement.setStyle({left: this.element.getStyle('left')}); + else + this.wiredElement.setStyle({right: this.element.getStyle('right')}); + + if (this.useTop) + this.wiredElement.setStyle({top: this.element.getStyle('top')}); + else + this.wiredElement.setStyle({bottom: this.element.getStyle('bottom')}); + + var dim = this.element.getDimensions(); + this.wiredElement.setStyle({width: dim.width + "px", height: dim.height +"px"}); + + this.wiredElement.setStyle({zIndex: Windows.maxZIndex+30}); + return this.wiredElement; + }, + + _hideWiredElement: function() { + if (! this.wiredElement || ! this.currentDrag) + return; + if (this.currentDrag == this.element) + this.currentDrag = null; + else { + if (this.useLeft) + this.element.setStyle({left: this.currentDrag.getStyle('left')}); + else + this.element.setStyle({right: this.currentDrag.getStyle('right')}); + + if (this.useTop) + this.element.setStyle({top: this.currentDrag.getStyle('top')}); + else + this.element.setStyle({bottom: this.currentDrag.getStyle('bottom')}); + + this.currentDrag.hide(); + this.currentDrag = null; + if (this.doResize) + this.setSize(this.width, this.height); + } + }, + + _notify: function(eventName) { + if (this.options[eventName]) + this.options[eventName](this); + else + Windows.notify(eventName, this); + } +}; + +// Windows containers, register all page windows +var Windows = { + windows: [], + modalWindows: [], + observers: [], + focusedWindow: null, + maxZIndex: 0, + overlayShowEffectOptions: {duration: 0.5}, + overlayHideEffectOptions: {duration: 0.5}, + + addObserver: function(observer) { + this.removeObserver(observer); + this.observers.push(observer); + }, + + removeObserver: function(observer) { + this.observers = this.observers.reject( function(o) { return o==observer }); + }, + + // onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose + notify: function(eventName, win) { + this.observers.each( function(o) {if(o[eventName]) o[eventName](eventName, win);}); + }, + + // Gets window from its id + getWindow: function(id) { + return this.windows.detect(function(d) { return d.getId() ==id }); + }, + + // Gets the last focused window + getFocusedWindow: function() { + return this.focusedWindow; + }, + + updateFocusedWindow: function() { + this.focusedWindow = this.windows.length >=2 ? this.windows[this.windows.length-2] : null; + }, + + // Registers a new window (called by Windows constructor) + register: function(win) { + this.windows.push(win); + }, + + // Add a modal window in the stack + addModalWindow: function(win) { + // Disable screen if first modal window + if (this.modalWindows.length == 0) { + WindowUtilities.disableScreen(win.options.className, 'overlay_modal', win.overlayOpacity, win.getId(), win.options.parent); + } + else { + // Move overlay over all windows + if (Window.keepMultiModalWindow) { + $('overlay_modal').style.zIndex = Windows.maxZIndex + 1; + Windows.maxZIndex += 1; + WindowUtilities._hideSelect(this.modalWindows.last().getId()); + } + // Hide current modal window + else + this.modalWindows.last().element.hide(); + // Fucking IE select issue + WindowUtilities._showSelect(win.getId()); + } + this.modalWindows.push(win); + }, + + removeModalWindow: function(win) { + this.modalWindows.pop(); + + // No more modal windows + if (this.modalWindows.length == 0) + WindowUtilities.enableScreen(); + else { + if (Window.keepMultiModalWindow) { + this.modalWindows.last().toFront(); + WindowUtilities._showSelect(this.modalWindows.last().getId()); + } + else + this.modalWindows.last().element.show(); + } + }, + + // Registers a new window (called by Windows constructor) + register: function(win) { + this.windows.push(win); + }, + + // Unregisters a window (called by Windows destructor) + unregister: function(win) { + this.windows = this.windows.reject(function(d) { return d==win }); + }, + + // Closes all windows + closeAll: function() { + this.windows.each( function(w) {Windows.close(w.getId())} ); + }, + + closeAllModalWindows: function() { + WindowUtilities.enableScreen(); + this.modalWindows.each( function(win) {if (win) win.close()}); + }, + + // Minimizes a window with its id + minimize: function(id, event) { + var win = this.getWindow(id) + if (win && win.visible) + win.minimize(); + Event.stop(event); + }, + + // Maximizes a window with its id + maximize: function(id, event) { + var win = this.getWindow(id) + if (win && win.visible) + win.maximize(); + Event.stop(event); + }, + + // Closes a window with its id + close: function(id, event) { + var win = this.getWindow(id); + if (win) + win.close(); + if (event) + Event.stop(event); + }, + + blur: function(id) { + var win = this.getWindow(id); + if (!win) + return; + if (win.options.blurClassName) + win.changeClassName(win.options.blurClassName); + if (this.focusedWindow == win) + this.focusedWindow = null; + win._notify("onBlur"); + }, + + focus: function(id) { + var win = this.getWindow(id); + if (!win) + return; + if (this.focusedWindow) + this.blur(this.focusedWindow.getId()) + + if (win.options.focusClassName) + win.changeClassName(win.options.focusClassName); + this.focusedWindow = win; + win._notify("onFocus"); + }, + + unsetOverflow: function(except) { + this.windows.each(function(d) { d.oldOverflow = d.getContent().getStyle("overflow") || "auto" ; d.getContent().setStyle({overflow: "hidden"}) }); + if (except && except.oldOverflow) + except.getContent().setStyle({overflow: except.oldOverflow}); + }, + + resetOverflow: function() { + this.windows.each(function(d) { if (d.oldOverflow) d.getContent().setStyle({overflow: d.oldOverflow}) }); + }, + + updateZindex: function(zindex, win) { + if (zindex > this.maxZIndex) { + this.maxZIndex = zindex; + if (this.focusedWindow) + this.blur(this.focusedWindow.getId()) + } + this.focusedWindow = win; + if (this.focusedWindow) + this.focus(this.focusedWindow.getId()) + } +}; + +var Dialog = { + dialogId: null, + onCompleteFunc: null, + callFunc: null, + parameters: null, + + confirm: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.confirm); + return + } + content = content || ""; + + parameters = parameters || {}; + var okLabel = parameters.okLabel ? parameters.okLabel : "Ok"; + var cancelLabel = parameters.cancelLabel ? parameters.cancelLabel : "Cancel"; + + // Backward compatibility + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" + var cancelButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " cancel_button'" + var content = "\ + <div class='" + parameters.className + "_message'>" + content + "</div>\ + <div class='" + parameters.className + "_buttons'>\ + <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\ + <input type='button' value='" + cancelLabel + "' onclick='Dialog.cancelCallback()' " + cancelButtonClass + "/>\ + </div>\ + "; + return this._openDialog(content, parameters) + }, + + alert: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.alert); + return + } + content = content || ""; + + parameters = parameters || {}; + var okLabel = parameters.okLabel ? parameters.okLabel : "Ok"; + + // Backward compatibility + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" + var content = "\ + <div class='" + parameters.className + "_message'>" + content + "</div>\ + <div class='" + parameters.className + "_buttons'>\ + <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\ + </div>"; + return this._openDialog(content, parameters) + }, + + info: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.info); + return + } + content = content || ""; + + // Backward compatibility + parameters = parameters || {}; + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var content = "<div id='modal_dialog_message' class='" + parameters.className + "_message'>" + content + "</div>"; + if (parameters.showProgress) + content += "<div id='modal_dialog_progress' class='" + parameters.className + "_progress'> </div>"; + + parameters.ok = null; + parameters.cancel = null; + + return this._openDialog(content, parameters) + }, + + setInfoMessage: function(message) { + $('modal_dialog_message').update(message); + }, + + closeInfo: function() { + Windows.close(this.dialogId); + }, + + _openDialog: function(content, parameters) { + var className = parameters.className; + + if (! parameters.height && ! parameters.width) { + parameters.width = WindowUtilities.getPageSize(parameters.options.parent || document.body).pageWidth / 2; + } + if (parameters.id) + this.dialogId = parameters.id; + else { + var t = new Date(); + this.dialogId = 'modal_dialog_' + t.getTime(); + parameters.id = this.dialogId; + } + + // compute height or width if need be + if (! parameters.height || ! parameters.width) { + var size = WindowUtilities._computeSize(content, this.dialogId, parameters.width, parameters.height, 5, className) + if (parameters.height) + parameters.width = size + 5 + else + parameters.height = size + 5 + } + parameters.effectOptions = parameters.effectOptions ; + parameters.resizable = parameters.resizable || false; + parameters.minimizable = parameters.minimizable || false; + parameters.maximizable = parameters.maximizable || false; + parameters.draggable = parameters.draggable || false; + parameters.closable = parameters.closable || false; + + var win = new Window(parameters); + win.getContent().innerHTML = content; + + win.showCenter(true, parameters.top, parameters.left); + win.setDestroyOnClose(); + + win.cancelCallback = parameters.onCancel || parameters.cancel; + win.okCallback = parameters.onOk || parameters.ok; + + return win; + }, + + _getAjaxContent: function(originalRequest) { + Dialog.callFunc(originalRequest.responseText, Dialog.parameters) + }, + + _runAjaxRequest: function(message, parameters, callFunc) { + if (message.options == null) + message.options = {} + Dialog.onCompleteFunc = message.options.onComplete; + Dialog.parameters = parameters; + Dialog.callFunc = callFunc; + + message.options.onComplete = Dialog._getAjaxContent; + new Ajax.Request(message.url, message.options); + }, + + okCallback: function() { + var win = Windows.focusedWindow; + if (!win.okCallback || win.okCallback(win)) { + // Remove onclick on button + $$("#" + win.getId()+" input").each(function(element) {element.onclick=null;}) + win.close(); + } + }, + + cancelCallback: function() { + var win = Windows.focusedWindow; + // Remove onclick on button + $$("#" + win.getId()+" input").each(function(element) {element.onclick=null}) + win.close(); + if (win.cancelCallback) + win.cancelCallback(win); + } +} +/* + Based on Lightbox JS: Fullsize Image Overlays + by Lokesh Dhakar - http://www.huddletogether.com + + For more information on this script, visit: + http://huddletogether.com/projects/lightbox/ + + Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/ + (basically, do anything you want, just leave my name and link) +*/ + +if (Prototype.Browser.WebKit) { + var array = navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/)); + Prototype.Browser.WebKitVersion = parseFloat(array[1]); +} + +var WindowUtilities = { + // From dragdrop.js + getWindowScroll: function(parent) { + var T, L, W, H; + parent = parent || document.body; + if (parent != document.body) { + T = parent.scrollTop; + L = parent.scrollLeft; + W = parent.scrollWidth; + H = parent.scrollHeight; + } + else { + var w = window; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + } + return { top: T, left: L, width: W, height: H }; + }, + // + // getPageSize() + // Returns array with page width, height and window width, height + // Core code from - quirksmode.org + // Edit for Firefox by pHaez + // + getPageSize: function(parent){ + parent = parent || document.body; + var windowWidth, windowHeight; + var pageHeight, pageWidth; + if (parent != document.body) { + windowWidth = parent.getWidth(); + windowHeight = parent.getHeight(); + pageWidth = parent.scrollWidth; + pageHeight = parent.scrollHeight; + } + else { + var xScroll, yScroll; + + if (window.innerHeight && window.scrollMaxY) { + xScroll = document.body.scrollWidth; + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac + xScroll = document.body.scrollWidth; + yScroll = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + xScroll = document.body.offsetWidth; + yScroll = document.body.offsetHeight; + } + + + if (self.innerHeight) { // all except Explorer + windowWidth = self.innerWidth; + windowHeight = self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode + windowWidth = document.documentElement.clientWidth; + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { // other Explorers + windowWidth = document.body.clientWidth; + windowHeight = document.body.clientHeight; + } + + // for small pages with total height less then height of the viewport + if(yScroll < windowHeight){ + pageHeight = windowHeight; + } else { + pageHeight = yScroll; + } + + // for small pages with total width less then width of the viewport + if(xScroll < windowWidth){ + pageWidth = windowWidth; + } else { + pageWidth = xScroll; + } + } + return {pageWidth: pageWidth ,pageHeight: pageHeight , windowWidth: windowWidth, windowHeight: windowHeight}; + }, + + disableScreen: function(className, overlayId, overlayOpacity, contentId, parent) { + WindowUtilities.initLightbox(overlayId, className, function() {this._disableScreen(className, overlayId, overlayOpacity, contentId)}.bind(this), parent || document.body); + }, + + _disableScreen: function(className, overlayId, overlayOpacity, contentId) { + // prep objects + var objOverlay = $(overlayId); + + var pageSize = WindowUtilities.getPageSize(objOverlay.parentNode); + + // Hide select boxes as they will 'peek' through the image in IE, store old value + if (contentId && Prototype.Browser.IE) { + WindowUtilities._hideSelect(); + WindowUtilities._showSelect(contentId); + } + + // set height of Overlay to take up whole page and show + objOverlay.style.height = (pageSize.pageHeight + 'px'); + objOverlay.style.display = 'none'; + if (overlayId == "overlay_modal" && Window.hasEffectLib && Windows.overlayShowEffectOptions) { + objOverlay.overlayOpacity = overlayOpacity; + new Effect.Appear(objOverlay, Object.extend({from: 0, to: overlayOpacity}, Windows.overlayShowEffectOptions)); + } + else + objOverlay.style.display = "block"; + }, + + enableScreen: function(id) { + id = id || 'overlay_modal'; + var objOverlay = $(id); + if (objOverlay) { + // hide lightbox and overlay + if (id == "overlay_modal" && Window.hasEffectLib && Windows.overlayHideEffectOptions) + new Effect.Fade(objOverlay, Object.extend({from: objOverlay.overlayOpacity, to:0}, Windows.overlayHideEffectOptions)); + else { + objOverlay.style.display = 'none'; + objOverlay.parentNode.removeChild(objOverlay); + } + + // make select boxes visible using old value + if (id != "__invisible__") + WindowUtilities._showSelect(); + } + }, + + _hideSelect: function(id) { + if (Prototype.Browser.IE) { + id = id == null ? "" : "#" + id + " "; + $$(id + 'select').each(function(element) { + if (! WindowUtilities.isDefined(element.oldVisibility)) { + element.oldVisibility = element.style.visibility ? element.style.visibility : "visible"; + element.style.visibility = "hidden"; + } + }); + } + }, + + _showSelect: function(id) { + if (Prototype.Browser.IE) { + id = id == null ? "" : "#" + id + " "; + $$(id + 'select').each(function(element) { + if (WindowUtilities.isDefined(element.oldVisibility)) { + // Why?? Ask IE + try { + element.style.visibility = element.oldVisibility; + } catch(e) { + element.style.visibility = "visible"; + } + element.oldVisibility = null; + } + else { + if (element.style.visibility) + element.style.visibility = "visible"; + } + }); + } + }, + + isDefined: function(object) { + return typeof(object) != "undefined" && object != null; + }, + + // initLightbox() + // Function runs on window load, going through link tags looking for rel="lightbox". + // These links receive onclick events that enable the lightbox display for their targets. + // The function also inserts html markup at the top of the page which will be used as a + // container for the overlay pattern and the inline image. + initLightbox: function(id, className, doneHandler, parent) { + // Already done, just update zIndex + if ($(id)) { + Element.setStyle(id, {zIndex: Windows.maxZIndex + 1}); + Windows.maxZIndex++; + doneHandler(); + } + // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file) + else { + var objOverlay = document.createElement("div"); + objOverlay.setAttribute('id', id); + objOverlay.className = "overlay_" + className + objOverlay.style.display = 'none'; + objOverlay.style.position = 'absolute'; + objOverlay.style.top = '0'; + objOverlay.style.left = '0'; + objOverlay.style.zIndex = Windows.maxZIndex + 1; + Windows.maxZIndex++; + objOverlay.style.width = '100%'; + parent.insertBefore(objOverlay, parent.firstChild); + if (Prototype.Browser.WebKit && id == "overlay_modal") { + setTimeout(function() {doneHandler()}, 10); + } + else + doneHandler(); + } + }, + + setCookie: function(value, parameters) { + document.cookie= parameters[0] + "=" + escape(value) + + ((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") + + ((parameters[2]) ? "; path=" + parameters[2] : "") + + ((parameters[3]) ? "; domain=" + parameters[3] : "") + + ((parameters[4]) ? "; secure" : ""); + }, + + getCookie: function(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else { + begin += 2; + } + var end = document.cookie.indexOf(";", begin); + if (end == -1) { + end = dc.length; + } + return unescape(dc.substring(begin + prefix.length, end)); + }, + + _computeSize: function(content, id, width, height, margin, className) { + var objBody = document.body; + var tmpObj = document.createElement("div"); + tmpObj.setAttribute('id', id); + tmpObj.className = className + "_content"; + + if (height) + tmpObj.style.height = height + "px" + else + tmpObj.style.width = width + "px" + + tmpObj.style.position = 'absolute'; + tmpObj.style.top = '0'; + tmpObj.style.left = '0'; + tmpObj.style.display = 'none'; + + tmpObj.innerHTML = content; + objBody.insertBefore(tmpObj, objBody.firstChild); + + var size; + if (height) + size = $(tmpObj).getDimensions().width + margin; + else + size = $(tmpObj).getDimensions().height + margin; + objBody.removeChild(tmpObj); + return size; + } +} + diff --git a/htdocs/includes/scriptaculous/src/window/window_effects.js b/htdocs/includes/scriptaculous/src/window/window_effects.js new file mode 100644 index 00000000000..6ad73cc052e --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/window_effects.js @@ -0,0 +1,157 @@ +Effect.ResizeWindow = Class.create(); +Object.extend(Object.extend(Effect.ResizeWindow.prototype, Effect.Base.prototype), { + initialize: function(win, top, left, width, height) { + this.window = win; + this.window.resizing = true; + + var size = win.getSize(); + this.initWidth = parseFloat(size.width); + this.initHeight = parseFloat(size.height); + + var location = win.getLocation(); + this.initTop = parseFloat(location.top); + this.initLeft = parseFloat(location.left); + + this.width = width != null ? parseFloat(width) : this.initWidth; + this.height = height != null ? parseFloat(height) : this.initHeight; + this.top = top != null ? parseFloat(top) : this.initTop; + this.left = left != null ? parseFloat(left) : this.initLeft; + + this.dx = this.left - this.initLeft; + this.dy = this.top - this.initTop; + this.dw = this.width - this.initWidth; + this.dh = this.height - this.initHeight; + + this.r2 = $(this.window.getId() + "_row2"); + this.content = $(this.window.getId() + "_content"); + + this.contentOverflow = this.content.getStyle("overflow") || "auto"; + this.content.setStyle({overflow: "hidden"}); + + // Wired mode + if (this.window.options.wiredDrag) { + this.window.currentDrag = win._createWiredElement(); + this.window.currentDrag.show(); + this.window.element.hide(); + } + + this.start(arguments[5]); + }, + + update: function(position) { + var width = Math.floor(this.initWidth + this.dw * position); + var height = Math.floor(this.initHeight + this.dh * position); + var top = Math.floor(this.initTop + this.dy * position); + var left = Math.floor(this.initLeft + this.dx * position); + + if (window.ie) { + if (Math.floor(height) == 0) + this.r2.hide(); + else if (Math.floor(height) >1) + this.r2.show(); + } + this.r2.setStyle({height: height}); + this.window.setSize(width, height); + this.window.setLocation(top, left); + }, + + finish: function(position) { + // Wired mode + if (this.window.options.wiredDrag) { + this.window._hideWiredElement(); + this.window.element.show(); + } + + this.window.setSize(this.width, this.height); + this.window.setLocation(this.top, this.left); + this.r2.setStyle({height: null}); + + this.content.setStyle({overflow: this.contentOverflow}); + + this.window.resizing = false; + } +}); + +Effect.ModalSlideDown = function(element) { + var windowScroll = WindowUtilities.getWindowScroll(); + var height = element.getStyle("height"); + element.setStyle({top: - (parseFloat(height) - windowScroll.top) + "px"}); + + element.show(); + return new Effect.Move(element, Object.extend({ x: 0, y: parseFloat(height) }, arguments[1] || {})); +}; + + +Effect.ModalSlideUp = function(element) { + var height = element.getStyle("height"); + return new Effect.Move(element, Object.extend({ x: 0, y: -parseFloat(height) }, arguments[1] || {})); +}; + +PopupEffect = Class.create(); +PopupEffect.prototype = { + initialize: function(htmlElement) { + this.html = $(htmlElement); + this.options = Object.extend({className: "popup_effect", duration: 0.4}, arguments[1] || {}); + + }, + show: function(element, options) { + var position = Position.cumulativeOffset(this.html); + var size = this.html.getDimensions(); + var bounds = element.win.getBounds(); + this.window = element.win; + // Create a div + if (!this.div) { + this.div = document.createElement("div"); + this.div.className = this.options.className; + this.div.style.height = size.height + "px"; + this.div.style.width = size.width + "px"; + this.div.style.top = position[1] + "px"; + this.div.style.left = position[0] + "px"; + this.div.style.position = "absolute" + document.body.appendChild(this.div); + } + if (this.options.fromOpacity) + this.div.setStyle({opacity: this.options.fromOpacity}) + this.div.show(); + var style = "top:" + bounds.top + ";left:" +bounds.left + ";width:" + bounds.width +";height:" + bounds.height; + if (this.options.toOpacity) + style += ";opacity:" + this.options.toOpacity; + + new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._showWindow.bind(this)}); + }, + + hide: function(element, options) { + var position = Position.cumulativeOffset(this.html); + var size = this.html.getDimensions(); + this.window.visible = true; + var bounds = this.window.getBounds(); + this.window.visible = false; + + this.window.element.hide(); + + this.div.style.height = bounds.height; + this.div.style.width = bounds.width; + this.div.style.top = bounds.top; + this.div.style.left = bounds.left; + + if (this.options.toOpacity) + this.div.setStyle({opacity: this.options.toOpacity}) + + this.div.show(); + var style = "top:" + position[1] + "px;left:" + position[0] + "px;width:" + size.width +"px;height:" + size.height + "px"; + + if (this.options.fromOpacity) + style += ";opacity:" + this.options.fromOpacity; + new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._hideDiv.bind(this)}); + }, + + _showWindow: function() { + this.div.hide(); + this.window.element.show(); + }, + + _hideDiv: function() { + this.div.hide(); + } +} + diff --git a/htdocs/includes/scriptaculous/src/window/window_ext.js b/htdocs/includes/scriptaculous/src/window/window_ext.js new file mode 100644 index 00000000000..60efac61b4b --- /dev/null +++ b/htdocs/includes/scriptaculous/src/window/window_ext.js @@ -0,0 +1,115 @@ +// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) +// YOU MUST INCLUDE window.js BEFORE +// +// Object to store hide/show windows status in a cookie +// Just add at the end of your HTML file this javascript line: WindowStore.init() +WindowStore = { + doSetCookie: false, + cookieName: "__window_store__", + expired: null, + + // Init function with two optional parameters + // - cookieName (default = __window_store__) + // - expiration date (default 3 years from now) + init: function(cookieName, expired) { + WindowStore.cookieName = cookieName || WindowStore.cookieName + + if (! expired) { + var today = new Date(); + today.setYear(today.getYear()+1903); + WindowStore.expired = today; + } + else + WindowStore.expired = expired; + + Windows.windows.each(function(win) { + win.setCookie(win.getId(), WindowStore.expired); + }); + + // Create observer on show/hide events + var myObserver = { + onShow: function(eventName, win) { + WindowStore._saveCookie(); + }, + + onClose: function(eventName, win) { + WindowStore._saveCookie(); + }, + + onHide: function(eventName, win) { + WindowStore._saveCookie(); + } + } + Windows.addObserver(myObserver); + + WindowStore._restoreWindows(); + WindowStore._saveCookie(); + }, + + show: function(win) { + eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName)); + if (cookie != null) { + if (cookie[win.getId()]) + win.show(); + } + else + win.show(); + }, + + // Function to store windows show/hide status in a cookie + _saveCookie: function() { + if (!doSetCookie) + return; + + var cookieValue = "{"; + Windows.windows.each(function(win) { + if (cookieValue != "{") + cookieValue += "," + cookieValue += win.getId() + ": " + win.isVisible(); + }); + cookieValue += "}" + + WindowUtilities.setCookie(cookieValue, [WindowStore.cookieName, WindowStore.expired]); + }, + + // Function to restore windows show/hide status from a cookie if exists + _restoreWindows: function() { + eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName)); + if (cookie != null) { + doSetCookie = false; + Windows.windows.each(function(win) { + if (cookie[win.getId()]) + win.show(); + }); + } + doSetCookie = true; + } +} + +// Object to set a close key an all windows +WindowCloseKey = { + keyCode: Event.KEY_ESC, + + init: function(keyCode) { + if (keyCode) + WindowCloseKey.keyCode = keyCode; + + Event.observe(document, 'keydown', this._closeCurrentWindow.bindAsEventListener(this)); + }, + + _closeCurrentWindow: function(event) { + var e = event || window.event + var characterCode = e.which || e.keyCode; + + // Check if there is a top window (it means it's an URL content) + var win = top.Windows.focusedWindow; + if (characterCode == WindowCloseKey.keyCode && win) { + if (win.cancelCallback) + top.Dialog.cancelCallback(); + else if (win.okCallback) + top.Dialog.okCallback(); + else + top.Windows.close(top.Windows.focusedWindow.getId()); + } + } +} \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index db3585405da..e118f6daf42 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -648,7 +648,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0) // Affiche style sheets et link print '<link rel="stylesheet" type="text/css" title="default" href="'.DOL_URL_ROOT.'/'.$conf->css.'">'."\n"; - print '<link rel="stylesheet" type="text/css" media="print" HREF="'.DOL_URL_ROOT.'/theme/print.css">'."\n"; + print '<link rel="stylesheet" type="text/css" media="print" href="'.DOL_URL_ROOT.'/theme/print.css">'."\n"; + + // Style sheets pour la class Window + print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/default.css">'."\n"; + print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/window/alphacube.css">'."\n"; // Definition en alternate style sheet des feuilles de styles les plus maintenues // Les navigateurs qui supportent sont rares. Plus aucun connu. @@ -672,7 +676,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0) print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/scriptaculous.js"></script>'."\n"; print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/effects.js"></script>'."\n"; print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/controls.js"></script>'."\n"; - print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/prototip.js"></script>'."\n"; + //print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/prototip.js"></script>'."\n"; + print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/window.js"></script>'."\n"; + print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/tooltip.js"></script>'."\n"; } diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php index 94f47fb1ccd..cd5f58c0d7d 100644 --- a/htdocs/theme/auguria/auguria.css.php +++ b/htdocs/theme/auguria/auguria.css.php @@ -1259,22 +1259,3 @@ form.inplaceeditor-form a { /* The cancel link */ background-position : bottom; cursor:pointer; } - -/* ============================================================================== */ -/* Ajax - Tooltip */ -/* ============================================================================== */ -.tooltip { - width: 500px; - color: #fff; - } -.tooltip .title { - background: #0F6788; - font: 15px Arial, Helvetica, sans-serif; - font-weight: bold; - padding: 5px; - } -.tooltip .content { - background: dodgerblue; - font: 11px Arial, Helvetica, sans-serif; - padding: 5px; - } \ No newline at end of file diff --git a/htdocs/theme/common/window/alphacube.css b/htdocs/theme/common/window/alphacube.css new file mode 100644 index 00000000000..7d2790e75e1 --- /dev/null +++ b/htdocs/theme/common/window/alphacube.css @@ -0,0 +1,150 @@ +.overlay_alphacube { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alphacube_nw { + background: transparent url(alphacube/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_n { + background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.alphacube_ne { + background: transparent url(alphacube/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_w { + background: transparent url(alphacube/frame-left.gif) repeat-y top left; + width:7px; +} + +.alphacube_e { + background: transparent url(alphacube/frame-right.gif) repeat-y top right; + width:7px; +} + +.alphacube_sw { + background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_s { + background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.alphacube_se, .alphacube_sizer { + background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_sizer { + cursor:se-resize; +} + +.alphacube_close { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.alphacube_minimize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.alphacube_maximize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.alphacube_title { + float:left; + height:14px; + font-size:14px; + text-align:center; + margin-top:2px; + width:100%; + color:#123456; +} + +.alphacube_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background:#FDFDFD; +} + +/* For alert/confirm dialog */ +.alphacube_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alphacube_message { + font: 12px arial; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.alphacube_buttons { + text-align:center; + width:100%; +} + +.alphacube_buttons input { + width:20%; + margin:10px; +} + +.alphacube_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +.alphacube_wired_frame { + background: #FFF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + + diff --git a/htdocs/theme/common/window/alphacube/bottom-left-c.gif b/htdocs/theme/common/window/alphacube/bottom-left-c.gif new file mode 100644 index 0000000000000000000000000000000000000000..531acdc513d068f75e8a1ccf78d2103b0a167cf1 GIT binary patch literal 60 zcmZ?wbhEHbWM^P!_{hkxbLY<g|NoykbB2L|LGdRGBLf2ygAM}&0|Q8&fr;0pFF|6{ Oi@5Fpm*mY_4AuZO{SkWr literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/bottom-middle.gif b/htdocs/theme/common/window/alphacube/bottom-middle.gif new file mode 100644 index 0000000000000000000000000000000000000000..d4ce3be02ce72c51d28af307b19cea24abdf4b52 GIT binary patch literal 50 zcmZ?wbhEHbWMp7x_{hkxbLY<g|NoykbB2L|LGdRGBLf2ygAM}&0|Q8&fr+_?pOwKH E0FV|8WB>pF literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/bottom-right-c.gif b/htdocs/theme/common/window/alphacube/bottom-right-c.gif new file mode 100644 index 0000000000000000000000000000000000000000..2164c22c144145a4c74cf0fb2893b14f7e77fc8f GIT binary patch literal 61 zcmZ?wbhEHbWM^P!_{hkxbLY<g|NoykbB2L|LGdRGBLf2ygAM}&0|Q8&fr+n&KYaq% QBe|*xfd^Zzu`*Z#07d^1@&Et; literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/button-close-focus.gif b/htdocs/theme/common/window/alphacube/button-close-focus.gif new file mode 100644 index 0000000000000000000000000000000000000000..99f635c102c7e1732e8dad6ff0b1cd0e31171cbe GIT binary patch literal 699 zcmZ?wbhEHb6lV};_{IPNhL$#NwvKMT0YO1Q!NI{HAtB-6;gOM%F)=Zb@kuE$3F+zS znVFec`9(PeMTLchMMXu$#l<BhCFSMim6er^jg3uBP0h{Cy}iACeSQ7?{gWn5nl^3P zj2Sa#&YU@G)~wmHXU~~4XWqPd3l=O`xNzaJWy_W?U%q0+ij^x@ZrHG4<Hn7fH*emu zWy{W;JNNG0d+5-i<HwJmIC0|S$&;r}pE`Z|^x1P~E?>EH<;s<-SFc{ZcIDQc8@KP? zynFZV{rmSHJb3Wz*|YcW-+%b<;n%NUfByXW`}gnv|NqaNIRo<8P{4{mSr{1@+!+-A z2{{*~CYGe8C^%Ir6y+zS7KQjT=zzQciYW&6e+_&#+AXbZ?QJ%EO&z@*T|Ir1w5|EM ztTblM6k%f%(U>!D)=YC=E;E&tD_LAzScO>K)~#A;!pm$ZyK5KwT9>_R*>~?U;9%C3 zK6z4rbDxVdr{JlRY8;HpGB<CD^6cXgy>&~Okx^al`Ezlhb1uRX@^T;K)t_josH(0M zbN%!C?~hd>6N)D;N^s=;W7KfsfPeGBCcP5}GaNUvatkXt&B$mBOm^)uU}0JDanX{K zlQsOW33Mj6ot|!xyl+Zla}2+XMd7m(CnrBYC-<b`hs3YL?tzP)Cu@CWbXhV%!D*4* u++QNAt|~;Z>IitQTYY_f+*UbB?`>;tZqB&8D)#iYwYRr3=P)xeSOWkNdHyQ^ literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/button-max-focus.gif b/htdocs/theme/common/window/alphacube/button-max-focus.gif new file mode 100644 index 0000000000000000000000000000000000000000..1708a1e0d159dd33d23bd65e156fb1b3ed447c5e GIT binary patch literal 765 zcmZ?wbhEHb6lV};_{IPNhL$#NwvKMT0YO1QAt525p`nqHk<ro7F)=Z*v9WP+aq;o- zk?~2Xsi|pcX_=XsS@}hUg@vW1rRC-2b#-<1_4SR7jZIBW&CSi--Q7JsJ-xlXeSLlX z{rwXrOqe)v;-pEFCQqI`Wy+MPQ>RXwHf_d?88c_joHc9K?Af#D%$YNH?%a9v=FOi! zf5CzU3l}b2ym;}FB}<kqTef`p@)avqtXj2d_3G7Y)~s2(cI}1@8#Zp-xOwyDty{Nl z+qP}{_U$`&?%cI&*Y4fB_w3oTckkYP`}XbMzyH920|yTtJbLu#v17-MA3uKL#EFw9 zPo6q;>h$T;XU?2Cd-lxPvuDqpKYQ-nxeFIAT)cSk(xpq6FJHcL<;vBoSFc{Xa_!o+ z>({T}xN+mwty{Nm-@bkK=AAot?%ut7@7}%p_wPS=@ZjOYhmRgTdi?nD%a<?Tym|BX z?b~<n-o1bS{=<h4A3uKl^y$;jpFjWn`Sbt(|1)RKfWj9qR{Y7r$iPs-p!iS7xhOTU zBsE3BsZyaRKPj~+#GgS2q!$!Z4DA0J1QV=UTHD&&5(Jw%dONy$`X*U*@kW`<FcD#$ zGk31YOp_>H-T<BDIxI!2*Q_pN)zjY;#LMidq`Z@@c<q{EcC~|QKFrKk($X?A?8O`$ zoSa--+{HW!3W|!h%#0eca&q!~#r)TADhU(|D672HXJj;dtD-7YEOba+UAS0S^S@Ts zfx{aYC3JHY>uBsLU}SEyluS6#A(+g*N6yIT+y#T>i{1Mb@@^bxbmrKjWEu3Vq41IX zfhL`d4=*krW*4gPu47;nQt6m5-?>RhF=)vOL1p)42Ua(+curdGHAN@#(2}glYJQvS zIuEhV6W0n|6(L#8+I>?eV{^{KL)*M1D_k@7wQwrCota^n@@bN0@Ufnm#tj#jG%j~L zJIgdjU~}T-WxcbH=iT#YbGB??sF-1#eJ^Kb-}CbeoV(?GcWrrjc}4JQGg%G>YXE<< BbK(F1 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/button-min-focus.gif b/htdocs/theme/common/window/alphacube/button-min-focus.gif new file mode 100644 index 0000000000000000000000000000000000000000..ff69d1b20f4dc3ebb721164c9730f01a8a1b614d GIT binary patch literal 472 zcmZ?wbhEHb6lV};_{snRhL$#NwvKMT0g;iBk?~0>F$tNOnOXToIR!;EH8r)hwH+ND zot>RsU0vPX-BYJdoi=USj2Sa#&YU@S?%etF=Pz2cXvvZ#OP4NPwrtt*<;z#CTD5xh z>NRWDtX;cy-MV$_*RS8WapTslTX*c(v2*9nJ$v@--Me?+zI_J|9z1mD(9xquj~zR9 z`t<2DXU?2GclO-5a~Ce2zjF2Rwd+@}UAuPu`t@6PZrr|m^Zxz&4<0;t`0(NL=g;52 zfB)gbhrfUS{{R2~%$YNaKUo+V80;Ao{|Px4r6!i7rYJa7Diq}>r51(wGw6W)2l6Qc z+kJ-?T^Ajxem7~SjvS?_owJI)LgbQWuPHly_Y@bqxLUL1^z$!F);L52-utk_=A4v( z#l$^z=kHHuV-yz_Y8Gy5?`Ufg7H4FX6P+l^&pnl!i)$L+BvH9OCCP=7Jhn@hE#sA1 zD5cb=rXVk`AYiw3+ctrXo75SZw3H7h%ZMF0dQ|qHvi4qmjdSNOoY%al-)F3&d-K-q zJGYGc%#BSRKY42M$oS<W^SxG<mKN_ne1327?c;kZMm8oJ8|!~eTrv^{2l(sygtTII hd^phGE}-l+hhyUr{%#TDtUD(*E<WBb(9FPK4FEx&<{tn6 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/frame-left.gif b/htdocs/theme/common/window/alphacube/frame-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..543f13db6634b6db7d10ed20e7a564264618f878 GIT binary patch literal 64 zcmZ?wbhEHbWM^Px_{6}lbLY-)-@g6)`SaJWU%!9<{`2S0-@kv)oH?WTlZBCift^8z UfdND@GB7Z+aws~daxz#004U5GKmY&$ literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/frame-right.gif b/htdocs/theme/common/window/alphacube/frame-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..5d7afef939b7a9d40743adcbfd7ead7318246ad5 GIT binary patch literal 64 zcmZ?wbhEHbWM^Px_{6}lbLY-)-@g6)`SaJWU%!9<{`2S0-@kv)oH?WTlZBCift^8z UfdND@GB7Z+X1FRdaxz#004fw4KmY&$ literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/left-top.gif b/htdocs/theme/common/window/alphacube/left-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..8373aaae17fe72765f15da9688380f515bdee11d GIT binary patch literal 171 zcmZ?wbhEHb<YJIy_{_twbLY-4U%q_(`t{qlZ{NRv|MBC;&!0bk{rdI$_wPS{{`~#> z_us#N|Ns9#bLI>K7%2W^VPs(7WzYffKxQzoL~QWn%$hqb)9v6r->;4LR&=TbFI#=H z@4a~b=b5*X1vuX8@vOa@;1I#d+2ZsvLPNr9|B}R4oC0$%H@hpC%J6ZVXW({IVPJH+ XHYb3A#jhaxp<Kn;uGS_&Mh0sDAW%^2 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/right-top.gif b/htdocs/theme/common/window/alphacube/right-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..77cf65ef8686b01bb4b80b00ed9504ce8beb2769 GIT binary patch literal 168 zcmZ?wbhEHb<YJIy_{_twbLY-4U%q_(`t{qlZ{NRv|MBC;&!0bk{rdI$_wPS{{`~#> z_us#N|Ns9#bLI>K7%2W^VPs(7WzYffKxQzogbH}v%u1c%JKH#SE_;Kb*)+9=S*x$D z((XB>D$C>~aHV;|{T9dk=b8dd_LCPT$Y}9;FL}w(%U8y5q)|#VLx@9ni@^mAp#(ie UhJYQHy&JtYT6D8Fa4=W{05-QwkpKVy literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/alphacube/top-middle.gif b/htdocs/theme/common/window/alphacube/top-middle.gif new file mode 100644 index 0000000000000000000000000000000000000000..9cab17d53de3e1df534c9d2e93b8c7eee08b8dee GIT binary patch literal 97 zcmZ?wbhEHbWMq(J_{_twbLY-4U%q_(`t{qlZ{NRv|MBC;&!0bk{rdI$_wPS{{`~#> y_us#N|Ns9#bLI>K7%2W^VPs(7WzYffKxQzo@Cj`2)aFi_kaWhebCZrBgEastW-&eh literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default.css b/htdocs/theme/common/window/default.css new file mode 100644 index 00000000000..6ab13789d24 --- /dev/null +++ b/htdocs/theme/common/window/default.css @@ -0,0 +1,155 @@ +.overlay_dialog { + background-color: #666666; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.overlay___invisible__ { + background-color: #666666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.dialog_nw { + width: 9px; + height: 23px; + background: transparent url(default/top_left.gif) no-repeat 0 0; +} + +.dialog_n { + background: transparent url(default/top_mid.gif) repeat-x 0 0; + height: 23px; +} + +.dialog_ne { + width: 9px; + height: 23px; + background: transparent url(default/top_right.gif) no-repeat 0 0; +} + +.dialog_e { + width: 2px; + background: transparent url(default/center_right.gif) repeat-y 0 0; +} + +.dialog_w { + width: 2px; + background: transparent url(default/center_left.gif) repeat-y 0 0; +} + +.dialog_sw { + width: 9px; + height: 19px; + background: transparent url(default/bottom_left.gif) no-repeat 0 0; +} + +.dialog_s { + background: transparent url(default/bottom_mid.gif) repeat-x 0 0; + height: 19px; +} + +.dialog_se { + width: 9px; + height: 19px; + background: transparent url(default/bottom_right.gif) no-repeat 0 0; +} + +.dialog_sizer { + width: 9px; + height: 19px; + background: transparent url(default/sizer.gif) no-repeat 0 0; + cursor:se-resize; +} + +.dialog_close { + width: 14px; + height: 14px; + background: transparent url(default/close.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:8px; + cursor:pointer; + z-index:2000; +} + +.dialog_minimize { + width: 14px; + height: 15px; + background: transparent url(default/minimize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:28px; + cursor:pointer; + z-index:2000; +} + +.dialog_maximize { + width: 14px; + height: 15px; + background: transparent url(default/maximize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:49px; + cursor:pointer; + z-index:2000; +} + +.dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + width:100%; + color:#000; +} + +.dialog_content { + overflow:auto; + color: #DDD; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background-color:#123; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display: block; + position: absolute; + border: 1px #000 dashed; +} + +/* DO NOT CHANGE THESE VALUES*/ +.dialog { + display: block; + position: absolute; +} + +.dialog table.table_window { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 0px; + padding:0px; +} + +.dialog table.table_window td , .dialog table.table_window th { + padding: 0; +} + +.dialog .title_window { + -moz-user-select:none; +} + diff --git a/htdocs/theme/common/window/default/bottom_left.gif b/htdocs/theme/common/window/default/bottom_left.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c73d3563531b3470951a5d45e5302f79cc4af45 GIT binary patch literal 187 zcmZ?wbhEHb<YW+LIKsg2|Ns9FA3nT!^JdMOH7i%HT)uqy(xpomFJ8Q8(V~S57cN+^ zVE+91GiJ=_>+5T6ZLO)PDJd!W|NlP&(LnJh3nK%AAcGD_2gptaR*MBiJx^9JIIZG( zzG|MM4m-EO>8-P$Rn;EfCx6~FhBbdfJkwHZgIKoP>lOA2GThK9Ye+DW;qS0uVXy`O DwFE#B literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/bottom_mid.gif b/htdocs/theme/common/window/default/bottom_mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..9205d30190bae1048b906fe5d348e1087b3894e0 GIT binary patch literal 68 zcmZ?wbhEHbWMmL#Sj52a|Ns9FA3nT!^Jekl#U&*r|NsAI00YIJEQ|~ctPDCJ9!M<% RGpB`;;O+Ap89bO6tO1R;73}~3 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/bottom_right.gif b/htdocs/theme/common/window/default/bottom_right.gif new file mode 100644 index 0000000000000000000000000000000000000000..8d002eeb82f27cc58aef04616f9818618a6a8bc1 GIT binary patch literal 187 zcmZ?wbhEHb<YW+LIKsg2|Ns9FA3nT!^JdMOH7i%HT)uqy(xpomFJ8Q8(V~S57cN+^ zVE+91GiJ=_>+5T6ZLO)PDJd!W|NlP&(LnJh3nK%AAcGD_2gptaR*MIUeT$UltYDb& zawl7X%pM~ioweQ1%X9Vj-CS3CdS%1DxJj-)5{&H%2NZM}*4@x%JXC8T#dAb~g~1vC D#xp?H literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/bottom_right_resize.gif b/htdocs/theme/common/window/default/bottom_right_resize.gif new file mode 100644 index 0000000000000000000000000000000000000000..649b0d870dd137007a578158ae2e1f3a2e23d14f GIT binary patch literal 201 zcmZ?wbhEHb<YW+LIKsg2|Ns9FA3nT!^JdMOH7i%HT)uqy(xpomFJ8Q8(V~S57cN+^ zVE+91GiJ=_>+5T6ZLO)PDJd!W|NlP&(LnJh3nK%AAcGD_2gptaR<{R=eT$UltYDb& zawl7X%pM~ioweQ1%X9Vj-CS47yhUdFHD^;1ixBNAmpDA;ENfzaFd?**k*z_(Kv?`( R1_R@vItwYDBMK}G)&OzYMEL*! literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/center_left.gif b/htdocs/theme/common/window/default/center_left.gif new file mode 100644 index 0000000000000000000000000000000000000000..79e7a1cca64733b76c7bf467a0f3537cd3f33adf GIT binary patch literal 52 zcmZ?wbhEHb<YZuCn8?8J|Ns953l{wU|DS<@LGdRGBLf2ygAM}&0|Q8&fr*u;FTInM G!5RRlLk&m( literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/center_right.gif b/htdocs/theme/common/window/default/center_right.gif new file mode 100644 index 0000000000000000000000000000000000000000..554c55c864eef11da4a6815bf3ff80a8899678cd GIT binary patch literal 49 zcmZ?wbhEHbWMW`qn8?8J|Ns953l{wU|DS<@LGdRGBLf2ygAM}&h+<-3U}AEKVXy`O DeufN4 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/clear.gif b/htdocs/theme/common/window/default/clear.gif new file mode 100644 index 0000000000000000000000000000000000000000..c10b166944c3396d48d5ec868f5935d857fb1524 GIT binary patch literal 1014 zcmZ?wbhEHb6krfw_|CwfT%w@cuc6ziY1pfyUZ8BZ*}`s<h3!TQyNwpM>&<P}nAxm0 zvsz(lwamnFsfj_SwqC22R;8Lov5H!bl1iqca+-pCq>TM`D~Ih?HfznTSD9HYH?>@1 zVzJOzt6WVfQQmT)iN!o)qaIz`H5L|gjO|uhm`^p*t<%!0*3zrgGH%zmnq;b;tEAVg zX*JhayI9R`sfGPgOS|b7dWBlvYh1(D281l~37+pAxhgPnWl+dG-;A|M;miE;7iJ_a z2`^rh-FLWk>i)j??f!L#ikh~T&pj|DcCk~;e5cq2E@hh%)?S$xyU;P9%_?D*Tg!%m znfp3do}QIF*F9;Dd)6Yq^m)Eb>vMXxRP=1FoVLGt#=+LCg}%9q1B+LL&)nBmu*!Gh zzVfAKdJjEbU%b}8XpLX>rii*NF%4VeT6QM&?8#kmZo;Y)(|257VjZcv=KPe1LhH18 zw~C&4mjJb*D4D!)nZ@m1i`u;2l`*`kWc^Xb@V;K+ZVKbW4Cep!693y2|Cb9sD_4Bo z<?!#?j@2G)U*;x%T~V~xmt|w1(6(^N6Dg{vvvtoFTl}Bo`+aNgx2?VZ&aT_(!o1U! zd50_W9w(OFPAvbyfMFC+5CV!nSr{1@rZVV&%mC#H29C=N+MF^GFAq7evIujTOmIkG zZk=ktb7sLqUSaV(5iyH^OcrK#g|?PP=0ZnKDX(h`oC+>y8`uQ|cya`k&q^A3rf_@^ zbXPdaYmn7osC<lrPs1^4gXD>Y&K+i{$8;V}Z1tWlEXXnGMB}m3g3=M&Tq++qGBt8C z`M&wl^rUU7X3z_nSt6YexCC8FVlG}<(x>Fs$f2sVg2`c`R>&NQtSu+}<sJGt7I|EJ ze7wiAPb2f3vgSi>F%c~esUz(Db8ROmg#A)rzc}Bzifg4<Mk1ez=Spo>76xkoo8TAd literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/close.gif b/htdocs/theme/common/window/default/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..31ef5a3948ae1217506138bb95833431bd2147dd GIT binary patch literal 1012 zcmZ?wbhEHb<YVAt_|CvEUs+|Trq)s|?OIi}`&+j5dixgG+UMEY$C+Ein3><%u<72G ztx*CZkpd!<)pWc?#NCC(N>#N=)wFzM<o#q7I!&!Q&8z|)95X}1GD5@F&7QM%_M9*W zCwpTPTO;FnQ>I=yea6?-t+%hQr?+>qrEY_tTfLuKcSPW+j{0wF7ysP4>d}%}Kew%! z?`*Ns!*+#-?P@=#)qc*a6C!@io&0OwlwS*{|5`Hh*NXXPyPAKkUifw8g8TEQ*9dVm zO9^zy2=%K<&(>F+rKdXEP<@$&{xVDbYr&qELcPz0dOymDeVQ46yD;N^dH(v8*!IwX z_cJDZm_4~CDXu*}dTK}el#cd1PNq^G)-nOEdLix(X_0nmktR9u!<PE13^fl}7_2hX z>etge<zzkCQ0JtV;~8(4OMxEeqk`@vM?FZ5xs@1oEg|w~a_rIMxEuKyHwrQrYN*W9 zR5{{keLO61v#Rn&HRUZDs@pZy7O1E+o0~OSm@7+5D@jZDRaf^`SJ#)7&73e{#)JuT zrcS+f_U!DbQ=i_u_w2y~3v=_s2M?Y;b?VT;gDuU?%}q_GPMzAjckiA(d;0qN%F4=Y zY;1&uh5!Hm&oBz85dw-oSr{1@CNb!M3<Ko}29Apis+>7rID(dVOpr4bI&mRzp+N1Q zKQDzBO;B!A{*rQmAxU7NgS5dDLB*95+gVuIG!!;C9Bg3XurdfTS=c116?JXJMW>@( ztX!RXE*p%Wdrj4eSQRso*@20jgYQL&;Nxa?e);5WR|-EYXk@TRIm7buBJ+uvN(oE` z77w0sOj5LO;rQvO(kZCN_G6Fd=O&kKNt37v1&znf$~jj&+RzyI*o{xxaLSaO%^sK9 v^>gRE2so&8bh2uqodL@g7q%{0?E(W!#g2ssoP!t5&|q{urPRjA$Y2csV9Xzf literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/inspect.gif b/htdocs/theme/common/window/default/inspect.gif new file mode 100644 index 0000000000000000000000000000000000000000..ebeeb02f692029521bdd12892d1db67ac1bb1a13 GIT binary patch literal 556 zcmZ?wbhEHb<Y(Y#c*ej`Qr5oV>CX+vF0{1I+|eHM?D^Y!2c|#!|M%dQ?lb4FpMCPC zsjhFrqBSqyd^~gJ%<|iB=I57P`26qZixZ!A#Q%A;YQg3cJI~+S_UZq^2KWE}|IeH` z^W4oB&4tCCz0;rl|GMM)%Qc%09eVoh{*V9rj$VB9?Ag(a_fEe4`t9fcW7QG+pM9FM zZ2Pqv_d6%8{qyL^j7f`n8>TK?z4iN#9|xO!Zr(co`}xKh<u#jbzn`{z*Zvp3ul@V~ z@#ClCU;kZx_x0ZWCworZn$X+(?*IRa%I3}cPj{5|t-besVQI<U?;vMfy!~j)w%vyh zpO`Rz&Aq?>kG}tR@%qgVTeHsm|NrLyuU%JP9=&{b@8j=_mTr9i{`>#`{}~1dDE?$& z6=4Wx&;i*GiW3I*&W7-&=9bnbUOO=+C+)T-74skqUnLLDHbWkHYeq&32UXryK5rjO zOTiFDF27b!EeCdXA8UTi;8rhY2M0MzH*quRRx3wkN%rNwqE?cvoD2#!YGOL}Y$9#8 zdU~=3p)xGOCVhtI4E0@&{B_Uug|j-FYWNGiZ(`*Zkl^^<uV<h3L%8Ho%K`@mYXIY_ B^Ys7# literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/maximize.gif b/htdocs/theme/common/window/default/maximize.gif new file mode 100644 index 0000000000000000000000000000000000000000..892a0f08c9f8a729a81fcd4ae65caf5c9d17b75a GIT binary patch literal 1024 zcmZ?wbhEHb<YVAx_|CwfqoJd%uJic$v#U3+UAb{}^`<p-a~eFOz3S&QFr+XrBr`BX zFswPTX3eHGS-Dx+x!F&jKRtTv=)y${nUfiqk{HYj%*^vm*PdMC-RSNW?dj9xuH&qw z=c*ML7NF!Swq(U($y^4nZgcN$i?C8(*&+sId&#f@-{ZFr^iA(paggkr)~!;>pi;r0 z7AWF3T`ypoe&%Aoti}E(?;KdNVv$xQgH{DYM3t+41w+zYGwT)xs|JSTIp&FNHt{Xi z^OjCuw0L3G5}oYDdL27LJ9dV7cQbf)F?e?|q^*)lT_K&ZQeobb=}GfMa#qVH&5}); zDVH`;f5KtE$@}7`?2Rj0uGO^Lpm@3Vq!VtFj=4`c=D+BA_~PpkbIygXyPvt?VfNa4 znM*FGZg`Np{$9@BcU8MzRqlCJwc~l^uIH889+e;a+;;Lu*Xdt9C%<;q%m^)?5PbYY zZ`EdnmfZ#|I}LKC>d!tEJZXExjJ>g!|4csfxvyfQbjuEdYk#I(`#Gm$PHM~a<fi4e zP0MU6C%fPHF}Gr(+m5TXyRSB%c{=Ig@1+->PkZ!x$?_G8FI+f(?AXyaZ{ECo`SQh! z7tfzRfA;Lz<HwILUAlDi=+VQ656_u1XZGybvu4ejG-=X=2@^UyJKNjaBO@atA|iZz ze7wEAU0ht8ot^FN?Ik26{{R2aFbYsZK=CIFBLl+{1|5(vC{HkO+-30OoU`TR<rRVR z&3uJUY!F)EH%sNug(I3Fs%_I5EHWG%7+M%v<ybbjbWK{p%poynL!$FBR%S_;z*Acs znR^t2#B@58RM^<~W>|$(G_v^5;}m(c$MVr3r*<L5Ng51+kB{+6sR$VePCRs&PfMpn z#4xGFqffM;V2gp^ldfq7Y14ERFRONoDkz6o%siaRGfOk{QU~MarJP+HwhQJ&CO_|& zx6L}0@NlEXr5^S8J8v9QG%m>M7p1u<eboq*wrb{*RSIc8+wRVzs2Oz0T|mLkPQ@|l R#0J5|ZU<yP@^LU&0{{e^RO<i$ literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/minimize.gif b/htdocs/theme/common/window/default/minimize.gif new file mode 100644 index 0000000000000000000000000000000000000000..a7214167b7edb283924a402c2c4539ed4ac93412 GIT binary patch literal 1023 zcmZ?wbhEHb<YVAx_|Cvk9um5+qccKFcY1o(wDc?^F^Mc|`v`BJBrCiBzo*=}R{j6y z<Uil1zj;34|L+C=e=R(`D`dtbr`wk+{(POXU{2!O=ac?_?fvn#^Z(brSyL1CZwmbX zq3i$K=Kt?He>`trvS`}>S52=jr2KzYzhGj>(nZsr9E<<|py>CFy#MzK|K2YAf4BJm zy{i8Ys^|6uZRpYbf4g{L5yOH)hIvH{YuYvcUrP9YG3o#1r2m(b7Zx)7KjHV|kngKq zo(r=W7UnX%S<Lln5%<@%3h!4dy<4sPex1&*UH0Gi`o7re`D8lZlbL)k=7@Y+rSxHq z&X4Uj&t?c+>Xo|CEA?`7)T=GgueQX#+8VoR`J&Y;7SD}km>bV9C!XQXRNb4Cb(dFL zuc)zkwkqVw%8-RI3=88Ju1_$Y8^Lh3*LdxUMRP(JuC(c0Y1X?w+2_Np!|!h$IdSaB zEKi1GRi;O(Oy6BUIMbcs-L->@r*uuv^m%k(^#lju2@WE&GW{MOShGLhZEwE&(kb1Y z?QJKH9i1Pnw=Tx?_{6#s6YJ}=rRp>#%XO6|1-Q+aIHA)-b6TKBn77xX>(@@NU0o62 zAMNZE<?Ix$saX*aP!S%!u%lzk!iAd`E}SuO;@hWB-#mFTZ}#kYbLPyMHLJ6|{o;iS zZ{ECl_3G8jmoHzuc=7DnvrCsQ9XWF3@ZrP%|Nmzg1xO*F_>+Z^fnh0w4oD1?Cm1;H zFnDvyY<=m_$kh3xN9cq>urdRqhVLYilYwe&v*dUqmYlex>e|i0aUi5iq{*q_!=Av& zYJ77YI(Q}+xoGgu(hFSX(fEk9cb@Z9g`bwiPueG_Iye1rNP5P<*fDR`0nKFA(^IvR zZm47`pExI>8ej2X0;94Uzk$P{D>E0jdh$u>hiwQ*RA!&3Q~tz8Gl;phgHPIF#*T%D zPtLQ8?wP}onCQsFBNO!I!KP&*GbL4Rd<s4^9BdWPJ7KWql2daFo2ZC`gkx*s%78g` bDIEfhOq_uWW4KwazPzmNKR<?@g~1vCDB*!q literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/overlay.png b/htdocs/theme/common/window/default/overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..648e71ed690467b76d820ae039563f270bc4e904 GIT binary patch literal 2818 zcmeAS@N?(olHy`uVBq!ia0y~yU;weXIM^5%7<!G)?`2?M;4JWnEM{Qf76xHPhFNnY z7#O&GGo76S0y6ST@{2R_3luz^ofQg-^3yVNQW+R3Zp{rYkC^;j%<lg8RQ@oh8y_}K z&uL^(QeMMxLLhRHz$Avm76BoLqpclWVIrb}b38(iG+pKLnA`DafyRz>$F7d3?$8*E zck*|ZZ>_C*|Mu<g>%aFrpY#0BxytkW4T3^y6Q3>0Vz3NqwXwP(-|z2n<mBE4CQ*+E zED8e8P9I8VJ<7oFfw{7xu4IG#AIA0h3``6KSM^kcjz9e0yemL0oIznC!viIu=iH1F zf*4Ndg`5y!I3dBXA$W5N7sC_=hMdY8CnbheybN!?c-pZt+*mpJjyS`OMKUWn7<w5Q zW@@;rFgfgINC<5V(qTGqh+)AR2PHk01M3(YBDWd2Gd1jGWhm>5n85Flz|b($N#_iM zf&~+Uvz+i*W(6PS1qPS)KUf)G(7MBek>SAUsb{BqUosZiG4+B}`KJ#L9w|OLl(W$( zQCw3Xjq{1poawWbg*~1#`<&xpV37KG@!&rT`w7pVJ$d*n?Rn1oFGm;s%l?qBWT*J? z{=YpvOe_one&^rcihug_8gs#M#to(WvsXql+zMmJxc@WO_%`Q)D6R`tKf5a}{y50Z zTNrS{MplN4oBOS5(!#w4kGt*u8$Zl{&|UZKkAvL5+f^SJ3THXYTzg<~^WVb6ys~vc zea}y`I2q=Bf3E!Rcx(ONKFy1dOg6^oh<1I9=-d&Y<a@kwXV63!#gkJX3B9a0`Y1o` zFX!ZPUWPSo{s;WFv2Q({bD-`WBU3kD#HBI@hq}+YJyP5g83fWzj4Hn~FihV6v)@6R zk>Tw0C65^x_PmgYSusW2=NJbAgUf<OtqqRsJO@SA9N?RCP<GD&ai&Bz7Y81d12zIq zY)=|wxE4xGbCe7@V0D9K>jq}21%k643T!!OXu<pZfly52>jH7M1c`ZvB=)p%vN)dL z5KdII>JUuoyP<TBLwsf*i&CP8$)tuQ3NJfE0+o)QC|bg_(kW|VtcUU^-69do-WZ2p z6K<bSFzWi#wa49XO5>(L<||C44m(%KOLZMvP<*k(gg>@n+M?`>Qd{I~8@4T4e$o3y zX$eDZS6_0&MMJ){o|}m=J?*Xuoe@%M$HkJLMwo{6n<mRfn3su4ADEZ;o<oJHyFvI3 zM_h}*p`4}(6Wk+wBAi#KzER#Hw2LF0v$@6akh;?375-aPtAu_YsYtTgI3dDqjoLd! zImLOZaq4`+@smAN_)boG;>V?^I>E@3+cVqawukPL;3amK1TyFNsJ)($d-C2Bj!g|~ z6sAwyK7oIN|D@k14?o#1Vs*6Rkq_r0m7pb4guF~s?VqwNop0ncbHS>>vn%Ia;aJsS zH9yKTcR^WzesKFrVUyBXs%K}5IiFslyZGvbS()jX-!t@Imh9rZ+brig{lfH1*)P~% zK7ZN#rJRSijko!@N0NqQwq&*Ba*6Gd`ZIl&v0k1&^F)ZjbtCDS=`;9e<cCIRebcHD zop?%Us@2r6sdZDIuL=n*4z<5pxr#evbtwPpxUkw~ZlRk49<SuQBDVVKO4-oeE6vuO z3n~xl4>%tfzj$B#-=<&5yqnru-4?WYEDlNDeoV4gQS6ve>c<GDYeiwquXVC#_$Ebf z`uWDEjP<v4nSQlTuygUMv^8lH)8;-aJj=*;Y~zCumN(~kol`u=d#+lSS=U~7<F%}{ zX>04&n%}CrweMEa+oHE(Z(rYfUs^ENVXn^HuU5HM-%B}nne7VP)w=6;>G@Z7my=&t zzU2IR>MP&NyBFQR=6+fHRs7ZaYws`0n;V#Lm`#w(F|<hjaArdCi|iShJ1%}`dALIG zbjGfUM=};)^jxgIL+xFA`eV}yal5oN`7%jsOzx%L$+k&M$~3yY<j9hvPxfh^osvB( zZP&#umrKr^IiYiB&5boD-}G5tos&H;ao^27xBv9EE_I!A)T`U9`}nk5(`rt$PV=4i zea(z8yRgczuVL5McwUQnt@AqfT6j)?bogwZ*;cbpZ(Ff;_Sz$5vvco@JQC^GyrlUx zIPaF>n?G;3-pqQ#_SW)S;y2ZAx!=yqo{<rfy=GlvT~kz2dZsL=V9)C%4^0lQJhJle z%kXsR^o7N9Kbwj#^PX^8XnNUn@!;I$UCZ<4SDl{vRO;QXOIt60T|9gD>^p03=3cpb z#`b9K>fgS4v!zeQ9=3h&_~pa*h)0EI9?xAqd-<Wy6Q1kGmBmHI{oX6*zj=<@ylV!z zCvG2!ez5m+b%K?hZR)RcFPZI**)h$pn%}-}**>NFw)>RpuGP(~WB)VnxAm{nfBS#z ze^~iR?4uuR0^>o(r;K|Wr5ZOgXEV#Q%w$>0Zpzxrx|>a($4=CVhm$u_zG!m(0r5}L zKa-8`r0dMOD0+%xu4t6>FM~5`K62Lt``XTP+!v_JU-r}I<(X|99S_`dI(EosO3oDj zSu3KcWwc7~Rp6H3lERYjI@i`biTs_ux9?;B%ATFpx3jhtm8GxA$_dIzelvSV!;V!u z8Y|j=xPF{2R3fax`L^@PksC*BJ0BM_J<pkCJm<-*kZC2!>z>|Ov{U@q%X6pamD@y` zMoy@)Xq_Q6eUtsuW(B7JeF^`k%kz9?g+H~-ZuNKFx2Shf;KuDcylf^tn;SOuo5fx0 zTIXLGZT@bh$Ba4sgS0CrN>19T{Mk3m<=VY9=WiC?)U}*4XUd$#LA;sMwrF2B*sihN zKTTVEGVhbhXSt`OC%2#a{zUm_@#ov3Ijuey7jFq#7r-axqrXDCB3dH4Vu#0GkEkog z_tXBp`l-y_Bv!L`!iIny8#dqAQ4#s^fzp20-D1k!!Q$n5hOt4rQYtb(T&g{taeC9V zzX6XTf<ixKRo?m37u0-d=~8Fyrf`#~E2o@1owx2w)Xrql#HlHv@3W>~jSj2V5}z8s zreMvAbw4(^?RfSm+%NuW&DYA@Tet3cZ9nz)wa4ovuk+S?kKDiBYj2k0)eCJOc-KmQ z?0qU7pX+t6WMNg-*S@n`&Yn8UY?^5LHu}uAHMc)4G+X?wYHoe(>9D_RS8v~UQ|;EZ z{ddc&Kl3%qidx@$KjqDyt=bjg*?V1Uzvf+f*L1gEDoJ|R{%3V}cet1PAD!1<y|kMB zo9p}6Sta>7ch>LUzlk$9$gEe+!>Zuv?1ubXv)|4t-&zo*#dpZ@=|T1T%WA402fSE# z?(m(%XYbFf-~N^3wMV7)C9D0VYjhXqF0fs=_x+2W#dBrjWZm~||6ljs@NshKant_r zc?;%h*na%^q-pZw<tfYO&Goaly)yGo<#(SyGqYm@WA~;zpPy$hUh>Xod;Is4pYJ{I zkNvQx;EU4tq}!_7z1P~Vvvsd4`1{afeRTfo)bFR?hTE(w`QrQ9`r`Y`^}n(XTrIx- z<GNn#{K~!WkG+xJo~L$KW{2vouRqGZy%jI#dgpT|wyM8k{hxie{=Q=W#s8{)%fF4O z2XY_$NH~yi{%|D!dp^$gdH<&Tzuf-tlKUC=tIBT5z5R3L<)wM0_I^q^H~Hc6P0NMP zpQ;P{U-`Ot_4E6GAN}?|AMxkL2kxKU=l8FxT=}`^{pywLt&S@nm)~=)()Q!BKWoq3 zu6@7b{jU4R_sY-I_~Y;|;Pb^_$;X#p@c(Z2yyo8@{qHTGf2&@aZ_L2Jz>@Ch>&U>c zv9IQL;A92{28CpgAYTTCDpdxChGqtapZ^&c8eTFmlo~KFyh>nTu$sZZAf7)d{-_%R z1B1M$i(^Q|t)wk>cP}4sU`a?)5bDud(&xm$z`*eTKQlwD7L%Gyvq%Pr@9FC2vd$@? F2>?FqRigj^ literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/resize.gif b/htdocs/theme/common/window/default/resize.gif new file mode 100644 index 0000000000000000000000000000000000000000..c44070259c4be0caba2140b1001c5b61908194df GIT binary patch literal 138 zcmZ?wbhEHb<Y(Y#*v!E2|NsA&FJIodbLaN$+qZ7rx_R^F_3PKKUcK7h-v0mpe+CSo z_>+Z^fq|1j2P6YBgMr0-!wJu9MvLs)?Z@v<=XB8E^3Y6T7Fv<?`%v6NrX@2a&Ar~6 bAM!n3&6&Q;*}%h^X^xXb$<Iq`l^Co6iySog literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/sizer.gif b/htdocs/theme/common/window/default/sizer.gif new file mode 100644 index 0000000000000000000000000000000000000000..649b0d870dd137007a578158ae2e1f3a2e23d14f GIT binary patch literal 201 zcmZ?wbhEHb<YW+LIKsg2|Ns9FA3nT!^JdMOH7i%HT)uqy(xpomFJ8Q8(V~S57cN+^ zVE+91GiJ=_>+5T6ZLO)PDJd!W|NlP&(LnJh3nK%AAcGD_2gptaR<{R=eT$UltYDb& zawl7X%pM~ioweQ1%X9Vj-CS47yhUdFHD^;1ixBNAmpDA;ENfzaFd?**k*z_(Kv?`( R1_R@vItwYDBMK}G)&OzYMEL*! literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/top_left.gif b/htdocs/theme/common/window/default/top_left.gif new file mode 100644 index 0000000000000000000000000000000000000000..774538ac6abb275b9ddf8ee365f5944766024b30 GIT binary patch literal 358 zcmZ?wbhEHb<YW+MxXQrr`Sa&bpFVy3`0@Sw_ix|6ef|3Nt5>gHzI^%O#f#_9pFex{ z?8%cSj~_pN^ytyUhYue-cyRyz{d@QB-MxGF&Ye5AZ{NOo^XB#I*RNf>cJ=DjD_5>u zzI^%O#f#_9pFel*+?g|HPM<z~>eQ*DM~@ypeE7hD1G{(c-oAbN=FOYeuV24r&6<@f zS1w<^eCg7qix)5M>FN3Z|33riK=CIFBLjmTgAPb5$WIJx%?{H8EME4w9qv4#Y^l&P zO+b}FfG1{hz!5JEnV3c1-zNlUsL8i5CYqJ&vAXQET{K0!;*ZAR2!nt1%Dl}je7ws1 zon4*E0)72`%0iQ;OfD6fF;hfEbnd*ls$z>4FH)0`5MQ}UU25&RwHnf!HgD3D*}g+o YMoVt*zP;KChYlao(LH|RxFdr#03rXY^8f$< literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/top_mid.gif b/htdocs/theme/common/window/default/top_mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..6124e78bd3b4a051ed3e38ffbf3bb21bcb25a89f GIT binary patch literal 149 zcmZ?wbhEHbWMmL$IKsg2^XJd^@87?8@#5LDXHT9ydHneCqeqV(Ja};b{{6dm@7}(B z`{vD?*RNl{cJ12b%a<=+ym<cn`7>wEoH}*tz<~ojJw5;b|7XAp6o0ZXGBAiT=zvs# d>||gSdceYRC_$*TP@!{^LGNdWi7u@S)&S){L>2%5 literal 0 HcmV?d00001 diff --git a/htdocs/theme/common/window/default/top_right.gif b/htdocs/theme/common/window/default/top_right.gif new file mode 100644 index 0000000000000000000000000000000000000000..fbc94bf2b945280883bf2720b4b2140d3c7e0941 GIT binary patch literal 357 zcmZ?wbhEHb<YW+MxXQrr^XJdcpFe;4^y%ZrkMG~VfBW|B>({Sey?XWX<;xc@UOa#P z{MoZ-Po6w^{P^*sM~@ypeE8tOgZuaI-@AA3?%lh0?%cV3`}WP7H?Lp6e(l<|t5>gH zxpL+5<;xc@UOa#P{JC@I&YU@O`t<2jr%oL`di3z&!v_u=*u8uA_U+p@Z{ECq{rWX) z)~sB)a{2P*OP4NPym)a>PtX7V{~1UGia%Kx85r~#bU^w*eqvy2au7P{Tq)VhdE|+) zmK0}m!vdvU5`t|^Axc_$Vq7_l##OcZJDr(Q?6ig0dfFYAH)}6xi#wl@;lbC)$KRwP z(B9FmBG}X0qar+U(nJ-}Y15~vh|QieTUC6)!Ubv)OP5JXs!Ok4vsy!D!^RDovRh^4 awrR=l-m_a<@xZ|YI(kQs9o2PYum%7Hf2-*L literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php index 2910cbb962e..ab7ea6a9e6a 100644 --- a/htdocs/theme/eldy/eldy.css.php +++ b/htdocs/theme/eldy/eldy.css.php @@ -1367,22 +1367,3 @@ div.menuFleche position:relative; } - -/* ============================================================================== */ -/* Ajax - Tooltip */ -/* ============================================================================== */ -.tooltip { - width: 500px; - color: #fff; - } -.tooltip .title { - background: #0F6788; - font: 15px Arial, Helvetica, sans-serif; - font-weight: bold; - padding: 5px; - } -.tooltip .content { - background: dodgerblue; - font: 11px Arial, Helvetica, sans-serif; - padding: 5px; - } \ No newline at end of file -- GitLab