Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
8c57c576
Commit
8c57c576
authored
2 years ago
by
quido.zientek
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] href prevent default
parent
f50fd4fd
No related branches found
No related tags found
3 merge requests
!607
Pirati.cz
,
!594
Feature/pirati cz quidecek
,
!575
Feature/pirati cz
Pipeline
#9496
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/templates/main/blocks/twitter_block.html
+4
-2
4 additions, 2 deletions
main/templates/main/blocks/twitter_block.html
main/templates/main/main_articles_page.html
+6
-2
6 additions, 2 deletions
main/templates/main/main_articles_page.html
with
10 additions
and
4 deletions
main/templates/main/blocks/twitter_block.html
+
4
−
2
View file @
8c57c576
...
...
@@ -8,7 +8,8 @@
{% if show_next_tweet %}
<div
class=
"text-center"
>
<a
onclick=
"showMoreTweets(this)"
onclick=
"showMoreTweets(event, this)"
href=
"#"
data-url=
"{{ page_url }}?page="
data-page=
"2"
class=
"btn btn__slide__wrap"
>
...
...
@@ -23,7 +24,8 @@
{% endif %}
</div>
<script
type=
"text/javascript"
>
function
showMoreTweets
(
tweet
)
{
function
showMoreTweets
(
event
,
tweet
)
{
event
.
preventDefault
()
let
btn
=
tweet
;
let
tweetsList
=
document
.
getElementById
(
'
tweetsList
'
);
...
...
This diff is collapsed.
Click to expand it.
main/templates/main/main_articles_page.html
+
6
−
2
View file @
8c57c576
...
...
@@ -25,7 +25,8 @@
{% if show_next_articles %}
<div
class=
"text-center"
>
<a
onclick=
"showMoreArticles(this)"
onclick=
"showMoreArticles(event, this)"
href=
"#"
data-url=
"{{ page_url }}?months="
data-months=
"2"
class=
"btn btn__slide__wrap"
>
...
...
@@ -41,7 +42,8 @@
</div>
</main>
<script
type=
"text/javascript"
>
function
showMoreArticles
(
article
)
{
function
showMoreArticles
(
event
,
article
)
{
event
.
preventDefault
()
let
btn
=
article
;
let
searchResultWrapper
=
document
.
getElementById
(
'
searchResultWrapper
'
);
...
...
@@ -53,6 +55,8 @@
},
}).
then
((
response
)
=>
response
.
json
())
.
then
((
data
)
=>
{
if
(
data
.
last_article
)
btn
.
hide
();
searchResultWrapper
.
innerHTML
=
data
.
html
;
let
dataMonths
=
parseInt
(
article
.
getAttribute
(
'
data-months
'
))
+
1
article
.
setAttribute
(
'
data-months
'
,
dataMonths
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment