Impromptu


Well i’m thinking once again on Impromptu. My new thoughts are having multiple “states”. This would be completely optional and would not change the way you can use Impromptu in its simplest form. The idea behind States is after submitting the prompt, without closing it may morph into another “State” (different content and buttons ideally using pretty effects). That being said there are a few ways I could go about doing this. I could allow a string or a array/hash for my content argument:


//simple one state
$.prompt('hello world');

//complex multi state
$.prompt(['hello 1', 'hello 2', 'hello 3']);

While this seams nice we still may have different buttons for each state, and this isn’t very flexible as far as that goes. Another option may be to have another function to add extra states, sort of queuing up the prompts..


$.prompt('my state');
$.addPromptState('my state 2',options1);
$.addPromptState('my state 3',options2);

//or pass a hash to name our states
$.addPromptStates({
state1: {...},
state2: {...},
state3: {...}
});

So again I’m just throwing it out there to see if I get any bites. This isn’t set in stone but I think it could be a nice feature to ad some application like effects and feeling to Impromptu. Any one have any thoughts or suggestions?

Lately I’ve run into a brick wall. While working on the new version of Impromptu, I’ve had many requests to restrict the tab out of the prompt. Problem is how do you determine which element has focus without some ugly hacks like adding a class name to the element on its focus event, then removing it on blur.

The ideal solution would have jquery selector for :focus which would return the focused element, so then I would do something like so:


if($('.jqi :focus').length == 0){
$('.jqi').focus();
}

The problem is this selector isn’t implemented, or is it(are there any plugins out there)? Is it possible to retrieve such? Well of course everything is possible, but may not be pretty! So, does anyone have any suggestions?

Clean Blue Impromptu ThemeTo all the Impromptu users tired of the same old themes and don’t want to create one, we have a new theme option. Example 14 contains an example of using this theme. Just view the examples.css to snatch the code!  This one has the look and feel of a much more traditional dialog box for all you old schoolers out there.  Anyone else have any good impromptu themes let me know, i’ll gladly link to you!

Thanks for the escape key contributions as well as catching and reporting other bugs.   To the best of my knowledge I have those fixed and updated the documentation(the rounded corner example as well).  Although these weren’t crucial fixes still may want to grab the latest.

jQuery Impromptu is ready.  I made a few minor fixes mentioned in the comments:

  • like adding javascript:; to the iframe
  • it now properly returns the correct jquery object
  • iframe is now an option
  • I added a close button(hence another line of css)

Get it here!

The plugin everyone has been waiting for: Impromtu 1.3!!! Sorry for dragging around for so long on this but its here a long with some awesome additions and bug fixes!! Whats different you ask?

  • An option to focus a button by default
  • An option for zIndex if you need to change it from the default
  • If you click outside the prompt you will get a nice blinking effect on the prompt
  • Escape key should now close the prompt without submitting the form
  • $.prompt now returns a container with the fade and the prompt created
  • Fixed a bug if the body was shorter than the window so was the fade

So all of these additions what did you take out? Just the container option. This option in my opinion was too buggy and not all that useful, so away it went. So there we have it, please give it a shot and remember, it doesn’t have any bugs, just undocumented “features”. Enjoy!

Get It Here!

Hello Impromtpu users. I’m sorry to say as of late I haven’t had time to produce regular updates and upgrades to Impromptu. My work outside of “javascript land” has kept me from doing so for the past few months. However that being said over the next few months I hope to play with it a little more. Here are a few of my additions/corrections to the plugin which I plan to address:

  • If container option is body and body is smaller than the client viewing window, then use the client height width for the overlay. (this would need to recalculate upon window resize)
  • An option for the focused submit button
  • More accessible form. As of now the form is not a true form, so hitting enter doesn’t submit it. It would be nice to have this work for accessibility.
  • Add a promptClose function. This would allow you to call this function to manually close the prompt at any time.

Again these are a few of my plans(most of which I’ve gathered from the community, Thank You for your responses). Also as always if you have any suggestions, fixes, or improvements please let me know!

If you’re using an earlier version of Impromptu you should look at downloading this new version(it should be backwards compatible unless you’ve made changes).  Previously Impromptu worked great in all browsers except IE6.  Why IE6?  Because of its lack of support for position: fixed; After beating my head on my desk for hours it finally come together.

Previously in IE6 it would fade out the screen but the prompt would stay put, sometimes causing it to be scrolled out of view.  Now that is all fixed. Be sure to check the css on the project page.  A previous IE css hack has been removed and Impromptu takes care of all cross-browser issues just like it should :)
Download Impromptu 1.2

Impromptu 1.1 is now available(since sunday, sorry for the delayed post).  Everything works ok for me, but I don’t count for everyone, so if you see any issues please let me know.  That being said if you need the previous working version(1.0) for the time being, it can be located here.  I hope no one needs this one but better safe than sorry! If you’ve downloaded since Sunday you probably already have 1.1. 

It almost time.  I will be releasing the next version of jQuery Impromptu soon!  (Probably Sunday or Monday)  Among the next additions will be the following:

  • “Smart” iframe to cover elements that bleed through the fade(ie6, flash, applets)
  • “loadComplete” as a function to execute when the prompt has finished loading(after entrance effects)
  • A few CSS fixes for a few bugs.  This will go into the documentation for the CSS templates
  • Possibly using a form within the prompt to make it more “proper” and submitting easier
  • An option to focus a button by default

Thanks to everyone who has helped out so far on making Impromptu so great!  Please don’t hesitate to suggest something.  Keep in mind though, I want to do my best not to require any extra plugins and to keep everything as backwards compatible as possible so everyone has little trouble upgrading.  I look forward to hearing ideas!

Next Page »