X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FAutocomplete%2FAutocompletePlugin.php;h=39b933afd95cedd6bba1696fb7b9138e4bedd90d;hb=0cca861ea7b029cfa8e247e225981158fef831c0;hp=b2be365dd64547d69a58da0ca25214362f574b2f;hpb=12eee30586dbac883e39adf453586ffef9189214;p=quix0rs-gnu-social.git diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php index b2be365dd6..39b933afd9 100644 --- a/plugins/Autocomplete/AutocompletePlugin.php +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -51,22 +51,24 @@ class AutocompletePlugin extends Plugin function onEndShowScripts($action){ if (common_logged_in()) { - $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js'); - $action->script('plugins/Autocomplete/Autocomplete.js'); + $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')); } } function onEndShowStatusNetStyles($action) { if (common_logged_in()) { - $action->cssLink('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.css'); + $action->cssLink($this->path('jquery-autocomplete/jquery.autocomplete.css')); } } function onRouterInitialized($m) { if (common_logged_in()) { - $m->connect('plugins/Autocomplete/autocomplete.json', array('action'=>'autocomplete')); + $m->connect('main/autocomplete/suggest', array('action'=>'autocomplete')); } } @@ -77,9 +79,8 @@ class AutocompletePlugin extends Plugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:Autocomplete', 'rawdescription' => - _m('The autocomplete plugin allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user\'s friend\' screen names.')); + // TRANS: Plugin description. + _m('The autocomplete plugin adds autocompletion for @ replies.')); return true; } - } -?>