Add option to log QSO end times separately

Squashed commit of the following:

commit 595f620d9e
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 13:58:05 2023 +0100

    Update languages

commit f670a06059
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 13:55:04 2023 +0100

    Added user option for enabling QSO end time logging

commit 36d9a95ebb
Merge: 54d5bb53 352931b1
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 12:18:39 2023 +0100

    Merge branch 'dev' into qsoTime

commit 54d5bb535b
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:58 2023 +0200

    start/end times for other languages

commit c5f6bb0cab
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:42 2023 +0200

    Hide end time if only differs in seconds as we only display minutes
    anyway ...

commit d519d88604
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:29 2023 +0200

    use start as end time if end is not set separately

commit f2588ad132
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:43 2023 +0200

    reset timers on form reset

commit 2b7ee4e48c
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:27 2023 +0200

    Strip seconds from session time variable

commit e0c35aa0cf
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:11 2023 +0200

    Adapt contest logging

commit 5368ef25f3
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:12:50 2023 +0200

    Make date field a little smaller

commit ad2d7e756c
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:12:30 2023 +0200

    Add button to reset start time

commit f56e031946
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:11:09 2023 +0200

    Copy start to end time on focus out

commit b741d0428d
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:10:45 2023 +0200

    Only min and sec for post QSO template

commit 77314edd31
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:08:49 2023 +0200

    Basics for QSO end time logging
pull/2643/head
phl0 2023-11-01 14:24:13 +01:00
rodzic 47ee4c4b78
commit 973d76eeb5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
45 zmienionych plików z 234 dodań i 259 usunięć

Wyświetl plik

