diff --git a/COPYRIGHT b/COPYRIGHT
index e156311099a..3125277a278 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -29,7 +29,6 @@ OdtPHP 1.0.1 GPL 2.0 Yes Library
PHP_WriteExcel 0.3.0 LGPL 2.1 Yes Excel files generation
PHP_ExcelReader 2.21 MIT License Yes Parse and retrieve information from XLS files
Prototype 1.6.1 MIT License Yes Ajax library
-PWC 1.3 MIT License Yes Ajax library
Scriptaculous 1.8.3 MIT License Yes Ajax library
Smarty 2.6.26 LGPL 2.1 Yes Templates engine used by some pages
SMTPs 1.15 GPL Yes SMTPS library
diff --git a/htdocs/includes/pwc/MIT-LICENSE b/htdocs/includes/pwc/MIT-LICENSE
deleted file mode 100644
index 5bcdad1bd74..00000000000
--- a/htdocs/includes/pwc/MIT-LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-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/pwc/README b/htdocs/includes/pwc/README
deleted file mode 100644
index e2cb9608345..00000000000
--- a/htdocs/includes/pwc/README
+++ /dev/null
@@ -1,182 +0,0 @@
-== 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/pwc/debug.js b/htdocs/includes/pwc/debug.js
deleted file mode 100644
index 3d8f338836e..00000000000
--- a/htdocs/includes/pwc/debug.js
+++ /dev/null
@@ -1,137 +0,0 @@
-var debugWindow = null;
-function debug(text, reverse) {
- if (debugWindow == null)
- return;
-
- time = "-"; //new Date();
- if (reverse) {
- $('debug').innerHTML = time + " " + text + " "+ $('debug').innerHTML;
- debugWindow.getContent().scrollTop=0;
- }
- else {
- $('debug').innerHTML += time + " " + text + " ";
- 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 = "
";
- 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/pwc/extended_debug.js b/htdocs/includes/pwc/extended_debug.js
deleted file mode 100644
index 2b935b1b7dd..00000000000
--- a/htdocs/includes/pwc/extended_debug.js
+++ /dev/null
@@ -1,113 +0,0 @@
-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 = " ";
-
- //create hourglass icon and attach events to it.
- var cont = "";
-
- new Insertion.After('debug_window_maximize', cont);
- Event.observe('debug_window_inspect', 'click', enterInspectionMode, false);
-
- //create command text box
- cont = "Eval:"
- 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/pwc/tooltip.js b/htdocs/includes/pwc/tooltip.js
deleted file mode 100644
index 65e6106034c..00000000000
--- a/htdocs/includes/pwc/tooltip.js
+++ /dev/null
@@ -1,241 +0,0 @@
-// 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/pwc/window.js b/htdocs/includes/pwc/window.js
deleted file mode 100644
index 4ac5200c0af..00000000000
--- a/htdocs/includes/pwc/window.js
+++ /dev/null
@@ -1,1843 +0,0 @@
-// 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 ="
";
- $(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= "";
- $(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= "";
- else
- content ="
";
-
- var closeDiv = this.options.closable ? "
" : "";
- var minDiv = this.options.minimizable ? "
" : "";
- var maxDiv = this.options.maximizable ? "