[IPOL discuss] slider inputs for IPOL demos

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Mon Mar 7 15:47:41 CET 2011


> Please try the demo on my webpage
>    http://www.math.ucla.edu/~getreuer/jqslider.html

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

> The advantage of the JQueryUI version is that the slider has more
> features (like keyboard support), a well-developed JavaScript
> interface that facilitates more readable code, and the library is
> maintained by the web experts.  I much prefer the JQueryUI version
> over my previous implementation.

Can I conclude that you recommend Jquery for the JavaScript parts of
IPOL? Who on the list has some JavaScript experience (I don't) and can
confirm this?

@Soufiane: Which JavaScipt framework did you use for the PLATO project?
@Agustin: Do you think you could have a look at Jquery when implementing
the lens distortion and snakes demos?

> If there is anything to complain about, the JQuery+JQueryUI libraries
> are rather hefty (82 KB), which is enough to affect page load speed
> [2].  My previous and very minimal implementation is much smaller (4
> KB).  Then again, we are probably also loading ~100 KB in images on
> the demo page anyway, so it seems this point doesn't matter so much
> here.

And the libraries are only downloaded once and kept in the browser
cache for all the subsequent uses, so this load speed shouldn't be a
big problem. Moreover, the downloaded library can (and hopefully will)
be used for much more than sliders, it's quite like comparing apples
and oranges.

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);
    });

2. To use such sliders in IPOL, we will probably need to modify the
templates because for the moments one can only customize the HTML body 
from the app/xxx/template/ folders. I think we should
* provide a way to customize the HTML head links to include references
  to the 3 external files of the library when a demo needs it
* for the moment, include our custom javascript functions (such as
  your createLinkedSlider()) in the document header, just as you did
  on http://www.math.ucla.edu/~getreuer/jqslider.html
* when a function is used by more than one demo, include it in a
  jquery-ipol.js file available to all demos and included together
  like the 3 jquery files

-- 
Nicolas LIMARE
http://nicolas.limare.net/                         pgp:0xFA423F4F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20110307/749d20f9/attachment.pgp>


More information about the discuss mailing list