Very cool library! The one thing all of these type of things lack (e.g. this, dojo.dialog()) is that they are non-blocking to the execution thread, unlike alert()/confirm()/prompt(). I know it's not their fault, javascript doesn't allow this natively, but i feel like that would be immensely useful for general user input, form validation and the like. Yes, I am aware that it can be done currently through workarounds,…
Looking at the other comments, I think there might be a misunderstanding. The last thing you want is a UI blocking popup like alert() that, at least in browsers like Firefox and IE, effectively lock the entire browser from doing anything, which is a terrible anti-pattern in multi-tabbed browsers. Chrome did it right, at least with the HTTP authentication prompt, to make the UI block on a per-tab basis and have the pr…
Alertify.js
71–79 of 79 posts
Re: Alertify.js
#72I think that if you'd split this two things into two different libraries it would be better (e.g.: if i want only dialogs i'd prefer to include just them)
Re: Alertify.js
#73Re: Alertify.js
#74HALP! Does anyone know of a jQuery plugin that has notifications like they do on OSX. For example, when you raise the volume or mute you see that rounded transparent square? Is there something like that for the web?
jGrowl is a jQuery plugin that raises unobtrusive messages
within the browser, similar to the way that OS X's Growl
Framework works.
It is pretty old by now (4 years), but a benefit of that is that it supports older browsers too.And this plug-in is also close. Build on top of jQuery UI, so small footprint, but you'd need that library.
http://www.erichynds.com/examples/jquery-notify/
This is a growl/ubuntu-like notification system built on
top of jQuery UI.Re: Alertify.js
#75Earlier quoted context omitted.
Are you saying it would be good for them to block? Why? When they execute, they run a callback with the input provided. Inside that callback, do whatever you need to do that requires some input.
Sometimes it's just easier to have linear code with some blocking than to create an entire state machine. Yes there are libraries that get close to this. No, it's still not the same.
async.waterfall([ function getInput(){...}, function checkInput(){...}, function submitInput(){...}, ], function finally(){})
Each of the functions takes a callback, and returns err (if any) and output. If a callback returns err, it jumps to finally where you say what failed.
This is odd when you first get started with async, but it's really easy to visualize.
Think of a production line, with a number of different workers doing different stuff. If one of them gets a dud part, it throws it away.
Re: Alertify.js
#76Earlier quoted context omitted.
Looking at the other comments, I think there might be a misunderstanding. The last thing you want is a UI blocking popup like alert() that, at least in browsers like Firefox and IE, effectively lock the entire browser from doing anything, which is a terrible anti-pattern in multi-tabbed browsers. Chrome did it right, at least with the HTTP authentication prompt, to make the UI block on a per-tab basis and have the pr…
FWIW, Firefox handles alert() much better than Chrome does. In Firefox, you can navigate away from the page, and switch tabs. Chrome won't let me open a new tab, and keeps the alert in front of other pages.
Re: Alertify.js
#77Re: Alertify.js
#78Earlier quoted context omitted.
Sometimes it's just easier to have linear code with some blocking than to create an entire state machine. Yes there are libraries that get close to this. No, it's still not the same.
You can have linear code without blocking - it's exceptionally common in the node world. async.waterfall([ function getInput(){...}, function checkInput(){...}, function submitInput(){...}, ], function finally(){}) Each of the functions takes a callback, and returns err (if any) and output. If a callback returns err, it jumps to finally where you say what failed. This is odd when you first get started with async, but…
Re: Alertify.js
#79Earlier quoted context omitted.
FWIW, Firefox handles alert() much better than Chrome does. In Firefox, you can navigate away from the page, and switch tabs. Chrome won't let me open a new tab, and keeps the alert in front of other pages.
This may be platform dependent. I was just stuck in a FF alert that was a modal top-level window manager managed window the other day on Linux.