Hi! I've managed to get the config.command work, but there are still two issues I need to solve. So, when there is only one infobox (3), the template content is displayed in the config.command popup and the popup position is adjusted so the popup is completely on the screen. Which is how it should be. However, when there is more than one template present (4), buttons appear instead of the tables. Only when you click on the button does the corresponding table appear. There are two problems: 1. The position of the containing popup is not adjusted, so a part of the table is off-screen. 2. Clicking on the preceeding button and thus displaying the corresponding table pushes down the following button instead of being displayed over it in a popup fashion.
I should explain that for each table a button and a div are generated and that the div is hidden (display: none;), which is why the popup is correctly aligned with the button. Displaying the div does not adjust the popup's position. (I should note that if the divs were displayed initially, the popup position was adjusted.) I've tried adjusting position by modifying the window.adjustSliderPos function from Eric's NestedSlidersPlugin (1), but couldn't get it to work. I also tried creating a popup using Popup.create function, both inside the createTiddlyButton function and as a separate function, but I couldn't get it to work either. I also tried assigning z-index values to divs anf buttons, but they were ignored. I'm pretty much at the end of my knowledge. Can anyone shed any light? The test version is up (2). With indentation. :) (1) http://www.TiddlyTools.com/#NestedSlidersPlugin (2) http://infoboxes208test.tiddlyspot.com/ (3) http://infoboxes208test.tiddlyspot.com/#[[Infoboxes test single infobox]] (4) http://infoboxes208test.tiddlyspot.com/#[[Infoboxes test multiple infoboxes]] On Sep 12, 12:50 pm, PMario <[email protected]> wrote: > As I wrote allready: your code is terribly hard to read, because of > missing indentation. > No solutions - Just some hints. > > On Sep 12, 4:00 pm, whatever <[email protected]> wrote:> Here are the > problems for the command: > > 1. The popup is quite wide and the position isn't adjusted, so some of > > it is off-screen. > > The popup div is created with absolut positioning. The "top" and > "left" styles are set near the command buttons position. You'll need > to overwrite "top/left" after you calculated the real div's width. > (google search: mdn div width calculation) may find something. mdn > ishttps://developer.mozilla.org/en-US/ > > > 2. Clicking on the popup closes it (but not if you select some text). > > I only want it to close when I click off it. > > I did a short test with a standard popup like "fields" button, which > has the exact same behaviour. So it seems to be inherited from the > core popup macro. It may also depend on the browser you are using. (I > did test with FF15 ubuntu). You'll probably need to hijack the core > popup close function. > > > 3. How do I put other popups on this popup? Because when there is more > > than one infobox, I want the root popup to output the buttons, not the > > actual tables > > I think Eric figured it out. Borrow from nested sliders plugin ;) > > > This problem occurs in the body: > > 4. In order to hide the DIV with the table, you first need to click on > > it twice. After that show/hide works on every click. > > There is some code like {{{event.stopPropagation();}}} which stops > mouse events from bubbling. May be there is some "wrong > initialisation" when buttons are created. > > -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" 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/tiddlywiki?hl=en.

