aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--themes/default/js/rating.js17
-rw-r--r--themes/default/js/scripts.js72
-rw-r--r--themes/default/local_head.tpl2
-rw-r--r--themes/default/theme.css18
4 files changed, 43 insertions, 66 deletions
diff --git a/themes/default/js/rating.js b/themes/default/js/rating.js
index 9b8370e93..0e3006ec2 100644
--- a/themes/default/js/rating.js
+++ b/themes/default/js/rating.js
@@ -35,16 +35,9 @@ function makeNiceRatingForm(options)
if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
rateButton.parentNode.removeChild(rateButton.previousSibling);
- if(window.addEventListener){ // Mozilla, Netscape, Firefox
- rateButton.addEventListener("click", updateRating, false );
- rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
- rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
- }
- else if(window.attachEvent) { // IE
- rateButton.attachEvent("onclick", updateRating);
- rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
- rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
- }
+ pwgAddEventListener(rateButton, "click", updateRating);
+ pwgAddEventListener(rateButton, "mouseout", resetRatingStarDisplay);
+ pwgAddEventListener(rateButton, "mouseover", updateRatingStarDisplayEvt);
}
resetRatingStarDisplay();
}
@@ -88,8 +81,8 @@ function updateRating(e)
if (gRatingOptions.ratingSummaryElement)
{
var t = gRatingOptions.ratingSummaryText;
- var args =[result.average, result.count, result.stdev], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
- _xxx = t.match( rexp );
+ var args =[result.average, result.count], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
+ //_xxx = t.match( rexp );
while (idx<args.length) t=t.replace(rexp, args[idx++]);
gRatingOptions.ratingSummaryElement.innerHTML = t;
}
diff --git a/themes/default/js/scripts.js b/themes/default/js/scripts.js
index d4595435b..638fccbcf 100644
--- a/themes/default/js/scripts.js
+++ b/themes/default/js/scripts.js
@@ -1,42 +1,30 @@
function SelectAll( formulaire )
{
-var len = formulaire.elements.length;
-var i=0;
-for( i = 0; i < len; i++)
+var elts = formulaire.elements;
+for(var i=0; i <elts.length; i++)
{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = true;
- }
+ if (elts[i].type=='checkbox')
+ elts[i].checked = true;
}
}
function DeselectAll( formulaire )
{
-var len = formulaire.elements.length;
-var i=0;
-for( i = 0; i < len; i++)
+var elts = formulaire.elements;
+for(var i=0; i <elts.length; i++)
{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = false;
- }
+ if (elts[i].type=='checkbox')
+ elts[i].checked = false;
}
}
function Inverser( formulaire )
{
-var len = formulaire.elements.length;
-var i=0;
-for( i=0; i<len; i++)
+var elts = formulaire.elements;
+for(var i=0; i <elts.length; i++)
{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = !formulaire.elements[i].checked;
- }
+ if (elts[i].type=='checkbox')
+ elts[i].checked = !elts[i].checked;
}
}
@@ -46,23 +34,16 @@ function phpWGOpenWindow(theURL,winName,features)
img.src = theURL;
if (img.complete)
{
- var width=img.width +40;
- var height=img.height +40;
+ var width=img.width+40, height=img.height+40;
}
else
{
- var width=640;
- var height=480;
- img.onload = resizeWindowToFit;
+ var width=640, height=480;
+ img.onload = function () { newWin.resizeTo( img.width+50, img.height+100); };
}
newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height);
}
-function resizeWindowToFit()
-{
- newWin.resizeTo( img.width+50, img.height+100);
-}
-
function popuphelp(url)
{
window.open( url, 'dc_popup',
@@ -70,15 +51,12 @@ function popuphelp(url)
);
}
-
-
Function.prototype.pwgBind = function() {
- var __method = this, object = arguments[0], args = new Array();
- for (var i=1; i<arguments.length; i++)
- args[i-1] = arguments[i];
- return function() { return __method.apply(object, args); }
+ var __method = this, object = arguments[0], args = Array.prototype.slice.call(arguments,1);
+ return function() {
+ return __method.apply(object, args.concat(arguments) );
+ }
}
-
function PwgWS(urlRoot)
{
this.urlRoot = urlRoot;
@@ -144,8 +122,8 @@ PwgWS.prototype = {
onStateChange: function() {
var readyState = this.transport.readyState;
- if (readyState == 4)
- this.respondToReadyState(this.transport.readyState);
+ if (readyState==4)
+ this.respondToReadyState(readyState);
},
dispatchError: function( httpCode, text )
@@ -186,3 +164,11 @@ PwgWS.prototype = {
urlRoot: null,
options: {}
}
+
+function pwgAddEventListener(elem, evt, fn)
+{
+ if (window.attachEvent)
+ elem.attachEvent('on'+evt, fn);
+ else
+ elem.addEventListener(evt, fn, false);
+} \ No newline at end of file
diff --git a/themes/default/local_head.tpl b/themes/default/local_head.tpl
index 49d8ca78c..728feb21f 100644
--- a/themes/default/local_head.tpl
+++ b/themes/default/local_head.tpl
@@ -1,5 +1,3 @@
-{* the next css is used to fix khtml (Konqueror/Safari) issue the "text/nonsense" prevents gecko based browsers to load it *}
-<link rel="stylesheet" type="text/nonsense" href="{$ROOT_URL}themes/default/fix-khtml.css">
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css">
<![endif]-->
diff --git a/themes/default/theme.css b/themes/default/theme.css
index a7fa56b83..36b1522f2 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -25,7 +25,7 @@
/* H2 properties copied here */
#menubar DT {
font-weight: bold;
- padding: 5px 5px 5px 5px;
+ padding: 5px;
font-size: 120%;
text-align: center;
}
@@ -219,7 +219,7 @@ DIV.calImg {
.calBackDate {
padding-left: 4px;
- padding-top: 0px;
+ padding-top: 0;
z-index: 2;
position: absolute;
vertical-align: top;
@@ -252,7 +252,7 @@ DIV.calImg {
.content DIV.thumbnailCategory {
display:block;
- padding: 2px 0px 0px 2px;
+ padding: 2px 0 0 2px;
margin: 5px;
}
@@ -627,7 +627,7 @@ UL.actions A, UL.actions IMG {
UL.tagSelection {
width: 99%;
- margin: 1em 0 1em 0;
+ margin: 1em 0;
padding: 0;
}
@@ -642,7 +642,7 @@ UL.tagSelection LI {
font-size: 120%;
text-align: justify;
padding: 0;
- margin: 1em 2em 1em 2em;
+ margin: 1em 2em;
}
#fullTagCloud SPAN {
@@ -813,7 +813,7 @@ INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rate
padding: 10px 50px 10px 10px;
}
-/* Informations box in administration */
+/* Informations box */
.infos {
color: #002000;
background-color: #98fb98; /* palegreen */
@@ -834,16 +834,16 @@ INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rate
padding: 1px;
}
-/* Header notes box in public/administration */
+/* Header notes box */
.header_notes {
- border: 1px solid #aaaaaa; /* border color and style */
+ border: 1px solid #aaa;
text-align: center;
background-image: url(icon/note.png);
background-repeat: no-repeat;
background-position: top left;
font-weight: bold;
margin: 14px;
- padding: 5px 00px 0px 0px;
+ padding: 5px 0 0 0;
}
LEGEND {