summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-28 20:40:28 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-07-28 21:00:25 +0800
commita7f4d7aced009007d36e48685648e9bc3382f8cb (patch)
treef5b13204b496414ccee0f9e997da0b811ef66559 /modules/tag/helpers
parent2f969c80eb2e228f2c5729c6f4660c99555f9c9f (diff)
Revert commit 078c77a62b623322956457bfd7bfbdaf56203b00 and change the
tag_event:item_edit_form to use the new Form_Script library to inject script into a form. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_event.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 0cb49ffa..0fe8a393 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -64,19 +64,15 @@ class tag_event_Core {
tag::compact();
}
- static function item_edit_form($item, $view) {
+ static function item_edit_form($item, $form) {
$url = url::site("tags/autocomplete");
- $view->script[] = "$('#gEditFormContainer form').ready(function() {
- $('#gEditFormContainer form input[id=tags]').autocomplete(
- '$url',
- {max: 30,
- multiple: true,
- multipleSeparator: ',',
- cacheLength: 1}
- );
- });";
+ $form->script("")
+ ->text("$('form input[id=tags]').ready(function() {
+ $('form input[id=tags]').autocomplete(
+ '$url', {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1});
+ });");
$tag_value = implode(", ", tag::item_tags($item));
- $view->form->edit_item->input("tags")->label(t("Tags (comma separated)"))
+ $form->edit_item->input("tags")->label(t("Tags (comma separated)"))
->value($tag_value);
}