Example #1
0
 function onTestCreate($packet)
 {
     $server = $packet->content;
     $view = $this->tpl();
     $view->assign('server', $server);
     Dialog::fill($view->draw('_groups_add', true));
 }
Example #2
0
File: Rooms.php Project: Trim/movim
 /**
  * @brief Display the room list
  */
 function ajaxList($room)
 {
     if (!$this->validateRoom($room)) {
         return;
     }
     $view = $this->tpl();
     $cd = new \Modl\ContactDAO();
     $view->assign('list', $cd->getPresences($room));
     Dialog::fill($view->draw('_rooms_list', true), true);
 }
Example #3
0
 function onCommand($package)
 {
     $command = $package->content;
     $view = $this->tpl();
     if (isset($command->note)) {
         $view->assign('note', $command->note);
         Dialog::fill($view->draw('_adhoc_note', true));
     }
     if (isset($command->x)) {
         $xml = new \XMPPtoForm();
         $form = $xml->getHTML($command->x->asXML());
         $view->assign('form', $form);
         $view->assign('attributes', $command->attributes());
         $view->assign('actions', null);
         if (isset($command->actions)) {
             $view->assign('actions', $command->actions);
         }
         Dialog::fill($view->draw('_adhoc_form', true), true);
     }
     RPC::call('AdHoc.initForm');
 }
Example #4
0
File: Group.php Project: vijo/movim
 function ajaxAskUnsubscribe($server, $node)
 {
     if (!$this->validateServerNode($server, $node)) {
         return;
     }
     $view = $this->tpl();
     $view->assign('server', $server);
     $view->assign('node', $node);
     $pd = new \Modl\ItemDAO();
     $item = $pd->getItem($server, $node);
     if (isset($item)) {
         $view->assign('item', $item);
     } else {
         $view->assign('item', null);
     }
     Dialog::fill($view->draw('_group_unsubscribe', true));
 }
Example #5
0
File: Chat.php Project: Trim/movim
 /**
  * @brief Get the subject form of a chatroom
  */
 function ajaxGetSubject($room)
 {
     if (!$this->validateJid($room)) {
         return;
     }
     $view = $this->tpl();
     $md = new \Modl\MessageDAO();
     $s = $md->getRoomSubject($room);
     $view->assign('room', $room);
     $view->assign('subject', $s);
     Dialog::fill($view->draw('_chat_subject', true));
 }
Example #6
0
 function ajaxOpenDialog()
 {
     Dialog::fill($this->preparePresenceList());
     RPC::call('Presence.refresh');
 }
Example #7
0
 function ajaxDeleteContact($jid)
 {
     if (!$this->validateJid($jid)) {
         return;
     }
     $view = $this->tpl();
     $view->assign('jid', $jid);
     Dialog::fill($view->draw('_contact_delete', true));
 }
Example #8
0
 function ajaxHelp()
 {
     $view = $this->tpl();
     Dialog::fill($view->draw('_publish_help', true), true);
 }
Example #9
0
File: Post.php Project: vijo/movim
 function ajaxDelete($to, $node, $id)
 {
     $view = $this->tpl();
     $view->assign('to', $to);
     $view->assign('node', $node);
     $view->assign('id', $id);
     Dialog::fill($view->draw('_post_delete', true));
 }
Example #10
0
 /**
  * @brief Display the search contact form
  */
 function ajaxDisplaySearch($jid = null)
 {
     $view = $this->tpl();
     $view->assign('jid', $jid);
     $view->assign('add', $this->call('ajaxAdd', "movim_parse_form('add')"));
     $view->assign('search', $this->call('ajaxDisplayFound', 'this.value'));
     Dialog::fill($view->draw('_roster_search', true));
 }
Example #11
0
 /**
  * @brief Display the add chat form
  */
 function ajaxAdd()
 {
     $view = $this->tpl();
     $cd = new \Modl\ContactDAO();
     $chats = Cache::c('chats');
     if (!isset($chats)) {
         $chats = array();
     }
     $view->assign('chats', array_keys($chats));
     $view->assign('top', $cd->getTop(15));
     $view->assign('presencestxt', getPresencesTxt());
     Dialog::fill($view->draw('_chats_add', true), true);
 }
Example #12
0
 function ajaxRemoveAccount()
 {
     $view = $this->tpl();
     $view->assign('jid', $this->user->getLogin());
     Dialog::fill($view->draw('_account_remove', true));
 }
Example #13
0
 function ajaxRequest()
 {
     $view = $this->tpl();
     Dialog::fill($view->draw('_upload', true));
     RPC::call('Upload.init');
 }
Example #14
0
File: Chats.php Project: Nyco/movim
 /**
  * @brief Display the add chat form
  */
 function ajaxAdd()
 {
     $view = $this->tpl();
     $cd = new \Modl\ContactDAO();
     $view->assign('top', $cd->getTop(10));
     $view->assign('presencestxt', getPresencesTxt());
     Dialog::fill($view->draw('_chats_add', true), true);
 }
Example #15
0
 function ajaxAsk($jid)
 {
     $view = $this->tpl();
     $view->assign('jid', $jid);
     Dialog::fill($view->draw('_notifs_confirm', true));
 }