increased last 10 to 16 in QSO entry

pull/106/merge
Peter Goodhall 2012-04-23 14:58:04 +01:00
rodzic 608331d3ad
commit bc34014ecc
4 zmienionych plików z 47 dodań i 2 usunięć

Wyświetl plik

@ -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);
});
};

Wyświetl plik

@ -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');

Wyświetl plik

@ -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) {

Wyświetl plik

@ -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">