diff --git a/pagure/templates/_browseheader.html b/pagure/templates/_browseheader.html
index d22c389..cbaaafb 100644
--- a/pagure/templates/_browseheader.html
+++ b/pagure/templates/_browseheader.html
@@ -3,25 +3,36 @@
{%- endmacro %}
diff --git a/pagure/templates/group_info.html b/pagure/templates/group_info.html
index 108dddc..3a8dec8 100644
--- a/pagure/templates/group_info.html
+++ b/pagure/templates/group_info.html
@@ -106,65 +106,65 @@
$(document).ready(function() {
$('#term').selectize({
- valueField: 'group',
- labelField: 'group',
- searchField: 'group',
- onType: function(value){
- if (value == ""){
- this.close();
+ valueField: 'group',
+ labelField: 'group',
+ searchField: 'group',
+ onType: function(value){
+ if (value == ""){
+ this.close();
+ }
+ },
+ onChange: function(value){
+ if (value != ""){
+ $('#headerSearch').submit();
+ }
+ },
+ maxItems: 1,
+ create: false,
+ load: function(query, callback) {
+ if (!query.length) return callback();
+ $.getJSON(
+ "{{ url_for('api_ns.api_groups') }}", {
+ pattern: query
+ },
+ function( data ) {
+ callback( data.groups.map(function(x) { return { group: x }; }) );
}
- },
- onChange: function(value){
- if (value != ""){
- $('#headerSearch').submit();
+ );
+ }
+ });
+
+ var usersearch = $('#user').selectize({
+ valueField: 'user',
+ labelField: 'user',
+ searchField: 'user',
+ onChange: function(value){
+ if (value != ""){
+ $('#add_user_form').submit();
+ }
+ },
+ maxItems: 1,
+ create: false,
+ preload: 'focus',
+ load: function(query, callback) {
+ $.getJSON(
+ "{{ url_for('api_ns.api_users') }}",
+ function( data ) {
+ callback( data.users.map(function(x) { return { user: x }; }) );
}
- },
- maxItems: 1,
- create: false,
- load: function(query, callback) {
- if (!query.length) return callback();
- $.getJSON(
- "{{ url_for('api_ns.api_groups') }}", {
- pattern: query
- },
- function( data ) {
- callback( data.groups.map(function(x) { return { group: x }; }) );
- }
- );
+ );
+ },
+ render: {
+ option: function(item, escape) {
+ return '' +
+ '
' +
+ '' + escape(item.user) + '' +
+ '
' +
+ '
';
}
+ },
});
- var usersearch = $('#user').selectize({
- valueField: 'user',
- labelField: 'user',
- searchField: 'user',
- onChange: function(value){
- if (value != ""){
- $('#add_user_form').submit();
- }
- },
- maxItems: 1,
- create: false,
- preload: 'focus',
- load: function(query, callback) {
- $.getJSON(
- "{{ url_for('api_ns.api_users') }}",
- function( data ) {
- callback( data.users.map(function(x) { return { user: x }; }) );
- }
- );
- },
- render: {
- option: function(item, escape) {
- return '' +
- '
' +
- '' + escape(item.user) + '' +
- '
' +
- '
';
- }
- },
- });
-
$('#add_user_button').click(function(){
$('#add_user_button').hide();
$('#add_user_form_wrapper').show();
diff --git a/pagure/templates/group_list.html b/pagure/templates/group_list.html
index ca103e2..cbec56b 100644
--- a/pagure/templates/group_list.html
+++ b/pagure/templates/group_list.html
@@ -117,37 +117,40 @@
{% endblock %}
diff --git a/pagure/templates/user_list.html b/pagure/templates/user_list.html
index 9795443..a9e58ac 100644
--- a/pagure/templates/user_list.html
+++ b/pagure/templates/user_list.html
@@ -80,45 +80,45 @@
{% endblock %}