Skip to content

Commit

Permalink
Merge pull request #69 from openjournalteam/improvement34
Browse files Browse the repository at this point in the history
Improvement34
  • Loading branch information
rahmanramsi authored Mar 13, 2024
2 parents 126a07a + c5ea0af commit 8b36a58
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 3.0.2.0 : 13 Mar 2024
- Fix showing notice log when there's an error

### 3.0.1.1 : 21 Nov 2023
- Fix error when installing plugin because ojs root folder is restricted to write

Expand Down
2 changes: 1 addition & 1 deletion OjtControlPanelPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function fatalHandler()
{
$error = error_get_last();
// Fatal error, E_ERROR === 1
if (!in_array($error['type'], [E_COMPILE_ERROR, E_ERROR])) return;
if (!in_array(array_key_exists('type', $error) && $error['type'], [E_COMPILE_ERROR, E_ERROR])) return;
if (!str_contains($error['file'], 'ojtControlPanel')) {
return;
}
Expand Down
3 changes: 3 additions & 0 deletions OjtPageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,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'),
];

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

$templateMgr->assign('ojtPlugin', $ojtPlugin);
$templateMgr->assign('journal', $this->contextId ? $request->getContext() : $request->getSite());

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
10 changes: 10 additions & 0 deletions templates/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@
<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>ojtControlPanel</application>
<type>plugins.generic</type>
<release>3.0.1.2</release>
<date>2023-11-28</date>
<release>3.0.2.0</release>
<date>2024-3-13</date>
<lazy-load>0</lazy-load>
<class>OjtControlPanelPlugin</class>
</version>

0 comments on commit 8b36a58

Please sign in to comment.