add config option for typeahead limit

This commit is contained in:
wiad
2016-04-12 19:16:15 +02:00
parent 86039cfa24
commit 362bcd4353
3 changed files with 12 additions and 1 deletions

View File

@@ -204,6 +204,7 @@ function '.$unique_id.'() {
},
{
source: '.$unique_id.'_device.ttAdapter(),
limit: '.$config['typeahead_limit'].',
async: false,
templates: {
header: "<h5><strong>&nbsp;Devices</strong></h5>",
@@ -240,6 +241,7 @@ function '.$unique_id.'() {
},
{
source: '.$unique_id.'_port.ttAdapter(),
limit: '.$config['typeahead_limit'].',
async: false,
templates: {
header: "<h5><strong>&nbsp;Ports</strong></h5>",
@@ -275,6 +277,7 @@ function '.$unique_id.'() {
},
{
source: '.$unique_id.'_application.ttAdapter(),
limit: '.$config['typeahead_limit'].',
async: false,
templates: {
header: "<h5><strong>&nbsp;Applications</strong></h5>",
@@ -312,6 +315,7 @@ function '.$unique_id.'() {
},
{
source: '.$unique_id.'_munin.ttAdapter(),
limit: '.$config['typeahead_limit'].',
async: false,
templates: {
header: "<h5><strong>&nbsp;Munin</strong></h5>",
@@ -346,6 +350,7 @@ function '.$unique_id.'() {
},
{
source: '.$unique_id.'_bill.ttAdapter(),
limit: '.$config['typeahead_limit'].',
async: false,
templates: {
header: "<h5><strong><i class=\'fa fa-money\'></i>&nbsp;Bill</strong></h5>",

View File

@@ -717,6 +717,7 @@ $('#gsearch').typeahead({
},
{
source: devices.ttAdapter(),
limit: '<?php echo($config['typeahead_limit']); ?>',
async: true,
display: 'name',
valueKey: 'name',
@@ -727,6 +728,7 @@ $('#gsearch').typeahead({
},
{
source: ports.ttAdapter(),
limit: '<?php echo($config['typeahead_limit']); ?>',
async: true,
display: 'name',
valueKey: 'name',
@@ -737,6 +739,7 @@ $('#gsearch').typeahead({
},
{
source: bgp.ttAdapter(),
limit: '<?php echo($config['typeahead_limit']); ?>',
async: true,
display: 'name',
valueKey: 'name',