Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kieren Diment
committed
Apr 5, 2010
1 parent
9b625ba
commit f6762aa
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<title>Zotero ssj/jqote template demo</title> | ||
<link rel="stylesheet" type="text/css" media="all" href="../static/css/elastic.css" /> | ||
<link rel="stylesheet" type="text/css" media="all" href="../static/css/local.css" /> | ||
<script src="../static/js/jquery.js" type="text/javascript" language="javascript" charset="utf-8"></script> | ||
<script src="../static/css/elastic.js" type="text/javascript" language="javascript" charset="utf-8"></script> | ||
<script src="../static/js/jquery-1.4.2.min.js" type="text/javascript"></script> | ||
<script src="../static/js/jquery.jqote2.min.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
|
||
<?sjs | ||
var z = Components.classes["@zotero.org/Zotero;1"] .getService(Components.interfaces.nsISupports).wrappedJSObject; | ||
|
||
var render_collection = function(coll) { | ||
if (!coll) { | ||
coll = null; | ||
} | ||
var collections = z.getCollections(coll); | ||
document.writeln("<ul>"); | ||
for (c in collections) { | ||
document.writeln('<li>' + '<a href="view_collection.sjs?name=' + encodeURI(collections[c].name) + '&id=' + collections[c].id + '">' + collections[c].name + '</a></li>'); | ||
if (collections[c].hasChildCollections) { | ||
var childCol = render_collection(collections[c].id); | ||
} | ||
} | ||
document.writeln("</ul>"); | ||
} | ||
render_collection(); | ||
?> | ||
</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters