summaryrefslogtreecommitdiff
path: root/app/views/issues/_form.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/issues/_form.html.haml')
-rw-r--r--app/views/issues/_form.html.haml33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml
index 670b4e059f4..8a9a91a36a8 100644
--- a/app/views/issues/_form.html.haml
+++ b/app/views/issues/_form.html.haml
@@ -55,3 +55,36 @@
= link_to "Cancel", project_issues_path(@project), class: cancel_class
- else
= link_to "Cancel", project_issue_path(@project, @issue), class: cancel_class
+
+
+
+
+:javascript
+ $(function(){
+ $("#issue_label_list")
+ .bind( "keydown", function( event ) {
+ if ( event.keyCode === $.ui.keyCode.TAB &&
+ $( this ).data( "autocomplete" ).menu.active ) {
+ event.preventDefault();
+ }
+ })
+ .autocomplete({
+ minLength: 0,
+ source: function( request, response ) {
+ response( $.ui.autocomplete.filter(
+ #{raw labels_autocomplete_source}, extractLast( request.term ) ) );
+ },
+ focus: function() {
+ return false;
+ },
+ select: function(event, ui) {
+ var terms = split( this.value );
+ terms.pop();
+ terms.push( ui.item.value );
+ terms.push( "" );
+ this.value = terms.join( ", " );
+ return false;
+ }
+ });
+ });
+