Created
April 29, 2019 12:02
-
-
Save ohadlevy/1e63860b3c40a86d3fa3e1b941ec1eb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js | |
index 26f716169..4cb088a7f 100644 | |
--- a/app/assets/javascripts/application.js | |
+++ b/app/assets/javascripts/application.js | |
@@ -1,8 +1,6 @@ | |
//= require jquery.turbolinks | |
//= require turbolinks | |
-//= require jquery.ui.autocomplete | |
//= require jquery.ui.spinner | |
-//= require scoped_search | |
//= require bootstrap | |
//= require patternfly | |
//= require vendor | |
@@ -31,11 +29,6 @@ $(function() { | |
function onContentLoad(){ | |
tfm.store.observeStore('layout', tfm.nav.showContent); | |
- uninitialized_autocompletes = $.grep($('.autocomplete-input'), function(i){ return !$(i).next().hasClass('autocomplete-clear'); }); | |
- if (uninitialized_autocompletes.length > 0) { | |
- $.each(uninitialized_autocompletes, function(i, input) {$(input).scopedSearch({'delay': 250})}); | |
- $('.ui-helper-hidden-accessible').remove(); | |
- } | |
if ($("input[focus_on_load=true]").length > 0) { | |
$("input[focus_on_load]").first().focus(); | |
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss | |
index 97ca2738f..070ff3ad5 100644 | |
--- a/app/assets/stylesheets/application.scss | |
+++ b/app/assets/stylesheets/application.scss | |
@@ -2,7 +2,6 @@ | |
@import 'jquery.ui.core'; | |
@import 'jquery.ui.menu'; | |
//we need to import all the above because we are using jquery-ui-rails and it uses sprockets require instaed of sass import. | |
-@import 'jquery.ui.autocomplete'; | |
@import 'jquery.ui.spinner'; | |
@import 'jquery.ui.spinner_custom'; | |
@import 'scoped_search'; | |
diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss | |
index b67c50827..196cabbbf 100644 | |
--- a/app/assets/stylesheets/base.scss | |
+++ b/app/assets/stylesheets/base.scss | |
@@ -418,10 +418,6 @@ table { | |
font-size: 75%; | |
} | |
-.autocomplete-input { | |
- display: inline-block !important; | |
-} | |
- | |
.glyphicon.nic-flag { | |
margin: 2px; | |
} | |
@@ -583,11 +579,6 @@ table { | |
float: left; | |
} | |
-.ui-autocomplete { | |
- max-height: 300px; | |
- overflow-y: auto; | |
-} | |
- | |
.modal-big { | |
width: 80%; | |
} | |
diff --git a/app/assets/stylesheets/patternfly_and_overrides.scss b/app/assets/stylesheets/patternfly_and_overrides.scss | |
index f606006d2..3719a6851 100644 | |
--- a/app/assets/stylesheets/patternfly_and_overrides.scss | |
+++ b/app/assets/stylesheets/patternfly_and_overrides.scss | |
@@ -40,11 +40,6 @@ textarea.form-control { | |
max-width: 1400px; // Max width as per suggested by Patternfly | |
} | |
-.autocomplete-clear { | |
- z-index: 3; | |
- position: relative; | |
-} | |
- | |
#login { | |
max-width: 100%; | |
} | |
diff --git a/app/views/users/_audit_summary_query_builder.html.erb b/app/views/users/_audit_summary_query_builder.html.erb | |
index ec3b63262..08b65e15a 100644 | |
--- a/app/views/users/_audit_summary_query_builder.html.erb | |
+++ b/app/views/users/_audit_summary_query_builder.html.erb | |
@@ -1,4 +1,7 @@ | |
<div id="audit_summary_query_builder" class="input-group"> | |
- <%= text_f(f, :mail_query, {:no_label => true, :placeholder => _('Mail query'), | |
- :id => 'search',:class => "autocomplete-input", :data => {:url => auto_complete_search_audits_path} }) %> | |
+ <%= autocomplete_f f, :mail_query, | |
+ :placeholder => _('Mail query'), | |
+ :no_label => true, | |
+ :full_path => auto_complete_search_audits_path, | |
+ :control_group_id => 'search_group' %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment