• Tooltip + Dojo?

    By Peter Kempf 2 decades ago

    I've managed to add a javascript tooltip so that when you mouse over the first column you get an abstract of the document contents. Unfortunately I don't think my work is re-usable and I'd like to find something more universal.



    To achieve this I had to

    1) modify the form to compute a field using @abstract - you can't use this formula in a view.

    2) Create a special view that listed all documents by unid, and then used a special form formula to display just the contents of the abstract field, and set a content type of text/plain

    3) alter the jsNotesView2.1.6 to create a mouseover function to call some third party tooltip code.

    4) third party tooltip code (see nicetitle) needed work because i was inserting it into a dynamically generated page (jsNotesView).



    I found that injecting dynamic javascript into dynamic javascript was challenging (messy) from a browser support perspective. The differences between firefox and msie were really frustrating.



    This leads me to ask a question. Wouldn't it be advisable to use an ajax toolkit that handled browser compatibility issues? If you don't, we'll all be stuck coding around them. And, I would think there were some nice widgets in Dojo that would enhance the user experience. I'm no Dojo expert, but I'm going to start looking into it in my "spare" time, at least for my tooltip!



    And if anyone has an idea of how to generate a tooltip dynamically without special forms and views, post it!

    • More Dojo?

      By Peter Kempf 2 decades ago

      Maybe Dojo would be a good toolset to use to enhance this project. I've tested by incorporating a tooltip, although not in the most generic way. It can be challenging since the view is dynamic, adding more dynamic features with dojo means you have order your events carefully.



      I'm wondering if there is a dojo widget that would replace the view "slider"? Maybe the stack container?

      http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/layout/stack-container



      There would be advantages to using dojo - cross browser support, interesting widgets, debugging console…

      • Dojo, Debug Console, etc

        By Jeremy G Hodge 2 decades ago

        Hi Peter …



        I agree Dojo has some interesting offerings, however, because NotesView2 is a widget meant to plug into many different development environments, including an external package such as Dojo adds an extra layer of complexity that could cause uneeded complication to the project, and ultimately to the end implementer.



        I think you'll be happy to know however, that some the features you mentioned from the Dojo Tookit, such as the debugging "console", etc are being built into the next release. I think you'll find that extended NotesView2 and implementing custom code such as a tooltip document preview much easier with "NotesViewNext" … When comes down to cross-browser implementations, no matter what the underlying infrastructure is (Dojo, YUI, etc) if you extend it, you'll have to worry about that headache with whatever code you implement. Stay tuned for this next release and i think you'll find it much easier to extend.



        (BTW, If i can get it done, I want to implement a JavaScript based NotesDocument class that would make it easier to produce a tooltip document preview, without the extra fields, views, etc)



        Thanks



        jeremy