forked from UKSOURCE/cms.lams
Refactor: remove unused APIs, controllers, models and data files. Update: icon picker all system, Dashboard, Main UI more respone, Change: Logo, favicon.
This commit is contained in:
@@ -114,11 +114,14 @@
|
||||
<div class="row g-2 align-items-end">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small">Icon</label>
|
||||
<select class="form-select ch-icon">
|
||||
<% iconOptions.forEach(function(opt) { %>
|
||||
<option value="<%= opt.value %>" <%= (ch.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text icon-preview-cell" style="min-width:38px">
|
||||
<% if (ch.icon) { %><i class="<%= ch.icon %>"></i><% } %>
|
||||
</span>
|
||||
<input type="text" class="form-control ch-icon"
|
||||
value="<%= ch.icon || '' %>" placeholder="Click to pick..." readonly
|
||||
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small">Title</label>
|
||||
@@ -367,7 +370,7 @@
|
||||
<script>
|
||||
let statusModal = null;
|
||||
|
||||
window.CONTACT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
|
||||
// window.CONTACT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
|
||||
|
||||
function resetContactForm() {
|
||||
if (confirm('Reset all unsaved changes?')) location.reload();
|
||||
@@ -405,20 +408,20 @@
|
||||
|
||||
// ── Dynamic rows ──────────────────────────────
|
||||
|
||||
function iconSelectHtml(selected) {
|
||||
var opts = window.CONTACT_ICON_OPTIONS || [];
|
||||
var html = '';
|
||||
for (var i = 0; i < opts.length; i++) {
|
||||
var o = opts[i];
|
||||
html += '<option value="' + escHtml(o.value) + '"' + (o.value === selected ? ' selected' : '') + '>' + escHtml(o.label) + '</option>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
// function iconSelectHtml(selected) {
|
||||
// var opts = window.CONTACT_ICON_OPTIONS || [];
|
||||
// var html = '';
|
||||
// for (var i = 0; i < opts.length; i++) {
|
||||
// var o = opts[i];
|
||||
// html += '<option value="' + escHtml(o.value) + '"' + (o.value === selected ? ' selected' : '') + '>' + escHtml(o.label) + '</option>';
|
||||
// }
|
||||
// return html;
|
||||
// }
|
||||
|
||||
function buildChannelRow(ch) {
|
||||
ch = ch || {};
|
||||
return '<div class="card channel-row border"><div class="card-body"><div class="row g-2 align-items-end">' +
|
||||
'<div class="col-md-3"><label class="form-label small">Icon</label><select class="form-select ch-icon">' + iconSelectHtml(ch.icon) + '</select></div>' +
|
||||
'<div class="col-md-3"><label class="form-label small">Icon</label>' + iconPickerInput('ch-icon', ch.icon) + '</div>' +
|
||||
'<div class="col-md-3"><label class="form-label small">Title</label><input type="text" class="form-control ch-title" value="' + escHtml(ch.title) + '"></div>' +
|
||||
'<div class="col-md-4"><label class="form-label small">Detail</label><input type="text" class="form-control ch-detail" value="' + escHtml(ch.detail) + '"></div>' +
|
||||
'<div class="col-md-2 d-flex align-items-end"><button type="button" class="btn btn-outline-danger btn-sm w-100 remove-channel"><i class="fas fa-trash"></i></button></div>' +
|
||||
|
||||
Reference in New Issue
Block a user