diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-06 07:02:55 -0800 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-06 07:02:55 -0800 |
| commit | 44ae88e8e17713cab81a5cf08820e18896615196 (patch) | |
| tree | 45ecb24e92cbd8454c67a4840eea8ae579ebe68f /modules/tag/helpers | |
| parent | 1faa2492952a54f0b80cce149ae42b59b91039df (diff) | |
| parent | 04c10a0720b57bc4b6273ea7127d9880c2c28354 (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/tag/helpers')
| -rw-r--r-- | modules/tag/helpers/tag.php | 15 | ||||
| -rw-r--r-- | modules/tag/helpers/tag_theme.php | 8 |
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 |
