function ajaxRequest() { $view = $this->tpl(); $view->assign('empty', $this->prepareSearch('')); Drawer::fill($view->draw('_search', true), true); RPC::call('Search.init'); }
function ajaxCreate($server, $node, $id = false, $reply = false) { if (!$this->validateServerNode($server, $node)) { return; } $post = false; $view = $this->tpl(); if ($id) { $pd = new \modl\PostnDAO(); $p = $pd->get($server, $node, $id); if ($p->isEditable() && !$reply) { $post = $p; } if ($p->isReply()) { $reply = $p->getReply(); } elseif ($reply) { $reply = $p; } } if ($reply) { $view->assign('to', $this->user->getLogin()); $view->assign('node', 'urn:xmpp:microblog:0'); $view->assign('item', $post); $view->assign('reply', $reply); } else { $view->assign('to', $server); $view->assign('node', $node); $view->assign('item', $post); $view->assign('reply', false); } if ($node == 'urn:xmpp:microblog:0') { RPC::call('MovimUtils.pushState', $this->route('news')); } else { RPC::call('MovimUtils.removeClass', '#group_widget', 'fixed'); } if ($reply) { Drawer::fill('<section>' . $view->draw('_publish_create', true) . '</section>'); } else { RPC::call('MovimTpl.fill', 'main section > div:nth-child(2)', $view->draw('_publish_create', true)); } $pd = new \Modl\ItemDAO(); $item = $pd->getItem($server, $node); $view = $this->tpl(); $view->assign('server', $server); $view->assign('node', $node); $view->assign('post', $post); $view->assign('item', $item); //Header::fill($view->draw('_publish_header', true)); if ($id) { RPC::call('Publish.initEdit'); } RPC::call('Publish.setEmbed'); }
function ajaxGetDrawer($jid) { if (!$this->validateJid($jid)) { return; } $tpl = $this->tpl(); $cd = new \Modl\ContactDAO(); $cr = $cd->getRosterItem($jid); if (isset($cr)) { if ($cr->value != null) { $tpl->assign('presence', getPresencesTxt()[$cr->value]); } $tpl->assign('contactr', $cr); $tpl->assign('caps', $cr->getCaps()); $tpl->assign('clienttype', getClientTypes()); } $c = $cd->get($jid); $tpl->assign('contact', $c); Drawer::fill($tpl->draw('_contact_drawer', true)); }
/** * @brief Show the smiley list */ function ajaxSmileyTwo($to) { if (!$this->validateJid($to)) { return; } $view = $this->tpl(); $view->assign('jid', $to); $view->assign('packs', $this->getPacks()); $view->assign('path', $this->respath('stickers')); Drawer::fill($view->draw('_stickers_smiley_two', true)); }