kopia lustrzana https://github.com/magicbug/Cloudlog
changed quicklog to localstorage
rodzic
c0b7f49d5d
commit
5d9d77c6ab
|
@ -237,12 +237,16 @@
|
|||
if (action === 'search') {
|
||||
form.action = "<?php echo site_url('search'); ?>";
|
||||
form.method = "post";
|
||||
} else if (action === 'qso') {
|
||||
form.action = "<?php echo site_url('qso?manual=0'); ?>"; // Set ?manual=0 to 1 if go to "Post-QSO" logging
|
||||
form.method = "post";
|
||||
}
|
||||
form.submit();
|
||||
}
|
||||
function logQuicklog() {
|
||||
if (localStorage.getItem("quicklogCallsign") !== "") {
|
||||
localStorage.removeItem("quicklogCallsign");
|
||||
}
|
||||
localStorage.setItem("quicklogCallsign", $("input[name='searchBar']").val());
|
||||
window.open("<?php echo site_url('qso?manual=0'); ?>", "_self");
|
||||
}
|
||||
</script>
|
||||
<?php if ($this->session->userdata('user_quicklog_enter') == 1) { ?>
|
||||
<script>
|
||||
|
@ -262,12 +266,11 @@
|
|||
</script>
|
||||
<?php } ?>
|
||||
<form id="quicklog-form" class="form-inline">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="text" name="callsign" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Search" onkeypress="handleKeyPress(event)">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="text" name="searchBar" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Quicklog" onkeypress="handleKeyPress(event)">
|
||||
|
||||
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="submitForm('qso')"><i class="fas fa-plus"></i>
|
||||
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="logQuicklog()"><i class="fas fa-plus"></i>
|
||||
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button_qicksearch_log'); ?></div>
|
||||
</button>
|
||||
<input type="hidden" id="quicklog-input">
|
||||
|
||||
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="submitForm('search')" style="margin-left: 5px"><i class="fas fa-search"></i>
|
||||
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div>
|
||||
|
@ -275,7 +278,7 @@
|
|||
</form>
|
||||
<?php } else { ?>
|
||||
<form method="post" action="<?php echo site_url('search'); ?>" class="form-inline">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
|
||||
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="searchBar" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
|
||||
<button title="<?php echo lang('menu_search_button'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i>
|
||||
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button'); ?></div>
|
||||
</button>
|
||||
|
|
Ładowanie…
Reference in New Issue