modify bootstrap-notify.js

This commit is contained in:
iFish(木鱼) 2015-07-11 16:36:07 +08:00
parent f8fc836768
commit 9800c2ea3f

View File

@ -138,14 +138,20 @@
if (commands[command] === -1) { if (commands[command] === -1) {
//Ñ­»· //Ñ­»·
this.$ele.find('[data-notify="progressbar"]').addClass("marquee"); this.$ele.find('[data-notify="progressbar"]').addClass("marquee");
commands[command] = 50;
} else { } else {
this.$ele.find('[data-notify="progressbar"]').removeClass("marquee"); this.$ele.find('[data-notify="progressbar"]').removeClass("marquee");
}
var newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100)); var newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100));
this.$ele.data('notify-delay', newDelay); this.$ele.data('notify-delay', newDelay);
this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[command]).css('width', commands[command] + '%'); 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; break;
case "url": case "url":
this.$ele.find('[data-notify="url"]').attr('href', commands[command]); this.$ele.find('[data-notify="url"]').attr('href', commands[command]);