[Debtags-commits] [svn] r2004 - web/trunk/cloud

Erich Schubert erich at costa.debian.org
Thu Oct 5 13:19:12 UTC 2006


Author: erich
Date: Thu Oct  5 13:19:11 2006
New Revision: 2004

Modified:
   web/trunk/cloud/index.html
Log:
start at no tags, add removal of selected tags

Modified: web/trunk/cloud/index.html
==============================================================================
--- web/trunk/cloud/index.html	(original)
+++ web/trunk/cloud/index.html	Thu Oct  5 13:19:11 2006
@@ -21,7 +21,7 @@
 			var baseurl = "http://debtags.alioth.debian.org/cgi-bin/index.cgi?tags=";
 			var magicscale = 50;
 
-			var selectedtags = ["use::editing", "interface::commandline"];
+			var selectedtags = [];
 			function update() {
 				var bindArgs = {
 					url: "/cgi-bin/erich/" + selectedtags.join("/"),
@@ -53,6 +53,17 @@
 				update();
 			}
 
+			function unselectTag(event) {
+				var newtags = [];
+				for (var i=0; i<selectedtags.length; i++) {
+					if (selectedtags[i] != this.name) {
+						newtags.push(selectedtags);
+					}
+				}
+				selectedtags = newtags;
+				update();
+			}
+
 			function doCloud(event) {
 				if (!this.expanded) {
 					this.expanded = makeCloud(this.span, this);
@@ -150,6 +161,10 @@
 			function showSelected(node, tags) {
 				node.innerHTML="";
 				for (var i=0; i < tags.length; i++) {
+					var obj = {
+						name: tags[i],
+						unselectTag: unselectTag
+					}
 					var span = document.createElement("span");
 					var a = document.createElement("a");
 					a.className="tag_sel";



More information about the Debtags-commits mailing list