3.0.0.1 Demo repository registration

This commit is contained in:
Andy Howard
2025-02-08 16:41:08 +00:00
parent 0d8e7d5619
commit c4e5712d0a
312 changed files with 13145 additions and 30232 deletions
@@ -235,7 +235,7 @@ td.action
width: 25%;
}
.width50pc
.halfwidth, .width50pc
{
width: 50%;
}
@@ -245,7 +245,17 @@ td.action
width: 100%;
}
.fullheight
.height25pc
{
height: 25%;
}
.halfheight, .height50pc
{
height: 50%;
}
.fullheight, .height100pc
{
height: 100%;
}
@@ -311,7 +311,7 @@ ul.nav.sbc-burger ul.sbc-dropdown-menu li.sbc-action.sbc-dropdown-item:hover .sb
.sbc-panel-messages
{
margin: 8px 16px;
margin: 5px 12px;
padding: 2px 12px 2px 8px;
font-size: 16px;
}
@@ -248,9 +248,9 @@
/* Password strength */
#prgPasswordStrength
.sbc-password-strength
{
width: 200px;
width: 96%;
height: 18px;
margin: 6px 24px;
border-color: #595959;
@@ -259,7 +259,7 @@
overflow: hidden;
}
#prgPasswordStrength .ui-widget-header
.sbc-password-strength .ui-widget-header
{
margin: 0;
height: 20px;
@@ -269,19 +269,19 @@
border-radius: 0;
}
#prgPasswordStrength.amber .ui-widget-header
.sbc-password-strength.amber .ui-widget-header
{
background-color: #FFBF00;
border-color: #FFBF00;
}
#prgPasswordStrength.green .ui-widget-header
.sbc-password-strength.green .ui-widget-header
{
background-color: #238823;
border-color: #238823;
}
#prgPasswordStrength.ui-corner-all
.sbc-password-strength.ui-corner-all
{
border-radius: 8px;
}
@@ -0,0 +1,90 @@
/*
* BusMgr Control - Home scripts.
*/
(function (win, doc, undef)
{
"use strict";
let ch = sbc.controlHome = {};
let $pnl = ch.$pnl = {}, $dlg = ch.$dlg = {}, $frm = ch.$frm = {};
//--------------------------------------------------------------
ch.refreshApplicationStats = function (delay)
{
}
ch.handleStatsResponse = function (response)
{
}
//--------------------------------------------------------------
ch.refreshDbSchema = function (instance, delay)
{
if (sbc.awaitingLogin) return;
if (!ch.awaitingSchemaResponse)
{
let $pnlSchema = $('.sbc-panel-results .sbc-panel-info.DbSchema.' + instance);
var $items = $('.sbc-panel-item-list', $pnlSchema).fadeOut(200).empty();
var $msgs = $('.sbc-panel-messages', $pnlSchema).hide().empty().append($('<div class="sbc-message">' + sbc.msg.dataQuerying + '</div>')).fadeIn(200);
}
$('.DatabaseInstance', $frm.dbSchema).val(instance);
sbc.ajax.dbSchema = sbc.ajax.dbSchema || { url: sbc.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: $frm.dbSchema.prop('id'), callbackFn: ch.handleDbSchemaResponse, noWaitIcon: true };
sbc.doAjaxRequest(sbc.ajax.dbSchema, delay || 50);
ch.awaitingSchemaResponse = true;
}
ch.handleDbSchemaResponse = function (response)
{
sbc.debug('handleDbSchemaResponse', response);
delete ch.awaitingSchemaResponse;
let $pnlSchema = $('.sbc-panel-results .sbc-panel-info.DbSchema.' + response.instance);
var $msgs = $('.sbc-panel-messages', $pnlSchema).hide().empty();
var $tablePanel = $('.sbc-panel-item-table', $pnlSchema).hide();
var $table = $('table.sbc-item-list', $tablePanel);
sbc.debug($table);
$('tbody tr', $table).remove();
if (!response.success) return;
if (response.instance == 'Control') ch.toSchema = setTimeout(function () { ch.refreshDbSchema('Template'); }, 250);
if (response.instance == 'Template') ch.toSchema = setTimeout(function () { ch.refreshDbSchema('Demo'); }, 250);
// Items.
var items = response.items;
if (!items.length)
return $msgs.append($('<div class="sbc-message">' + sbc.msg.dbSchemaValid + '</div>')).fadeIn(500);
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
$table.append(ch.populateDbSchemaItem(ch.getDbSchemaRowTemplate(), items[itemIdx]));
$tablePanel.show();
}
ch.getDbSchemaTableTemplate = function ()
{
return $('.sbc-panel-results .sbc-panel-item-template .sbc-panel-item-table.DbSchema').clone().hide();
}
ch.getDbSchemaRowTemplate = function ()
{
return $('.sbc-panel-results .sbc-panel-item-template .sbc-row-item.DbSchemaItem').clone();
}
ch.populateDbSchemaItem = function ($item, item)
{
if (!item) return;
$item.prop('id', sbc.itemIdPrefix + item.id);
$('.SchemaName', $item).text(item.schemaName);
$('.TableName', $item).text(item.tableName);
$('.IndexName', $item).text(item.indexName);
$('.ColumnName', $item).text(item.columnName);
$('.Comment', $item).text(item.comment);
return $item;
}
//--------------------------------------------------------------
$(function ()
{
$frm.dbSchema = $('#frmDatabaseSchema');
$pnl.dbSchemaControl = $('.sbc-panel-info.DbSchema.Control').append(ch.getDbSchemaTableTemplate());
$pnl.dbSchemaTemplate = $('.sbc-panel-info.DbSchema.Template'); $pnl.dbSchemaTemplate.append(ch.getDbSchemaTableTemplate());
$pnl.dbSchemaDemo = $('.sbc-panel-info.DbSchema.Demo').append(ch.getDbSchemaTableTemplate());
ch.toSchema = setTimeout(function () { ch.refreshDbSchema('Control'); }, 600);
// NB Can only request one of the database schemas at a time as they share the same ajax config.
});
//--------------------------------------------------------------
}(window, window.document));
/* The End */
@@ -255,7 +255,7 @@
var opt = sbc.dlgOpts();
sbc.$dlg.alert = $('<div id="dlgAlert"><div id="dlgAlertMsg"></div></div>').dialog(opt);
}
$('#dlgAlertMsg', sbc.$dlg.alert).html(msg.replace(/\\n/g, '<br>'));
$('#dlgAlertMsg', sbc.$dlg.alert).html(msg.replace(/\n/g, '<br>'));
let btns = {};
btns[sbc.lbl.ok] = function () { $(this).dialog('close'); if (onOk) onOk(); };
sbc.$dlg.alert.dialog('option', { title: title || sbc.dlg.title.alert, buttons: btns });
@@ -277,7 +277,7 @@
btns[sbc.lbl.yes] = function () { $(this).dialog('close'); if (onOk) onOk(); };
btns[sbc.lbl.no] = function () { $(this).dialog('close'); if (onCancel) onCancel(); };
sbc.$dlg.confirm.dialog('option', { title: title || sbc.dlg.title.confirm, buttons: btns });
$('#dlgConfirmMsg').html(msg.replace(/\\n/g, '<br>'));
$('#dlgConfirmMsg').html(msg.replace(/\n/g, '<br>'));
sbc.openDialog(sbc.$dlg.confirm);
}
sbc.doProgress = function (title, msg, delay)
@@ -295,7 +295,7 @@
opt.hide = { effect: 'fade', duration: 200 };
sbc.$dlg.progress = $('<div id="dlgProgress"><div id="dlgProgressMsg"></div></div>').dialog(opt);
}
$('#dlgProgressMsg').html(msg.replace(/\\n/g, '<br>'));
$('#dlgProgressMsg').html(msg.replace(/\n/g, '<br>'));
sbc.$dlg.progress.dialog('option', { title: title || sbc.dlg.title.progress });
if (delay > 0) sbc.toShowProgress = setTimeout(function () { sbc.$dlg.progress.dialog('open'); }, delay);
else sbc.$dlg.progress.dialog('open');
@@ -76,11 +76,11 @@
$('#ifEmailAddress,#ifPasswordCurrent,#ifPassword,#ifPasswordConfirm').on('input', function () { sbc.clearControlError(this); });
sbc.$frm.signIn = $('#frmSignIn');
sbc.$frm.signIn.on('keypress', '#ifEmailAddress,#ifPassword,#chkKeepMeSignedIn', function (e) { if (e.which == 13 && $('#ifEmailAddress', sbc.$frm.signIn).val() && $('#ifPassword', sbc.$frm.signIn).val()) sbc.doSignin(); });
sbc.$frm.signIn.on('click', '#pbSignIn', function () { sbc.doSignin(); }).on('keypress', '#pbSignIn', function (e) { if (e.which == 13) sbc.doSignin(); });;
sbc.$frm.signIn.on('click', '#pbSignIn', function () { sbc.doSignin(); }).on('keypress', '#pbSignIn', function (e) { if (e.which == 13) sbc.doSignin(); });
sbc.$frm.chgPword = $('#frmChangePassword');
sbc.$frm.chgPword.on('keypress', '#ifPasswordCurrent,#ifPassword,#ifPasswordConfirm', function (e) { if (e.which == 13) sbc.doChangePassword(); });
sbc.$frm.chgPword.on('keyup', '#ifPassword', sbc.doScorePassword);
sbc.$prgPwordStrength = $('#prgPasswordStrength', sbc.$frm.chgPword).progressbar({ 'max': 5 });
sbc.$prgPwordStrength = $('.sbc-password-strength', sbc.$frm.chgPword).progressbar({ 'max': 5 });
$('#pbChangePassword', sbc.$frm.chgPword).on('click', function () { sbc.doChangePassword(); }).on('keypress', function (e) { if (e.which == 13) sbc.doChangePassword(); });
sbc.$frm.reqPword = $('#frmRequestPassword');
sbc.$frm.reqPword.on('keypress', '#ifEmailAddress', function (e) { if (e.which == 13) sbc.doRequestPassword(); });