diff --git a/adminstuds.php b/adminstuds.php index 1af93932d9ed064f92663a622947601b0fc5c78b..3c3f017dab5ec511425ca6b7a2ed0f888b8d4ede 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -84,7 +84,7 @@ function send_mail_admin() { global $email_admin; global $poll_title; global $numsondageadmin; - global $smtp_allowed; + global $smtp_allowed; if($smtp_allowed==true){ if(!isset($_SESSION["mail_admin_sent"])) { Utils::sendEmail( $email_admin, @@ -839,11 +839,11 @@ if (substr($dsondage->format, 0, 1)=="D") { // Current date $current = $toutsujet[$i];//format date@hour. ex : 2020292820@10:00 - $horoCur = explode("@",$current); //horoCur[0] = date, horoCur[1] = hour - if (isset($toutsujet[$i+1])){ - $next = $toutsujet[$i+1]; - $horoNext = explode("@",$next); - } + $horoCur = explode("@",$current); //horoCur[0] = date, horoCur[1] = hour + if (isset($toutsujet[$i+1])){ + $next = $toutsujet[$i+1]; + $horoNext = explode("@",$next); + } $border[$i] = false; $radio_title[$i] = strftime($date_format['txt_short'],$horoCur[0]); @@ -1169,6 +1169,7 @@ echo $tr_addition.' if ($compteursujet == 1) { echo ' + <div class="col-sm-12"><h3>' . _("Best choice") . '</h3></div> <div class="col-sm-6 col-sm-offset-3 alert alert-success"> <p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p> ' . $meilleursujet . ' @@ -1176,6 +1177,7 @@ if ($compteursujet == 1) { </div>'."\n"; } elseif ($compteursujet > 1) { echo ' + <div class="col-sm-12"><h3>' . _("Best choices") . '</h3></div> <div class="col-sm-6 col-sm-offset-3 alert alert-success"> <p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p> ' . $meilleursujet . ' diff --git a/css/style.css b/css/style.css index f22af140b97a99ecf77ce4771dad18fc8db6ac15..f3bb3073cda85f8d07d8f4f5da36b5552b638f33 100644 --- a/css/style.css +++ b/css/style.css @@ -156,8 +156,13 @@ caption { /* Tableau du sondage */ #tableContainer { + overflow-x:hidden; + margin:5px auto; +} + +#tableContainer:focus, +#tableContainer:hover { overflow-x:auto; - margin:20px auto; } table.results { diff --git a/js/core.js b/js/core.js index f371c6a8eb8a59b661a5a9e242136559faad307f..dd4a4aa0731304047ddb415c871bfd36dd2b6e09 100644 --- a/js/core.js +++ b/js/core.js @@ -103,7 +103,7 @@ $(document).ready(function() { // HTML code of the new hour var new_hour_html = - '<div class="col-md-2">'+ + '<div class="col-sm-2">'+ last_hour.html().replace(re_label, hour_text+' '+(hj+2)) .replace(re_id,'"d'+di+'-h'+(hj+1)+'"') .replace(/value="(.*?)"/g, 'value=""')+ @@ -405,7 +405,7 @@ $(document).ready(function() { // Vote form moving to the top or to the bottom $(window).scroll(function() { var $table_offset = $('.results thead').offset(); - if(($table_offset == undefined || $(window).scrollTop() > $table_offset.top) && ($('table.results').height() > $(window).height())) { + if(($table_offset == undefined || $(window).scrollTop() > $table_offset.top+150) && ($('table.results').height()-150 > $(window).height())) { $('#addition').before($('#vote-form')); $('#tableContainer').after($('.scroll-buttons')); } else { diff --git a/locale/de_DE/LC_MESSAGES/Studs.mo b/locale/de_DE/LC_MESSAGES/Studs.mo index 4311fa75521cbf54a19a609910deeec581fcf19e..d225d64f535a56e20d67dac5655325fcadafb7f5 100644 Binary files a/locale/de_DE/LC_MESSAGES/Studs.mo and b/locale/de_DE/LC_MESSAGES/Studs.mo differ diff --git a/locale/de_DE/LC_MESSAGES/Studs.po b/locale/de_DE/LC_MESSAGES/Studs.po index ed73b338c60d72b4e92f66b7150fb829ad49facd..2481a7f97d14f5d90f6ada150eb9acedbb0fd716 100644 --- a/locale/de_DE/LC_MESSAGES/Studs.po +++ b/locale/de_DE/LC_MESSAGES/Studs.po @@ -301,6 +301,12 @@ msgstr "Die Wahl speichern" msgid "Addition" msgstr "Hinzufügen" +msgid "Best choice" +msgstr "Bste Wahl" + +msgid "Best choices" +msgstr "Besten Wahlen" + msgid "The best choice at this time is:" msgstr "Die beste Wahl ist derzeit:" diff --git a/locale/en_GB/LC_MESSAGES/Studs.mo b/locale/en_GB/LC_MESSAGES/Studs.mo index d4623e0ba7e674c6584a38444feb92f2c73df9b7..54aba0404469a72aa4860252b777e5c624b05758 100644 Binary files a/locale/en_GB/LC_MESSAGES/Studs.mo and b/locale/en_GB/LC_MESSAGES/Studs.mo differ diff --git a/locale/en_GB/LC_MESSAGES/Studs.po b/locale/en_GB/LC_MESSAGES/Studs.po index e01b3ab046746bdb63e7e0cee4b51cc1afbf6513..4510ab90e3af51003f4985671deed83670e348f7 100644 --- a/locale/en_GB/LC_MESSAGES/Studs.po +++ b/locale/en_GB/LC_MESSAGES/Studs.po @@ -307,6 +307,12 @@ msgstr "Save the choices" msgid "Addition" msgstr "Addition" +msgid "Best choice" +msgstr "Best choices" + +msgid "Best choices" +msgstr "Best choices" + msgid "The best choice at this time is:" msgstr "The best choice at this time is:" diff --git a/locale/fr_FR/LC_MESSAGES/Studs.mo b/locale/fr_FR/LC_MESSAGES/Studs.mo index 006378a3beae041d84ae1719f4184b67d7527cf0..dd5ee79dc0a111d3d6cf041b384e39755ff1bf7c 100644 Binary files a/locale/fr_FR/LC_MESSAGES/Studs.mo and b/locale/fr_FR/LC_MESSAGES/Studs.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/Studs.po b/locale/fr_FR/LC_MESSAGES/Studs.po index 66aa4fc76079cf4b4640796e67de7205ac27c816..62302fefda267eceba00209c9061416911fff69c 100644 --- a/locale/fr_FR/LC_MESSAGES/Studs.po +++ b/locale/fr_FR/LC_MESSAGES/Studs.po @@ -307,6 +307,12 @@ msgstr "Enregister les choix" msgid "Addition" msgstr "Somme" +msgid "Best choice" +msgstr "Meilleur choix" + +msgid "Best choices" +msgstr "Meilleurs choix" + msgid "The best choice at this time is:" msgstr "Le meilleur choix pour l'instant est :" diff --git a/studs.php b/studs.php index 9918083a499a49948a4726c734e6f8eb3c2f22fc..6ec461a366d16bc85d79b7ed015684b791adf022 100644 --- a/studs.php +++ b/studs.php @@ -333,11 +333,11 @@ if ($dsondage->format=="D"||$dsondage->format=="D+"||$dsondage->format=="D-") { // Current date $current = $toutsujet[$i]; - $horoCur = explode("@",$current); //horoCur[0] = date, horoCur[1] = hour - if (isset($toutsujet[$i+1])){ - $next = $toutsujet[$i+1]; - $horoNext = explode("@",$next); - } + $horoCur = explode("@",$current); //horoCur[0] = date, horoCur[1] = hour + if (isset($toutsujet[$i+1])){ + $next = $toutsujet[$i+1]; + $horoNext = explode("@",$next); + } $border[$i] = false; $radio_title[$i] = strftime($date_format['txt_short'],$horoCur[0]); @@ -645,6 +645,7 @@ echo $tr_addition.' if ($compteursujet == 1) { echo ' + <div class="col-sm-12"><h3>' . _("Best choice") . '</h3></div> <div class="col-sm-6 col-sm-offset-3 alert alert-success"> <p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p> ' . $meilleursujet . ' @@ -652,6 +653,7 @@ if ($compteursujet == 1) { </div>'."\n"; } elseif ($compteursujet > 1) { echo ' + <div class="col-sm-12"><h3>' . _("Best choices") . '</h3></div> <div class="col-sm-6 col-sm-offset-3 alert alert-success"> <p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p> ' . $meilleursujet . '