v1.2.6.4
This commit is contained in:
@@ -67,6 +67,11 @@
|
||||
{
|
||||
return (val || '').replace(/[[{}()*+?^$|\]\.\\]/g, "\\$&");
|
||||
}
|
||||
sax.haltEvent = function (evt)
|
||||
{
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
}
|
||||
sax.debug = sax.debugMode ? win.console.log.bind(win.console) : function () { };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Admin - Organisation Address scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let oa = sax.mdl.organisationAddress = { data: {}, ajax: {} };
|
||||
let $pnl = oa.$pnl = {}, $frm = oa.$frm = {}, $dlg = oa.$dlg = {};
|
||||
let mdlOrg = function () { return sax.mdl.organisations; }
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oa.updateItemAddress = function (item, $item)
|
||||
{
|
||||
oa.init();
|
||||
$('.OrganisationId', $frm.orgId).val(item.id);
|
||||
oa.ajax.updateItemAddr = oa.ajax.updateItemAddr || { url: sax.url.base + 'Organisation/Ajax/GetItem', formId: 'frmOrganisationId', callbackFn: oa.onUpdateItemAddress };
|
||||
sax.doAjaxRequest(oa.ajax.updateItemAddr, 50);
|
||||
}
|
||||
oa.onUpdateItemAddress = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItemAddress', response);
|
||||
if (!response.success) return;
|
||||
// Address.
|
||||
let item = response.organisation;
|
||||
let addr = item.address || {};
|
||||
let frm = $frm.orgAddr;
|
||||
$('input.OrganisationId', frm).val(item.id);
|
||||
$('.OrganisationName', frm).val(item.name);
|
||||
$('input.AddressId', frm).val(addr.id);
|
||||
$('input.AddressLine1', frm).val(addr.line1);
|
||||
$('input.AddressLine2', frm).val(addr.line2);
|
||||
$('input.AddressLine3', frm).val(addr.line3);
|
||||
$('input.AddressTown', frm).val(addr.town);
|
||||
$('input.AddressRegionIdProvince', frm).val(addr.regionIdProvince);
|
||||
$('input.AddressProvince', frm).val(addr.regionNameProvince);
|
||||
$('input.AddressPostalCode', frm).val(addr.postalCode);
|
||||
$('input.AddressRegionIdCountry, input.AddressRegionNameCountry', frm).val('');
|
||||
if (addr.regionIdCountry)
|
||||
{
|
||||
$('input.AddressRegionIdCountry', frm).val(addr.regionIdCountry);
|
||||
$('input.AddressRegionNameCountry', frm).val(addr.regionNameCountry);
|
||||
}
|
||||
else if (item.regionPrimary.country)
|
||||
{
|
||||
$('input.AddressRegionIdCountry', frm).val(item.regionPrimary.id);
|
||||
$('input.AddressRegionNameCountry', frm).val(item.regionPrimary.name);
|
||||
}
|
||||
sax.clearControlErrors(frm);
|
||||
sax.openDialog($dlg.orgAddr, 640, 480);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oa.selectOrgAddrRegionCountry = function ()
|
||||
{
|
||||
if (!mdlOrg().data.regions)
|
||||
mdlOrg().populateRegions(oa.showSelectOrgAddrRegionCountry);
|
||||
else oa.showSelectOrgAddrRegionCountry();
|
||||
}
|
||||
oa.showSelectOrgAddrRegionCountry = function ()
|
||||
{
|
||||
let regions = [];
|
||||
for (let rgn of mdlOrg().data.regions)
|
||||
if (rgn.regionType == 30) regions.push(rgn);
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectCountry, itemId: $('input.AddressRegionIdCountry', $frm.orgAddr).val(), items: regions, fnCallback: oa.onOrgAddrRegionCountrySelected });
|
||||
}
|
||||
oa.onOrgAddrRegionCountrySelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onRegionSelected', rgn);
|
||||
let frm = $frm.orgAddr;
|
||||
sax.clearControlError($('input.AddressRegionIdCountry', frm).val(rgn.id));
|
||||
$('.AddressRegionNameCountry', frm).val(rgn.name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oa.storeItemAddress = function ()
|
||||
{
|
||||
oa.ajax.storeItemAddr = oa.ajax.storeItemAddr || { url: sax.url.base + 'Organisation/Ajax/StoreItem', formId: 'frmOrganisationAddress', callbackFn: oa.onStoreItemAddress };
|
||||
sax.doAjaxRequest(oa.ajax.storeItemAddr, 50);
|
||||
}
|
||||
oa.onStoreItemAddress = function (response)
|
||||
{
|
||||
//sax.debug('onStoreItemAddress', response);
|
||||
sax.refreshControlValues(response.controlValues, $frm.orgAddr);
|
||||
if (!response.success) return;
|
||||
$dlg.orgAddr.dialog('close');
|
||||
mdlOrg().refreshItem(response.organisation);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oa.init = function ()
|
||||
{
|
||||
if ($frm.orgId) return;
|
||||
$frm.orgId = $('#frmOrganisationId');
|
||||
|
||||
// Organisation Address dialog.
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { oa.storeItemAddress(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.orgAddr = $('#dlgOrganisationAddress').dialog(opt);
|
||||
|
||||
// Organisation Address form.
|
||||
$frm.orgAddr = $('#frmOrganisationAddress');
|
||||
$frm.orgAddr.on('input', '.sax-input, .sax-textarea', function () { sax.clearControlError(this); }).on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
$frm.orgAddr.on('dblclick', '.AddressRegionNameCountry', oa.selectOrgAddrRegionCountry).on('click', '.AddressRegionCountrySelect', oa.selectOrgAddrRegionCountry);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Admin - Organisation Images scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let oi = sax.mdl.organisationImages = { data: {}, ajax: {} };
|
||||
let $pnl = oi.$pnl = {}, $frm = oi.$frm = {}, $dlg = oi.$dlg = {};
|
||||
oi.classFileDrag = 'sax-file-drag';
|
||||
let mdlOrg = function () { return sax.mdl.organisations; }
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oi.updateItemImages = function (item, $item)
|
||||
{
|
||||
oi.init();
|
||||
$('.OrganisationId', $frm.orgId).val(item.id);
|
||||
oi.ajax.getOrgImages = oi.ajax.getOrgImages || { url: sax.url.base + 'Organisation/Ajax/GetImages', formId: 'frmOrganisationId', callbackFn: oi.onUpdateItemImages };
|
||||
sax.doAjaxRequest(oi.ajax.getOrgImages, 50);
|
||||
}
|
||||
oi.onUpdateItemImages = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItemImages', response);
|
||||
if (!response.success) return;
|
||||
oi.data.imageContentTypes = response.imageContentTypes;
|
||||
let item = response.organisation;
|
||||
let frm = $frm.orgImg;
|
||||
$('.OrganisationId', frm).val(item.id);
|
||||
$('.OrganisationName', frm).val(item.name);
|
||||
$('img.OrganisationLogo', frm).prop('src', item.logoImageUrl).toggle(!!item.logoImageUrl);
|
||||
|
||||
sax.clearControlErrors(frm);
|
||||
sax.openDialog($dlg.orgImg, 640, 480);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Drop organisation logo image.
|
||||
oi.onDropOrgLogoImage = function (evt)
|
||||
{
|
||||
//sax.debug('onDropOrgLogoImage', evt);
|
||||
let files = evt.originalEvent.dataTransfer.files;
|
||||
if (files.length < 1) return;
|
||||
if (files.length > 1) return sax.doAlert(sax.dlg.title.imageUpload, sax.msg.uploadImageSingle);
|
||||
oi.onDropOrgLogoImageFile(files[0], $frm.orgImg);
|
||||
}
|
||||
oi.onDropOrgLogoImageFile = function (file, context)
|
||||
{
|
||||
//sax.debug('onDropOrgLogoImageFile', file, context);
|
||||
if (file.size > sax.maxProfileImageSize) return sax.doAlert(sax.dlg.title.imageUpload, sax.msg.uploadFileSizeMax.format(sax.formatFileSize(sax.maxProfileImageSize)));
|
||||
if ((oi.data.imageContentTypes || []).indexOf(file.type) < 0) return sax.doAlert(sax.dlg.title.imageUpload, sax.msg.uploadFileTypeInvalid.format(sax.getFileType(file)));
|
||||
$(".UploadMessage", context).text(sax.msg.uploadingFile.format(file.name));
|
||||
$('img.ImageUploadProgress', context).fadeIn(200);
|
||||
sax.clearControlError($pnl.orgLogoImageDrag);
|
||||
oi.data.orgLogoImageUploadContext = context;
|
||||
|
||||
oi.ajax.uploadOrgLogoImage = sax.ajax.uploadOrgLogoImage || { url: sax.url.base + 'Organisation/Ajax/UploadLogoImage', callbackFn: oi.handleOrgLogoImageUploadResponse, noWaitIcon: true };
|
||||
let ajaxData = oi.ajax.uploadOrgLogoImage.formData = new FormData();
|
||||
ajaxData.append("__RequestVerificationToken", $('#frmNavigate input[name="__RequestVerificationToken"]').val());
|
||||
ajaxData.append("OrganisationId", $('.OrganisationId', $frm.orgImg).val());
|
||||
ajaxData.append("OrganisationLogoImage", file);
|
||||
sax.doAjaxRequest(oi.ajax.uploadOrgLogoImage, 50);
|
||||
}
|
||||
oi.handleOrgLogoImageUploadResponse = function (response)
|
||||
{
|
||||
//sax.debug('handleOrgLogoImageUploadResponse', response, context);
|
||||
let context = oi.data.orgLogoImageUploadContext;
|
||||
if (!response) return;
|
||||
sax.refreshControlValues(response.controlValues, context);
|
||||
$(".UploadMessage", context).empty();
|
||||
$('img.ImageUploadProgress', context).hide();
|
||||
if (response.success)
|
||||
{
|
||||
$dlg.selectOrgLogoImage.dialog('close');
|
||||
$('img.OrganisationLogo', $pnl.orgLogo).prop('src', response.imageUrl).show();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Select organisation logo image.
|
||||
oi.selectOrgLogoImage = function ()
|
||||
{
|
||||
let dlg = $dlg.selectOrgLogoImage;
|
||||
$('.OrganisationLogoImage', dlg).val('');
|
||||
sax.openDialog(dlg, 560, 240);
|
||||
}
|
||||
oi.uploadOrgLogoImage = function ()
|
||||
{
|
||||
let dlg = $dlg.selectOrgLogoImage;
|
||||
let $fileCtrl = $('.OrganisationLogoImage', dlg);
|
||||
if (!$fileCtrl.length || !$fileCtrl[0].files.length)
|
||||
return sax.doAlert(sax.dlg.title.imageUpload, sax.msg.uploadFileSelect);
|
||||
let file = $fileCtrl[0].files[0];
|
||||
oi.onDropOrgLogoImageFile(file, dlg);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oi.storeItemImages = function ()
|
||||
{
|
||||
oi.ajax.storeOrgImages = oi.ajax.storeOrgImages || { url: sax.url.base + 'Organisation/Ajax/StoreImages', formId: 'frmOrganisationImages', callbackFn: oi.onStoreItemImages };
|
||||
sax.doAjaxRequest(oi.ajax.storeOrgImages, 50);
|
||||
}
|
||||
oi.onStoreItemImages = function (response)
|
||||
{
|
||||
//sax.debug('onStoreItemImages', response);
|
||||
sax.refreshControlValues(response.controlValues, $frm.orgImg);
|
||||
if (!response.success) return;
|
||||
$dlg.orgImg.dialog('close');
|
||||
mdlOrg().refreshItem(response.organisation);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oi.init = function ()
|
||||
{
|
||||
if ($frm.orgId) return;
|
||||
$frm.orgId = $('#frmOrganisationId');
|
||||
|
||||
// Organisation Images dialog and form.
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { oi.storeItemImages(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.orgImg = $('#dlgOrganisationImages').dialog(opt);
|
||||
$frm.orgImg = $('#frmOrganisationImages', $dlg.orgImg);
|
||||
|
||||
// Organisation logo.
|
||||
$pnl.orgLogo = $('.sax-form-control.OrganisationLogoImage', $dlg.orgImg);
|
||||
$pnl.orgLogoImgDrop = $('.sax-panel-drop.OrganisationLogoImageDrop', $pnl.orgLogo)
|
||||
.on('dragenter', function (evt) { sax.haltEvent(evt); })
|
||||
.on('dragover', function (evt) { sax.haltEvent(evt); if (!$pnl.orgLogoImgDrop.hasClass(oi.classFileDrag)) $pnl.orgLogoImgDrop.addClass(oi.classFileDrag); })
|
||||
.on('dragleave', function (evt) { sax.haltEvent(evt); $pnl.orgLogoImgDrop.removeClass(oi.classFileDrag); })
|
||||
.on('drop', function (evt) { sax.haltEvent(evt); $pnl.orgLogoImgDrop.removeClass(oi.classFileDrag); oi.onDropOrgLogoImage(evt); })
|
||||
.on('click', '.sax-button.SelectOrgLogoImage', oi.selectOrgLogoImage);
|
||||
|
||||
// Select image dialog.
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { oi.uploadOrgLogoImage(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.selectOrgLogoImage = $('#dlgSelectOrgLogoImage').dialog(opt);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -5,9 +5,8 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let op = sax.mdl.organisations = sax.mdl.organisations || { data: {}, ajax: {} };
|
||||
let op = sax.mdl.organisations = { data: {}, ajax: {} };
|
||||
let $pnl = op.$pnl = {}, $frm = op.$frm = {}, $dlg = op.$dlg = {};
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.refreshResults = function (delay)
|
||||
@@ -47,15 +46,21 @@
|
||||
$items.append(op.populateItem(op.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
op.getItemIdProp = function (id)
|
||||
{
|
||||
return 'Org_' + id;
|
||||
}
|
||||
op.populateItem = function ($item, item)
|
||||
{
|
||||
//sax.debug('populateItem', item);
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$item.prop('id', op.getItemIdProp(item.id));
|
||||
$('img.OrganisationLogo', $item).prop('src', item.logoImageUrl).toggle(!!item.logoImageUrl);
|
||||
$('.OrganisationName', $item).text(item.name);
|
||||
$('.OrganisationType', $item).text(item.typeDesc);
|
||||
$('.OrganisationCategory', $item).text(item.categoryDesc);
|
||||
$('.OrganisationSport', $item).text(item.sportName);
|
||||
$('.OrganisationRegion', $item).text(item.regionNameCountry);
|
||||
$('.OrganisationRegion', $item).text(item.regionPrimary.name);
|
||||
$('.OrganisationMemberCount', $item).on('click', function () { op.onClickMemberCount(item.id); }).find('.MemberCount').text(item.memberCount);
|
||||
$('.StatusDesc', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
$('.sax-caption .sax-action').toggleClass('sax-action', !item.deleted);
|
||||
@@ -224,15 +229,15 @@
|
||||
}
|
||||
op.showSelectOrgRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectRegion, itemId: $('.OrganisationRegionIdCountry', $frm.org).val(), items: op.data.regions, fnCallback: op.onOrgRegionSelected });
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectRegion, itemId: $('.OrganisationRegionIdPrimary', $frm.org).val(), items: op.data.regions, fnCallback: op.onOrgRegionSelected });
|
||||
}
|
||||
op.onOrgRegionSelected = function (rgn)
|
||||
{
|
||||
//sax.debug('onRegionSelected', rgn);
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationRegionIdCountry', frm).val(rgn.id);
|
||||
$('.OrganisationRegionCaptionCountry', frm).val(rgn.name);
|
||||
sax.clearControlError($('.OrganisationRegionCaptionCountry', frm));
|
||||
$('.OrganisationRegionIdPrimary', frm).val(rgn.id);
|
||||
$('.OrganisationRegionNamePrimary', frm).val(rgn.name);
|
||||
sax.clearControlError($('.OrganisationRegionIdPrimary', frm));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -251,7 +256,7 @@
|
||||
op.clearItem = function ()
|
||||
{
|
||||
let frm = $frm.org;
|
||||
$('.OrganisationId,.OrganisationSportId,.OrganisationRegionIdCountry,input[type="text"],textarea,select', frm).val('');
|
||||
$('.OrganisationId,.OrganisationSportId,.OrganisationRegionIdPrimary,input[type="text"],textarea,select', frm).val('');
|
||||
$pnl.tblconMths.empty();
|
||||
$('.OrganisationStatus', frm).val(op.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
@@ -285,8 +290,8 @@
|
||||
$('.OrganisationCategory', frm).val(item.categoryCode);
|
||||
$('.OrganisationSportId', frm).val(item.sportId);
|
||||
$('.OrganisationSportCaption', frm).val(item.sportName);
|
||||
$('.OrganisationRegionIdCountry', frm).val(item.regionIdCountry);
|
||||
$('.OrganisationRegionCaptionCountry', frm).val(item.regionNameCountry);
|
||||
$('.OrganisationRegionIdPrimary', frm).val(item.regionPrimary.id);
|
||||
$('.OrganisationRegionNamePrimary', frm).val(item.regionPrimary.name);
|
||||
$('.OrganisationAbout', frm).val(item.about);
|
||||
$('.OrganisationFacilities', frm).val(item.facilities);
|
||||
$('.OrganisationNotes', frm).val(item.notes);
|
||||
@@ -374,7 +379,7 @@
|
||||
}
|
||||
op.refreshItem = function (item)
|
||||
{
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + op.getItemIdProp(item.id));
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = op.getItemTemplate();
|
||||
@@ -404,7 +409,7 @@
|
||||
}
|
||||
popItemValue('.OrganisationName', item.name);
|
||||
popItemValue('.OrganisationSport', item.sportName);
|
||||
popItemValue('.OrganisationRegion', item.regionNameCountry);
|
||||
popItemValue('.OrganisationRegion', item.regionPrimary.name);
|
||||
popItemValue('.OrganisationCategory', item.categoryDesc);
|
||||
popItemValue('.OrganisationAddress', item.addressSummary);
|
||||
let $orgMbrs = $('.OrganisationMembers', $dlg.activate).empty();
|
||||
@@ -440,51 +445,12 @@
|
||||
//--------------------------------------------------------------
|
||||
op.updateItemImages = function (item, $item)
|
||||
{
|
||||
sax.debug('updateItemImages');
|
||||
sax.mdl.organisationImages.updateItemImages(item, $item)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.updateItemAddress = function (item, $item)
|
||||
{
|
||||
sax.debug('updateItemAddress');
|
||||
$('.OrganisationId', $frm.orgId).val(item.id);
|
||||
op.ajax.updateItemAddr = op.ajax.updateItemAddr || { url: sax.url.base + 'Organisation/Ajax/GetItem', formId: 'frmOrganisationId', callbackFn: op.onUpdateItemAddress };
|
||||
sax.doAjaxRequest(op.ajax.updateItemAddr, 50);
|
||||
}
|
||||
op.onUpdateItemAddress = function (response)
|
||||
{
|
||||
sax.debug('onUpdateItemAddress', response);
|
||||
if (!response.success) return;
|
||||
// Address.
|
||||
let item = response.organisation;
|
||||
let address = item.address || {};
|
||||
let frm = $frm.orgAddr;
|
||||
$('input.OrganisationId', frm).val(item.id);
|
||||
$('.OrganisationName', frm).val(item.name);
|
||||
$('input.AddressId', frm).val(address.id);
|
||||
$('input.AddressLine1', frm).val(address.line1);
|
||||
$('input.AddressLine2', frm).val(address.line2);
|
||||
$('input.AddressLine3', frm).val(address.line3);
|
||||
$('input.AddressTown', frm).val(address.town);
|
||||
$('input.AddressProvince', frm).val(address.province);
|
||||
$('input.AddressCountry', frm).val(address.country);
|
||||
$('input.AddressPostalCode', frm).val(address.postalCode);
|
||||
sax.clearControlErrors(frm);
|
||||
sax.openDialog($dlg.orgAddr, 640, 480);
|
||||
}
|
||||
op.storeItemAddress = function ()
|
||||
{
|
||||
sax.debug('storeItemAddress');
|
||||
op.ajax.storeItemAddr = op.ajax.storeItemAddr || { url: sax.url.base + 'Organisation/Ajax/StoreItem', formId: 'frmOrganisationAddress', callbackFn: op.onStoreItemAddress };
|
||||
sax.doAjaxRequest(op.ajax.storeItemAddr, 50);
|
||||
}
|
||||
op.onStoreItemAddress = function (response)
|
||||
{
|
||||
sax.debug('onStoreItemAddress', response);
|
||||
sax.refreshControlValues(response.controlValues, $frm.orgAddr);
|
||||
if (!response.success) return;
|
||||
$dlg.orgAddr.dialog('close');
|
||||
op.refreshItem(response.organisation);
|
||||
sax.mdl.organisationAddress.updateItemAddress(item, $item);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -512,7 +478,7 @@
|
||||
$frm.org = $('#frmOrganisation');
|
||||
$frm.org.on('input', '.sax-input, .sax-textarea', function () { sax.clearControlError(this); }).on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
$frm.org.on('dblclick', '.OrganisationSportCaption', op.selectOrgSport).on('click', '#pbSelectSport', op.selectOrgSport).on('click', '.OrganisationSportClear', op.clearOrgSport);
|
||||
$frm.org.on('dblclick', '.OrganisationRegionCaptionCountry', op.selectOrgRegion).on('click', '#pbSelectRegion', op.selectOrgRegion);
|
||||
$frm.org.on('dblclick', '.OrganisationRegionNamePrimary', op.selectOrgRegion).on('click', '#pbSelectOrganisationRegionPrimary', op.selectOrgRegion);
|
||||
$frm.org.on('click', '.ItemContactMethods .sax-action.sax-add', op.addConMth);
|
||||
$pnl.conMths = $('.ItemContactMethods', $frm.org);
|
||||
$pnl.tblconMths = $('table.sax-data', $pnl.conMths);
|
||||
@@ -523,18 +489,10 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.activate = $('#dlgOrganisationActivation').dialog(opt);
|
||||
|
||||
// Activate Organisation Address dialog and form.
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { op.storeItemAddress(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.orgAddr = $('#dlgOrganisationAddress').dialog(opt);
|
||||
|
||||
$frm.orgAddr = $('#frmOrganisationAddress');
|
||||
$frm.orgAddr.on('input', '.sax-input, .sax-textarea', function () { sax.clearControlError(this); }).on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
|
||||
setTimeout(op.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
Reference in New Issue
Block a user