Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# 🔐 Scan único (policy)
- name: Trivy Image Scan
uses: aquasecurity/trivy-action@0.20.0
uses: aquasecurity/trivy-action@v0.35.0
with:
image-ref: infrascielo/opac_5:${{ env.VERSION }}
severity: HIGH,CRITICAL
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV OPAC_VCS_REF ${OPAC_VCS_REF}
ENV OPAC_WEBAPP_VERSION ${OPAC_WEBAPP_VERSION}

LABEL org.label-schema.build-date=$OPAC_BUILD_DATE \
org.label-schema.name="OPAC WebApp - development build" \
org.label-schema.name="OPAC WebApp" \
org.label-schema.description="OPAC WebApp main app" \
org.label-schema.url="https://github.com/scieloorg/opac/" \
org.label-schema.vcs-ref=$OPAC_VCS_REF \
Expand All @@ -30,8 +30,7 @@ WORKDIR /app
RUN pip install --upgrade pip

RUN pip --no-cache-dir install -U pip && \
pip --no-cache-dir install -r /app/requirements.txt && \
pip --no-cache-dir install -r /app/requirements.dev.txt
pip --no-cache-dir install -r /app/requirements.txt

RUN sed -i 's/\r//' start_worker.sh \
&& sed -i 's/\r//' start_scheduler.sh \
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
user: redis
restart: always
volumes:
- ../data_opac_prod/redis-cache-data-dev:/data
- ../data_opac_prod/redis-cache-data:/data
- /etc/localtime:/etc/localtime:ro

opac_mongo:
Expand Down
2 changes: 1 addition & 1 deletion opac/webapp/static/css/article.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion opac/webapp/static/js/scielo-article-min.js

Large diffs are not rendered by default.

55 changes: 25 additions & 30 deletions opac/webapp/static/js/scielo-article.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
});
},200);


$(window).scroll(function() {
var t = $(window).scrollTop(),
$floatingMenuCtt = '.scielo__floatingMenuCttJs3';
Expand All @@ -262,24 +263,11 @@
}


if(t > articleTextP.top) {

$(".articleMenu").addClass("fixed").width(articleMenuW);

if(t > (articleTextH + articleTextP.top - articleMenuH - 46)) {
$(".articleMenu").addClass("fixedBottom");

} else {
$(".articleMenu").removeClass("fixedBottom");
}
} else
$(".articleMenu").removeClass("fixed");

Article.ArticleStructureSelect(t);

$(".alternativeHeader").stop(false,false);

});




Expand Down Expand Up @@ -442,8 +430,8 @@

if(typeof t == "undefined") return true;

ctt += '<li '+(idx == 0 ? 'class="selected"' : '')+'>';
ctt += ' <a href="#articleSection'+idx+'">'+t+'</a>';
ctt += '<li '+(idx == 0 ? 'class="selected list-group-item active"' : 'class="list-group-item"')+'>';
ctt += ' <a href="#articleSection'+idx+'" class="list-group-item-action d-block" aria-current="location">'+t+'</a>';

if(h.length > 1) {
var iidx = 0;
Expand All @@ -456,8 +444,8 @@
$(this).before("<a name='as"+idx+"-heading"+iidx+"'></a>");
}

ctt += '<li>';
ctt += ' <a href="#as'+idx+'-heading'+iidx+'">'+$(this).text()+'</a>';
ctt += '<li class="list-group-item">';
ctt += ' <a href="#as'+idx+'-heading'+iidx+'" class="list-group-item-action d-block">'+$(this).text()+'</a>';
ctt += '</li>';

iidx++;
Expand All @@ -483,25 +471,32 @@

$("html,body").animate({
scrollTop: (p.top-60)
},500);

Check failure

Code scanning / CodeQL

DOM text reinterpreted as HTML High

DOM text
is reinterpreted as HTML without escaping meta-characters.
});
},
ArticleStructureSelect: function(pos) {
var structure = $(".articleMenu"),
idx = 0;
for(var i=0,l=Article.TopBinder.length;i<l;i++) {
if(i == l-1 && pos >= Article.TopBinder[i]-100) {
structure.find("li").removeClass("selected");
structure.find("li:eq("+i+")").addClass("selected");
currentIndex = 0,
current;

for (var i = 0, l = Article.TopBinder.length; i < l; i++) {
if (i == l - 1 && pos >= Article.TopBinder[i] - 100) {
currentIndex = i;
break;
}

if (pos <= (Article.TopBinder[i] - 100)) {
currentIndex = (i > 0) ? (i - 1) : 0;
break;
} else {
if(pos <= (Article.TopBinder[i]-100)) {
structure.find("li").removeClass("selected");
structure.find("li:eq("+(i-1)+")").addClass("selected");
break;
}
}
}

structure.find("li").removeClass("selected active");
structure.find("a").removeAttr("aria-current");

current = structure.find("li:eq(" + currentIndex + ")");
current.addClass("selected active");
current.find("a").attr("aria-current", "location");
},
Bindings: function(ctn) {
if(typeof ctn == "undefined") ctn = ".article";
Expand Down
2 changes: 1 addition & 1 deletion opac/webapp/static/maps/scielo-article-min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion opac/webapp/templates/article/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% endblock %}

{% block extra_css %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/article.css') }}?v=1.1.25" type="text/css" async/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/article.css') }}?v=1.1.29" type="text/css" async/>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" async />
<link href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" rel="stylesheet" async />
{% endblock %}
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ zope.interface==5.5.2
tox==4.3.5
PyJWT==2.8.0
tenacity==8.2.3
-e git+https://git@github.com/scieloorg/opac_schema@v2.9.0#egg=Opac_Schema
-e git+https://git@github.com/scieloorg/packtools@4.16.0#egg=packtools
-e git+https://github.com/scieloorg/scieloh5m5.git@1.9.5#egg=scieloh5m5
git+https://github.com/scieloorg/opac_schema@v2.9.0#egg=Opac_Schema
git+https://github.com/scieloorg/packtools@4.16.2#egg=packtools
git+https://github.com/scieloorg/scieloh5m5@1.9.5#egg=scieloh5m5
Loading