marki responded: |
2010-10-25 13:28 |
|
|
Ben Bimber responded: |
2010-10-25 13:37 |
yes, that's exactly what i'm looking for. |
|
Ben Bimber responded: |
2010-10-28 09:00 |
hi mark,
i attached a screenshot. there's two places with title on a view: the title that appears in the top-left (which is set using LABKEY.NavTrail.setNavTrail) and a title that is given to the webpart on the page. This particular view based is an HTML file in a simple module. All the page does it load an ext panel into a div. If I understand this correctly, labkey automatically displays the webpart-like border around file-based views. It seems to give this border a title based on the name of that view. Is there a js API to customize that? |
|
marki responded: |
2010-10-28 11:13 |
|
|
Ben Bimber responded: |
2010-10-28 11:17 |
should have been a little clearer: the xml lets you give all instances of that view the same name. we've done that in some other cases.
can i use JS to set a custom name based on some other logic? for example, changing the title based on the type of form being loaded (assuming one HTML file loads every type of form) or appending animal ID to the title? |
|
jeckels responded: |
2010-10-29 11:07 |
Hi Ben,
We don't have an API to set this, but it's possible to use XPath in JavaScript to get the DOM element for the header and change its text content. As you'd expect, this could break in a future release if we change the way we generate the HTML for the header.
Thanks,
Josh |
|