summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag.php15
-rw-r--r--modules/tag/helpers/tag_theme.php8
2 files changed, 7 insertions, 16 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 01972a65..feaf40c5 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -73,12 +73,16 @@ class tag_Core {
if ($tags) {
$cloud = new View("tag_cloud.html");
$cloud->max_count = $tags[0]->count;
- usort($tags, array("tag_theme", "sort_by_name"));
+ usort($tags, array("tag", "sort_by_name"));
$cloud->tags = $tags;
return $cloud;
}
}
+ static function sort_by_name($tag1, $tag2) {
+ return strcasecmp($tag1->name, $tag2->name);
+ }
+
/**
* Return all the tags for a given item.
* @return array
@@ -109,15 +113,6 @@ class tag_Core {
return $form;
}
- static function get_rename_form($tag) {
- $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-rename-tag-form", "class" => "g-short-form"));
- $group = $form->group("rename_tag")->label(t("Rename Tag"));
- $group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]");
- $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name"));
- $group->submit("")->value(t("Save"));
- return $form;
- }
-
static function get_delete_form($tag) {
$form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "g-delete-tag-form"));
$group = $form->group("delete_tag")
diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php
index ac0dd016..76c0ea6b 100644
--- a/modules/tag/helpers/tag_theme.php
+++ b/modules/tag/helpers/tag_theme.php
@@ -21,16 +21,12 @@ class tag_theme_Core {
static function head($theme) {
$theme->css("jquery.autocomplete.css");
$theme->script("jquery.autocomplete.js");
- $theme->css("tag.css");
$theme->script("tag.js");
+ $theme->css("tag.css");
}
static function admin_head($theme) {
$theme->css("tag.css");
- $theme->script("tag.js");
- }
-
- static function sort_by_name($tag1, $tag2) {
- return strcasecmp($tag1->name, $tag2->name);
+ $theme->script("gallery.in_place_edit.js");
}
} \ No newline at end of file