v1.2.3.1
This commit is contained in:
@@ -142,6 +142,8 @@
|
||||
$('#ifArticleOrganisation', $frmA).val($('#ifFilterOrganisation', $frmF).val());
|
||||
$('.sax-form-control.ArticleOrganisation', $frmA).toggle(!!orgId);
|
||||
$('#chkArticlePublish', $frmA).prop("checked", false);
|
||||
$('div.ArticlePublish', $frmA).show();
|
||||
$('div.ArticlePublished', $frmA).hide();
|
||||
$('.sax-input.sax-calendar.ArticlePublishOn', $frmA).datepicker('setDate', 'today');
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
@@ -462,7 +464,7 @@
|
||||
});
|
||||
$frm.articleId = $('#frmArticleId');
|
||||
$frm.article = $('#frmArticle');
|
||||
$('.sax-input', $frm.article).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-input,.sax-textarea', $frm.article).on('input', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.cancel] = { text: sax.dlg.btn.cancel, class: "floatr", click: function () { $(this).dialog('close'); } };
|
||||
@@ -473,7 +475,7 @@
|
||||
|
||||
ac.$content = $('.sax-article-panel.sax-article-content');
|
||||
ac.$segList = $('.sax-article-segment-list', ac.$content);
|
||||
sax.initCalendars('.sax-input.sax-calendar').datepicker('option', { maxDate: '+00' });
|
||||
sax.initCalendars('.sax-input.sax-calendar').datepicker('option', { maxDate: '+' + (sax.maxPublishDaysAhead||'0') });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.uploadArticleImage(); };
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
{
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
sax.getTime = function ()
|
||||
{
|
||||
return (new Date()).getTime();
|
||||
}
|
||||
sax.zeroPad = function (num, count)
|
||||
{
|
||||
var val = num + '';
|
||||
@@ -123,7 +127,7 @@
|
||||
{
|
||||
return $(sel).datepicker(opt || {});
|
||||
}
|
||||
sax.allowClearCalendar = function(sel)
|
||||
sax.allowClearCalendar = function (sel)
|
||||
{
|
||||
$(sel).datepicker().on('keyup', function (e)
|
||||
{
|
||||
@@ -375,39 +379,26 @@
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Session.
|
||||
sax.configureKeepLoggedIn = function ()
|
||||
sax.configureKeepLoggedIn = function (single)
|
||||
{
|
||||
//sax.debug('KeepLoggedIn Configuring');
|
||||
setTimeout(sax.doKeepLoggedIn, Math.max(30000, sax.keepLoggedInDelay || 300000));
|
||||
let kli = sax.kli;
|
||||
if (!kli.timeout) kli.timeout = setTimeout(function () { sax.doKeepLoggedIn(single); }, Math.max(30000, kli.interval || 300000));
|
||||
}
|
||||
sax.doKeepLoggedIn = function ()
|
||||
sax.doKeepLoggedIn = function (single)
|
||||
{
|
||||
//sax.debug('KeepLoggedIn Calling');
|
||||
var onKeepLoggedIn = function (response)
|
||||
{
|
||||
//sax.debug('KeepLoggedIn Responded', response);
|
||||
sax.configureKeepLoggedIn();
|
||||
}
|
||||
sax.doAjaxRequest({ url: sax.url.base + 'Security/Ajax/KeepLoggedIn', formId: 'frmNavigate', noWaitIcon: true, callbackFn: onKeepLoggedIn }, 1000)
|
||||
let kli = sax.kli;
|
||||
delete kli.timeout;
|
||||
sax.doAjaxRequest({ url: sax.url.base + 'Security/Ajax/KeepLoggedIn', formId: 'frmNavigate', noWaitIcon: true, callbackFn: function (response) { kli.lastAt = sax.getTime(); if (!single) sax.configureKeepLoggedIn(); } }, 1000)
|
||||
}
|
||||
sax.configureSessionRefresh = function ()
|
||||
{
|
||||
//sax.debug('SessionRefresh Configuring');
|
||||
$(document).on('mousedown mousemove touchstart scroll keydown', sax.triggeRefreshSession);
|
||||
}
|
||||
sax.triggeRefreshSession = function ()
|
||||
{
|
||||
sax.session = sax.session || { refresh: {} };
|
||||
let ssr = sax.session.refresh;
|
||||
win.clearTimeout(ssr.timeout);
|
||||
ssr.timeout = setTimeout(function () { sax.refreshSession(); }, 150000);
|
||||
if (sax.kli.timeout) return;
|
||||
sax.configureKeepLoggedIn(1);
|
||||
}
|
||||
sax.refreshSession = function ()
|
||||
{
|
||||
//sax.debug('sax.refreshSession');
|
||||
sax.doKeepLoggedIn();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Data entry.
|
||||
sax.clearControlErrors = function (context)
|
||||
@@ -520,7 +511,7 @@
|
||||
$(function ()
|
||||
{
|
||||
$('.sax-button-cta,.sax-button-action,.sax-action-link,.sax-social-icon.sax-action').prop('tabindex', 0);
|
||||
if (sax.keepLoggedIn)
|
||||
if (sax.kli.active)
|
||||
sax.configureKeepLoggedIn();
|
||||
else if (!sax.awaitingLogin)
|
||||
sax.configureSessionRefresh();
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
if (!response.success) return;
|
||||
let dlg = $dlg.usr;
|
||||
let item = su.data.user = response.user;
|
||||
$('.UserName', dlg).val(item.name);
|
||||
$('.UserName', dlg).find('.sax-value').text(item.name);
|
||||
$('.UserLocation', dlg).toggle(!!item.location).find('.sax-value').text(item.location);
|
||||
sax.clearControlErrors();
|
||||
$dlg.usr.dialog('option', 'title', item.name || sax.dlg.title.user);
|
||||
|
||||
Reference in New Issue
Block a user