1 |
diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep |
2 |
--- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2022-02-28 11:13:38.757816366 +0000 |
3 |
+++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2022-02-28 15:18:00.000000000 +0000 |
4 |
@@ -136,24 +136,6 @@ |
5 |
|
6 |
<div class="container-fluid"> |
7 |
<div class="row mb-2"> |
8 |
-<!-- |
9 |
- <div class="col-sm-3"> |
10 |
- %# Extract the initial h1 to 3 heading from content and use that as header |
11 |
- % my $content = content('module'); |
12 |
- %# my $heading; |
13 |
- %# if ($content =~ /<h(1|2|3)>[\n]*[\s]*(.*)[\s]*[\n]*<\/h(1|2|3)>/i) { |
14 |
- %# $heading = $2; |
15 |
- %# } else { $heading = "unknown";} |
16 |
- %#= "$heading"; |
17 |
- %#and take out heading that we have used already - this does not work - left for later... |
18 |
- %# my $startofheading = index(lc($content),"<h$3>"); |
19 |
- %# my $endofheading = index(lc($content),"<\/h$3>"); |
20 |
- %# my $replacestring = substr($content,$startofheading,$endofheading-$startofheading+5); |
21 |
- %# my $content =~ s/$replacestring//gim; |
22 |
- %# my $content =~ s/<p>//gim; |
23 |
- %# my $content =~ s/<\/p>//gim; |
24 |
- </div> |
25 |
---> |
26 |
|
27 |
<div class="col-sm-5"> |
28 |
<b><%= session 'SystemName' %>@<%= session 'DomainName' %></b> |
29 |
@@ -216,6 +198,7 @@ |
30 |
<!-- Main content --> |
31 |
<div class="content"> |
32 |
<div class="container-fluid"> |
33 |
+ % my $content = content('module'); |
34 |
%= $content; |
35 |
</div><!-- /.container-fluid --> |
36 |
</div> |
37 |
@@ -254,7 +237,6 @@ |
38 |
|
39 |
<!-- jQuery --> |
40 |
%= javascript "/plugins/jquery/jquery.min.js" |
41 |
- %= javascript "/plugins/hideShowPassword.min.js" |
42 |
|
43 |
<!-- Bootstrap 4 --> |
44 |
%= javascript "/plugins/bootstrap/js/bootstrap.bundle.min.js" |
45 |
@@ -279,78 +261,76 @@ |
46 |
const classSelector = 'adminlte-version'; |
47 |
const versionType = 'full'; // 'full' OR true; |
48 |
for (var i = 0, max = document.styleSheets.length; i < max; i++) { |
49 |
- if ((document.styleSheets[i].href).includes("adminlte")) { |
50 |
- $.ajax({ |
51 |
- url: document.styleSheets[i].href, |
52 |
- dataType: "text", |
53 |
- success: function(cssText) { |
54 |
- const searchReg = /AdminLTE v([0-9.]{0,})/; |
55 |
- const result = cssText.match(searchReg); |
56 |
- $(`.${classSelector}`).text(result[versionType == 'full' ? 0 : 1]); |
57 |
+ if ((document.styleSheets[i].href).includes("adminlte")) { |
58 |
+ $.ajax({ |
59 |
+ url: document.styleSheets[i].href, |
60 |
+ dataType: "text", |
61 |
+ success: function(cssText) { |
62 |
+ const searchReg = /AdminLTE v([0-9.]{0,})/; |
63 |
+ const result = cssText.match(searchReg); |
64 |
+ $(`.${classSelector}`).text(result[versionType == 'full' ? 0 : 1]); |
65 |
+ } |
66 |
+ }); |
67 |
} |
68 |
- }); |
69 |
} |
70 |
- } |
71 |
- /* Overload the sme classes with those from AdminLTE */ |
72 |
- $(".sme-error").addClass("card card-danger card-body"); |
73 |
- $(".sme-warning").addClass("card card-warning card-body"); |
74 |
- $(".success").addClass("card card-success card-body"); |
75 |
- $(".sme-success").addClass("card card-success card-body"); |
76 |
- $("table.sme-border").addClass("table table-striped"); |
77 |
- |
78 |
- $("#footer").addClass("card card-info card-body"); |
79 |
- $(".module").addClass("card card-info card-body"); |
80 |
- $(".central").addClass("card card-info card-body"); |
81 |
- $(".review-panel table").addClass("table"); |
82 |
- $(".module h1").addClass("card-header"); |
83 |
- //$(".module h2").addClass("card-subtitle"); |
84 |
- |
85 |
- |
86 |
- $(".menu-cell").addClass("nav-item"); |
87 |
- $(".item").addClass("nav-link"); |
88 |
- $(".infobar").addClass("row"); |
89 |
- $(".label").addClass("float-left"); |
90 |
- $(".action").addClass("float-right btn btn-primary"); |
91 |
+ /* Overload the sme classes with those from AdminLTE */ |
92 |
+ $(".sme-error").addClass("card card-danger card-body"); |
93 |
+ $(".sme-warning").addClass("card card-warning card-body"); |
94 |
+ $(".success").addClass("card card-success card-body"); |
95 |
+ $(".sme-success").addClass("card card-success card-body"); |
96 |
+ $("table.sme-border").addClass("table table-striped"); |
97 |
+ |
98 |
+ $("#footer").addClass("card card-info card-body"); |
99 |
+ $(".module").addClass("card card-info card-body"); |
100 |
+ $(".central").addClass("card card-info card-body"); |
101 |
+ $(".review-panel table").addClass("table"); |
102 |
+ $(".module h1").addClass("card-header"); |
103 |
+ //$(".module h2").addClass("card-subtitle"); |
104 |
+ |
105 |
+ |
106 |
+ $(".menu-cell").addClass("nav-item"); |
107 |
+ $(".item").addClass("nav-link"); |
108 |
+ $(".infobar").addClass("row"); |
109 |
+ $(".label").addClass("float-left"); |
110 |
+ $(".action").addClass("float-right btn btn-primary"); |
111 |
+ |
112 |
|
113 |
- |
114 |
- $("#h2l1").addClass("row"); |
115 |
- $("#h2e22").addClass("float-right"); |
116 |
- $("#h2e23").addClass("float-right"); |
117 |
- $("#h2e12").addClass("float-right"); |
118 |
- |
119 |
- /*Dark mode changes*/ |
120 |
- var mode = localStorage.getItem('darkmode'); |
121 |
- var myselect = document.getElementById("darkmodeswtid"); |
122 |
- if (mode == "") {myselect.checked = false;} |
123 |
- else {myselect.checked = true;} |
124 |
- $("#darkmodeswtid").val(mode).change(); |
125 |
+ $("#h2l1").addClass("row"); |
126 |
+ $("#h2e22").addClass("float-right"); |
127 |
+ $("#h2e23").addClass("float-right"); |
128 |
+ $("#h2e12").addClass("float-right"); |
129 |
+ |
130 |
+ /*Dark mode changes*/ |
131 |
+ var mode = localStorage.getItem('darkmode'); |
132 |
+ var myselect = document.getElementById("darkmodeswtid"); |
133 |
+ if (mode == "") {myselect.checked = false;} |
134 |
+ else {myselect.checked = true;} |
135 |
+ $("#darkmodeswtid").val(mode).change(); |
136 |
+ |
137 |
|
138 |
- |
139 |
- /* Sort out font size */ |
140 |
- var fontsize = localStorage.getItem('fontsize'); |
141 |
- if (fontsize == ""){fontsize = 'text-md'} |
142 |
- $("#fontsizeid").val(fontsize).change(); |
143 |
- |
144 |
- |
145 |
- var url = window.location; |
146 |
- |
147 |
- // for sidebar menu entirely but not cover treeview - not yet working... |
148 |
- // |
149 |
- $('.nav-link').filter(function() { |
150 |
- return this.href == url; |
151 |
- }).parent().addClass('active'); |
152 |
- |
153 |
- /* |
154 |
- var options = ""; |
155 |
- var breadcrumb = $('.breadcrumb').breadcrumb(options); |
156 |
- breadcrumb.push('Level'); |
157 |
- breadcrumb.pop(); |
158 |
- */ |
159 |
- //alert("Hello world"); |
160 |
- $("#login_password").togglePasswordVisibility(); |
161 |
+ /* Sort out font size */ |
162 |
+ var fontsize = localStorage.getItem('fontsize'); |
163 |
+ if (fontsize == ""){fontsize = 'text-md'} |
164 |
+ $("#fontsizeid").val(fontsize).change(); |
165 |
+ |
166 |
+ |
167 |
+ var url = window.location; |
168 |
|
169 |
+ // for sidebar menu entirely but not cover treeview - not yet working... |
170 |
+ // |
171 |
+ $('.nav-link').filter(function() { |
172 |
+ return this.href == url; |
173 |
+ }).parent().addClass('active'); |
174 |
+ |
175 |
+ /* |
176 |
+ var options = ""; |
177 |
+ var breadcrumb = $('.breadcrumb').breadcrumb(options); |
178 |
+ breadcrumb.push('Level'); |
179 |
+ breadcrumb.pop(); |
180 |
+ */ |
181 |
|
182 |
}); |
183 |
+ |
184 |
function SetFontSize(){ |
185 |
var myselect = document.getElementById("fontsizeid"); |
186 |
var textclass = myselect.options[myselect.selectedIndex].value; |
187 |
@@ -380,22 +360,6 @@ |
188 |
return this.href == url; |
189 |
}).parentsUntil(".sidebar-menu > .treeview-menu").addClass('active'); |
190 |
|
191 |
- /* |
192 |
- //Setup passord visibility toggle |
193 |
- (function ($) { |
194 |
- $.fn.togglePasswordVisibility = function() { |
195 |
- togglePassword.addEventListener('click', function (e) { |
196 |
- // toggle the type attribute |
197 |
- const togglePassword = document.getElementById('togglePassword'); |
198 |
- const password = document.getElementById('login-password'); |
199 |
- const type = password.getAttribute('type') === 'password' ? 'text' : 'password'; |
200 |
- password.setAttribute('type', type); |
201 |
- // toggle the eye slash icon |
202 |
- this.classList.toggle('fa-eye-slash'); |
203 |
- }); |
204 |
- }; |
205 |
- }(jQuery)); |
206 |
- */ |
207 |
|
208 |
</script> |
209 |
</body> |
210 |
diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep |
211 |
--- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 2022-02-28 11:13:38.753816328 +0000 |
212 |
+++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 2022-02-28 14:51:00.000000000 +0000 |
213 |
@@ -62,7 +62,7 @@ |
214 |
</div> |
215 |
</div> |
216 |
<div class="input-group mb-3"> |
217 |
- <input type="password" name='Password' id='login-password' class="form-control" placeholder="<%=l 'PASSWORD'%>"> |
218 |
+ <input type="password" name='Password' id='id_password' class="form-control" placeholder="<%=l 'PASSWORD'%>"> |
219 |
<div class="input-group-append"> |
220 |
<div class="input-group-text"> |
221 |
<i class="far fa-eye" id="togglePassword"></i> |