mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Added ajaxCall to get all phone Numbers. Also cleanup templates
This commit is contained in:
parent
2b4b7ad6d8
commit
37c32f8ce7
@ -18,4 +18,5 @@ $application->registerRoutes($this, array('routes' => array(
|
||||
array('name' => 'sms#push', 'url' => '/push', 'verb' => 'POST'),
|
||||
array('name' => 'sms#replace', 'url' => '/replace', 'verb' => 'POST'),
|
||||
array('name' => 'sms#retrieve_all_ids', 'url' => '/get/smsidlist', 'verb' => 'GET'),
|
||||
array('name' => 'sms#retrieve_all_peers', 'url' => '/get/peerlist', 'verb' => 'GET'),
|
||||
)));
|
||||
|
@ -38,12 +38,10 @@ class SmsController extends Controller {
|
||||
$mboxes = array(
|
||||
'PNLConversations' => array(
|
||||
'label' => 'Conversations',
|
||||
'phoneNumbers' => $this->smsMapper->getAllPeersPhoneNumbers($this->userId),
|
||||
'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'conversations'))
|
||||
),
|
||||
'PNLDrafts' => array(
|
||||
'label' => 'Drafts',
|
||||
'phoneNumbers' => array(),
|
||||
'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'drafts'))
|
||||
)
|
||||
);
|
||||
@ -63,6 +61,16 @@ class SmsController extends Controller {
|
||||
return new JSONResponse(array("smslist" => $smsList));
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function retrieveAllPeers () {
|
||||
$phoneList = $this->smsMapper->getAllPeersPhoneNumbers($this->userId);
|
||||
// @ TODO: filter correctly
|
||||
return new JSONResponse(array("phonelist" => $phoneList));
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
|
@ -6,7 +6,6 @@
|
||||
<div id="app">
|
||||
<div id="app-navigation">
|
||||
<?php print_unescaped($this->inc('part.navigation')); ?>
|
||||
<?php /*print_unescaped($this->inc('part.settings'));*/ ?>
|
||||
</div>
|
||||
|
||||
<div id="app-mailbox-peers">
|
||||
|
@ -1,10 +0,0 @@
|
||||
<div id="app-settings">
|
||||
<div id="app-settings-header">
|
||||
<button class="settings-button"
|
||||
data-apps-slide-toggle="#app-settings-content"
|
||||
></button>
|
||||
</div>
|
||||
<div id="app-settings-content">
|
||||
<!-- Your settings in here -->
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user