* Tue Jul 01 2025 Brian Read <brianr@koozali.org> 11.0.0-100.sme

- Add code in top template default.html.ep to incorporate any panel specific js and css [SME: 13062]
This commit is contained in:
Brian Read 2025-07-01 11:28:58 +01:00
parent 21255abf46
commit ff9c2fee8c
5 changed files with 74 additions and 74 deletions

View File

@ -1,7 +1,5 @@
% layout 'default', title => 'Sme server 2 - datetime'; % layout 'default', title => 'Sme server 2 - datetime';
% content_for 'module' => begin % content_for 'module' => begin
%= javascript 'js/datetime.js'
%= stylesheet 'css/datetime.css'
<div id='module' class='module datetime-panel'> <div id='module' class='module datetime-panel'>
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <p>

View File

@ -4,8 +4,6 @@
% layout 'default', title => "Sme server 2 - E-Mail", share_dir => './'; % layout 'default', title => "Sme server 2 - E-Mail", share_dir => './';
%# css specific to this panel: %# css specific to this panel:
% content_for 'module' => begin % content_for 'module' => begin
%= stylesheet '/css/emailsettings.css'
%= javascript '/js/emailsettings.js'
% use constant FALSE => 0; % use constant FALSE => 0;
% use constant TRUE => 1; % use constant TRUE => 1;

View File

@ -2,7 +2,6 @@
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<!-- default +jquery -->
<head> <head>
<title><%= $title %></title> <title><%= $title %></title>
<link rel="made" href="mailto:bugs%40koozali.org"> <link rel="made" href="mailto:bugs%40koozali.org">
@ -11,27 +10,16 @@
%= stylesheet '/css/new_sme.css' %= stylesheet '/css/new_sme.css'
%= stylesheet '/css/new-sme-main.css' %= stylesheet '/css/new-sme-main.css'
%# Replaced by consolidated (and rationlised) CSS files as above March 2025
%#= stylesheet '/css/sme_core.css'
%#= stylesheet '/css/sme_main.css'
%#= stylesheet '/css/sme_menu.css'
%#= stylesheet '/css/styles.css'
%#= stylesheet '/css/sme-password.css'
%= content_for 'head_contrib' %= content_for 'head_contrib'
% if (config 'hasJquery') { % if (config 'hasJquery') {
%= include 'partials/_js_imports' %= include 'partials/_js_imports'
%= include 'common_js' %= include 'common_js'
% } % }
%= content_for 'refresh' %= content_for 'refresh'
%= stylesheet '/js/datatables.min.css' %= stylesheet '/js/datatables.min.css'
%= javascript '/js/datatables.min.js' %= javascript '/js/datatables.min.js'
%= stylesheet '/js/jquery-ui.min.css' %= stylesheet '/js/jquery-ui.min.css'
%= javascript '/js/jquery-ui.min.js' %= javascript '/js/jquery-ui.min.js'
%= javascript '/js/dataTables.buttons.min.js' %= javascript '/js/dataTables.buttons.min.js'
%= javascript '/js/jszip.min.js' %= javascript '/js/jszip.min.js'
@ -57,13 +45,22 @@
} }
</style> </style>
%# panel specific css file
% my $controller = stash('controller');
% if ($controller) {
% my $css_path = "css/$controller.css";
%# Use the url_for helper to generate the correct static file URL
% if (app->static->file($css_path)) {
<link rel="stylesheet" href="<%= url_for("/$css_path") %>">
% }
% }
</head> </head>
<body> <body>
% if ( not defined $c->session->{lang} ) { % if ( not defined $c->session->{lang} ) {
% SrvMngr::init_session ( $c ); % SrvMngr::init_session ( $c );
% } % }
<div id="header"> <div id="header">
%= include 'partials/_header' %= include 'partials/_header'
% if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) { % if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
@ -72,7 +69,6 @@
</div> </div>
<div id="container"> <div id="container">
% if (config 'hasJquery') { % if (config 'hasJquery') {
%= content 'js_toggleMenu' %= content 'js_toggleMenu'
% } % }
@ -86,10 +82,9 @@
%= include 'partials/_navig2' %= include 'partials/_navig2'
% } % }
</div> </div>
<div id="main" class="col-md-9"> <div id="main" class="col-md-9">
%= include 'partials/_info' %= include 'partials/_info'
% if (flash 'success') { % if (flash 'success') {
<br><div class="success module"> <br><div class="success module">
%= $c->render_to_string(inline => flash 'success') %= $c->render_to_string(inline => flash 'success')
@ -124,14 +119,21 @@
// Disable the submit button // Disable the submit button
$(this).find('button[type="submit"], input[type="submit"]').prop('disabled', true); $(this).find('button[type="submit"], input[type="submit"]').prop('disabled', true);
// Show the busy indicator // Show the busy indicator
// $('#busy-indicator').show();
// Change the cursor to "wait" // Change the cursor to "wait"
$('body').addClass('busy'); $('body').addClass('busy');
}); });
}); });
</script> </script>
%# Specific panel js code
% $controller = stash('controller');
% if ($controller) {
% my $js_path = "js/$controller.js";
%# Use the url_for helper to generate the correct static file URL
% if (app->static->file($js_path)) {
<script src="<%= url_for("/$js_path") %>"></script>
% }
% }
</body> </body>
</html> </html>

View File

@ -1,6 +1,5 @@
% layout 'default', title => "Sme server 2 - qmailanalog"; % layout 'default', title => "Sme server 2 - qmailanalog";
% content_for 'module' => begin % content_for 'module' => begin
%= javascript '/js/qmailanalog.js'
<div id='module' class='module qmailanalog-panel'> <div id='module' class='module qmailanalog-panel'>
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <p>

View File

@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
%define name smeserver-manager %define name smeserver-manager
Name: %{name} Name: %{name}
%define version 11.0.0 %define version 11.0.0
%define release 99 %define release 100
Version: %{version} Version: %{version}
Release: %{release}%{?dist} Release: %{release}%{?dist}
License: GPL License: GPL
@ -146,6 +146,9 @@ true
%defattr(-,root,root) %defattr(-,root,root)
%changelog %changelog
* Tue Jul 01 2025 Brian Read <brianr@koozali.org> 11.0.0-100.sme
- Add code in top template default.html.ep to incorporate any panel specific js and css [SME: 13062]
* Mon Jun 30 2025 Brian Read <brianr@koozali.org> 11.0.0-99.sme * Mon Jun 30 2025 Brian Read <brianr@koozali.org> 11.0.0-99.sme
- Directory panel - Add in open for config db as required by cacheing [SME: 13059] - Directory panel - Add in open for config db as required by cacheing [SME: 13059]