Subject: | Improve new_entry screen |
Add a little JavaScript so the tag in the tags window on the right of the new entry screen will be appended to the tags field when they're clicked. No more typos when you're typing in tags.
--- templates/user_tags.html.orig 2005-04-10 17:10:55.000000000 +1200
+++ templates/user_tags.html 2005-04-10 17:11:40.000000000 +1200
@@ -30,6 +30,15 @@
refilter_tags();
}
}
+
+ function append_to_tags(i) {
+ if (document.forms["entryform"].tags.value == "") {
+ document.forms["entryform"].tags.value = i;
+ } else {
+ document.forms["entryform"].tags.value =
+ document.forms["entryform"].tags.value.concat(" " , i);
+ }
+ }
</script>
<div class='taglist all' id='user_tags'>
@@ -45,7 +54,7 @@
<div class='tag'>
<span class='tag_count'>[% tag.1 %]</span>
- <a href='[% uri.entries(username => user, tags => [ tag.0 ]) %]'>
+ <a href="javascript:append_to_tags('[% tag.0 %]')">
[% tag.0 %]
</a>