3.0.1.2 Requirements & tidy

This commit is contained in:
Andy Howard
2025-02-26 18:42:52 +00:00
parent d7dc5f8fbc
commit 80b085cf29
79 changed files with 2472 additions and 594 deletions
@@ -222,12 +222,13 @@
{
//sbm.debug('selectAssetCategory', prm);
let env = ac.env.select;
if (!env.$pnl.items.length) return;
env.prmSelect = prm;
env.$frm.filter.find('.FilterAssetType').val('');
env.$frm.filter.find('.FilterSearch').val(prm.search || '');
env.$pnl.table.find('tbody tr').remove();
sbm.openDialog(env.$dlg.select, 1000, 800);
if (env.$pnl.items.length) setTimeout(function () { ac.refreshResults(env); }, 250);
setTimeout(function () { ac.refreshResults(env); }, 250);
}
ac.selectItemRow = function (env, $item, item)
{
@@ -265,15 +266,16 @@
{
let env = { mode: { search: 1 }, data: {}, ajax: {}, $pnl: {}, $frm: {}, $ctrl: {}, $dlg: {} };
env.$pnl.items = $($pnlItems);
env.$pnl.header = env.$pnl.items.find('.sbm-panel-header');
env.$pnl.bgr = env.$pnl.header.find('.sbm-burger');
let $items = env.$pnl.items = $($pnlItems);
if (!$items.length) return env;
env.$pnl.hdr = $items.find('.sbm-panel-header');
env.$pnl.bgr = env.$pnl.hdr.find('.sbm-burger').invisible();
env.$pnl.mnu = env.$pnl.bgr.find('ul.sbm-dropdown-menu');
env.$pnl.table = env.$pnl.items.find('.sbm-panel-item-table');
env.$pnl.table = $items.find('.sbm-panel-item-table');
env.$pnl.msgs = env.$pnl.table.find('.sbm-panel-messages');
env.$pnl.tmpls = env.$pnl.items.find('.sbm-panel-item-template');
env.$pnl.tmpls = $items.find('.sbm-panel-item-template');
env.$frm.filter = env.$pnl.items.find('.frmAssetCategoryFilter');
env.$frm.filter = $items.find('.frmAssetCategoryFilter');
env.$frm.filter.on('input', '.FilterSearch', function () { ac.refreshResults(env,250); });
env.$frm.filter.on('change', '.FilterAssetType', function () { ac.refreshResults(env, 50); });
@@ -281,7 +283,7 @@
var opt = sbm.dlgOpts();
opt.dialogClass += " sbm-AssetCategory";
env.$dlg.item = $('#dlgAssetCategory').dialog(opt);
env.$frm.item = $('#frmAssetCategory').on('input', '.sbm-input, .sbm-textarea', function () { sbm.clearControlError(this); }).on('change', '.sbm-select', function () { sbm.clearControlError(this); });
env.$frm.item = $('#frmAssetCategory').off('input').on('input', '.sbm-input, .sbm-textarea', function () { sbm.clearControlError(this); }).off('change').on('change', '.sbm-select', function () { sbm.clearControlError(this); });
var opt = sbm.dlgOpts();
opt.dialogClass += " sbm-AssetCategory";