@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 147;
$config['migration_version'] = 148;
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -68,6 +68,7 @@ class QSO extends CI_Controller {
$qso_data = array(
'start_date' => $this->input->post('start_date'),
'start_time' => $this->input->post('start_time'),
'end_time' => $this->input->post('end_time'),
'time_stamp' => time(),
'band' => $this->input->post('band'),
'band_rx' => $this->input->post('band_rx'),

Wyświetl plik

@ -90,6 +90,7 @@ class User extends CI_Controller {
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['language'] = $this->input->post('language');
$this->load->view('user/add', $data);
} else {
@ -125,6 +126,7 @@ class User extends CI_Controller {
$this->input->post('user_mastodon_url'),
$this->input->post('user_default_band'),
($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : ''),
$this->input->post('user_qso_end_times'),
$this->input->post('language'),
)) {
// Check for errors
@ -172,6 +174,7 @@ class User extends CI_Controller {
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['language'] = $this->input->post('language');
$this->load->view('user/add', $data);
$this->load->view('interface_assets/footer');
@ -389,6 +392,12 @@ class User extends CI_Controller {
$data['user_show_notes'] = $q->user_show_notes;
}
if($this->input->post('user_qso_end_times')) {
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times', true);
} else {
$data['user_qso_end_times'] = $q->user_qso_end_times;
}
if($this->input->post('user_show_profile_image')) {
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image', false);
} else {
@ -529,6 +538,7 @@ class User extends CI_Controller {
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_default_band'] = $this->input->post('user_default_band');
$data['user_default_confirmation'] = ($this->input->post('user_default_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_default_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_default_confirmation_eqsl') !== null ? 'E' : '');
$data['user_qso_end_times'] = $this->input->post('user_qso_end_times');
$data['language'] = $this->input->post('language');
$data['user_winkey'] = $this->input->post('user_winkey');
$this->load->view('user/edit');

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Дата';
$lang['general_word_time'] = 'Час';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Дата/Час';
$lang['general_word_none'] = 'Нито едно';
$lang['general_word_name'] = 'Име';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = '梅登海德网格';
$lang['account_cloudlog_preferences'] = '偏好选项';
$lang['account_timezone'] = '时区';
$lang['account_date_format'] = '日期格式';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = '距离单位偏好';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '选择您登录账户时要显示的日期格式';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = '选择距离单位';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = '日期';
$lang['general_word_time'] = '时间';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = '日期/时间';
$lang['general_word_none'] = '无';
$lang['general_word_name'] = '名称';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Locátor';
$lang['account_cloudlog_preferences'] = 'Nastavení Cloudlogu';
$lang['account_timezone'] = 'Časové pásmo';
$lang['account_date_format'] = 'Formát data';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Nastavení měření';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Vyberte, jak chcete, aby byla data zobrazena při přihlášení do vašeho účtu.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Vyberte, v jakých jednotkách se budou zobrazovat vzdálenosti.';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Čas';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Datum/čas';
$lang['general_word_none'] = 'Žádné';
$lang['general_word_name'] = 'Jméno';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Tijd';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Date/Time';
$lang['general_word_none'] = 'Geen';
$lang['general_word_name'] = 'Naam';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Date';
$lang['general_word_time'] = 'Time';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Date/Time';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'Name';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Asetukset';
$lang['account_timezone'] = 'Aikavyöhyke';
$lang['account_date_format'] = 'Päivämäärämuoto';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Mittayksikkömuoto';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Valitse, miten haluat päivämäärät näkyvän, kun olet kirjautunut tilillesi.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Valitse, mitä mittayksikkömuotoa käytetään';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Päivä';
$lang['general_word_time'] = 'Aika';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Päivä/Aika';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'Nimi';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Locator';
$lang['account_cloudlog_preferences'] = 'Préférences Cloudlog';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Format de la date';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Unité de mesure';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = '(Sélectionnez le format de date à afficher)';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = '(Choisiez l\'unité de mesure à afficher)';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Date';
$lang['general_word_time'] = 'Heure';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Date/Heure';
$lang['general_word_none'] = 'Aucun';
$lang['general_word_name'] = 'Nom';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Planquadrat';
$lang['account_cloudlog_preferences'] = 'Cloudlog Einstellungen';
$lang['account_timezone'] = 'Zeitzone';
$lang['account_date_format'] = 'Datumsformat';
$lang['account_log_end_time'] = 'Logge Endzeiten für QSOs separat';
$lang['account_log_end_time_hint'] = 'Wenn aktiviert, werden QSO Endzeiten separat erfasst. Falls nicht, ist die QSO Endzeit gleich der Startzeit.';
$lang['account_measurement_preferences'] = 'Entfernungsformat';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Wähle, wie Datumsfelder angezeigt werden sollen, wenn du eingeloggt bist.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Wähle, in welcher Einheit Entfernungen angezeigt werden sollen.';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Importieren";
$lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Zeit';
$lang['general_word_time_on'] = 'Startzeit';
$lang['general_word_time_off'] = 'Endzeit';
$lang['general_word_datetime'] = 'Datum/Uhrzeit';
$lang['general_word_none'] = 'Nichts/Keine';
$lang['general_word_name'] = 'Name';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Ημερομηνία';
$lang['general_word_time'] = 'Ωρα';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Ημερομηνία/Ωρα';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'όνομα';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Data';
$lang['general_word_time'] = 'Orario';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Data/Orario';
$lang['general_word_none'] = 'Nessuno';
$lang['general_word_name'] = 'Nome';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Data';
$lang['general_word_time'] = 'Godzina';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Data/Godzina';
$lang['general_word_none'] = 'Nic';
$lang['general_word_name'] = 'Imie';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'QTH локатор';
$lang['account_cloudlog_preferences'] = 'Настройки Cloudlog';
$lang['account_timezone'] = 'Часовой пояс';
$lang['account_date_format'] = 'Формат даты';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Единицы измерения';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Выберите представление даты для отображения в вашем аккаунте.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Выберите единицы измерения расстояния';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Дата';
$lang['general_word_time'] = 'Время';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Дата/Время';
$lang['general_word_none'] = '-';
$lang['general_word_name'] = 'Имя';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Fecha';
$lang['general_word_time'] = 'Hora';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Fecha/Hora';
$lang['general_word_none'] = 'Ninguno';
$lang['general_word_name'] = 'Nombre';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Tidszon';
$lang['account_date_format'] = 'Datumformat';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Välj hur du vill att datum ska visas när du är inloggad på ditt konto.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Välj i vilken enhetsavstånd som ska visas';

Wyświetl plik

@ -1,3 +1,4 @@
<<<<<<< HEAD
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
@ -25,6 +26,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Tid';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Datum/Tid';
$lang['general_word_none'] = 'Ingen';
$lang['general_word_name'] = 'Namn';
@ -48,7 +51,6 @@ $lang['general_word_worked_not_confirmed'] = "Worked not confirmed";
$lang['general_word_not_worked'] = "Not worked";
$lang['general_word_confirmed'] = 'Bekräftade';
$lang['general_word_needed'] = 'Behövs';
$lang['general_word_all'] = 'All';
$lang['general_word_no'] = 'Nej';
$lang['general_word_yes'] = 'Ja';
@ -199,4 +201,4 @@ $lang['general_word_today'] = 'Today';
$lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is';
$lang['dashboard_country_files_warning'] = 'You need to update country files! Go <a href="'.site_url('update').'">here</a> to do it!';
$lang['dashboard_locations_warning'] = 'You have no station locations. Go <a href="'. site_url('station') . '">here</a> to create it!';
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';
$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go <a href="'. site_url('logbooks') . '">here</a> to create it!';

Wyświetl plik

@ -33,6 +33,8 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_log_end_time'] = 'Log End Times for QSOs Separately';
$lang['account_log_end_time_hint'] = 'Choose yes here if you want to log QSO start and end times separately. If set to \'No\' the end time will be the same as start time.';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';

Wyświetl plik

@ -24,6 +24,8 @@ $lang['general_word_import'] = "Import";
$lang['general_word_date'] = 'Tarih';
$lang['general_word_time'] = 'Saat';
$lang['general_word_time_on'] = 'Time on';
$lang['general_word_time_off'] = 'Time off';
$lang['general_word_datetime'] = 'Tarih/Saat';
$lang['general_word_none'] = 'Hiçbiri';
$lang['general_word_name'] = 'İsim';

Wyświetl plik

@ -0,0 +1,29 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This adds an option to enable grid lookup
* by location entered
*/
class Migration_qso_end_times extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('user_qso_end_times', 'users')) {
$fields = array(
'user_qso_end_times integer DEFAULT 0 AFTER user_default_confirmation',
);
$this->dbforge->add_column('users', $fields);
}
}
public function down()
{
if ($this->db->field_exists('user_qso_end_times', 'users')) {
$this->dbforge->drop_column('users', 'user_qso_end_times');
}
}
}

Wyświetl plik

@ -8,6 +8,11 @@ class Logbook_model extends CI_Model {
$callsign = str_replace('Ø', '0', $this->input->post('callsign'));
// Join date+time
$datetime = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('start_time');
if ($this->input->post('end_time') != null) {
$datetime_off = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('end_time');
} else {
$datetime_off = $datetime;
}
if ($this->input->post('prop_mode') != null) {
$prop_mode = $this->input->post('prop_mode');
} else {
@ -174,7 +179,7 @@ class Logbook_model extends CI_Model {
// Create array with QSO Data
$data = array(
'COL_TIME_ON' => $datetime,
'COL_TIME_OFF' => $datetime,
'COL_TIME_OFF' => $datetime_off,
'COL_CALL' => strtoupper(trim($callsign)),
'COL_BAND' => $this->input->post('band'),
'COL_BAND_RX' => $this->input->post('band_rx'),

Wyświetl plik

@ -124,7 +124,7 @@ class User_Model extends CI_Model {
$measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup,
$user_pota_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5,
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
$user_default_band, $user_default_confirmation, $language) {
$user_default_band, $user_default_confirmation, $user_qso_end_times, $language) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
@ -156,6 +156,7 @@ class User_Model extends CI_Model {
'user_mastodon_url' => xss_clean($user_mastodon_url),
'user_default_band' => xss_clean($user_default_band),
'user_default_confirmation' => xss_clean($user_default_confirmation),
'user_qso_end_times' => xss_clean($user_qso_end_times),
'language' => xss_clean($language),
);
@ -217,6 +218,7 @@ class User_Model extends CI_Model {
'user_mastodon_url' => xss_clean($fields['user_mastodon_url']),
'user_default_band' => xss_clean($fields['user_default_band']),
'user_default_confirmation' => (isset($fields['user_default_confirmation_qsl']) ? 'Q' : '').(isset($fields['user_default_confirmation_lotw']) ? 'L' : '').(isset($fields['user_default_confirmation_eqsl']) ? 'E' : ''),
'user_qso_end_times' => xss_clean($fields['user_qso_end_times']),
'language' => xss_clean($fields['language']),
'winkey' => xss_clean($fields['user_winkey']),
);
@ -343,6 +345,7 @@ class User_Model extends CI_Model {
'user_mastodon_url' => $u->row()->user_mastodon_url,
'user_default_band' => $u->row()->user_default_band,
'user_default_confirmation' => $u->row()->user_default_confirmation,
'user_qso_end_times' => isset($u->row()->user_qso_end_times) ? $u->row()->user_qso_end_times : 1,
'active_station_logbook' => $u->row()->active_station_logbook,
'language' => isset($u->row()->language) ? $u->row()->language: 'english',
'isWinkeyEnabled' => $u->row()->winkey,

Wyświetl plik

@ -45,7 +45,7 @@
<div class="form-group col-md-1">
<label for="start_time"><?php echo lang('general_word_time'); ?></label>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>

Wyświetl plik

@ -32,7 +32,6 @@
<script src="<?php echo base_url(); ?>assets/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/jquery.fancybox.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap.bundle.js"></script>
<script src="<?php echo base_url(); ?>assets/js/jquery.jclock.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leaflet.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/Control.FullScreen.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/L.Maidenhead.qrb.js"></script>
@ -1000,6 +999,12 @@ $(document).on('keypress',function(e) {
}
);
});
$('#reset_time').click(function() {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$('#start_time').val(("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2));
});
});
</script>
@ -1110,24 +1115,24 @@ $(document).on('keypress',function(e) {
if ( ! manual ) {
$(function($) {
var options = {
utc: true,
format: '%H:%M:%S'
}
$('.input_time').jclock(options);
});
$(function($) {
var options = {
utc: true,
format: '%d-%m-%Y'
}
$('.input_date').jclock(options);
resetTimers();
});
}
});
<?php if ($this->session->userdata('user_qso_end_times') == 1) { ?>
$('#callsign').focusout(function() {
if (! manual && $('#callsign').val() != '') {
clearInterval(handleStart);
clearInterval(handleDate);
}
});
$('#start_time').focusout(function() {
if (manual && $('#start_time').val() != '') {
$('#end_time').val($('#start_time').val());
}
});
<?php } ?>
jQuery(function($) {
var input = $('#callsign');
@ -1146,6 +1151,9 @@ $(document).on('keypress',function(e) {
}
if (e.key === "Escape") { // escape key maps to keycode `27`
reset_fields();
if ( ! manual ) {
resetTimers()
}
$('#callsign').val("");
$("#callsign").focus();
}
@ -1320,6 +1328,21 @@ $(document).on('keypress',function(e) {
$('#rst_rcvd').val('59');
}
}
function getUTCTimeStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2));
}
function getUTCDateStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCDate()).slice(-2)+'-'+("0" + (now.getUTCMonth()+1)).slice(-2)+'-'+now.getUTCFullYear());
}
</script>
<script>

Wyświetl plik

@ -5,7 +5,7 @@
<div class="col-sm-5">
<div class="card">
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off">
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off" onReset="resetTimers();">
<div class="card-header">
<ul style="font-size: 15px;" class="nav nav-tabs card-header-tabs pull-right" id="myTab" role="tablist">
@ -51,6 +51,31 @@
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="qso" role="tabpanel" aria-labelledby="qso-tab">
<!-- HTML for Date/Time -->
<?php if ($this->session->userdata('user_qso_end_times') == 1) { ?>
<div class="form-row">
<div class="form-group col-md-3">
<label for="start_date"><?php echo lang('general_word_date'); ?></label>
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-3][0-9]-[0-1][0-9]-[0-9]{4}">
</div>
<div class="form-group col-md-3">
<label for="start_time"><?php echo lang('general_word_time_on'); ?></label> <?php if ($_GET['manual'] != 1) { ?><i id="reset_time" data-toggle="tooltip" data-original-title="Reset start time" class="fas fa-stopwatch"></i><?php } ?>
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
</div>
<div class="form-group col-md-3">
<label for="end_time"><?php echo lang('general_word_time_off'); ?></label>
<input type="text" class="form-control form-control-sm input_end_time" name="end_time" id="end_time" value="<?php if (($this->session->userdata('end_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('end_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>
<input class="input_start_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i:s'); ?>" />
<input class="input_end_time" type="hidden" id="end_time" name="end_time"value="<?php echo date('H:i:s'); ?>" />
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
<?php } ?>
</div>
<?php } else {?>
<div class="form-row">
<div class="form-group col-md-6">
<label for="start_date"><?php echo lang('general_word_date'); ?></label>
@ -59,16 +84,15 @@
<div class="form-group col-md-6">
<label for="start_time"><?php echo lang('general_word_time'); ?></label>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
<input class="input_start_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i:s'); ?>" />
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
<?php } ?>
</div>
<?php } ?>
<!-- Callsign Input -->
<div class="form-row">

