[Debtags-commits] [svn] r2003 - web/trunk/cloud
Erich Schubert
erich at costa.debian.org
Thu Oct 5 13:11:16 UTC 2006
Author: erich
Date: Thu Oct 5 13:11:16 2006
New Revision: 2003
Modified:
web/trunk/cloud/index.html
Log:
first try at allowing selection of additional tags
Modified: web/trunk/cloud/index.html
==============================================================================
--- web/trunk/cloud/index.html (original)
+++ web/trunk/cloud/index.html Thu Oct 5 13:11:16 2006
@@ -21,10 +21,10 @@
var baseurl = "http://debtags.alioth.debian.org/cgi-bin/index.cgi?tags=";
var magicscale = 50;
- var tags = ["use::editing", "interface::commandline"];
+ var selectedtags = ["use::editing", "interface::commandline"];
function update() {
var bindArgs = {
- url: "/cgi-bin/erich/" + tags.join("/"),
+ url: "/cgi-bin/erich/" + selectedtags.join("/"),
error: function(type, data, evt){ alert("error"); },
mimetype: "text/json",
};
@@ -48,6 +48,11 @@
return b[1] - a[1];
}
+ function selectTag(event) {
+ selectedtags.push(this.name);
+ update();
+ }
+
function doCloud(event) {
if (!this.expanded) {
this.expanded = makeCloud(this.span, this);
@@ -82,7 +87,8 @@
if (isfacet) {
dojo.event.connect(a,"onclick",tag,"doCloud");
} else {
- a.href="http://debtags.alioth.debian.org/cgi-bin/index.cgi?tags="+tag.name;
+ //a.href="http://debtags.alioth.debian.org/cgi-bin/index.cgi?tags="+tag.name;
+ dojo.event.connect(a,"onclick",tag,"selectTag");
}
subtags.appendChild(span);
@@ -102,7 +108,8 @@
shortname: data[i][0],
count: data[i][1],
tags: [],
- doCloud: doCloud };
+ doCloud: doCloud,
+ selectTag: selectTag};
if (lastfacet && newtag.name.indexOf(lastfacet.name+"::") == 0) {
newtag.shortname = newtag.shortname.substr(lastfacet.name.length+2);
lastfacet.tags.push(newtag);
@@ -127,6 +134,7 @@
}
function showPackages(node, packages) {
+ node.innerHTML="";
for (var i=0; i < packages.length; i++) {
var div = document.createElement("div");
var a = document.createElement("a");
@@ -140,6 +148,7 @@
}
function showSelected(node, tags) {
+ node.innerHTML="";
for (var i=0; i < tags.length; i++) {
var span = document.createElement("span");
var a = document.createElement("a");
More information about the Debtags-commits
mailing list