Skip to content

Commit

Permalink
Merge pull request #68 from openjournalteam/improvement33
Browse files Browse the repository at this point in the history
Improvement (33)
  • Loading branch information
rahmanramsi authored Mar 13, 2024
2 parents 6b1bc92 + 252520a commit fa4effc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
6 changes: 5 additions & 1 deletion OjtPageHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ public function index($args, $request)
$this->getPluginFullUrl('assets/js/main.js'),
$this->getPluginFullUrl('assets/js/updater.js'),
$this->getPluginFullUrl('assets/js/alpine/alpine.min.js'),
$this->getPluginFullUrl('assets/js/htmx.min.js'),
];

HookRegistry::call('OjtPageHandler::index', array(&$ojtPlugin));

$templateMgr->assign('ojtPlugin', $ojtPlugin);
$templateMgr->assign('journal', $this->contextId ? $request->getContext() : $request->getSite());
$templateMgr->assign('pluginGalleryHtml', $templateMgr->fetch($this->ojtPlugin->getTemplateResource('plugingallery.tpl')));
Expand All @@ -108,8 +111,9 @@ public function support($args, $request)
$user->getLocalizedFamilyName(),
$journalName
];
$url = 'https://ticketing.openjournaltheme.com/login/' . base64_encode(implode('+', $params));

$url = 'https://ticketing.openjournaltheme.com/login/' . base64_encode(implode('+', $params));

header('Location: ' . $url, true, 302);

return;
Expand Down
1 change: 1 addition & 0 deletions assets/js/htmx.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ async function loadAjax(name, dom = false) {
});
}
dom.html(resp.html);

htmx.process('#main-menu')
});

xhr.fail((responseText, statusText, xhr, form) => {
Expand Down
11 changes: 11 additions & 0 deletions templates/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@
<link href="{$ojtPlugin->tailwindCss}" rel="stylesheet">
<link href="{$ojtPlugin->fontAwesomeCss}" rel="stylesheet">
<link href="{$ojtPlugin->sweetAlertCss}" rel="stylesheet">
<meta name="htmx-config" content='{ "includeIndicatorStyles": false }'>
<style>
[x-cloak] {
display: none;
}
.htmx-indicator{
display:none;
}
.htmx-request .htmx-indicator{
display:block;
}
.htmx-request.htmx-indicator{
display:block;
}
</style>
</head>
<div id="moduleCss"></div>
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<version>
<application>ojtPlugin</application>
<type>plugins.generic</type>
<release>2.0.7.2</release>
<date>2023-11-28</date>
<release>2.0.8.0</release>
<date>2024-02-08</date>
<lazy-load>0</lazy-load>
<class>OjtPlugin</class>
</version>

0 comments on commit fa4effc

Please sign in to comment.