mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 12:15:15 +00:00
Merge pull request #202 from git-marijus/master
make autocomplete better themable by adding an id
This commit is contained in:
commit
e651ca8b07
8 changed files with 36 additions and 11 deletions
|
@ -22,6 +22,7 @@ function nav(&$a) {
|
|||
serviceUrl: '$base/acl',
|
||||
minChars: 2,
|
||||
width: 250,
|
||||
id: 'nav-search-text-ac',
|
||||
});
|
||||
a.setOptions({ autoSubmit: true, params: { type: 'x' }});
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
this.ignoreValueChange = false;
|
||||
this.serviceUrl = options.serviceUrl;
|
||||
this.isLocal = false;
|
||||
this.id = options.id;
|
||||
this.options = {
|
||||
autoSubmit: false,
|
||||
minChars: 1,
|
||||
|
@ -77,7 +78,7 @@
|
|||
if (!this.options.width) { this.options.width = this.el.width(); }
|
||||
this.mainContainerId = 'AutocompleteContainter_' + uid;
|
||||
|
||||
$('<div id="' + this.mainContainerId + '" style="position:absolute;z-index:9999;"><div class="autocomplete-w1"><div class="autocomplete" id="' + autocompleteElId + '" style="display:none; width:300px;"></div></div></div>').appendTo('body');
|
||||
$('<div id="' + this.mainContainerId + '" style="position:absolute;z-index:9999;"><div class="autocomplete-w1" id="'+this.id+'"><div class="autocomplete" id="' + autocompleteElId + '" style="display:none; width:300px;"></div></div></div>').appendTo('body');
|
||||
|
||||
this.container = $('#' + autocompleteElId);
|
||||
this.fixPosition();
|
||||
|
|
|
@ -3,7 +3,8 @@ $(document).ready(function() {
|
|||
a = $("#contacts-search").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
width: 250,
|
||||
id: 'contact-search-ac',
|
||||
});
|
||||
a.setOptions({ autoSubmit: true, params: { type: 'a' }});
|
||||
|
||||
|
|
|
@ -3,10 +3,11 @@ $(document).ready(function() {
|
|||
a = $("#recip").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
width: 250,
|
||||
id: 'recip-ac',
|
||||
onSelect: function(value,data) {
|
||||
$("#recip-complete").val(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -4,6 +4,7 @@ $(document).ready(function() {
|
|||
serviceUrl: baseurl + '/search_ac',
|
||||
minChars: 2,
|
||||
width: 250,
|
||||
id: 'search-text-ac',
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ $(document).ready(function() {
|
|||
a = $("#poke-recip").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
width: 250,
|
||||
id: 'poke-recip-ac';
|
||||
onSelect: function(value,data) {
|
||||
$("#poke-recip-complete").val(data);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ $(document).ready(function() {
|
|||
a = $("#id_name").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
width: 250,
|
||||
id: 'id-name-ac',
|
||||
onSelect: function(value,data) {
|
||||
$("#id_xchan").val(data);
|
||||
}
|
||||
|
|
|
@ -781,6 +781,12 @@ footer {
|
|||
height: 120px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#contacts-search {
|
||||
font-size: 1em;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#contacts-search-end {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
@ -2894,14 +2900,26 @@ div.jGrowl div.info {
|
|||
width:100px;
|
||||
}
|
||||
|
||||
#recip {
|
||||
#nav-search-text-ac .autocomplete {
|
||||
position: fixed;
|
||||
top: 24px;
|
||||
border: 1px solid $nav_bg_2;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#search-text-ac .autocomplete,
|
||||
#recip-ac .autocomplete,
|
||||
#poke-recip-ac .autocomplete,
|
||||
#id-name-ac .autocomplete,
|
||||
#contact-search-ac .autocomplete {
|
||||
margin-top: 2px;
|
||||
margin-left: $radiuspx;
|
||||
border: 1px solid #666;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.autocomplete {
|
||||
color: $font_colour;
|
||||
border: 1px solid $nav_bg_1;
|
||||
border-top: none;
|
||||
background: #FFF;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
|
|
Loading…
Reference in a new issue