Wyświetl plik

@ -156,6 +156,15 @@
?>
</div>
<div class="form-group">
<label for="logendtime"><?php echo lang('account_log_end_time'); ?></label>
<select class="custom-select" id="logendtime" name="user_qso_end_times">
<option value="0"><?php echo lang('general_word_no'); ?></option>
<option value="1"><?php echo lang('general_word_yes'); ?></option>
</select>
<small id="SelectDateFormatHelp" class="form-text text-muted"><?php echo lang('account_log_end_time_hint'); ?></small>
</div>
<div class="form-group">
<label for="SelectDateFormat"><?php echo lang('account_date_format'); ?></label>
<select name="user_date_format" class="custom-select" id="SelectDateFormat"

Wyświetl plik

@ -165,6 +165,15 @@
<?php echo form_dropdown('user_timezone', $timezones, $user_timezone); ?>
</div>
<div class="form-group">
<label for="logendtime"><?php echo lang('account_log_end_time'); ?></label>
<select class="custom-select" id="logendtimes" name="user_qso_end_times">
<option value="1" <?php if ($user_qso_end_times == 1) { echo " selected =\"selected\""; } ?>><?php echo lang('general_word_yes'); ?></option>
<option value="0" <?php if ($user_qso_end_times == 0) { echo " selected =\"selected\""; } ?>><?php echo lang('general_word_no'); ?></option>
</select>
<small id="SelectDateFormatHelp" class="form-text text-muted"><?php echo lang('account_log_end_time_hint'); ?></small>
</div>
<div class="form-group">
<label for="SelectDateFormat"><?php echo lang('account_date_format'); ?></label>
<select name="user_date_format" class="custom-select" id="SelectDateFormat" aria-describedby="SelectDateFormatHelp">

