jnotify.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
  2. // Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
  3. //
  4. // This program is free software; you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation; either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. // or see http://www.gnu.org/
  17. //
  18. //
  19. // \file htdocs/core/js/jnotify.js
  20. // \brief File that include javascript functions for jnotify default options
  21. //
  22. $(document).ready(function() {
  23. $.jnotify.setup({
  24. delay: 3000 // the default time to show each notification (in milliseconds)
  25. , sticky: false // determines if the message should be considered "sticky" (user must manually close notification)
  26. , closeLabel: "&times;" // the HTML to use for the "Close" link
  27. , showClose: true // determines if the "Close" link should be shown if notification is also sticky
  28. , fadeSpeed: 1000 // the speed to fade messages out (in milliseconds)
  29. , slideSpeed: 250 // the speed used to slide messages out (in milliseconds)
  30. , classContainer: "jnotify-container"
  31. , classNotification: "jnotify-notification"
  32. , classBackground: "jnotify-background"
  33. , classClose: "jnotify-close"
  34. , classMessage: "jnotify-message"
  35. , init: null // callback that occurs when the main jnotify container is created
  36. , create: null // callback that occurs when when the note is created (occurs just before appearing in DOM)
  37. , beforeRemove: null // callback that occurs when before the notification starts to fade away
  38. });
  39. });