Commit f4a73045 authored by Laurent's avatar Laurent

hotline #90214 : Killer feature: notification bar on bottom

parent 6438d8c6
Pipeline #6787 passed with stage
in 67 minutes and 10 seconds
- ticket #90214 : Barre bleue de notification positionnée en bas de l'écran
\ No newline at end of file
......@@ -44,4 +44,6 @@
| public/opac/java/leaflet-ajax-gh-pages/ | MIT | - | Afficher un fond geoJSON dans la boite bibliothèques | | https://github.com/calvinmetcalf/leaflet-ajax |
| icon slideshow by Javier Cabezas | CCBY | | editeur d'articles | | https://thenounproject.com/term/slideshow/6517/ |
| PHP-Parser | BSD-3-Clauses | - | validation de fichiers php (formulaires de recherche) | | https://github.com/nikic/PHP-Parser |
| Jquery Notification | MIT ? | | barre bleue de notification | oui (barre en bas) | n'existe plus |
......@@ -343,13 +343,14 @@ class Class_ScriptLoader {
* voir [[file:~/public_html/afi-opac3/library/ZendAfi/Controller/Action/Helper/Notify.php::class%20ZendAfi_Controller_Action_Helper_Notify%20extends%20Zend_Controller_Action_Helper_Abstract%20{][ZendAfi_Controller_Action_Helper_Notify]]
* @return ScriptLoader
*/
public function notify($message, $autoclose=true, $duration=10, $type='information') {
public function notify($message, $autoclose=true, $duration=3, $type='information') {
return $this
->loadNotificationJS()
->addJQueryReady(sprintf('showNotification(%s)',
json_encode(array('message' => $message,
'autoClose' => $autoclose,
'duration' => $duration,
'showAfter' => 1,
'type' => $type))));
}
......
......@@ -6,7 +6,7 @@ body{
width: 100%;
height: auto;
position: absolute;
top: 0;
bottom: 0;
position: fixed;
z-index: 50000;
margin: 0;
......
/**
* Javascript functions to show top nitification
* Javascript functions to show bottom nitification
* Error/Success/Info/Warning messages
* Developed By: Ravi Tamada
* url: http://androidhive.info
......@@ -49,9 +49,9 @@ function showNotification(params){
$('body').append($notification);
var divHeight = $('div#info_message').height();
// see CSS top to minus of div height
// see CSS bottom to minus of div height
$('div#info_message').css({
top : '-'+divHeight+'px'
bottom : '-' + divHeight + 'px'
});
// showing notification message, default it will be hidden
......@@ -74,7 +74,7 @@ function closeNotification(duration){
var divHeight = $('div#info_message').height();
setTimeout(function(){
$('div#info_message').animate({
top: '-'+divHeight
bottom: '-'+divHeight
});
// removing the notification from body
setTimeout(function(){
......@@ -90,7 +90,7 @@ function closeNotification(duration){
function slideDownNotification(startAfter, autoClose, duration){
setTimeout(function(){
$('div#info_message').animate({
top: 0
bottom: 0
});
if(autoClose){
setTimeout(function(){
......
......@@ -258,7 +258,7 @@ class ScriptLoaderNotificationsBarTest extends ModelTestCase {
/** @test */
public function javascriptToShowNotificationsShouldConcatenateMessagesOneAndTwo() {
$this->assertContains('showNotification({"message":"First message. Second message","autoClose":true,"duration":10,"type":"information"})',
$this->assertContains('showNotification({"message":"First message. Second message","autoClose":true,"duration":3,"showAfter":1,"type":"information"}',
$this->_html);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment