pjs/rdf/resources/ignore-test.xul

46 строки
1.2 KiB
Plaintext
Исходник Обычный вид История

1999-05-16 04:08:34 +04:00
<?xml version="1.0"?>
<?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
1999-05-16 04:08:34 +04:00
<xul:window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script>
function SetIgnore()
{
var tree = document.getElementById('tree');
var ignore = document.getElementById('ignore').value;
dump('setting ignore to ' + ignore + '\n');
tree.setAttribute('rdf:ignore', ignore);
// now force the tree to be rebuilt.
var treebody = document.getElementById('NC:BookmarksRoot');
treebody.setAttribute('id', 'NC:BookmarksRoot');
}
</html:script>
<html:button onclick="SetIgnore();">Set Ignore Attrs</html:button>
<html:form>
<html:input id="ignore" type="text" width="80" />
</html:form>
<tree id="tree" datasources="rdf:bookmarks" onclick="return OpenURL(event,event.target.parentNode);">
<treecol rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treehead>
<treeitem>
<treecell>Name</treecell>
<treecell>URL</treecell>
</treeitem>
</treehead>
<treebody id="NC:BookmarksRoot" />
</tree>
</xul:window>