v1.1.7.1
This commit is contained in:
@@ -307,7 +307,7 @@
|
||||
$('.sax-input', $frm.member).on('input', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem()onUpdateItem; };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.member = $('#dlgMember').dialog(opt);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
so.doRefreshResults = function (response)
|
||||
{
|
||||
sax.debug('doRefreshResults', response);
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -49,7 +49,9 @@
|
||||
if (!item) return;
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
$('.OrganisationName', $item).text(item.name);
|
||||
$('.OrganisationEmail', $item).text(item.emailAddress);
|
||||
$('.OrganisationCategory', $item).text(item.categoryDesc);
|
||||
$('.OrganisationSport', $item).text(item.sportName);
|
||||
$('.OrganisationLocation', $item).text(item.location);
|
||||
let $bgr = $('.sax-burger', $item);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
{
|
||||
@@ -91,13 +93,11 @@
|
||||
//--------------------------------------------------------------
|
||||
so.selectFilterSport = function ()
|
||||
{
|
||||
sax.debug('selectFilterSport');
|
||||
let excludeIds = [];
|
||||
sax.mdl.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('.FilterSportId', $frm.filter).val(), excludeIds: excludeIds, fnCallback: so.onFilterSportSelected })
|
||||
}
|
||||
so.onFilterSportSelected = function (spt)
|
||||
{
|
||||
sax.debug('onFilterSportSelected', spt)
|
||||
$('.FilterSportId', $frm.filter).val(spt ? spt.id : '');
|
||||
$('.FilterSportCaption', $frm.filter).val(spt ? spt.name : '');
|
||||
so.refreshResults();
|
||||
@@ -111,13 +111,11 @@
|
||||
//--------------------------------------------------------------
|
||||
so.selectFilterRegion = function ()
|
||||
{
|
||||
sax.debug('selectFilterRegion');
|
||||
let excludeIds = [];
|
||||
sax.mdl.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.FilterRegionId', $frm.filter).val(), excludeIds: excludeIds, fnCallback: so.onFilterRegionSelected })
|
||||
}
|
||||
so.onFilterRegionSelected = function (rgn)
|
||||
{
|
||||
sax.debug('onFilterRegionSelected', rgn)
|
||||
$('.FilterRegionId', $frm.filter).val(rgn ? rgn.id : '');
|
||||
$('.FilterRegionCaption', $frm.filter).val(rgn ? rgn.name : '');
|
||||
so.refreshResults();
|
||||
@@ -139,11 +137,16 @@
|
||||
{
|
||||
sax.debug('onViewItem', response);
|
||||
if (!response.success) return;
|
||||
let frm = $frm.org;
|
||||
let dlg = $dlg.org;
|
||||
let item = so.data.organisation = response.organisation;
|
||||
$('.OrganisationName', frm).toggle(!item.awaiting).val(item.name);
|
||||
$('.OrganisationName', dlg).val(item.name);
|
||||
$('.OrganisationCategory', dlg).toggle(!!item.category).find('.sax-value').text(item.category);
|
||||
$('.OrganisationSport', dlg).toggle(!!item.sport).find('.sax-value').text(item.sport);
|
||||
$('.OrganisationLocation', dlg).toggle(!!item.location).find('.sax-value').text(item.location);
|
||||
$('.OrganisationAddress', dlg).toggle(!!item.address).find('.sax-value').html(item.address ? item.address.replace('\n', '<br/>') : '');
|
||||
$('.OrganisationPostalCode', dlg).toggle(!!item.postalCode).find('.sax-value').text(item.postalCode);
|
||||
sax.clearControlErrors();
|
||||
$dlg.org.dialog('option', 'title', sax.dlg.title.organisation);
|
||||
$dlg.org.dialog('option', 'title', item.name || sax.dlg.title.organisation);
|
||||
sax.openDialog($dlg.org, 600, 600);
|
||||
}
|
||||
|
||||
@@ -165,7 +168,6 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.org = $('#dlgOrganisation').dialog(opt);
|
||||
$frm.orgId = $('#frmOrganisationId');
|
||||
$frm.org = $('#frmOrganisation', $dlg.org);
|
||||
|
||||
setTimeout(so.refreshResults, 250);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user