diff --git a/contrib/tagger/main.php b/contrib/tagger/main.php
index 3acb8bed..0f6b3b85 100644
--- a/contrib/tagger/main.php
+++ b/contrib/tagger/main.php
@@ -30,7 +30,9 @@ class tagger extends Extension {
$base_href = $config->get_string('base_href');
$tags_min = $config->get_int('ext-tagger_tags-min',2);
- $hidden = $config->get_bool('ext-tagger_respect-hidden',true) ? "AND substring(tag,1,1) != '.' " : null;
+ $hidden = $config->get_bool(
+ 'ext-tagger_respect-hidden',
+ true) ? "AND substring(tag,1,1) != '.' " : null;
$tags = $database->Execute("
SELECT tag
@@ -51,8 +53,12 @@ class tagger extends Extension {
if(is_a($event, 'SetupBuildingEvent')) {
$sb = new SetupBlock("Tagger - Power Tagging");
$sb->add_bool_option("ext-tagger_show-hidden", "Show Hidden Tags");
- $sb->add_bool_option("ext-tagger_clear-tagme", "
Remove 'tagme' on use");
- $sb->add_int_option("ext-tagger_tags-min", "
Ignore tags used fewer than "); $sb->add_label("times.");
+ $sb->add_bool_option(
+ "ext-tagger_clear-tagme",
+ "
Remove 'tagme' on use");
+ $sb->add_int_option(
+ "ext-tagger_tags-min",
+ "
Ignore tags used fewer than "); $sb->add_label("times.");
$event->panel->add_block($sb);
}
}
diff --git a/contrib/tagger/script.js b/contrib/tagger/script.js
index 9c200691..319cac28 100644
--- a/contrib/tagger/script.js
+++ b/contrib/tagger/script.js
@@ -8,7 +8,6 @@ function taggerResetPos() {
// In case the drag point goes off screen.
tagger = byId("tagger_window");
- // reset default position (bottom right.)
tagger.style.top="";
tagger.style.left="";
tagger.style.right="25px";
@@ -17,7 +16,6 @@ function taggerResetPos() {
// get location in (left,top) terms
pos = findPos(tagger);
- // set top left and clear bottom right.
tagger.style.top = pos[1]+"px";
tagger.style.left = pos[0]+"px";
tagger.style.right="";
@@ -39,8 +37,6 @@ function tagExists(tag) {
}
function toggleTag(tag,rTagme) {
-
-
if (!tagExists(tag)) {
addTag(tag);
if(rTagme && tag != "tagme") {
@@ -107,26 +103,47 @@ function setTagIndicators() {
}
}
+function pushSet(form_id) {
+ var set = getSetButton(form_id);
+ if(set) {
+ set.click();
+ }
+}
+
+function getSetButton(form_id) {
+ var form_nodes = getElementsByTagNames('input',byId(form_id));
+ for (i in form_nodes) {
+ node = form_nodes[i];
+ if (node.value=="Set" && node.type=="submit") {
+ return node;
+ }
+ }
+ return false;
+}
+
+var _f_custTag = false;
function tagger_filter(id) {
- var filter = byId(id);
- var e;
-
- search = filter.value;
- // set up single letter filters for first-letter matching only.
- if (search.length == 1)
- search = " "+search;
-
- tag_links = getElementsByTagNames('div',byId('tagger_body'));
-
- for (x in tag_links) {
- tag_id = tag_links[x].id;
- // remove tagger_tag from id, prepend space for first-letter matching.
- tag = " "+tag_id.replace(/tagger_tag_/,"");
- e = byId(tag_id);
- if (!tag.match(search)) {
- e.style.display = 'none';
- } else {
- e.style.display = '';
+ if (_f_custTag) {
+ var filter = byId(id);
+ var e;
+
+ search = filter.value;
+ // set up single letter filters for first-letter matching only.
+ if (search.length == 1)
+ search = " "+search;
+
+ tag_links = getElementsByTagNames('div',byId('tagger_body'));
+
+ for (x in tag_links) {
+ tag_id = tag_links[x].id;
+ // remove tagger_tag from id, prepend space for first-letter matching.
+ tag = " "+tag_id.replace(/tagger_tag_/,"");
+ e = byId(tag_id);
+ if (!tag.match(search)) {
+ e.style.display = 'none';
+ } else {
+ e.style.display = '';
+ }
}
}
}
diff --git a/contrib/tagger/style.css b/contrib/tagger/style.css
index 7b8c99b0..aa93e4fc 100644
--- a/contrib/tagger/style.css
+++ b/contrib/tagger/style.css
@@ -6,6 +6,7 @@
#tagger_window {
position:fixed;
+ text-align:left;
}
#tagger_titlebar {
@@ -15,21 +16,32 @@
top:-0em;
padding:.25em;
border:2px solid;
- border-bottom:1px solid;
- -moz-border-radius:10px 10px 0px 0px;
+ -moz-border-radius:1em;
background-image:none;
- background-color:white;
-
+ background-color:#DDDDDD;
+ margin-bottom:.5em;
cursor:move;
}
-#tagger_body {
+#tagger_body, #tagger_filter {
overflow:scroll;
padding:1em;
border:2px solid;
border-top:none;
background-color:white;
}
+#tagger_filter {
+ overflow:hidden;
+ -moz-border-radius:1em 1em 0 0;
+ border:2px solid;
+ border-bottom:none;
+ margin-bottom:-1px;
+ text-align:center;
+ padding-bottom:1px;
+}
+#tagger_filter input {
+ width:auto;
+}
#tagger_body a {
font-size:1.25em;
diff --git a/contrib/tagger/theme.php b/contrib/tagger/theme.php
index da06e883..63037510 100644
--- a/contrib/tagger/theme.php
+++ b/contrib/tagger/theme.php
@@ -5,45 +5,59 @@
class taggerTheme extends Themelet {
public function build ($page, $tags) {
- global $config;
-
- $tagme = $config->get_string("ext-tagger_clear-tagme","N") == "Y" ? "true":"false";
- $base_href = $config->get_string("base_href");
-
- $tag_html = "";
- foreach ($tags as $tag) {
- $tag_name = $tag['tag'];
- $tag_trunc = $this->trimTag($tag_name,20,"_");
- $tag_html .= "
Tagger gets all the tags in use with 2 or more uses, so the list can get quite large. If you are having trouble finding the tag you are looking for, you can enter it into the box at the top and as you type, Tagger will remove - tags that do not match to aid your search.
-If the tag is not in the list, finish typing out the tag and click "Add" to - add the tag to the image's tag list.
+ tags that do not match to aid your search. Usually, you'll only need one + or two letters to trim the list down to the tag you are looking for. +If the tag is not in the list, finish typing out the tag and click "Add" + to add the tag to the image's tag list.
Tags must have two uses to appear in Tagger's list, so you'll have to enter the tag for at least one other image for it to show up.
Tagger requires javascript for its functionality. Sorry, but there's no - other way to accomplish the tag list modifications.
+Tagger requires javascript for its functionality. Sorry, but there's + no other way to accomplish the tag list modifications.
If you have javascript completely disabled, you will not be able to use Tagger.
Due to the manner in which Tagger is constructed, it will hide along with