kopia lustrzana https://github.com/magicbug/Cloudlog
increased last 10 to 16 in QSO entry
rodzic
608331d3ad
commit
bc34014ecc
|
@ -0,0 +1,37 @@
|
|||
|
||||
/**
|
||||
* Attaches the batch behavior to progress bars.
|
||||
*/
|
||||
Drupal.behaviors.batch = function (context) {
|
||||
// This behavior attaches by ID, so is only valid once on a page.
|
||||
if ($('#progress.batch-processed').size()) {
|
||||
return;
|
||||
}
|
||||
$('#progress', context).addClass('batch-processed').each(function () {
|
||||
var holder = this;
|
||||
var uri = Drupal.settings.batch.uri;
|
||||
var initMessage = Drupal.settings.batch.initMessage;
|
||||
var errorMessage = Drupal.settings.batch.errorMessage;
|
||||
|
||||
// Success: redirect to the summary.
|
||||
var updateCallback = function (progress, status, pb) {
|
||||
if (progress == 100) {
|
||||
pb.stopMonitoring();
|
||||
window.location = uri+'&op=finished';
|
||||
}
|
||||
};
|
||||
|
||||
var errorCallback = function (pb) {
|
||||
var div = document.createElement('p');
|
||||
div.className = 'error';
|
||||
$(div).html(errorMessage);
|
||||
$(holder).prepend(div);
|
||||
$('#wait').hide();
|
||||
};
|
||||
|
||||
var progress = new Drupal.progressBar('updateprogress', updateCallback, "POST", errorCallback);
|
||||
progress.setProgress(-1, initMessage);
|
||||
$(holder).append(progress.element);
|
||||
progress.startMonitoring(uri+'&op=do', 10);
|
||||
});
|
||||
};
|
|
@ -21,7 +21,7 @@ class QSO extends CI_Controller {
|
|||
|
||||
$data['notice'] = false;
|
||||
$data['radios'] = $this->cat->radios();
|
||||
$data['query'] = $this->logbook_model->last_ten();
|
||||
$data['query'] = $this->logbook_model->last_custom('16');
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
|
|
|
@ -130,6 +130,14 @@ class Logbook_model extends CI_Model {
|
|||
return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
function last_custom($num) {
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit($num);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
/* Callsign QRA */
|
||||
|
||||
function call_qra($callsign) {
|
||||
|
|
|
@ -244,7 +244,7 @@
|
|||
<div class="span9 offset1">
|
||||
|
||||
<div id="partial_view">
|
||||
<h2>Last 10 QSOs</h2>
|
||||
<h2>Last 16 QSOs</h2>
|
||||
|
||||
<table class="zebra-striped" width="100%">
|
||||
<tr class="log_title titles">
|
||||
|
|
Ładowanie…
Reference in New Issue