Attempt to add Autocompletion to event form.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 31 Jan 2009 17:24:37 +0000 (12:24 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 31 Jan 2009 17:24:37 +0000 (12:24 -0500)
The ajax works, returns the results, populates the _results div
but for some reason, the div is not made visible.

kronolith/new.php
kronolith/templates/edit/edit.inc

index b73fce6..adefdc0 100644 (file)
@@ -76,4 +76,6 @@ require KRONOLITH_TEMPLATES . '/common-header.inc';
 require KRONOLITH_TEMPLATES . '/menu.inc';
 require KRONOLITH_TEMPLATES . '/edit/javascript.inc';
 require KRONOLITH_TEMPLATES . '/edit/edit.inc';
+Kronolith_Imple::factory('TagAutoCompleter', array('triggerId' => 'tags', 'id' => $event->getUID()));
+
 require $registry->get('templates', 'horde') . '/common-footer.inc';
index 6c9e513..8ab58d9 100644 (file)
@@ -418,6 +418,8 @@ endif;
  </td>
  <td colspan="4">
    <input type="text" name="tags" id="tags" value="<?php echo (!empty($tags) ? $tags : '')?>" size="40" />
+   <div id="tags_results" class="autocomplete"></div>
+   <span id="tags_loading_img" style="display:none;"><?php echo Horde::img('loading.gif', _("Loading...")) ?></span>
  </td>
 </tr>
 
@@ -446,4 +448,4 @@ endif;
 </form>
 <script type="text/javascript">
 document.eventform.title.focus();
-</script>
+</script>
\ No newline at end of file