Browse Source

Merge pull request #21 from lexintegritastech/improve-main-ui

Minor fixes for UI
pull/22/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
da8d414255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/javascript/controllers/selectize_controller.js
  2. 2
      app/views/documents/index.html.erb

4
app/javascript/controllers/selectize_controller.js

@ -35,12 +35,10 @@ export default class extends ApplicationController {
var subject_ids_opts = {
onChange: function (value) {
console.log(value)
var selectize_options = []
var $selectize = $("#doctrineModal").find("#doctine_content_suggestions").selectize($.extend({ options: selectize_options }, doctrine_content_suggestions_opts))
if (value.length === 0) {
console.log("Here!!!")
$selectize[0].selectize.clearOptions();
} else {
$.get("/api/doctrines.json", { subject_ids: value }, function(data, status) {
@ -55,8 +53,6 @@ export default class extends ApplicationController {
}
$selectize[0].selectize.refreshOptions()
console.log(selectize_options)
}
};

2
app/views/documents/index.html.erb

@ -22,7 +22,7 @@
<div class="modal-body">
<div class="row">
<div class="col-sm-6 p-2">
<%= text_field_tag :citation_finder, params[:citation_finder], class: "form-control" %>
<%= text_field_tag :citation_finder, params[:citation_finder], class: "form-control", placeholder: "Citation Finder" %>
</div>
</div>

Loading…
Cancel
Save