Feature request: Make 'allow_dismiss' .update()-able
I have the requirement to make a notification sticky/persistent whenever its (quite lengthy) underlying operation failed, but using allow_dismiss = true in the $.notify constructor is not an option as i don't wont the user to be able to close the notification will the operation is still running, so being able too change allow_dismiss on the fly would be quite handy.
Can be realized with only 3 additional lines of code:
case "allow_dismiss":
this.$ele.find('[data-notify="dismiss"]').css('display', commands[command] == true ? 'inline' : 'none');
break;
Use like any other .update() e.g.
myNotify.notify({},{
allow_dismiss: false,
showProgressbar: true
}
...
if(e.status 429) {
// Something went foo
// make notification sticky
myNotify.update('allow_dismiss': true)
}
else {
// all good, dismiss the notification
myNotify.close()
}
...
I'll look into this. I will have to see how to best handle this.
+1
I working on an update I hope to release soon. This is already included. I am not currently sure when I am going to release it. I am hoping by the end of the month.