Changement de gnrateur de tooltip Ajax - exemple toujours sur les lignes produits d'une propale
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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)));
|
||||
}
|
||||
}
|
||||
19
htdocs/includes/scriptaculous/src/window/MIT-LICENSE
Normal file
@ -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.
|
||||
182
htdocs/includes/scriptaculous/src/window/README
Normal file
@ -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/
|
||||
137
htdocs/includes/scriptaculous/src/window/debug.js
Normal file
@ -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;
|
||||
113
htdocs/includes/scriptaculous/src/window/extended_debug.js
Normal file
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
241
htdocs/includes/scriptaculous/src/window/tooltip.js
Normal file
@ -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;
|
||||
}
|
||||
};
|
||||
1843
htdocs/includes/scriptaculous/src/window/window.js
Normal file
157
htdocs/includes/scriptaculous/src/window/window_effects.js
Normal file
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
115
htdocs/includes/scriptaculous/src/window/window_ext.js
Normal file
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
150
htdocs/theme/common/window/alphacube.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
||||
BIN
htdocs/theme/common/window/alphacube/bottom-left-c.gif
Normal file
|
After Width: | Height: | Size: 60 B |
BIN
htdocs/theme/common/window/alphacube/bottom-middle.gif
Normal file
|
After Width: | Height: | Size: 50 B |
BIN
htdocs/theme/common/window/alphacube/bottom-right-c.gif
Normal file
|
After Width: | Height: | Size: 61 B |
BIN
htdocs/theme/common/window/alphacube/button-close-focus.gif
Normal file
|
After Width: | Height: | Size: 699 B |
BIN
htdocs/theme/common/window/alphacube/button-max-focus.gif
Normal file
|
After Width: | Height: | Size: 765 B |
BIN
htdocs/theme/common/window/alphacube/button-min-focus.gif
Normal file
|
After Width: | Height: | Size: 472 B |
BIN
htdocs/theme/common/window/alphacube/frame-left.gif
Normal file
|
After Width: | Height: | Size: 64 B |
BIN
htdocs/theme/common/window/alphacube/frame-right.gif
Normal file
|
After Width: | Height: | Size: 64 B |
BIN
htdocs/theme/common/window/alphacube/left-top.gif
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
htdocs/theme/common/window/alphacube/right-top.gif
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
htdocs/theme/common/window/alphacube/top-middle.gif
Normal file
|
After Width: | Height: | Size: 97 B |
155
htdocs/theme/common/window/default.css
Normal file
@ -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;
|
||||
}
|
||||
|
||||
BIN
htdocs/theme/common/window/default/bottom_left.gif
Normal file
|
After Width: | Height: | Size: 187 B |
BIN
htdocs/theme/common/window/default/bottom_mid.gif
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
htdocs/theme/common/window/default/bottom_right.gif
Normal file
|
After Width: | Height: | Size: 187 B |
BIN
htdocs/theme/common/window/default/bottom_right_resize.gif
Normal file
|
After Width: | Height: | Size: 201 B |
BIN
htdocs/theme/common/window/default/center_left.gif
Normal file
|
After Width: | Height: | Size: 52 B |
BIN
htdocs/theme/common/window/default/center_right.gif
Normal file
|
After Width: | Height: | Size: 49 B |
BIN
htdocs/theme/common/window/default/clear.gif
Normal file
|
After Width: | Height: | Size: 1014 B |
BIN
htdocs/theme/common/window/default/close.gif
Normal file
|
After Width: | Height: | Size: 1012 B |
BIN
htdocs/theme/common/window/default/inspect.gif
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
htdocs/theme/common/window/default/maximize.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
htdocs/theme/common/window/default/minimize.gif
Normal file
|
After Width: | Height: | Size: 1023 B |
BIN
htdocs/theme/common/window/default/overlay.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
htdocs/theme/common/window/default/resize.gif
Normal file
|
After Width: | Height: | Size: 138 B |
BIN
htdocs/theme/common/window/default/sizer.gif
Normal file
|
After Width: | Height: | Size: 201 B |
BIN
htdocs/theme/common/window/default/top_left.gif
Normal file
|
After Width: | Height: | Size: 358 B |
BIN
htdocs/theme/common/window/default/top_mid.gif
Normal file
|
After Width: | Height: | Size: 149 B |
BIN
htdocs/theme/common/window/default/top_right.gif
Normal file
|
After Width: | Height: | Size: 357 B |
@ -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;
|
||||
}
|
||||