Wyświetl plik

@ -70,7 +70,9 @@
<td><?php echo lang('general_word_datetime'); ?></td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></td>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->COL_TIME_ON); $time_on = date('H:i', $timestamp); echo " at ".$time_on; ?>
<?php $timestamp = strtotime($row->COL_TIME_OFF); $time_off = date('H:i', $timestamp); if ($time_on != $time_off) { echo " - ".$time_off; } ?>
</td>
<?php } else { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
<?php } ?>

Wyświetl plik

@ -1,222 +0,0 @@
/*
* jQuery jclock - Clock plugin - v 2.3.2
* http://plugins.jquery.com/project/jclock
*
* Copyright (c) 2007-2011 Doug Sparling <http://www.dougsparling.com>
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
(function($) {
$.fn.jclock = function(options) {
var version = '2.3.2';
// options
var opts = $.extend({}, $.fn.jclock.defaults, options);
return this.each(function() {
$this = $(this);
$this.timerID = null;
$this.running = false;
// Record keeping for seeded clock
$this.increment = 0;
$this.lastCalled = new Date().getTime();
var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
$this.format = o.format;
$this.utc = o.utc;
// deprecate utc_offset (v 2.2.0)
$this.utcOffset = (o.utc_offset != null) ? o.utc_offset : o.utcOffset;
$this.seedTime = o.seedTime;
$this.timeout = o.timeout;
$this.css({
fontFamily: o.fontFamily,
fontSize: o.fontSize,
backgroundColor: o.background,
color: o.foreground
});
// %a
$this.daysAbbrvNames = new Array(7);
$this.daysAbbrvNames[0] = "Sun";
$this.daysAbbrvNames[1] = "Mon";
$this.daysAbbrvNames[2] = "Tue";
$this.daysAbbrvNames[3] = "Wed";
$this.daysAbbrvNames[4] = "Thu";
$this.daysAbbrvNames[5] = "Fri";
$this.daysAbbrvNames[6] = "Sat";
// %A
$this.daysFullNames = new Array(7);
$this.daysFullNames[0] = "Sunday";
$this.daysFullNames[1] = "Monday";
$this.daysFullNames[2] = "Tuesday";
$this.daysFullNames[3] = "Wednesday";
$this.daysFullNames[4] = "Thursday";
$this.daysFullNames[5] = "Friday";
$this.daysFullNames[6] = "Saturday";
// %b
$this.monthsAbbrvNames = new Array(12);
$this.monthsAbbrvNames[0] = "Jan";
$this.monthsAbbrvNames[1] = "Feb";
$this.monthsAbbrvNames[2] = "Mar";
$this.monthsAbbrvNames[3] = "Apr";
$this.monthsAbbrvNames[4] = "May";
$this.monthsAbbrvNames[5] = "Jun";
$this.monthsAbbrvNames[6] = "Jul";
$this.monthsAbbrvNames[7] = "Aug";
$this.monthsAbbrvNames[8] = "Sep";
$this.monthsAbbrvNames[9] = "Oct";
$this.monthsAbbrvNames[10] = "Nov";
$this.monthsAbbrvNames[11] = "Dec";
// %B
$this.monthsFullNames = new Array(12);
$this.monthsFullNames[0] = "January";
$this.monthsFullNames[1] = "February";
$this.monthsFullNames[2] = "March";
$this.monthsFullNames[3] = "April";
$this.monthsFullNames[4] = "May";
$this.monthsFullNames[5] = "June";
$this.monthsFullNames[6] = "July";
$this.monthsFullNames[7] = "August";
$this.monthsFullNames[8] = "September";
$this.monthsFullNames[9] = "October";
$this.monthsFullNames[10] = "November";
$this.monthsFullNames[11] = "December";
$.fn.jclock.startClock($this);
});
};
$.fn.jclock.startClock = function(el) {
$.fn.jclock.stopClock(el);
$.fn.jclock.displayTime(el);
}
$.fn.jclock.stopClock = function(el) {
if(el.running) {
clearTimeout(el.timerID);
}
el.running = false;
}
$.fn.jclock.displayTime = function(el) {
var time = $.fn.jclock.currentTime(el);
var formatted_time = $.fn.jclock.formatTime(time, el);
el.attr('currentTime', time.getTime())
el.val(formatted_time);
el.timerID = setTimeout(function(){$.fn.jclock.displayTime(el)},el.timeout);
}
$.fn.jclock.currentTime = function(el) {
if(typeof(el.seedTime) == 'undefined') {
// Seed time not being used, use current time
var now = new Date();
} else {
// Otherwise, use seed time with increment
el.increment += new Date().getTime() - el.lastCalled;
var now = new Date(el.seedTime + el.increment);
el.lastCalled = new Date().getTime();
}
if(el.utc == true) {
var localTime = now.getTime();
var localOffset = now.getTimezoneOffset() * 60000;
var utc = localTime + localOffset;
var utcTime = utc + (3600000 * el.utcOffset);
var now = new Date(utcTime);
}
return now
}
$.fn.jclock.formatTime = function(time, el) {
var timeNow = "";
var i = 0;
var index = 0;
while ((index = el.format.indexOf("%", i)) != -1) {
timeNow += el.format.substring(i, index);
index++;
// modifier flag
//switch (el.format.charAt(index++)) {
//}
var property = $.fn.jclock.getProperty(time, el, el.format.charAt(index));
index++;
//switch (switchCase) {
//}
timeNow += property;
i = index
}
timeNow += el.format.substring(i);
return timeNow;
};
$.fn.jclock.getProperty = function(dateObject, el, property) {
switch (property) {
case "a": // abbrv day names
return (el.daysAbbrvNames[dateObject.getDay()]);
case "A": // full day names
return (el.daysFullNames[dateObject.getDay()]);
case "b": // abbrv month names
return (el.monthsAbbrvNames[dateObject.getMonth()]);
case "B": // full month names
return (el.monthsFullNames[dateObject.getMonth()]);
case "d": // day 01-31
return ((dateObject.getDate() < 10) ? "0" : "") + dateObject.getDate();
case "H": // hour as a decimal number using a 24-hour clock (range 00 to 23)
return ((dateObject.getHours() < 10) ? "0" : "") + dateObject.getHours();
case "I": // hour as a decimal number using a 12-hour clock (range 01 to 12)
var hours = (dateObject.getHours() % 12 || 12);
return ((hours < 10) ? "0" : "") + hours;
case "l": // hour as a decimal number using a 12-hour clock (range 1 to 12)
var hours = (dateObject.getHours() % 12 || 12);
//return ((hours < 10) ? "0" : "") + hours;
return hours;
case "m": // month number
return (((dateObject.getMonth() + 1) < 10) ? "0" : "") + (dateObject.getMonth() + 1);
case "M": // minute as a decimal number
return ((dateObject.getMinutes() < 10) ? "0" : "") + dateObject.getMinutes();
case "p": // either `am' or `pm' according to the given time value,
// or the corresponding strings for the current locale
return (dateObject.getHours() < 12 ? "am" : "pm");
case "P": // either `AM' or `PM' according to the given time value,
return (dateObject.getHours() < 12 ? "AM" : "PM");
case "S": // second as a decimal number
return ((dateObject.getSeconds() < 10) ? "0" : "") + dateObject.getSeconds();
case "y": // two-digit year
return dateObject.getFullYear().toString().substring(2);
case "Y": // full year
return (dateObject.getFullYear());
case "%":
return "%";
}
}
// plugin defaults (24-hour)
$.fn.jclock.defaults = {
format: '%H:%M:%S',
utcOffset: 0,
utc: false,
fontFamily: '',
fontSize: '',
foreground: '',
background: '',
seedTime: undefined,
timeout: 1000 // 1000 = one second, 60000 = one minute
};
})(jQuery);

Wyświetl plik

@ -68,19 +68,11 @@ function setSession(formdata) {
// realtime clock
if ( ! manual ) {
$(function ($) {
var options = {
utc: true,
format: '%H:%M:%S'
}
$('.input_time').jclock(options);
handleStart = setInterval(function() { getUTCTimeStamp($('.input_time')); }, 500);
});
$(function ($) {
var options = {
utc: true,
format: '%d-%m-%Y'
}
$('.input_date').jclock(options);
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
});
}
@ -572,3 +564,17 @@ function pad (str, max) {
str = str.toString();
return str.length < max ? pad("0" + str, max) : str;
}
function getUTCTimeStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2));
}
function getUTCDateStamp(el) {
var now = new Date();
var localTime = now.getTime();
var utc = localTime + (now.getTimezoneOffset() * 60000);
$(el).attr('value', ("0" + now.getUTCDate()).slice(-2)+'-'+("0" + (now.getUTCMonth()+1)).slice(-2)+'-'+now.getUTCFullYear());
}

Wyświetl plik

@ -484,6 +484,12 @@ function reset_fields() {
$('.dxccsummary').remove();
}
function resetTimers() {
handleStart = setInterval(function() { getUTCTimeStamp($('.input_start_time')); }, 500);
handleEnd = setInterval(function() { getUTCTimeStamp($('.input_end_time')); }, 500);
handleDate = setInterval(function() { getUTCDateStamp($('.input_date')); }, 1000);
}
$("#callsign").focusout(function() {
if ($(this).val().length >= 3) {
@ -743,6 +749,16 @@ $('#start_time').change(function() {
$('#start_time').val(raw_time);
}
});
$('#end_time').change(function() {
var raw_time = $(this).val();
if(raw_time.match(/^\d\[0-6]d$/)) {
raw_time = "0"+raw_time;
}
if(raw_time.match(/^[012]\d[0-5]\d$/)) {
raw_time = raw_time.substring(0,2)+":"+raw_time.substring(2,4);
$('#end_time').val(raw_time);
}
});
/* date input shortcut */
$('#start_date').change(function() {