v1.2.10.1
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
// Users.
|
||||
let user = response.stats.user;
|
||||
let $user = sax.getAppStatItemTemplate();
|
||||
$('.sax-header .sax-caption', $user).text(user.caption||'Users');
|
||||
$('.sax-header .sax-caption', $user).text(user.caption || 'Users');
|
||||
ah.populateAppStat($user, user.awaiting.label, user.awaiting.value, user.awaitingLink)
|
||||
for (let item of user.onlineStats)
|
||||
ah.populateAppStat($user, item.label, item.value, user.onlineLink)
|
||||
@@ -43,7 +43,7 @@
|
||||
// Organisations.
|
||||
let org = response.stats.organisation;
|
||||
let $org = sax.getAppStatItemTemplate();
|
||||
$('.sax-header .sax-caption', $org).text(org.caption||'Organisations');
|
||||
$('.sax-header .sax-caption', $org).text(org.caption || 'Organisations');
|
||||
ah.populateAppStat($org, org.awaiting.label, org.awaiting.value, org.awaitingLink)
|
||||
$items.append($org);
|
||||
$items.slideDown(750);
|
||||
@@ -67,35 +67,39 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshDbSchema = function (delay)
|
||||
ah.refreshDbSchema = function (instance, delay)
|
||||
{
|
||||
if (sax.awaitingLogin) return;
|
||||
if (!ah.awaitingSchemaResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $pnl.dbSchema).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
let $pnlSchema = $('.sax-panel-results.DbSchema.' + instance);
|
||||
var $items = $('.sax-panel-item-list', $pnlSchema).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: 'frmNavigate', callbackFn: sax.handleDbSchemaResponse, noWaitIcon: true };
|
||||
$('.DatabaseInstance', $frm.dbSchema).val(instance);
|
||||
sax.ajax.dbSchema = sax.ajax.dbSchema || { url: sax.url.base + 'System/Ajax/ValidateDatabaseSchema', formId: $frm.dbSchema.prop('id'), callbackFn: ah.handleDbSchemaResponse, noWaitIcon: true };
|
||||
sax.doAjaxRequest(sax.ajax.dbSchema, delay || 50);
|
||||
ah.awaitingSchemaResponse = true;
|
||||
}
|
||||
sax.handleDbSchemaResponse = function (response)
|
||||
ah.handleDbSchemaResponse = function (response)
|
||||
{
|
||||
//sax.debug('handleDbSchemaResponse', response);
|
||||
delete ah.awaitingSchemaResponse;
|
||||
var $msgs = $('.sax-panel-messages', $pnl.dbSchema).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.dbSchema).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnl.dbSchema);
|
||||
let $pnlSchema = $('.sax-panel-results.DbSchema.' + response.instance) ;
|
||||
var $msgs = $('.sax-panel-messages', $pnlSchema).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnlSchema).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item.DbSchemaItem', $pnlSchema);
|
||||
if (!response.success) return;
|
||||
if (response.instance == 'Core') ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Support'); }, 250);
|
||||
// Items.
|
||||
var items = response.items;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dbSchemaValid + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
$items.append(sax.populateDbSchemaItem($tmpl.clone(), items[itemIdx]));
|
||||
$items.append(ah.populateDbSchemaItem($tmpl.clone(), items[itemIdx]));
|
||||
$items.slideDown(750);
|
||||
}
|
||||
sax.populateDbSchemaItem = function ($item, item)
|
||||
ah.populateDbSchemaItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
@@ -112,10 +116,13 @@
|
||||
$(function ()
|
||||
{
|
||||
$pnl.appStats = $('.sax-panel-results.ApplicationStats');
|
||||
$pnl.dbSchema = $('.sax-panel-results.DbSchema');
|
||||
$frm.dbSchema = $('#frmDatabaseSchema');
|
||||
$pnl.dbSchemaCore = $('.sax-panel-results.DbSchema.Core');
|
||||
$pnl.dbSchemaSupport = $('.sax-panel-results.DbSchema.Support');
|
||||
|
||||
ah.toStats = setTimeout(ah.refreshApplicationStats, 400);
|
||||
ah.toSchema = setTimeout(sax.refreshDbSchema, 600);
|
||||
ah.toSchema = setTimeout(function () { ah.refreshDbSchema('Core'); }, 600);
|
||||
// NB Can only request one of the database schemas at a time as they share the same ajax config.
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
@@ -411,6 +411,10 @@
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Data entry.
|
||||
sax.hasControlErrors = function (context)
|
||||
{
|
||||
return $('.sax-form-control', $(context || doc.body)).hasClass('sax-error');
|
||||
}
|
||||
sax.clearControlErrors = function (context)
|
||||
{
|
||||
var $ctrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error');
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
oa.doRefreshResults = function (response)
|
||||
{
|
||||
sax.debug('doRefreshResults', response);
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete oa.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -156,7 +156,7 @@
|
||||
}
|
||||
oa.onUpdateItem = function (response)
|
||||
{
|
||||
sax.debug('onUpdateItemAssociation', response);
|
||||
//sax.debug('onUpdateItemAssociation', response);
|
||||
if (!response.success) return;
|
||||
oa.clearItem();
|
||||
// Association.
|
||||
|
||||
Reference in New Issue
Block a user