/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.4-Restore-lost-js-to-restore-menu.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.4-Restore-lost-js-to-restore-menu.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Mar 4 12:51:50 2024 UTC (8 months, 3 weeks ago) by brianr
Branch: MAIN
CVS Tags: smeserver-manager-0_1_4-34_el7_sme, smeserver-manager-0_1_4-33_el7_sme, HEAD
* Mon Mar 04 2024 Brian Read <brianr@koozali.org> 0.1.4-33.sme
- js code to restore the menu got deleted somehow this restores it [SME: 12498]

1 brianr 1.1 diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep
2     --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-03-04 12:24:58.636810151 +0000
3     +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-03-04 12:14:00.000000000 +0000
4     @@ -90,6 +90,47 @@
5     % }
6    
7     %= javascript '/js/sme-dataTable-setup.js'
8     +
9     +%= javascript begin
10     +//Set menu to initial condition based on localStorage
11     +$(document).ready(function() {
12     + let menunavflag = window.localStorage.getItem('menunav');
13     + if (menunavflag != "false"){
14     + $('#menunav').toggle(true);
15     + } else {
16     + $('#menunav').toggle(false);
17     + }
18     +
19     + let menuadmflag = window.localStorage.getItem('menuadm');
20     + if (menuadmflag != "false"){
21     + $('#menuadm').toggle(true);
22     + } else {
23     + $('#menuadm').toggle(false);
24     + }
25     +
26     + let menuuserflag = window.localStorage.getItem('menuuser');
27     + if (menuuserflag != "false"){
28     + $('#menuuser').toggle(true);
29     + } else {
30     + $('#menuuser').toggle(false);
31     + }
32     +
33     + var sections = document.getElementsByClassName("section-title");
34     + for (var i = 0, len = sections.length; i < len; i++) {
35     + var jqObj = $(sections[i]);
36     + var $section = jqObj.parent().next('div');
37     + if(!$section.length){
38     + return false;
39     + }
40     + let localStorageTag = "admSection-"+sections[i].innerHTML;
41     + if (window.localStorage.getItem(localStorageTag) != "false"){
42     + $section.toggle(true);
43     + } else {
44     + $section.toggle(false);
45     + }
46     + }
47     +})
48     +%end
49    
50     </body>
51     </html>

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed