getRequestParameter: function (sName) {
var url = window.top.location.search.substring(1);
var pIndex = url.indexOf(sName);
- if (pIndex < 0)
+ if (pIndex < 0) {
return null;
+ }
pIndex = pIndex + sName.length;
var lastIndex = url.indexOf("&", pIndex);
- if (lastIndex < 0)
+ if (lastIndex < 0) {
lastIndex = url.length;
+ }
return unescape(url.substring(pIndex, lastIndex));
}
};
var couple = new Array();
for (var i = 0; i < couples.length; i++) {
couple = couples[i].split('=');
- res[couple[0]] = trim($ESAPI.httpUtilities().getRequestParameter(couple[0]), "=");
+ //res[couple[0]] = trim($ESAPI.httpUtilities().getRequestParameter(couple[0]), "=");
+ //res[couple[0]] = $ESAPI.httpUtilities().getRequestParameter(couple[0]);
+ res[couple[0]] = unescape(couple[1]);
}
return res;
}
{
var res = $ESAPI.httpUtilities().getCookie(nom);
return res.getValue();
-
- /*var arg = nom + "=";
- var alen = arg.length;
- var clen = document.cookie.length;
- var i = 0;
- while (i < clen) {
- var j = i + alen;
- if (document.cookie.substring(i, j) == arg) {
- return getCookieVal(j);
- }
- i = document.cookie.indexOf(" ", i) + 1;
- if (i == 0) {
- break;
- }
- }
- return null;*/
}
function setCookie(nom, valeur)
{
cookie.setSecure(window.top.location.protocol === 'https:');
return $ESAPI.httpUtilities().addCookie(cookie);
-
- /*date = new Date;
- date.setFullYear(date.getFullYear() + 10);
-
- var argv = setCookie.arguments;
- var argc = setCookie.arguments.length;
- var expires = (argc > 2) ? argv[2] : date;
- var path = (argc > 3) ? argv[3] : '/';
- var domain = (argc > 4) ? argv[4] : null;
- var secure = (argc > 5) ? argv[5] : false;
- document.cookie = nom + "=" + escape(valeur) +
- ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
- ((path == null) ? "" : ("; path=/")) +
- ((domain == null) ? "" : ("; domain=" + domain)) +
- ((secure == true) ? "; secure" : "");*/
}
function addThis(x) {
addthis_offset_left = parseFloat(x);
$this->fields['soundOn'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Activer les effets sonores à l'ouverture"));
$this->fields['ambientSound'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
'label' => __('Ambiance sonore'), 'grade' => 3, 'fileFilter' => $soundFilter);
+ $this->fields['ambientSoundVolume'] = array('type' => 'integer', 'default' => 50, 'editable' => true,
+ 'label' => __("Volume de l'ambiance sonore"),
+ 'min' => 0, 'max' => 100);
$this->forms['sound'] = array('label' => __('Effets sonores'),
- 'fieldsnames' => array('soundTheme', 'soundOn', 'ambientSound'));
+ 'fieldsnames' => array('soundTheme', 'soundOn', '|', 'ambientSound', 'ambientSoundVolume'));
// .
$this->fields['pdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Activer les fonctions de téléchargement"));
$this->fields['pdfName'] = array('type' => 'text', 'default' => 'document.pdf', 'editable' => true, 'label' => __("Nom du fichier PDF"));