| |
@@ -675,6 +675,25 @@
|
| |
doUpload("{{ form.csrf_token.current_token }}", this.files);
|
| |
});
|
| |
|
| |
+ $('.mainform #assignee').selectize({
|
| |
+ valueField: 'user',
|
| |
+ labelField: 'user',
|
| |
+ searchField: 'user',
|
| |
+ maxItems: 1,
|
| |
+ create: false,
|
| |
+ load: function(query, callback) {
|
| |
+ if (!query.length) return callback();
|
| |
+ $.getJSON(
|
| |
+ "{{ url_for('api_ns.api_users') }}", {
|
| |
+ pattern: "*"+query+"*"
|
| |
+ },
|
| |
+ function( data ) {
|
| |
+ callback( data.users.map(function(x) { return { user: x }; }) );
|
| |
+ }
|
| |
+ );
|
| |
+ }
|
| |
+ });
|
| |
+
|
| |
$.get("{{ url_for('api_ns.api_users') }}", {
|
| |
pattern: '*'
|
| |
}).done(function(resp) {
|
| |
@@ -687,17 +706,6 @@
|
| |
}
|
| |
$("#comment").atwho(userConfig);
|
| |
|
| |
- $('.mainform #assignee').selectize({
|
| |
- valueField: 'user',
|
| |
- labelField: 'user',
|
| |
- searchField: 'user',
|
| |
- maxItems: 1,
|
| |
- create: false,
|
| |
- load: function(query, callback) {
|
| |
- callback( resp.users.map(function(x) { return { user: x }; }) );
|
| |
- }
|
| |
- });
|
| |
-
|
| |
});
|
| |
$.when($.get("{{ url_for('api_ns.api_view_issues',
|
| |
repo=repo.name,
|
| |
Make the selectize async call for the assignee actaully work properly. Previously it was just pulling down all the users all the time.
Also, add a loading spinner to selectize elements when loading aync data.