Skip to content

Commit

Permalink
Merge pull request #2551 from gitnnolabs/scimago_improvements
Browse files Browse the repository at this point in the history
Garante que todos os termos separados serão avaliados como instituição e adiciona a capacidade de buscar por diferentes separadores.
  • Loading branch information
gitnnolabs authored Jan 3, 2023
2 parents d5626a4 + ff95029 commit eb9c911
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions opac/webapp/templates/article/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@
{% endif %}

<script>

function splitMulti(str, tokens){
var tempChar = tokens[0];
for(var i = 1; i < tokens.length; i++){
str = str.split(tokens[i]).join(tempChar);
}
str = str.split(tempChar);
return str;
}

var scimago_verify = false;

$('#ModalTutors').on('shown.bs.modal', function () {
Expand All @@ -113,10 +123,10 @@
$(this).find('div').not(".clearfix").each(function () {
self = $(this);

items = self.text().split(',');
items = splitMulti(self.text(), ['–', ',', '.', ':'])

// just the first and the second item.
items.splice(0, 2).forEach(function (item) {
items.forEach(function (item) {

if (!appended) {
$.ajax({
Expand Down

0 comments on commit eb9c911

Please sign in to comment.