From 9800c2ea3f693f49d067d4aa2a8036d2da253d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?iFish=28=E6=9C=A8=E9=B1=BC=29?= Date: Sat, 11 Jul 2015 16:36:07 +0800 Subject: [PATCH] modify bootstrap-notify.js --- ChatRoomServer.Www/Scripts/bootstrap-notify.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ChatRoomServer.Www/Scripts/bootstrap-notify.js b/ChatRoomServer.Www/Scripts/bootstrap-notify.js index 40beb71..d9e6599 100644 --- a/ChatRoomServer.Www/Scripts/bootstrap-notify.js +++ b/ChatRoomServer.Www/Scripts/bootstrap-notify.js @@ -138,14 +138,20 @@ if (commands[command] === -1) { //Ñ­»· this.$ele.find('[data-notify="progressbar"]').addClass("marquee"); - commands[command] = 50; } else { this.$ele.find('[data-notify="progressbar"]').removeClass("marquee"); - } - var newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100)); - this.$ele.data('notify-delay', newDelay); - this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[command]).css('width', commands[command] + '%'); + var newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100)); + this.$ele.data('notify-delay', newDelay); + this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[command]).css('width', commands[command] + '%'); + } + break; + case "showProgressbar": + if(commands[command]===true){ + this.$ele.find('[data-notify="progressbar"]').show(); + }else{ + this.$ele.find('[data-notify="progressbar"]').hide(); + } break; case "url": this.$ele.find('[data-notify="url"]').attr('href', commands[command]);