This commit is contained in:
2021-07-02 09:28:37 +01:00
parent 03873bbdf4
commit 03ea1058be
64 changed files with 3038 additions and 250 deletions
@@ -89,7 +89,7 @@
{
margin: 2px 1px 0 1px;
background-color: #a0a0a0;
opacity:0.8;
opacity: 0.8;
box-shadow: 0 0 0 1px #40404080 inset;
}
+16 -6
View File
@@ -47,36 +47,46 @@
#dlgActivity .sax-panel-item.Article .ArticleHeadline,
#dlgActivity .sax-panel-item.Opportunity .OpportunityOrganisation
{
margin: 0 0 8px 0;
padding: 0 0 8px 0;
margin: 0;
padding: 8px 8px;
font-size: 2rem;
font-weight: bold;
border-bottom: 1px solid #b0b0b0;
}
#dlgActivity .sax-panel-item.Article .ArticleSummary,
#dlgActivity .sax-panel-item.Article .ArticleAuthor,
#dlgActivity .sax-panel-item.Opportunity .OpportunityOrganisation,
#dlgActivity .sax-panel-item.Opportunity .OpportunityPosition,
#dlgActivity .sax-panel-item.Opportunity .OpportunityOutline
{
margin: 0 0 8px 0;
padding: 0 0 8px 0;
margin: 0;
padding: 8px 8px;
font-size: 1.5rem;
font-weight: bold;
border-bottom: 1px solid #b0b0b0;
}
#dlgActivity .sax-panel-item.Article .ArticleAuthor
{
padding: 4px 8px;
font-size: .9rem;
background-color: #f8f8f8;
}
#dlgActivity .sax-panel-item.Opportunity
{
}
#dlgActivity .sax-panel-item.Article .ArticleContentSegment
{
margin:4px 0;
}
#dlgActivity .sax-panel-item.Article .ArticleContentSegmentImage img
{
max-width:75%;
max-height:400px;
max-width: 75%;
max-height: 400px;
}
.ui-dialog.sax-dialog-activity button.ActivityReaction
@@ -113,6 +113,13 @@ button.accept-policy
line-height: inherit;
}
/* Information */
.sax-para
{
margin: 8px 0;
}
/* Actions */
a, a:hover
@@ -84,6 +84,7 @@
let $segs = $('.ArticleContentSegments', $itm);
$('.ArticleHeadline', $itm).text(item.headline);
$('.ArticleSummary', $itm).text(item.summary).toggle(!!item.summary);
$('.ArticleAuthor', $itm).text(item.author).toggle(!!item.author);
let segs = item.content.segments;
for (let segIdx = 0; segIdx < segs.length; segIdx++)
{
+13 -13
View File
@@ -311,7 +311,7 @@
}
sax.onUpdateItem = function (response)
{
sax.debug('onUpdateItem', response);
//sax.debug('onUpdateItem', response);
sax.clearItem();
if (!response.success) return;
let $frm = sax.$frm.article;
@@ -347,17 +347,6 @@
$('.sax-article').removeClass('ArticleHeader').addClass('ArticleContent');
}
//--------------------------------------------------------------
sax.selectRegion = function ()
{
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('#ifArticleRegionId').val(), fnCallback: sax.onSelectRegion })
}
sax.onSelectRegion = function (region)
{
sax.clearControlError($('#ifArticleRegionId').val(region.id));
$('#ifArticleRegionCaption').val(region ? region.name : '');
}
//--------------------------------------------------------------
sax.selectSport = function ()
{
@@ -369,6 +358,17 @@
$('#ifArticleSportCaption').val(sport ? sport.name : '');
}
//--------------------------------------------------------------
sax.selectRegion = function ()
{
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('#ifArticleRegionId').val(), fnCallback: sax.onSelectRegion })
}
sax.onSelectRegion = function (region)
{
sax.clearControlError($('#ifArticleRegionId').val(region.id));
$('#ifArticleRegionCaption').val(region ? region.name : '');
}
//--------------------------------------------------------------
sax.storeItem = function ()
{
@@ -377,7 +377,7 @@
}
sax.onStoreItem = function (response)
{
sax.debug('onStoreItem', response);
//sax.debug('onStoreItem', response);
sax.refreshControlValues(response.controlValues);
if (!response.success) return;
sax.$dlg.article.dialog('close');
@@ -0,0 +1,69 @@
/*
* Organisation Request.
*/
(function (win, doc, undef)
{
"use strict";
let or = sax.orgReq;
or.fn = {}; or.ajax = {};
//--------------------------------------------------------------
or.fn.requestOrganisation = function ()
{
or.fn.init();
sax.openDialog(or.$dlg, 640, 760);
}
or.fn.storeOrganisation = function ()
{
//sax.debug('refreshResults');
or.ajax.registerOrg = or.ajax.registerOrg || { url: sax.url.base + 'Organisation/Ajax/requestOrganisation', formId: 'frmOrganisationRequest', callbackFn: or.fn.handleRequestOrganisationResponse };
sax.doAjaxRequest(or.ajax.registerOrg, 50);
}
or.fn.handleRequestOrganisationResponse = function (response)
{
sax.debug('or.handleRequestOrganisationResponse', response);
if (!response.success) return;
}
or.fn.cleanUp = function ()
{
}
//--------------------------------------------------------------
sax.selectOrgSport = function ()
{
sax.data.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('.OrganisationSportId', or.$frm).val(), fnCallback: sax.onSelectOrgSport })
}
sax.onSelectOrgSport = function (sport)
{
sax.clearControlError($('.OrganisationSportId', or.$frm).val(sport.id));
$('.OrganisationSportCaption', or.$frm).val(sport ? sport.name : '');
}
//--------------------------------------------------------------
sax.selectOrgRegion = function ()
{
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionId', or.$frm).val(), typesInc:[30], fnCallback: sax.onSelectOrgRegion })
}
sax.onSelectOrgRegion = function (region)
{
sax.clearControlError($('.OrganisationRegionId', or.$frm).val(region.id));
$('.OrganisationRegionCaption', or.$frm).val(region ? region.name : '');
}
//--------------------------------------------------------------
or.fn.init = function ()
{
if (or.$dlg) return;
var opt = sax.dlgOpts();
opt.title = sax.orgReq.dlgTitleRequestOrganisation;
opt.buttons[sax.dlg.btn.ok] = function () { or.fn.storeOrganisation(); };
opt.buttons[sax.dlg.btn.cancel] = function () { or.fn.cleanUp(); $(this).dialog('close'); };
or.$dlg = $('#dlgOrganisationRequest').dialog(opt);
or.$frm = $('#frmOrganisationRequest', or.$dlg);
}
}(window, window.document));
/* The End */
@@ -1,11 +1,12 @@
/*
* Admin - User page scripts.
* Organisation selection.
*/
(function (win, doc, undef)
{
"use strict";
let so = sax.selectOrganisation = sax.selectOrganisation || { data: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Org_' };
let so = sax.selectOrganisation;
so.data = {}; so.fn = {}; so.itemIdPrefix = 'Org_';
//--------------------------------------------------------------
/*
@@ -92,6 +93,7 @@
so.fn.cleanUp = function ()
{
//sax.debug('confirmSelection', so.data.item);
$('.sax-input.FilterOrganisation', so.$filter).val('');
so.$results.empty();
delete so.cfg;
delete so.data.item;
@@ -101,7 +103,7 @@
//--------------------------------------------------------------
so.fn.init = function ()
{
if (!so.$dlg) return;
if (so.$dlg) return;
var opt = sax.dlgOpts();
opt.open = function () { so.fn.refreshResults(200); };
opt.buttons[sax.dlg.btn.ok] = function () { so.fn.confirmSelection(); };
@@ -5,13 +5,16 @@
(function (win, doc, undef)
{
"use strict";
let sr = sax.data.selectRegion = sax.data.selectRegion || { regions: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Rgn_' };
let sr = sax.data.selectRegion;
sr.regions = {}; sr.fn = {}; sr.ajax = {}; sr.itemIdPrefix = 'Rgn_';
//--------------------------------------------------------------
/*
* Region selection config:
* - caption - dialog title.
* - regionId - currently selected region.
* - typesInc[] - included region types.
* - typesExc[] - excluded region types.
* - fnCallback - method to call on completion to store selected region.
*/
sr.fn.selectRegion = function (cfg)
@@ -22,14 +25,15 @@
if (sr.regions.length) sr.fn.showSelectRegion();
else
{
sax.ajaxRegions = sax.ajaxRegions || { url: sax.url.base + 'Reference/Ajax/GetRegions', formId: 'frmNavigate', callbackFn: sr.fn.refreshRegionsAndSelect };
sax.doAjaxRequest(sax.ajaxRegions, 20);
sr.ajax.regions = sr.ajax.regions || { url: sax.url.base + 'Reference/Ajax/GetRegions', formId: 'frmNavigate', callbackFn: sr.fn.refreshRegionsAndSelect };
sax.doAjaxRequest(sr.ajax.regions, 20);
}
}
sr.fn.refreshRegionsAndSelect = function (response)
{
if (!response || !response.success) return;
sr.regions = response.regions;
sax.debug(sr.cfg);
sr.fn.showSelectRegion();
}
sr.fn.showSelectRegion = function ()
@@ -57,12 +61,16 @@
let $regionsAvail = $('.sax-selectRegion-regions.AvailableRegions', sr.$dlg).empty();
let $regionTmpl = $('.sax-panel-item-template .sax-panel-item.Region', sr.$dlg);
let regions = [...sr.regions];
let typesInc = sr.cfg.typesInc||[];
let typesExc = sr.cfg.typesExc||[];
regions.sort(sr.fn.compareRegions);
for (let rgnIdx = 0; rgnIdx < regions.length; rgnIdx++)
{
let region = regions[rgnIdx];
let id = region.id;
if (filter && !region.name.match(reFilter)) continue;
if (typesInc.length && !typesInc.includes(region.regionType)) continue;
if (typesExc.length && typesExc.includes(region.regionType)) continue;
let $region = $regionTmpl.clone();
$region.prop('id', sr.itemIdPrefix + id).on('click', function () { sr.fn.onClickRegion(id); }).on('dblclick', function () { sr.fn.onDblClickRegion(id); }).find('.RegionName').text(region.name).end();
if (id == sr.regionId) $region.addClass('sel');
@@ -120,7 +128,7 @@
//--------------------------------------------------------------
sr.fn.init = function ()
{
if (!sr.$dlg) return;
if (sr.$dlg) return;
var opt = sax.dlgOpts();
opt.open = function (evt, ui) { sr.fn.onDlgSize(); };
opt.resize = function (evt, ui) { sr.fn.onDlgSize(); };
@@ -15,8 +15,8 @@
rp.paging = paging = paging || {};
rp.$rp.toggle(paging.paged);
$('.sax-paging-info', rp.$rp).text(sax.resultsPaging.msg.pageInfo.format(paging.pageNo, paging.pageCount));
$('.sax-paging-first,.sax-paging-prev', rp.$rp).toggle(paging.pageNo > 1);
$('.sax-paging-next,.sax-paging-last', rp.$rp).toggle(paging.pageNo < paging.pageCount);
//$('.sax-paging-first,.sax-paging-prev', rp.$rp).toggle(paging.pageNo > 1);
//$('.sax-paging-next,.sax-paging-last', rp.$rp).toggle(paging.pageNo < paging.pageCount);
}
//--------------------------------------------------------------
@@ -5,7 +5,8 @@
(function (win, doc, undef)
{
"use strict";
let ss = sax.data.selectSport = sax.data.selectSport || { sports: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Spt_' };
let ss = sax.data.selectSport;
ss.sports = {}; ss.fn = {}; ss.ajax = {}; ss.itemIdPrefix = 'Spt_';
//--------------------------------------------------------------
/*
@@ -23,8 +24,8 @@
if (ss.sports.length) ss.fn.showSelectSport();
else
{
sax.ajaxSports = sax.ajaxSports || { url: sax.url.base + 'Reference/Ajax/GetSports', formId: 'frmNavigate', callbackFn: ss.fn.refreshSportsAndSelect };
sax.doAjaxRequest(sax.ajaxSports, 20);
ss.ajax.sports = ss.ajax.sports || { url: sax.url.base + 'Reference/Ajax/GetSports', formId: 'frmNavigate', callbackFn: ss.fn.refreshSportsAndSelect };
sax.doAjaxRequest(ss.ajax.sports, 20);
}
}
ss.fn.refreshSportsAndSelect = function (response)
@@ -122,7 +123,7 @@
//--------------------------------------------------------------
ss.fn.init = function ()
{
if (!ss.$dlg) return;
if (ss.$dlg) return;
var opt = sax.dlgOpts();
opt.open = function (evt, ui) { ss.fn.onDlgSize(); };
opt.resize = function (evt, ui) { ss.fn.onDlgSize(); };