* Fri Apr 26 2024 Brian Read <brianr@koozali.org> 11.0.0-4.sme
- Move link creation to createlinks, add REquires smeserver-manager [SME: 12539]
This commit is contained in:
parent
14ab3fdfd2
commit
67bb63c5f3
25
createlinks
25
createlinks
@ -6,14 +6,12 @@ use esmith::Build::Backup qw(:all);
|
||||
# our event specific for updating with yum without reboot
|
||||
$event = 'smeserver-manager-jsquery-update';
|
||||
#add here the path to your templates needed to expand
|
||||
#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
|
||||
#see the,/etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
|
||||
|
||||
# Maybe need ths in here as well:
|
||||
# /etc/dar/DailyBackup.dcf - if backup requested
|
||||
#,/etc/dar/DailyBackup.dcf - if backup requested
|
||||
|
||||
foreach my $file (qw(
|
||||
/etc/systemd/system-preset/49-koozali.preset
|
||||
))
|
||||
foreach my $file (qw(/etc/systemd/system-preset/49-koozali.preset))
|
||||
{
|
||||
templates2events( $file, $event );
|
||||
};
|
||||
@ -37,6 +35,23 @@ event_link('systemd-reload', $event, '50');
|
||||
# safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeserver-manager-jsquery");
|
||||
# templates2events("/etc/smeserver-manager-jsquery/smeserver-manager-jsquery.conf", $event);
|
||||
|
||||
|
||||
safe_symlink('/usr/share/javascript/buttons/buttons.html5.min.js','root/usr/share/smanager/themes/default/public/js/buttons.html5.min.js');
|
||||
safe_symlink('/usr/share/javascript/buttons/buttons.print.min.js','root/usr/share/smanager/themes/default/public/js/buttons.print.min.js');
|
||||
safe_symlink('/usr/share/javascript/dataTables.buttons.min.js','root/usr/share/smanager/themes/default/public/js/dataTables.buttons.min.js');
|
||||
safe_symlink('/usr/share/javascript/datatables.min.css','root/usr/share/smanager/themes/default/public/js/datatables.min.css');
|
||||
safe_symlink('/usr/share/javascript/datatables.min.js','root/usr/share/smanager/themes/default/public/js/datatables.min.js');
|
||||
safe_symlink('/usr/share/javascript/jquery-ui/images','root/usr/share/smanager/themes/default/public/js/images');
|
||||
safe_symlink('/usr/share/javascript/jquery/latest/jquery.min.js','root/usr/share/smanager/themes/default/public/js/jquery.min.js');
|
||||
safe_symlink('/usr/share/javascript/jquery/latest/jquery.min.map','root/usr/share/smanager/themes/default/public/js/jquery.min.map');
|
||||
safe_symlink('/usr/share/javascript/jquery-ui/jquery-ui.min.css','root/usr/share/smanager/themes/default/public/js/jquery-ui.min.css');
|
||||
safe_symlink('/usr/share/javascript/jquery-ui/jquery-ui.min.js','root/usr/share/smanager/themes/default/public/js/jquery-ui.min.js');
|
||||
safe_symlink('/usr/share/javascript/jszip/jszip.min.js','root/usr/share/smanager/themes/default/public/js/jszip.min.js');
|
||||
safe_symlink('/usr/share/javascript/pdfmake/pdfmake.min.js','root/usr/share/smanager/themes/default/public/js/pdfmake.min.js');
|
||||
#safe_symlink('/usr/share/javascript/sme-dataTable-setup.js','root/usr/share/smanager/themes/default/public/js/sme-DataTable-setup.js');
|
||||
safe_symlink('/usr/share/javascript/pdfmake/vfs_fonts.js','root/usr/share/smanager/themes/default/public/js/vfs_fonts.js');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
root/usr/share/javascript/buttons/buttons.html5.min.js
vendored
Normal file
8
root/usr/share/javascript/buttons/buttons.html5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
root/usr/share/javascript/buttons/buttons.print.min.js
vendored
Normal file
5
root/usr/share/javascript/buttons/buttons.print.min.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Print button for Buttons and DataTables.
|
||||
* © SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
!function(n){var o,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return n(t,window,document)}):"object"==typeof exports?(o=require("jquery"),r=function(t,e){e.fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),r(t,e),n(e,t,t.document)}:(r(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)}(function(m,b,t,p){"use strict";function h(t){return n.href=t,-1===(t=n.host).indexOf("/")&&0!==n.pathname.indexOf("/")&&(t+="/"),n.protocol+"//"+t+n.pathname+n.search}var e=m.fn.dataTable,n=t.createElement("a");return e.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,n,o){function r(t,e){for(var n="<tr>",o=0,r=t.length;o<r;o++){var i=null===t[o]||t[o]===p?"":t[o];n+="<"+e+" "+(s[o]?'class="'+s[o]+'"':"")+">"+i+"</"+e+">"}return n+"</tr>"}var i=e.buttons.exportData(m.extend({decodeEntities:!1},o.exportOptions)),a=e.buttons.exportInfo(o),s=e.columns(o.exportOptions.columns).flatten().map(function(t){return e.settings()[0].aoColumns[e.column(t).index()].sClass}).toArray(),u='<table class="'+e.table().node().className+'">';o.header&&(u+="<thead>"+r(i.header,"th")+"</thead>"),u+="<tbody>";for(var d=0,c=i.body.length;d<c;d++)u+=r(i.body[d],"td");u+="</tbody>",o.footer&&i.footer&&(u+="<tfoot>"+r(i.footer,"th")+"</tfoot>"),u+="</table>";var l=b.open("","");if(l){l.document.close();var f="<title>"+a.title+"</title>";m("style, link").each(function(){f+=function(t){t=m(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=h(t.href)),t.outerHTML}(this)});try{l.document.head.innerHTML=f}catch(t){m(l.document.head).html(f)}l.document.body.innerHTML="<h1>"+a.title+"</h1><div>"+(a.messageTop||"")+"</div>"+u+"<div>"+(a.messageBottom||"")+"</div>",m(l.document.body).addClass("dt-print-view"),m("img",l.document.body).each(function(t,e){e.setAttribute("src",h(e.getAttribute("src")))}),o.customize&&o.customize(l,o,e);a=function(){o.autoPrint&&(l.print(),l.close())};navigator.userAgent.match(/Trident\/\d.\d/)?a():l.setTimeout(a,1e3)}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null},e});
|
4
root/usr/share/javascript/dataTables.buttons.min.js
vendored
Normal file
4
root/usr/share/javascript/dataTables.buttons.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
root/usr/share/javascript/jszip/jszip.min.js
vendored
Normal file
13
root/usr/share/javascript/jszip/jszip.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
30
root/usr/share/javascript/pdfmake/pdfmake.min.js
vendored
Normal file
30
root/usr/share/javascript/pdfmake/pdfmake.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
root/usr/share/javascript/pdfmake/vfs_fonts.js
Normal file
6
root/usr/share/javascript/pdfmake/vfs_fonts.js
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,35 @@
|
||||
.dataTables_wrapper {
|
||||
width: min-content;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.ui-button {
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTables_length {
|
||||
float: left;
|
||||
margin-right:2%;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTables_paginate {
|
||||
float: right;
|
||||
}
|
||||
.dataTables_wrapper .dataTables_info {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* If the buttons extension is enabled */
|
||||
.dataTables_wrapper .dt-buttons {
|
||||
float: left;
|
||||
margin-right: 10px; /* Or any desired space between buttons and search */
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
//Additional JS for dataTable usesetup in SMEServer
|
||||
// Options for the initial dataTable call found here: https://datatables.net/reference/option/
|
||||
$(window).on('pageshow', function(){
|
||||
//alert('page show');
|
||||
$('.TableSort').DataTable({
|
||||
"stateSave": true,
|
||||
"retrieve": true,
|
||||
"responsive":true,
|
||||
"language": {
|
||||
"emptyTable": "No record found.",
|
||||
"processing":'" style="color: rgba(42, 43, 43, 1)">Loading... ',
|
||||
"error": function (xhr, error, thrown) {alert("Error occurred while loading data. Please try again.");}
|
||||
},
|
||||
"dom": '<"top"lBf<"clear">>rt<"bottom"ip<"clear">>',
|
||||
"buttons": ['copy', 'csv', 'excel', 'pdf', 'print'],
|
||||
"headerCallback": function( thead, data, start, end, display ) {
|
||||
setup_table_row_buttons();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
function setup_table_row_buttons(){
|
||||
$(".sme-modify-button").button({"icon": "ui-icon-pencil"});
|
||||
$(".sme-remove-button").button({"icon": "ui-icon-trash"});
|
||||
$(".sme-password-button").button({"icon": "ui-icon-refresh"});
|
||||
$(".sme-lock-button").button({"icon": "ui-icon-key"});
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
%define name smeserver-manager-jsquery
|
||||
%define version 11.0.0
|
||||
%define release 3
|
||||
%define release 4
|
||||
Summary: Jsquery and associated plugins plus server-manager (2) specific overrides.
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
@ -13,6 +13,7 @@ Prefix: %{_prefix}
|
||||
BuildArchitectures: noarch
|
||||
BuildRequires: smeserver-devtools
|
||||
Requires: smeserver-release >= 10.0
|
||||
Requires: smeserver-manager >= 11.0
|
||||
AutoReqProv: no
|
||||
|
||||
%define dir_mngr /usr/share/smanager
|
||||
@ -21,6 +22,9 @@ AutoReqProv: no
|
||||
Jsquery and associated plugins plus server-manager (2) specific overrides.
|
||||
|
||||
%changelog
|
||||
* Fri Apr 26 2024 Brian Read <brianr@koozali.org> 11.0.0-4.sme
|
||||
- Move link creation to createlinks, add REquires smeserver-manager [SME: 12539]
|
||||
|
||||
* Thu Apr 04 2024 Brian Read <brianr@koozali.org> 11.0.0-3.sme
|
||||
- Set license file to GPL2.0 [SME: 12577]
|
||||
|
||||
@ -59,28 +63,28 @@ rm -rf %{name}-%{version}
|
||||
%preun
|
||||
|
||||
%post
|
||||
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ]
|
||||
then
|
||||
[ -d %{dir_mngr}/themes/default/public/js ] ||
|
||||
mkdir %{dir_mngr}/themes/default/public/js
|
||||
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] ||
|
||||
ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js
|
||||
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.map ] ||
|
||||
ln -s /usr/share/javascript/jquery/latest/jquery.min.map %{dir_mngr}/themes/default/public/js/jquery.min.map
|
||||
|
||||
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.js ] ||
|
||||
ln -s /usr/share/javascript/datatables.min.js %{dir_mngr}/themes/default/public/js/datatables.min.js
|
||||
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.css ] ||
|
||||
ln -s /usr/share/javascript/datatables.min.css %{dir_mngr}/themes/default/public/js/datatables.min.css
|
||||
|
||||
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.js ] ||
|
||||
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.js %{dir_mngr}/themes/default/public/js/jquery-ui.min.js
|
||||
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.css ] ||
|
||||
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.css %{dir_mngr}/themes/default/public/js/jquery-ui.min.css
|
||||
|
||||
|
||||
fi
|
||||
true
|
||||
#if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ]
|
||||
#then
|
||||
# [ -d %{dir_mngr}/themes/default/public/js ] ||
|
||||
# mkdir %{dir_mngr}/themes/default/public/js
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] ||
|
||||
# ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/jquery.min.map ] ||
|
||||
# ln -s /usr/share/javascript/jquery/latest/jquery.min.map %{dir_mngr}/themes/default/public/js/jquery.min.map
|
||||
#
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/datatables.min.js ] ||
|
||||
# ln -s /usr/share/javascript/datatables.min.js %{dir_mngr}/themes/default/public/js/datatables.min.js
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/datatables.min.css ] ||
|
||||
# ln -s /usr/share/javascript/datatables.min.css %{dir_mngr}/themes/default/public/js/datatables.min.css
|
||||
#
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.js ] ||
|
||||
# ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.js %{dir_mngr}/themes/default/public/js/jquery-ui.min.js
|
||||
# [ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.css ] ||
|
||||
# ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.css %{dir_mngr}/themes/default/public/js/jquery-ui.min.css
|
||||
#
|
||||
#
|
||||
#fi
|
||||
#true
|
||||
|
||||
|
||||
%postun
|
||||
|
Loading…
Reference in New Issue
Block a user