Revision e620ca07 snf-cyclades-app/synnefo/helpdesk/static/js/common.js
b/snf-cyclades-app/synnefo/helpdesk/static/js/common.js | ||
---|---|---|
1 | 1 |
$(document).ready(function(){ $("input").focus(); }) |
2 | 2 |
|
3 | 3 |
$(document).ready(function(){ |
4 |
|
|
5 |
|
|
4 | 6 |
// fix sub nav on scroll |
5 | 7 |
var $win = $(window) |
6 | 8 |
, $nav = $('.subnav') |
... | ... | |
82 | 84 |
$('.info-block h3').click(function(){ |
83 | 85 |
$(this).next('.info-block-content').toggle(); |
84 | 86 |
$(this).prev('.show-hide-all').toggle(); |
85 |
}) |
|
86 |
|
|
87 |
}); |
|
88 |
|
|
89 |
$('.search-query').typeahead() |
|
90 |
|
|
91 |
$('.search-query').keyup(function(){ |
|
92 |
var t = $(".search-query").data("typeahead"); |
|
93 |
var a = t.lookup().query; |
|
94 |
$.ajax({ |
|
95 |
url:'/helpdesk/api/users/?prefix='+a, |
|
96 |
dataType:'json', |
|
97 |
success:function(d){ |
|
98 |
t.source = d; |
|
99 |
} |
|
100 |
}) |
|
101 |
}) |
|
102 |
|
|
103 |
|
|
87 | 104 |
|
88 | 105 |
}) |
89 | 106 |
|
Also available in: Unified diff