]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 2 Dec 2014 17:15:13 +0000 (17:15 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 2 Dec 2014 17:15:13 +0000 (17:15 +0000)
fluidbook/compile/_js/esapi.js
fluidbook/compile/_js/fluidbook.js
inc/ws/Metier/class.ws.book.parametres.php

index 82e0ffcde275f0ace6069e168ab82b9fa66958f2..95846c82ef7cb16e0103db76ee4ddf00964613ba 100644 (file)
@@ -558,12 +558,14 @@ org.owasp.esapi.HTTPUtilities = function () {
                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));
                }
        };
index 1ad41eb2ec0feb37b473e08be95b000cdbb335fe..e1c72a2f106d2ad27db61ed44e389f9e0ba258b0 100644 (file)
@@ -54,7 +54,9 @@ function parseGet(res) {
        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;
 }
@@ -112,22 +114,6 @@ function getCookie(nom)
 {
        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)
 {
@@ -137,21 +123,6 @@ 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);
index c333be5301f662bc6972afe92e6ef9556e6cd81f..07378f07084c616b94e27cced4b9a0567bc3ad2b 100644 (file)
@@ -166,8 +166,11 @@ class wsBookParametres extends wsParametres {
                $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"));