[IPOL discuss] slider inputs for IPOL demos

Pascal Getreuer getreuer at gmail.com
Mon Mar 7 22:37:27 CET 2011


Hi, thanks for the feedback!

> Thanks for your efforts Pascal, these sliders are very nice. Did you
> need to spend a lot of time to study and understand Jquery?

JQuery and JQueryUI both have superb documentation.  For the slider
demo, I learned just about everything I needed from the documentation
on JQueryUI's slider:
    http://docs.jquery.com/UI/Slider

So far I only know the slider.  I feel positive though that other
components would be easy to pick up as well.

> About the implementation:
>
> 1. Is it possible to write this part of the code in the document <body>?
>
>    $(document).ready(function() {
>        createLinkedSlider('#value1', '#slider1', 1, 8, 0.1);
>        createLinkedSlider('#value2', '#slider2', 0, 1, 0.01);
>    });

Yes, it looks like that works.  I have updated the demo at

    http://www.math.ucla.edu/~getreuer/jqslider.html

where createLinkedSlider is now called in the body.  (Actually, the
definition of createLinkedSlider can also be placed in the body, but
moving a certain LINK element outside of the header breaks XHTML
strict validity.)  So demos can use JQuery sliders without requiring
customized changes to the header.

I like the idea of starting an "ipol-jquery.js" that would include
things like the createLinkedSlider definition.  What else could
JavaScript do that would be valuable for IPOL?  I am not suggesting to
go JavaScript crazy, but here are a few things I was thinking about.
   * Image cropping with improved interactivity
   * Progress bar for a demo that take longer to compute (this was
discussed earlier, work is also needed on the Python end to poll the
program's progress)
   * On the results page, other ways of organizing/visualizing multiple images


Pascal Getreuer



More information about the discuss mailing list