Compare commits

..

3 Commits
6.1.1 ... 6.1.4

Author SHA1 Message Date
Deon George
b67df24219 Disable sorting - should be sorted by ajax method 2020-06-11 16:19:40 +10:00
Deon George
7ffcdb139a Enable font selection override 2020-05-26 11:26:00 +10:00
Deon George
5a9437db37 bootstrap typeahead now part of app.js - updated and optimised enabling categories 2020-05-26 11:12:54 +10:00
2 changed files with 21 additions and 15 deletions

View File

@@ -13,7 +13,7 @@
<link rel="stylesheet" href="{{ asset('//use.fontawesome.com/releases/v5.13.0/css/v4-shims.css') }}">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family={{ str_replace(' ','+',config('app.font') ?: 'IBM Plex Sans') }}:wght@300&display=swap" rel="stylesheet">
@if(file_exists('css/social.css'))
<!-- Social Logins -->

View File

@@ -75,15 +75,25 @@
</nav>
@section('page-scripts')
@js('/plugin/bootstrap3-typeahead/js/bootstrap3-typeahead.min.js','bs-typeahead')
<style>
/* Solid border */
div.typeahead.dropdown-menu > .dropdown-header {
color: #000000;
text-align: left;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$("input[name=q]").typeahead({
autoSelect: false,
scrollHeight: 10,
theme: 'bootstrap4',
delay: 500,
minLength: 2,
items: {{ isset($search_limit) ? $search_limit : 15 }},
items: {{ isset($search_limit) ? $search_limit : 100 }},
fitToElement: false,
selectOnBlur: false,
appendTo: "#search_results",
source: function (query,process) {
search('{{ url("search",['date'=>isset($ido) ? $ido->id : NULL]) }}',query,process);
@@ -91,8 +101,14 @@
matcher: function () { return true; },
// Disable sorting and just return the items (items should by the ajax method)
sorter: function(items) {
return items;
},
updater: function (item) {
window.parent.location.href = '{{ url("/") }}'+users[item];
console.log(item.value);
window.parent.location.href = item.value;
},
})
.on('keyup keypress', function(event) {
@@ -126,17 +142,7 @@
// if json is null, means no match, won't do again.
if(data==null || (data.length===0)) return;
users = {};
userLabels = [];
_.each(data,function(item,ix,list) {
if (_.includes(users,item.label))
item.label = item.label + ' #' + item.value;
userLabels.push(item.label);
users[item.label] = item.value;
});
process(userLabels);
process(data);
},
complete : function() {
if (--c == 0) {