Update Autocomplete plugin for reusable notice forms in 1.0.x. It's fun!

Now pulls the fetch API URL from a dedicated <span> with a data attribute ('data-url', should pass HTML 5 validators for our future overlords)
This commit is contained in:
Brion Vibber
2011-03-09 18:01:41 -08:00
parent ec828a094c
commit 4915b0cb9e
2 changed files with 20 additions and 3 deletions

View File

@@ -51,6 +51,8 @@ class AutocompletePlugin extends Plugin
function onEndShowScripts($action){
if (common_logged_in()) {
$action->element('span', array('id' => 'autocomplete-api',
'data-url' => common_local_url('autocomplete')));
$action->script($this->path('jquery-autocomplete/jquery.autocomplete.pack.js'));
$action->script($this->path('Autocomplete.js'));
}