Skip to content

Commit

Permalink
Add button to process incoming message (in inbox)
Browse files Browse the repository at this point in the history
This is to check for unprocessed messaged that are waiting in the table Inbox of the gammu-smsd DB
  • Loading branch information
tenzap committed Oct 29, 2024
1 parent c05d7f0 commit e2ba8b9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions application/views/js_init/message/js_conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@
});
});

// check new message
$(document).on('click', "a.process_incoming_msgs_button, div#logo a", refresh = function(type) {
$.get("<?php echo site_url('daemon/message_routine');?>")
.done(function(data) {
$('a.refresh_button').trigger('click');
})
.fail(function(data) {
display_error_container(data);
});
return false;
});
<?php endif; ?>

// Reply, forward, resend SMS
Expand Down
12 changes: 12 additions & 0 deletions application/views/js_init/message/js_function.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
return false;
});

// check new message
$(document).on('click', "a.process_incoming_msgs_button, div#logo a", refresh = function(type) {
$.get("<?php echo site_url('daemon/message_routine');?>")
.done(function(data) {
$('a.refresh_button').trigger('click');
})
.fail(function(data) {
display_error_container(data);
});
return false;
});

// --------------------------------------------------------------------

/**
Expand Down
4 changes: 4 additions & 0 deletions application/views/main/messages/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@

<div class="bttn-group">
<button><a href="javascript:void(0);" class="refresh_button button"><?php echo tr('Refresh');?></a></button>
<?php if (($this->uri->segment(2) === 'folder' && $this->uri->segment(3) === 'inbox') ||
($this->uri->segment(2) === 'conversation' && $this->uri->segment(4) === 'inbox')): ?>
<button><a href="javascript:void(0);" class="process_incoming_msgs_button button"><?php echo tr('Process incoming messages');?></a></button>
<?php endif; ?>
</div>
<?php endif; ?>

Expand Down

0 comments on commit e2ba8b9

Please sign in to comment.