Thanks! This looks like a magic for me since I'm not so familiar with jQuery :)
However, it seems that it is used to manipulate with DOM elements from ubiquity command, is it right? In my case I need to execute JS function when user changes state of checkbox in preview window. Thanks anyway, I guess I have to learn much more about JavaScript :) On Dec 8, 11:48 pm, Aza <[email protected]> wrote: > Take a look here: > > http://hg.toolness.com/ubiquity-firefox/file/608427400f93/ubiquity/st... > > The new rotate-image command does some dynamic stuff. > > -- aza | ɐzɐ -- > > 2008/12/8 svd <[email protected]> > > > > > Thanks! > > > However, it seems the template in your command does not have any > > JavaScript embedded, right? > > Anyway, I will check again if it is enough to have string template or > > if it is needed to have a template file. > > > On 2 дек, 03:09, Hu.Ziming <[email protected]> wrote: > > > On Tue, Dec 2, 2008 at 5:01 AM, svd <[email protected]> wrote: > > > > > Thanks, I will try that! > > > > > I tried to put JS code into templated defined as string, but it didn't > > > > help, will try file template... BTW, if I want to distribute such > > > > command, how the template will be distributed? > > > > > Best Regards, > > > > Slava > > > > I have written the whole template in a string, and renderTemplate can > > > render is well. > > > my code is placed at github,http://gist.github.com/25703 > > > hope is useful. > > > > ^_^ > > > > > On Dec 1, 8:20 pm, "Douglas Nogueira" <[email protected]> > > > > wrote: > > > >> Take a look in the command "map", he defines a html template for the > > preview > > > >> (map.html). > > > >> I hope that helps! > > > > >> ---- > > > >> Doug > > > > >> 2008/11/29 svd <[email protected]> > > > > >> > Hello, > > > > >> > I'm trying to make a new command which displays some data in preview > > > >> > panel, and I'd like to have it "dynamic". Particularly, I have some > > > >> > check boxes there and I need to perform some actions when checkbox > > > >> > state is changes. I have something like this: > > > > >> > var text = "<input type='checkbox' onchange='myFunction();'/> > > > > >> > I have myFunction() defined in the Ubiquity's command editor, but it > > > >> > is not accessible from the preview panel. Is it possible to access > > it > > > >> > somehow? > > > > >> > I could assume that it is possible to define html template for the > > > >> > preview and have JS function identified there, but I would like to > > > >> > reuse code from the commands and do not want to have it duplicated. > > > > >> > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ubiquity-firefox" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ubiquity-firefox?hl=en -~----------~----~----~----~------~----~------~--~---
