Author: cedric@yterium.com
Date: Thu Jul 13 15:23:34 2006
New Revision: 3974
Log:
un wrapper pour ce #### de ie mon ami
Added:
_plugins_/_squelettes_/timeline/images/wrapper.php
Modified:
_plugins_/_squelettes_/timeline/scripts/themes.js
_plugins_/_squelettes_/timeline/scripts/timeline.js
_plugins_/_squelettes_/timeline/scripts/util/graphics.js
Added: _plugins_/_squelettes_/timeline/images/wrapper.php
--- _plugins_/_squelettes_/timeline/images/wrapper.php (added)
+++ _plugins_/_squelettes_/timeline/images/wrapper.php Thu Jul 13 15:23:34 2006
@@ -0,0 +1,28 @@
+<?php
+
+ // wrapper image pour scintillement MSIE, cf.
+ // http://www.ultra-fluide.com/ressources/css/css-hacks.htm#scintillement
+ if (isset($_GET['file'])){
+ $f = $_GET['file']; // pas de urldecode ici car on accepte de toute facon que les caracteres alphanumeriques
+ if (preg_match(',^[a-z_0-9\-]+\.(gif|jpg|png)$,i', $f, $r)
+ AND @file_exists('./'.$f)){
+
+ $mime = array(
+ 'jpg' => 'image/jpeg',
+ 'gif' => 'image/gif',
+ 'png' => 'image/png'
+ );
+
+ header('Content-Type: '.$mime[strtolower($r[1])]);
+ header('Content-Length: '.filesize('./'.$f));
+ header('Cache-Control: max-age=36000');
+ header('Pragma: public');
+ readfile('./'.$f);
+ exit;
+ }
+ }
+
+ header("Status : 404 Not Found");
+ die('404 not found');
+
+?>
\ No newline at end of file
Modified: _plugins_/_squelettes_/timeline/scripts/themes.js
--- _plugins_/_squelettes_/timeline/scripts/themes.js (original)
+++ _plugins_/_squelettes_/timeline/scripts/themes.js Thu Jul 13 15:23:34 2006
@@ -81,7 +81,7 @@
gap: 0.5 // em
},
instant: {
- icon: Timeline.urlPrefix + "images/dull-blue-circle.png",
+ icon: Timeline.urlPrefix + "images/wrapper.php?file=dull-blue-circle.png",
lineColor: "#58A0DC",
impreciseColor: "#58A0DC",
impreciseOpacity: 20,
Modified: _plugins_/_squelettes_/timeline/scripts/timeline.js
--- _plugins_/_squelettes_/timeline/scripts/timeline.js (original)
+++ _plugins_/_squelettes_/timeline/scripts/timeline.js Thu Jul 13 15:23:34 2006
@@ -213,7 +213,7 @@
/*
* inserting copyright and link to simile
*/
- var elmtCopyright = Timeline.Graphics.createTranslucentImage(doc, Timeline.urlPrefix + (this.isHorizontal() ? "images/copyright-vertical.png" : "images/copyright.png"));
+ var elmtCopyright = Timeline.Graphics.createTranslucentImage(doc, Timeline.urlPrefix + (this.isHorizontal() ? "images/wrapper.php?file=copyright-vertical.png" : "images/wrapper.php?file=copyright.png"));
elmtCopyright.className = "timeline-copyright";
elmtCopyright.title = "Timeline (c) SIMILE - http://simile.mit.edu/timeline/";
Timeline.DOM.registerEvent(elmtCopyright, "click", function() { window.location = "http://simile.mit.edu/timeline/"; });
Modified: _plugins_/_squelettes_/timeline/scripts/util/graphics.js
--- _plugins_/_squelettes_/timeline/scripts/util/graphics.js (original)
+++ _plugins_/_squelettes_/timeline/scripts/util/graphics.js Thu Jul 13 15:23:34 2006
@@ -107,22 +107,22 @@
divInner.appendChild(divImg);
}
- createImg(urlPrefix + "images/bubble-top-left.png", 0, 0, margins.left, margins.top);
- createImg(urlPrefix + "images/bubble-top.png", margins.left, 0, contentWidth, margins.top);
- createImg(urlPrefix + "images/bubble-top-right.png", margins.left + contentWidth, 0, margins.right, margins.top);
-
- createImg(urlPrefix + "images/bubble-left.png", 0, margins.top, margins.left, contentHeight);
- createImg(urlPrefix + "images/bubble-right.png", margins.left + contentWidth, margins.top, margins.right, contentHeight);
-
- createImg(urlPrefix + "images/bubble-bottom-left.png", 0, margins.top + contentHeight, margins.left, margins.bottom);
- createImg(urlPrefix + "images/bubble-bottom.png", margins.left, margins.top + contentHeight, contentWidth, margins.bottom);
- createImg(urlPrefix + "images/bubble-bottom-right.png", margins.left + contentWidth, margins.top + contentHeight, margins.right, margins.bottom);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-top-left.png", 0, 0, margins.left, margins.top);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-top.png", margins.left, 0, contentWidth, margins.top);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-top-right.png", margins.left + contentWidth, 0, margins.right, margins.top);
+
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-left.png", 0, margins.top, margins.left, contentHeight);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-right.png", margins.left + contentWidth, margins.top, margins.right, contentHeight);
+
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-bottom-left.png", 0, margins.top + contentHeight, margins.left, margins.bottom);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-bottom.png", margins.left, margins.top + contentHeight, contentWidth, margins.bottom);
+ createImg(urlPrefix + "images/wrapper.php?file=bubble-bottom-right.png", margins.left + contentWidth, margins.top + contentHeight, margins.right, margins.bottom);
var divClose = doc.createElement("div");
divClose.style.left = (bubbleWidth - margins.right + Timeline.Graphics._bubblePadding - 16 - 2) + "px";
divClose.style.top = (margins.top - Timeline.Graphics._bubblePadding + 1) + "px";
divClose.style.cursor = "pointer";
- setImg(divClose, urlPrefix + "images/close-button.png", 16, 16);
+ setImg(divClose, urlPrefix + "images/wrapper.php?file=close-button.png", 16, 16);
Timeline.DOM.registerEventWithObject(divClose, "click", bubble, bubble.close);
divInner.appendChild(divClose);
@@ -151,7 +151,7 @@
divImg.style.left = (pageX - Timeline.Graphics._halfArrowWidth - left) + "px";
divImg.style.top = (margins.top + contentHeight) + "px";
- setImg(divImg, urlPrefix + "images/bubble-bottom-arrow.png", 37, margins.bottom);
+ setImg(divImg, urlPrefix + "images/wrapper.php?file=bubble-bottom-arrow.png", 37, margins.bottom);
divInner.appendChild(divImg);
div.style.left = left + "px";
@@ -164,7 +164,7 @@
divImg.style.left = (pageX - Timeline.Graphics._halfArrowWidth - left) + "px";
divImg.style.top = "0px";
- setImg(divImg, urlPrefix + "images/bubble-top-arrow.png", 37, margins.top);
+ setImg(divImg, urlPrefix + "images/wrapper.php?file=bubble-top-arrow.png", 37, margins.top);
divInner.appendChild(divImg);
div.style.left = left + "px";
@@ -185,7 +185,7 @@
divImg.style.left = (margins.left + contentWidth) + "px";
divImg.style.top = (pageY - Timeline.Graphics._halfArrowWidth - top) + "px";
- setImg(divImg, urlPrefix + "images/bubble-right-arrow.png", margins.right, 37);
+ setImg(divImg, urlPrefix + "images/wrapper.php?file=bubble-right-arrow.png", margins.right, 37);
divInner.appendChild(divImg);
div.style.left = (pageX - Timeline.Graphics._bubblePointOffset - bubbleWidth +
@@ -196,7 +196,7 @@
divImg.style.left = "0px";
divImg.style.top = (pageY - Timeline.Graphics._halfArrowWidth - top) + "px";
- setImg(divImg, urlPrefix + "images/bubble-left-arrow.png", margins.left, 37);
+ setImg(divImg, urlPrefix + "images/wrapper.php?file=bubble-left-arrow.png", margins.left, 37);
divInner.appendChild(divImg);
div.style.left = (pageX + Timeline.Graphics._bubblePointOffset -