From bbdb7fd12f7d0f77eeb598cefc41bbb9ff35b919 Mon Sep 17 00:00:00 2001 From: kmligue Date: Mon, 13 Oct 2014 19:16:12 +0800 Subject: [PATCH 01/10] added option for close button --- messages.js | 4 +- messages_list.html | 4 +- messages_tests.js | 2 +- versions.json | 119 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 versions.json diff --git a/messages.js b/messages.js index 906b5c1..9e457e6 100644 --- a/messages.js +++ b/messages.js @@ -34,7 +34,8 @@ FlashMessages = { options: { autoHide: true, hideDelay: 5000, - autoScroll: true + autoScroll: true, + showCloseButton: false } } @@ -42,5 +43,6 @@ sendMessage = function(message, style, options) { options = options || {}; options.autoHide = options.autoHide === undefined ? FlashMessages.options.autoHide : options.autoHide; options.hideDelay = options.hideDelay || FlashMessages.options.hideDelay; + options.showCloseButton = options.showCloseButton === undefined ? FlashMessages.options.showCloseButton : options.showCloseButton; flashMessages.insert({ message: message, style: style, seen: false, options: options}); } \ No newline at end of file diff --git a/messages_list.html b/messages_list.html index 34aa5b9..8e894cb 100644 --- a/messages_list.html +++ b/messages_list.html @@ -6,7 +6,9 @@