[frio] Ensure tagsinput library is loaded in pages where new PM can be submitted

- The new private message page loads in a modal, requiring the base page to load them in advance
This commit is contained in:
Hypolite Petovan 2020-09-03 10:03:36 -04:00
parent 4a4d0f04cb
commit 9ea7f7d4ad
2 changed files with 15 additions and 3 deletions

View file

@ -28,6 +28,7 @@ use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Core\Theme;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
@ -354,6 +355,13 @@ function conv_get_blocklist()
*/
function conversation(App $a, array $items, $mode, $update, $preview = false, $order = 'commented', $uid = 0)
{
$page = DI::page();
$page->registerFooterScript(Theme::getPathForFile('asset/typeahead.js/dist/typeahead.bundle.js'));
$page->registerFooterScript(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.js'));
$page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css'));
$page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css'));
$ssl_state = (local_user() ? true : false);
$profile_owner = 0;