v1.2.10
This commit is contained in:
@@ -324,6 +324,9 @@
|
||||
<data name="label.contact.method" xml:space="preserve">
|
||||
<value>Contact method</value>
|
||||
</data>
|
||||
<data name="label.contacts" xml:space="preserve">
|
||||
<value>Contacts</value>
|
||||
</data>
|
||||
<data name="label.country" xml:space="preserve">
|
||||
<value>Country</value>
|
||||
</data>
|
||||
|
||||
@@ -30,16 +30,11 @@ namespace Saxonite.Net.Core.Web.Online.App
|
||||
private Dictionary<String, SaxAppConfig> appConfigs = new Dictionary<string, SaxAppConfig>();
|
||||
private Dictionary<String, SaxEmailConfig> emailConfigs = new Dictionary<string, SaxEmailConfig>();
|
||||
// Session contexts.
|
||||
protected class SessionContextData
|
||||
protected class SessionContextData_Online : SessionContextData_Web
|
||||
{
|
||||
public SessionContextData(SaxSessionContext_Web sessionContext)
|
||||
{
|
||||
SessionContext = sessionContext;
|
||||
}
|
||||
public SaxSessionContext_Web SessionContext { get; }
|
||||
public ISacsDatabase CoreDatabase { get; set; }
|
||||
public SessionContextData_Online(SaxSessionContext_Web sessionContext) : base(sessionContext) { }
|
||||
}
|
||||
private readonly Dictionary<int, SessionContextData> sessionContexts = new Dictionary<int, SessionContextData>();
|
||||
private readonly Dictionary<int, SessionContextData_Online> sessionContexts = new Dictionary<int, SessionContextData_Online>();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
@@ -64,9 +59,9 @@ namespace Saxonite.Net.Core.Web.Online.App
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public static SaxApplication_Online AppInstance { get; private set; }
|
||||
public override ISacsDatabase GetCoreDatabase(SaxSessionContext sessionContext)
|
||||
public override ISacsDatabase GetDatabase(SaxSessionContext sessionContext, Sax.Database databaseType)
|
||||
{
|
||||
return sessionContexts.GetValue(sessionContext.Index, null)?.CoreDatabase;
|
||||
return sessionContexts.GetValue(sessionContext.Index, null)?.Databases.GetValue(databaseType, null);
|
||||
}
|
||||
public override String SessionCookieName { get { return Sax.Config.Online.Session.Cookie.Name; } }
|
||||
// Configuration.
|
||||
@@ -124,16 +119,16 @@ namespace Saxonite.Net.Core.Web.Online.App
|
||||
|
||||
// Configure database connection.
|
||||
SacsDatabaseConsole.OdbcConfig config = new SacsDatabaseConsole.OdbcConfig();
|
||||
config.location = AppConfig.CoreDatabase.Location;
|
||||
config.user = AppConfig.CoreDatabase.User;
|
||||
config.pword = AppConfig.CoreDatabase.Password;
|
||||
config.location = AppConfig.Databases.Core.Location;
|
||||
config.user = AppConfig.Databases.Core.User;
|
||||
config.pword = AppConfig.Databases.Core.Password;
|
||||
SacsDatabase coreDatabase = SacsDatabaseConsole.OpenOdbcDatabase(config);
|
||||
if (coreDatabase.HasErrorState())
|
||||
SaLogger.Warn(fn + " Database initialisation error: " + coreDatabase.ErrorStateMessage);
|
||||
|
||||
// Session context - only one context available/necessary (for now).
|
||||
SessionContextData sessionContextData = new SessionContextData(new SaxSessionContext_Web(100, Sax.Application.Online));
|
||||
sessionContextData.CoreDatabase = coreDatabase;
|
||||
SessionContextData_Online sessionContextData = new SessionContextData_Online(new SaxSessionContext_Web(100, Sax.Application.Online));
|
||||
sessionContextData.Databases.Add(Sax.Database.Core, coreDatabase);
|
||||
sessionContexts.Add(sessionContextData.SessionContext.Index, sessionContextData);
|
||||
SessionContext = sessionContextData.SessionContext;
|
||||
|
||||
|
||||
@@ -74,6 +74,20 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
set { ProfileSportOfficiatingCode = SportOfficiatingCodes.GetCodeForType(value); }
|
||||
}
|
||||
public String ProfileSportAbout { get; set; }
|
||||
public class SportsContactsData
|
||||
{
|
||||
// Contacts.
|
||||
/// <summary>Placeholder field value to indicate the number of Contacts in form (even if none are populated).</summary>
|
||||
public String Count { get; set; }
|
||||
public String[] ContactType { get; set; }
|
||||
public String[] UserAccountId { get; set; }
|
||||
public String[] ContactName { get; set; }
|
||||
public String[] ContactPhone { get; set; }
|
||||
public String[] ContactEmail { get; set; }
|
||||
/// <summary>Sport Contacts to be populated during validation.</summary>
|
||||
public SaxSportContactsData SportContactsData { get; set; }
|
||||
}
|
||||
public SportsContactsData Contacts {get; } = new SportsContactsData();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Organisation properties.
|
||||
|
||||
@@ -113,9 +113,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
if (ExperienceAwards != null)
|
||||
{
|
||||
responseData.SetControlValue(nameof(ExperienceAwards), ExperienceAwards);
|
||||
if (StringUtil.IsEmpty(ExperienceAwards))
|
||||
responseData.SetControlError(nameof(ExperienceAwards), Localiser["msg.validation.mandatory.value"]);
|
||||
else if (StringUtil.GetLength(ExperienceAwards) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserSportExperience_Awards))
|
||||
if (StringUtil.GetLength(ExperienceAwards) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserSportExperience_Awards))
|
||||
responseData.SetControlError(nameof(ExperienceAwards), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserSportExperience_Awards)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
@model Model_Account
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Account/Profile-Eligibility")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-pro-elg.js");
|
||||
}
|
||||
|
||||
<div class="sax-panel-section ProfileEligibility sax-populating">
|
||||
|
||||
@@ -171,4 +177,3 @@
|
||||
sax.dlg.title.removeUserEligibility = '@Localiser.GetJavascriptText("account.caption.profile.eligibility.remove")';
|
||||
sax.msg.removeUserEligibility = '@(Localiser.GetJavascriptText("msg.confirm.item.remove"))';
|
||||
</script>
|
||||
<script src="~/js/sax-pro-elg.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
@model Model_Account
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Account/Profile-Organisations")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-pro-org.js");
|
||||
}
|
||||
|
||||
@* Profile Organisations *@
|
||||
<div class="sax-panel-section ProfileOrganisations sax-populating">
|
||||
|
||||
@@ -134,5 +141,3 @@
|
||||
</div>
|
||||
|
||||
<partial name="~/Views/Common/OrganisationRequest.cshtml" />
|
||||
|
||||
<script src="~/js/sax-usr-org.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
/* Sport Experience panel - list experience for sport */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Account/Profile-SportExperiences")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-spt-exp.js");
|
||||
}
|
||||
|
||||
@* Sport Experience panel - list experience for sport *@
|
||||
<div class="sax-panel sax-panel-info ProfileSportExperience hidden">
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -77,6 +83,7 @@
|
||||
<div class="row">
|
||||
<div class="col text-right pr12"><button type="button" class="sax-button" value="" onclick="sax.closeProfileSportExperience();">@Localiser["label.close"]</button></div>
|
||||
</div>
|
||||
<div class="spacer2"></div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -250,4 +257,4 @@
|
||||
<script type="text/javascript">
|
||||
sax.lbl.sportExperience = '@Localiser.GetJavascriptText("account.caption.profile.sports.experience")';
|
||||
</script>
|
||||
<script src="~/js/sax-pro-exp.js?@Model.HrefVersion"></script>
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
@model Model_Account
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
/* Online Profile Sports. */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Account/Profile-Sports")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-pro-spt.js");
|
||||
}
|
||||
|
||||
<div class="sax-panel-section ProfileSports sax-populating">
|
||||
|
||||
@@ -118,6 +125,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Contact controls *@
|
||||
<partial name="~/Views/Common/SportControls-Contacts.cshtml" />
|
||||
|
||||
@* Sport Participation *@
|
||||
<div class="sax-form-control ProfileSportParticipation">
|
||||
<div class="row">
|
||||
@@ -161,4 +171,3 @@
|
||||
sax.dlg.title.addUserSport = '@Localiser.GetJavascriptText("account.caption.profile.sport.add")';
|
||||
sax.dlg.title.updateUserSport = '@Localiser.GetJavascriptText("account.caption.profile.sport.update")';
|
||||
</script>
|
||||
<script src="~/js/sax-pro-spt.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
ViewData["Title"] = "Profile - Sports";
|
||||
}
|
||||
|
||||
<partial name="~/Views/Account/Profile-Sports.cshtml" />
|
||||
<partial name="~/Views/Account/Profile-Sports.cshtml" />
|
||||
|
||||
<partial name="~/Views/Account/Profile-SportExperiences.cshtml" />
|
||||
<partial name="~/Views/Common/Sport-Contacts.cshtml" />
|
||||
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Account/Profile-SportExperiences.cshtml" />
|
||||
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/CodeSelect")) return;
|
||||
@{
|
||||
/* Online Code Select */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/CodeSelect")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-code-sel.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-code-sel.css?@Model.HrefVersion" />
|
||||
<script src="~/js/sax-code-sel.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
<div id="dlgCodeSelect" class="sax-dialog sax-form" style="padding-bottom:8px;">
|
||||
|
||||
@* Filter *@
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/ContactMethods")) return;
|
||||
|
||||
<script src="~/js/sax-cnt-mth.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
@{
|
||||
/* Online Contact Methods */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/ContactMethods")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-cnt-mth.js");
|
||||
}
|
||||
|
||||
<div id="dlgContactMethod" class="sax-dialog sax-form" title="@Localiser["caption.contact.method"]">
|
||||
<div class="spacer4"></div>
|
||||
@@ -20,7 +21,7 @@
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select name="ContactMethod" class="ContactMethod sax-select" style="max-width:240px;" ></select>
|
||||
<select name="ContactMethod" class="ContactMethod sax-select" style="max-width:240px;"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
@inject SaxLocaliser Localiser
|
||||
@* NB Organisation contact controls may be present more than once on a page, eg. Profile Organisation. *@
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/OrganisationControls-Contact")) return;
|
||||
|
||||
<style>
|
||||
.OrganisationContactMethods .ContactMethods
|
||||
{
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/OrganisationRequest")) return;
|
||||
|
||||
@{
|
||||
/* Online Organisation Request. */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/OrganisationRequest")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-org-req.js");
|
||||
Microsoft.AspNetCore.Html.HtmlString regionIdCountry = new Microsoft.AspNetCore.Html.HtmlString(Model.ValidUserSession ? Model.GetEncryptedRegionId(Model.SessionData.User.RegionIdCountry) : "");
|
||||
String regionNameCountry = Model.ValidUserSession ? Localiser.EscapeJavascriptText(Model.GetRegionCaption(Model.SessionData.User.RegionIdCountry)) : "";
|
||||
}
|
||||
@@ -96,6 +99,5 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-org-req.js?@Model.HrefVersion"></script>
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/OrganisationSelect")) return;
|
||||
@{
|
||||
/* Online Organisation Select. */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/OrganisationSelect")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-org-sel.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-org-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
sax.selectOrganisation = {};
|
||||
sax.selectOrganisation = sax.selectOrganisation || {};
|
||||
sax.selectOrganisation.dlgTitleSelectOrganisation = '@Localiser.GetJavascriptText("organisation.caption.organisation.select")';
|
||||
</script>
|
||||
|
||||
<div id="dlgSelectOrganisation" class="sax-dialog sax-form">
|
||||
|
||||
@* Filter *@
|
||||
@@ -46,5 +50,3 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-org-sel.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/RegionSelect")) return;
|
||||
@{
|
||||
/* Online Region Select */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/RegionSelect")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-reg-sel.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-reg-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
@@ -49,5 +54,3 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-reg-sel.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
@{
|
||||
/* Online Results Paging. */
|
||||
// NB View can be included more than once on a page.
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-res-pag.js");
|
||||
}
|
||||
|
||||
<script src="~/js/sax-res-pag.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
sax.mdl.resultsPaging = sax.mdl.resultsPaging || {msg:{}};
|
||||
sax.mdl.resultsPaging.msg.pageInfo = '@Localiser.GetJavascriptText("label.page.info","{0}","{1}")';
|
||||
</script>
|
||||
|
||||
|
||||
+7
-6
@@ -1,13 +1,14 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/SportSelect")) return;
|
||||
@{
|
||||
/* Sport Contacts */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/Sport-Contacts")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-spt-cnt.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-spt-cnt.css?@Model.HrefVersion" />
|
||||
<script src="~/js/sax-spt-cnt.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
<div id="dlgCodeSelect" class="sax-dialog sax-form" style="padding-bottom:8px;">
|
||||
|
||||
@* Filter *@
|
||||
@@ -0,0 +1,78 @@
|
||||
@* Organisation controls - Contact *@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
@* NB Organisation contact controls may be present more than once on a page, eg. Profile Organisation. *@
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/SportControls-Contacts")) return;
|
||||
|
||||
<style>
|
||||
.SportContacts .Contacts
|
||||
{
|
||||
min-height: 32px;
|
||||
max-height: 64px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #808080;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.SportContacts.Contacts table.sax-data tr:hover
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.SportContacts .Contacts table.sax-data .sax-label
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@* Sport Contacts *@
|
||||
<div class="sax-form-control SportContacts">
|
||||
<input type="hidden" name="Sport.Contacts" value="0" />
|
||||
<div class="row">
|
||||
<div class="col-sm-3 row">
|
||||
<div class="col">
|
||||
<div class="sax-label">
|
||||
<label for=""><span>@Localiser["label.contacts"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fixed">
|
||||
@* Action to add new contact. *@
|
||||
<div class="sax-actions">
|
||||
<div class="sax-action sax-add pr4"><img src="~/img/action/add24.png" alt="@(Localiser["label.add"])" title="@(Localiser["label.add"])" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
<div class="col">
|
||||
@* List of existing contacts with actions to edit/remove. *@
|
||||
<div class="Contacts">
|
||||
<table class="sax-data fullwidth"></table>
|
||||
</div>
|
||||
<table class="sax-panel-item-template">
|
||||
<tr class="Contact">
|
||||
<td style="width:20px;"><div class="sax-label nowrap"></div></td>
|
||||
<td class="sax-name" style="width:70%;word-break: break-all;"></td>
|
||||
<td class="sax-details" style="width:70%;word-break: break-all;"></td>
|
||||
<td class="sax-actions right nowrap" style="min-width:10px;">
|
||||
<input type="hidden" name="Contacts.ContactType" />
|
||||
<input type="hidden" name="Contacts.ContactName" />
|
||||
<input type="hidden" name="Contacts.ContactPhone" />
|
||||
<input type="hidden" name="Contacts.ContactEmail" />
|
||||
<div class="nowrap">
|
||||
<div class="inlineb sax-action sax-edit"><img src="~/img/action/edit16.png" alt="@(Localiser["label.edit"])" title="@(Localiser["label.edit"])" /></div>
|
||||
<div class="inlineb sax-action sax-remove"><img src="~/img/action/delete16.png" alt="@(Localiser["label.remove"])" title="@(Localiser["label.remove"])" /></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,12 +1,14 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@if (!Model.RegisterView("Views/Common/SportSelect")) return;
|
||||
@{
|
||||
/* Online Sport Select */
|
||||
// Ensure view is only included once in page.
|
||||
if (!Model.RegisterView("Views/Common/SportSelect")) return;
|
||||
// Scripts.
|
||||
Model.AdditionalFiles_JS.Add("js/sax-spt-sel.js");
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-spt-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
<div id="dlgSelectSport" class="sax-dialog sax-form">
|
||||
|
||||
<div class="container-fluid h-100">
|
||||
@@ -49,5 +51,3 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-spt-sel.js?@Model.HrefVersion"></script>
|
||||
|
||||
@@ -3,10 +3,17 @@
|
||||
"Saxonite-Dev": {
|
||||
"Environments": [ "Development" ],
|
||||
"Instance": "Dev",
|
||||
"CoreDatabase": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Core_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
},
|
||||
"Support": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Support_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"Context": "SAX-SF-Dev",
|
||||
@@ -24,10 +31,12 @@
|
||||
"Saxonite-Test": {
|
||||
"Environments": [ "Production" ],
|
||||
"Instance": "QC",
|
||||
"CoreDatabase": {
|
||||
"Location": "MsSql:Sarand106\\SQL2014.Saxonite_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Core_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"Context": "SAX-SF-Dev",
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
"SAX-Prod": {
|
||||
"Environments": [ "Production" ],
|
||||
"Instance": "",
|
||||
"CoreDatabase": {
|
||||
"Location": "MsSql:.\\SQLExpress2012.Saxonite_Core_Demo",
|
||||
"User": "sax-demo-user",
|
||||
"Password": "sax-demo-202105"
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:.\\SQLExpress2012.Saxonite_Core_Demo",
|
||||
"User": "sax-demo-user",
|
||||
"Password": "sax-demo-202105"
|
||||
}
|
||||
},
|
||||
"Security": {
|
||||
"Password": {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Account page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
@@ -61,7 +60,5 @@
|
||||
setTimeout(sax.refreshProfile, 200);
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Article page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
@@ -10,7 +9,6 @@
|
||||
let am = sax.articleMgt = { ajax: {}, data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
let $pnl = am.$pnl, $frm = am.$frm, $dlg = am.$dlg;
|
||||
let ac = sax.articleContent = sax.articleContent || {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.refreshResults = function (delay)
|
||||
{
|
||||
@@ -77,7 +75,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -107,7 +104,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.selectFilterOrganisation = function ()
|
||||
{
|
||||
@@ -126,7 +122,6 @@
|
||||
$('#frmArticleFilter #ifFilterOrganisation').val(name);
|
||||
am.refreshResults(50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.createItem = function ()
|
||||
{
|
||||
@@ -169,7 +164,6 @@
|
||||
sax.openDialog($dlg.article, 800, 1200);
|
||||
$('.ArticleHeadline.sax-input,.ArticleSummary.sax-textarea', $frm.article).trigger("input");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.updateItem = function (item, $item)
|
||||
{
|
||||
@@ -205,7 +199,6 @@
|
||||
am.populateArticleContent(item.content);
|
||||
am.openArticleDialog(sax.dlg.title.updateArticle);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.switchArticleHeader = function ()
|
||||
{
|
||||
@@ -215,7 +208,6 @@
|
||||
{
|
||||
$('.sax-article').removeClass('ArticleHeader').addClass('ArticleContent');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.selectArticleSport = function ()
|
||||
{
|
||||
@@ -226,7 +218,6 @@
|
||||
sax.clearControlError($('#ifArticleSportId').val(sport.id));
|
||||
$('#ifArticleSportCaption').val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.selectArticleRegion = function ()
|
||||
{
|
||||
@@ -237,7 +228,6 @@
|
||||
sax.clearControlError($('#ifArticleRegionId').val(region.id));
|
||||
$('#ifArticleRegionCaption').val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.segmentId = function (idx)
|
||||
{
|
||||
@@ -460,7 +450,6 @@
|
||||
$dlg.selectArticleImage.dialog('close');
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.storeItem = function ()
|
||||
{
|
||||
@@ -487,14 +476,12 @@
|
||||
}
|
||||
am.populateItem($item, item)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
am.refreshControlInfo = function (ctrl)
|
||||
{
|
||||
let $ctrl = $(ctrl);
|
||||
sax.setAvailableCharsInfo($ctrl, $ctrl.prop('maxlength'));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -532,7 +519,6 @@
|
||||
|
||||
setTimeout(am.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Contact Methods script.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let cm = sax.mdl.contactMethods = { fn: {}, data: {}, ajax: {} };
|
||||
let $dlg = cm.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Config:
|
||||
@@ -19,7 +17,6 @@
|
||||
*/
|
||||
sax.editContactMethod = cm.fn.edit = function (cfg)
|
||||
{
|
||||
cm.fn.init();
|
||||
cm.data.cfg = cfg || {};
|
||||
cm.$mth.empty();
|
||||
for (let mth of cfg.methods || [])
|
||||
@@ -29,9 +26,9 @@
|
||||
}
|
||||
cm.$mth.val(cfg.method).attr('disabled', cfg.method && cm.$mth.val() == cfg.method ? true : null);
|
||||
cm.$val.val(cfg.value);
|
||||
sax.clearControlErrors($dlg.conMth);
|
||||
sax.openDialog($dlg.conMth, 600, 240);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
cm.fn.applyChanges = function ()
|
||||
{
|
||||
@@ -50,20 +47,16 @@
|
||||
$dlg.conMth.dialog('close');
|
||||
if (cm.data.cfg.fnCallback) cm.data.cfg.fnCallback(cm.$mth.val(), $('option:selected', cm.$mth).text(), cm.$val.val());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
cm.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if ($dlg.conMth) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { cm.fn.applyChanges(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.conMth = $('#dlgContactMethod').dialog(opt);
|
||||
cm.$mth = $('.sax-select.ContactMethod', $dlg.conMth);
|
||||
cm.$val = $('.sax-input.ContactValue', $dlg.conMth);
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Code selection.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let cs = sax.codeSelect = sax.codeSelect || { fn: {}, $dlg: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Code selection config:
|
||||
@@ -23,7 +21,6 @@
|
||||
cs.fn.openCodeSelect = function (cfg)
|
||||
{
|
||||
//sax.debug('openSelectCode', cfg);
|
||||
cs.fn.init();
|
||||
cs.cfg = cfg;
|
||||
cs.selectedCodes = cfg.selectedCodes || [];
|
||||
cs.fn.displayCodes(cfg.codes);
|
||||
@@ -44,6 +41,7 @@
|
||||
else $codesAvail.append($code);
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
cs.fn.onClickCode = function (code, $code)
|
||||
{
|
||||
$('.sax-panel-item.Code').removeClass('sel');
|
||||
@@ -93,6 +91,7 @@
|
||||
for (const code of codes)
|
||||
$('.sax-panel-item.Code[aria-code="' + code + '"]').addClass('sel');
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
cs.fn.storeSelectCode = function ()
|
||||
{
|
||||
//sax.debug('storeSelectCode', cs.cfg, cs.selectedCodes);
|
||||
@@ -105,19 +104,16 @@
|
||||
delete cs.cfg;
|
||||
delete cs.selectedCodes;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
cs.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if (!cs.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { cs.fn.storeSelectCode(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { cs.fn.cleanUp(); $(this).dialog('close'); };
|
||||
cs.$dlg = $('#dlgCodeSelect').dialog(opt);
|
||||
$('.sax-button.Select', cs.$dlg).on('click', function () { cs.fn.onClickSelect(); });
|
||||
$('.sax-button.Remove', cs.$dlg).on('click', function () { cs.fn.onClickRemove(); });
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,11 +1,9 @@
|
||||
/*
|
||||
* Home scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
{
|
||||
@@ -57,7 +55,6 @@
|
||||
$('.ActivityPublishedOn', $item).text(item.publishedOnFmt);
|
||||
$item.on('click', '.sax-header .ActivityCaption', function () { sax.expandActivity(activity); }).on('dblclick', '.sax-content', function () { sax.expandActivity(activity); });
|
||||
$('.sax-panel-messages', sax.$pnl.results).hide().empty();
|
||||
|
||||
}
|
||||
sax.refreshItem = function (activity)
|
||||
{
|
||||
@@ -71,13 +68,11 @@
|
||||
for (let i = 1; i <= Math.min(5, activity.item.reaction); i++)
|
||||
$react.append($('<img>').prop('src', '../img/icon/star-gold-16.png'));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getActivityTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Activity', sax.$pnl.results).clone();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.expandActivity = function (activity)
|
||||
{
|
||||
@@ -148,7 +143,6 @@
|
||||
sax.setActivityReactionButton(sax.activity.item.reaction);
|
||||
sax.openDialog(sax.$dlg.activity, 800, dlgH);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
let selectedClass = 'sax-selected';
|
||||
sax.setActivityReactionButton = function (r)
|
||||
@@ -172,7 +166,6 @@
|
||||
sax.ajax.activityReact = sax.ajax.activityReact || { url: sax.url.base + 'Activity/Ajax/React', formId: 'frmActivityReact', callbackFn: fn, noWaitIcon: true };
|
||||
sax.doAjaxRequest(sax.ajax.activityReact, 20);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -188,8 +181,6 @@
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Main scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
win.sax = win.sax || {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Utilities.
|
||||
sax.isDef = function (obj)
|
||||
@@ -73,7 +71,6 @@
|
||||
evt.stopPropagation();
|
||||
}
|
||||
sax.debug = sax.debugMode ? win.console.log.bind(win.console) : function () { };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.compareCI = function (a, b)
|
||||
{
|
||||
@@ -88,7 +85,6 @@
|
||||
this.sort(function (a, b) { return sax.compareCI(a, b); });
|
||||
return this;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.setOddDataRowClass = function (rowSel, cName)
|
||||
{
|
||||
@@ -142,7 +138,6 @@
|
||||
if (sax.mdl.resultsPaging.fn.refreshPaging)
|
||||
sax.mdl.resultsPaging.fn.refreshPaging(response.paging, context, refreshFn);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Page navigation.
|
||||
sax.navigateTo = function (action)
|
||||
@@ -155,7 +150,6 @@
|
||||
sax.doPleaseWait();
|
||||
location = sax.url.base + action;
|
||||
}
|
||||
|
||||
// Account action.
|
||||
sax.onAccountAction = function (select)
|
||||
{
|
||||
@@ -166,7 +160,6 @@
|
||||
else if (action == "Organisations")
|
||||
sax.navigateTo("Organisations");
|
||||
}
|
||||
|
||||
// Security.
|
||||
sax.redirectHome = function ()
|
||||
{
|
||||
@@ -185,7 +178,6 @@
|
||||
{
|
||||
sax.doAjaxRequest({ url: sax.url.base + 'Security/Ajax/SignOut', formId: 'frmNavigate' }, 50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Dialogs.
|
||||
sax.openDialog = function ($dlg, width, height)
|
||||
@@ -273,7 +265,6 @@
|
||||
clearTimeout(sax.toShowProgress);
|
||||
sax.$dlg.progress.dialog('close');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Notifications.
|
||||
sax.showNotification = function (title, msg)
|
||||
@@ -310,7 +301,6 @@
|
||||
{
|
||||
if (sax.$pleaseWait) sax.$pleaseWait.stop(true, false).fadeOut(200);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Ajax.
|
||||
sax.doAjaxRequest = function (ajax, delay)
|
||||
@@ -376,7 +366,6 @@
|
||||
}
|
||||
ajax.request = $.ajax(cfgAjax);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Session.
|
||||
sax.configureKeepLoggedIn = function (single)
|
||||
@@ -434,7 +423,6 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Elements.
|
||||
sax.objBtm = function (sel)
|
||||
@@ -477,7 +465,6 @@
|
||||
var $obj = $(sel);
|
||||
return parseInt($obj.css('border-top-width'), 10) + parseInt($obj.css('border-bottom-width'), 10);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Viewport - Desktop or Mobile.
|
||||
sax.isMob = function () { return $('body.mob').length > 0; };
|
||||
@@ -503,7 +490,6 @@
|
||||
$ftr.css('visibility', 'visible');
|
||||
sax.onWinResizePage();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -526,9 +512,8 @@
|
||||
//defaultDate: 0,
|
||||
});
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
//--------------------------------------------------------------
|
||||
(function ()
|
||||
{
|
||||
@@ -538,5 +523,5 @@
|
||||
}
|
||||
if (!Array.prototype.sortBy) Array.prototype.sortCI = sax.arraySortCI;
|
||||
})();
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Organisation - Events page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let oe = sax.OrgEvt = { data: {}, fn: {} };
|
||||
let $pnl = oe.$pnl = {}, $frm = oe.$frm = {}, $dlg = oe.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.refreshResults = function (delay)
|
||||
{
|
||||
@@ -83,7 +81,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -109,7 +106,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.selectFilterOrganisation = function ()
|
||||
{
|
||||
@@ -141,7 +137,6 @@
|
||||
$('#frmEventFilter #ifFilterOrganisation').val(name);
|
||||
oe.refreshResults(50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.selectSportPrimary = function ()
|
||||
{
|
||||
@@ -152,7 +147,6 @@
|
||||
sax.clearControlError($('.EventSportIdPrimary', $frm.evt).val(sport.id));
|
||||
$('.EventSportCaptionPrimary', $frm.evt).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.selectRegionCountry = function ()
|
||||
{
|
||||
@@ -163,7 +157,6 @@
|
||||
sax.clearControlError($('.EventRegionIdCountry', $frm.evt).val(region.id));
|
||||
$('.EventRegionCaptionCountry', $frm.evt).val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.createItem = function ()
|
||||
{
|
||||
@@ -185,7 +178,6 @@
|
||||
$('.EventDate', $frm.evt).datepicker('setDate', 'today');
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.updateItem = function (item, $item)
|
||||
{
|
||||
@@ -216,7 +208,6 @@
|
||||
$dlg.event.dialog('option', 'title', sax.dlg.title.updateEvent);
|
||||
sax.openDialog($dlg.event, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oe.storeItem = function ()
|
||||
{
|
||||
@@ -238,7 +229,6 @@
|
||||
}
|
||||
oe.populateItem(oe.$item, item)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -265,7 +255,6 @@
|
||||
|
||||
setTimeout(oe.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Organisation - Members page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let om = sax.OrgMbr = { data: {}, fn: {} };
|
||||
let $pnl = om.$pnl = {}, $frm = om.$frm = {}, $dlg = om.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.refreshResults = function (delay)
|
||||
{
|
||||
@@ -74,7 +72,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -100,7 +97,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.selectFilterOrganisation = function ()
|
||||
{
|
||||
@@ -132,7 +128,6 @@
|
||||
$('#frmMemberFilter #ifFilterOrganisation').val(name);
|
||||
om.refreshResults(50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.createItem = function ()
|
||||
{
|
||||
@@ -151,7 +146,6 @@
|
||||
$('.MemberDisplayName,.MemberTitle,.MemberFirstName,.MemberLastName', $frm.mbr).hide();
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.updateItem = function (item, $item)
|
||||
{
|
||||
@@ -182,7 +176,6 @@
|
||||
$dlg.member.dialog('option', 'title', sax.dlg.title.updateMember);
|
||||
sax.openDialog($dlg.member, 600, 560);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Member Roles.
|
||||
om.selectMemberRoles = function ()
|
||||
@@ -212,7 +205,6 @@
|
||||
sax.data.memberRoles.some(function (value) { if (value.code == roleCode) { roleDesc = value.desc; return true; } return false; })
|
||||
return roleDesc || roleCode;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.storeItem = function ()
|
||||
{
|
||||
@@ -241,7 +233,6 @@
|
||||
om.populateItem(om.$item, item)
|
||||
delete om.$item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.removeItem = function (item, $item)
|
||||
{
|
||||
@@ -265,7 +256,6 @@
|
||||
delete om.$item;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.activateItem = function (item, $item)
|
||||
{
|
||||
@@ -289,7 +279,6 @@
|
||||
delete om.$item;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -315,7 +304,6 @@
|
||||
|
||||
setTimeout(om.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Organisation - Opportunities page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let oo = sax.OrgOpp = { data: {}, fn: {} };
|
||||
let $pnl = oo.$pnl = {}, $frm = oo.$frm = {}, $dlg = oo.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.refreshResults = function (delay)
|
||||
{
|
||||
@@ -81,7 +79,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -107,7 +104,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.selectFilterOrganisation = function ()
|
||||
{
|
||||
@@ -139,7 +135,6 @@
|
||||
$('#frmOpportunityFilter #ifFilterOrganisation').val(name);
|
||||
oo.refreshResults(50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.selectSport = function ()
|
||||
{
|
||||
@@ -150,7 +145,6 @@
|
||||
sax.clearControlError($('#ifOpportunitySportId').val(sport.id));
|
||||
$('#ifOpportunitySportCaption').val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.selectRegion = function ()
|
||||
{
|
||||
@@ -161,7 +155,6 @@
|
||||
sax.clearControlError($('#ifOpportunityRegionId').val(region.id));
|
||||
$('#ifOpportunityRegionCaption').val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.createItem = function ()
|
||||
{
|
||||
@@ -182,7 +175,6 @@
|
||||
$('#cbOpportunityType', $frm.opp).find('option[value=""]').remove();
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.updateItem = function (item, $item)
|
||||
{
|
||||
@@ -212,7 +204,6 @@
|
||||
$dlg.opportunity.dialog('option', 'title', sax.dlg.title.updateOpportunity);
|
||||
sax.openDialog($dlg.opportunity, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
oo.storeItem = function ()
|
||||
{
|
||||
@@ -234,7 +225,6 @@
|
||||
}
|
||||
oo.populateItem(oo.$item, item)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -260,7 +250,6 @@
|
||||
|
||||
setTimeout(oo.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,17 +1,14 @@
|
||||
/*
|
||||
* Organisation Request.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let or = sax.orgReq;
|
||||
or.fn = {}; or.ajax = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.fn.requestOrganisation = function ()
|
||||
{
|
||||
or.fn.init();
|
||||
$('input[type="text"],textarea,select,.OrganisationSportId,.OrganisationRegionIdCountry', or.$frm).val('');
|
||||
$('.OrganisationRegionIdPrimary', or.$frm).val(sax.data.regionIdCountryDefault);
|
||||
$('.OrganisationRegionNamePrimary', or.$frm).val(sax.data.regionNameCountryDefault);
|
||||
@@ -36,7 +33,6 @@
|
||||
or.fn.cleanUp = function ()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.selectOrgSport = function ()
|
||||
{
|
||||
@@ -47,7 +43,6 @@
|
||||
sax.clearControlError($('.OrganisationSportId', or.$frm).val(sport.id));
|
||||
$('.OrganisationSportName', or.$frm).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.selectOrgRegionPrimary = function ()
|
||||
{
|
||||
@@ -59,11 +54,9 @@
|
||||
sax.clearControlError($('.OrganisationRegionIdPrimary', or.$frm).val(region.id));
|
||||
$('.OrganisationRegionNamePrimary', or.$frm).val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if (or.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.title = sax.orgReq.dlgTitleRequestOrganisation;
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { or.fn.storeOrganisation(); };
|
||||
@@ -74,8 +67,7 @@
|
||||
or.$frm.on('dblclick', 'input.OrganisationRegionNamePrimary', or.selectOrgRegionPrimary).on('click', 'button.SelectOrganisationRegionPrimary', or.selectOrgRegionPrimary);
|
||||
$('.sax-input, .sax-textarea', or.$frm).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select', or.$frm).on('change', function () { sax.clearControlError(this); });
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Organisation selection.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let so = sax.selectOrganisation;
|
||||
let so = sax.selectOrganisation = sax.selectOrganisation || {};
|
||||
so.data = {}; so.fn = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Organisation selection config:
|
||||
@@ -20,7 +18,6 @@
|
||||
so.fn.selectOrganisation = function (cfg)
|
||||
{
|
||||
//sax.debug('openDialog', cfg);
|
||||
so.fn.init();
|
||||
so.cfg = cfg;
|
||||
sax.openDialog(so.$dlg.dialog('option', { title: cfg.caption || so.dlgTitleSelectOrganisation || 'Select Organisation' }), so.cfg.width || 480, so.cfg.height || 600);
|
||||
}
|
||||
@@ -99,11 +96,9 @@
|
||||
delete so.cfg;
|
||||
delete so.data.item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
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(); };
|
||||
@@ -113,8 +108,7 @@
|
||||
so.$results = $('.sax-selection-results.Organisations', so.$dlg);
|
||||
so.$filter = $('.sax-panel-filter', so.$dlg);
|
||||
$('.sax-input.FilterOrganisation', so.$filter).on('input', function () { sax.selectOrganisation.fn.refreshResults(250); });
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -16,5 +16,4 @@
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Profile Eligibility scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
@@ -11,7 +10,6 @@
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshProfileEligibilityInfo = function (delay)
|
||||
{
|
||||
ue.init();
|
||||
$pnl.infoTip.hide().find('.sax-info').text(sax.msg.eligibilityInfo);
|
||||
$pnl.usrElg.removeClass('sax-edit').addClass('sax-populating');
|
||||
$('.sax-property', $pnl.usrElg).hide();
|
||||
@@ -224,9 +222,8 @@
|
||||
ue.clearItem();
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ue.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if ($pnl.usrElg) return;
|
||||
$pnl.usrElg = $('.sax-panel-section.ProfileEligibility');
|
||||
$pnl.usrElg.on('click', '.sax-action.sax-add', function (evt) { ue.addItem(); });
|
||||
$pnl.usrElg.on('click', '.sax-action.sax-info', function (evt) { ue.showInfoTip(); });
|
||||
@@ -248,7 +245,7 @@
|
||||
sax.initCalendars('#frmUserEligibility .sax-calendar', { changeMonth: true, changeYear: true, yearRange: '-99:+12', autoClose: true });
|
||||
ue.$dpExpiresOn.datepicker({ onSelect: function () { ue.onChangeExpiresOn(); }, onClose: function () { ue.onChangeExpiresOn(); } });
|
||||
sax.allowClearCalendar('#frmUserEligibility .sax-calendar');
|
||||
}
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Account page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let po = sax.mdl.profileOrganisations = sax.mdl.profileOrganisations || { data: {}, ajax: {} };
|
||||
let $pnl = po.$pnl = {}, $dlg = po.$dlg = {}, $frm = po.$frm = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshProfileOrganisationsInfo = function (delay)
|
||||
{
|
||||
@@ -62,7 +60,6 @@
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.getHeaderDropdownTemplate = function ()
|
||||
{
|
||||
@@ -88,7 +85,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.updateOrganisation = function ($item, item)
|
||||
{
|
||||
@@ -155,7 +151,6 @@
|
||||
delete po.data.item;
|
||||
delete po.data.$item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.selectOrgSport = function ()
|
||||
{
|
||||
@@ -166,7 +161,6 @@
|
||||
sax.clearControlError($('.OrganisationSportId', $frm.org).val(sport.id));
|
||||
$('.OrganisationSportName', $frm.org).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.selectOrgRegionPrimary = function ()
|
||||
{
|
||||
@@ -177,7 +171,6 @@
|
||||
sax.clearControlError($('.OrganisationRegionIdPrimary', $frm.org).val(region.id));
|
||||
$('.OrganisationRegionNamePrimary', $frm.org).val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
po.getConMthCfg = function (usedMths, mth, val)
|
||||
{
|
||||
@@ -229,8 +222,8 @@
|
||||
po.clearConMth = function (mth)
|
||||
{
|
||||
$('#' + po.getConMthId(mth), $pnl.conMths).remove();
|
||||
po.sortConMths();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -248,9 +241,6 @@
|
||||
$pnl.conMths = $('.OrganisationContactMethods', $frm.org);
|
||||
$pnl.tblconMths = $('table.sax-data', $pnl.conMths);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Account page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
@@ -11,7 +10,6 @@
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshProfileSportsInfo = function (delay)
|
||||
{
|
||||
ps.init();
|
||||
$pnl.proSpt.removeClass('sax-edit').addClass('sax-populating');
|
||||
$('.sax-property', $pnl.proSpt).hide();
|
||||
sax.showDataRefreshingMsg($pnl.proSpt);
|
||||
@@ -64,28 +62,28 @@
|
||||
{
|
||||
//sax.debug('addProfileSport');
|
||||
ps.clearProfileSport();
|
||||
sax.openDialog($dlg.proSpt.dialog('option', 'title', sax.dlg.title.addUserSport), 640, 480);
|
||||
sax.openDialog($dlg.spt.dialog('option', 'title', sax.dlg.title.addUserSport), 640, 480);
|
||||
}
|
||||
ps.clearProfileSport = function ()
|
||||
{
|
||||
let dlg = $dlg.proSpt;
|
||||
let dlg = $dlg.spt;
|
||||
$('.UserSportId,.ProfileSportExists,#ifProfileSportId,input.sax-input,textarea.sax-textarea,select.sax-select', dlg).val('');
|
||||
$('.SelectSport', dlg).show();
|
||||
sax.clearControlErrors(dlg);
|
||||
}
|
||||
ps.updateProfileSport = function (item)
|
||||
{
|
||||
//sax.debug('updateProfileSport', item, $frm.proSptId);
|
||||
$('.UserSportId', $frm.proSptId).val(item.id);
|
||||
ps.ajax.profileSport = ps.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: $frm.proSptId.prop('id'), callbackFn: ps.doUpdateProfileSport };
|
||||
//sax.debug('updateProfileSport', item, $frm.sptId);
|
||||
$('.UserSportId', $frm.sptId).val(item.id);
|
||||
ps.ajax.profileSport = ps.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: $frm.sptId.prop('id'), callbackFn: ps.doUpdateProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.profileSport, 50);
|
||||
}
|
||||
ps.doUpdateProfileSport = function (response)
|
||||
{
|
||||
//sax.debug('doUpdateProfileSport', response);
|
||||
ps.clearProfileSport();
|
||||
let dlg = $dlg.proSpt;
|
||||
let frm = $frm.proSpt;
|
||||
let dlg = $dlg.spt;
|
||||
let frm = $frm.spt;
|
||||
let item = response.sport;
|
||||
$('.UserSportId', frm).val(item.id);
|
||||
$('.ProfileSportExists', frm).val(1);
|
||||
@@ -101,9 +99,9 @@
|
||||
ps.selectUserSport = function (sport)
|
||||
{
|
||||
//sax.debug('selectUserSport');
|
||||
if ($('.UserSportId', $frm.proSpt).val() > 0) return;
|
||||
if ($('.UserSportId', $frm.spt).val() > 0) return;
|
||||
let excludeIds = $.grep(sax.profile.sports.Ids, function (value) { return !sport || value != sport.id; });
|
||||
sax.mdl.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('#ifProfileSportId', $frm.proSpt).val(), excludeIds: excludeIds, fnCallback: ps.onSelectUserSport })
|
||||
sax.mdl.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('#ifProfileSportId', $frm.spt).val(), excludeIds: excludeIds, fnCallback: ps.onSelectUserSport })
|
||||
}
|
||||
ps.onSelectUserSport = function (sport)
|
||||
{
|
||||
@@ -111,37 +109,67 @@
|
||||
$('#ifProfileSport').val(sport ? sport.name : '');
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ps.getSportContactCfg = function (contact)
|
||||
{
|
||||
let cfg = { fnCallback: ps.applySportContact, methods: ps.data.contactTypes, typesUsed: ps.getUsedContactTypes(), contact: contact};
|
||||
return cfg;
|
||||
}
|
||||
ps.getUsedContactTypes = function ()
|
||||
{
|
||||
return $('input[name="Contacts.ContactTypes"]', $frm.org).map(function () { return $(this).val(); }).get();
|
||||
}
|
||||
ps.addSportContact = function ()
|
||||
{
|
||||
sax.debug('addSportContact');
|
||||
ps.showSportContact(ps.getSportContactCfg());
|
||||
}
|
||||
ps.editSportContact= function (contact)
|
||||
{
|
||||
sax.debug('editSportContact');
|
||||
ps.showSportContact(ps.getSportContactCfg(contact));
|
||||
}
|
||||
ps.showSportContact=function(cfg)
|
||||
{
|
||||
sax.mdl.sportContact.showSportContact(cfg);
|
||||
}
|
||||
ps.getConId = function (contact)
|
||||
{
|
||||
return 'SptCon_' + contact.type;
|
||||
}
|
||||
ps.applySportContact = function ()
|
||||
{
|
||||
sax.debug('applySportContact');
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ps.storeProfileSport = function ()
|
||||
{
|
||||
//sax.debug('storeProfileSport');
|
||||
sax.clearControlErrors();
|
||||
ps.ajax.storeProfileSport = ps.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: $frm.proSpt.prop('id'), callbackFn: ps.onStoreProfileSport };
|
||||
ps.ajax.storeProfileSport = ps.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: $frm.spt.prop('id'), callbackFn: ps.onStoreProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.storeProfileSport, 50);
|
||||
}
|
||||
ps.onStoreProfileSport = function (response)
|
||||
{
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response || !response.success) return;
|
||||
$dlg.proSpt.dialog('close');
|
||||
$dlg.spt.dialog('close');
|
||||
sax.refreshProfileSportsInfo();
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
ps.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if ($pnl.proSpt) return;
|
||||
$pnl.proSpt = $('.sax-panel-section.ProfileSports');
|
||||
$('.sax-action.sax-add', $pnl.proSpt).on('click', function (evt) { ps.addProfileSport(); });
|
||||
$frm.proSptId = $('#frmProfileSportId', $pnl.proSpt);
|
||||
$frm.sptId = $('#frmProfileSportId', $pnl.proSpt);
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { ps.storeProfileSport(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.proSpt = $('#dlgProfileSport').dialog(opt);
|
||||
$frm.proSpt = $('#frmProfileSport', $dlg.proSpt);
|
||||
$frm.proSpt.on('dblclick', '.ProfileSport.sax-input', ps.selectUserSport);
|
||||
$frm.proSpt.on('click', '.SelectSport.sax-button', ps.selectUserSport);
|
||||
}
|
||||
$dlg.spt = $('#dlgProfileSport').dialog(opt);
|
||||
$frm.spt = $('#frmProfileSport', $dlg.spt);
|
||||
$frm.spt.on('dblclick', '.ProfileSport.sax-input', ps.selectUserSport);
|
||||
$frm.spt.on('click', '.SelectSport.sax-button', ps.selectUserSport);
|
||||
$frm.spt.on('click', '.SportContacts .sax-action.sax-add', ps.addSportContact);
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Account page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let $pnl = sax.$pnl, $dlg = sax.$dlg, $frm = sax.$frm;
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshProfileContactInfo = function ()
|
||||
{
|
||||
@@ -86,7 +84,6 @@
|
||||
if (!response.success) return;
|
||||
sax.refreshProfileContactInfo();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshDob = function ()
|
||||
{
|
||||
@@ -125,7 +122,6 @@
|
||||
$selDobDay.val('');
|
||||
$selDobDay.prop('disabled', !monthVal);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectRegionCountry = function ()
|
||||
{
|
||||
@@ -137,7 +133,6 @@
|
||||
sax.clearControlError($('#ifAccountRegionIdCountry').val(region.id));
|
||||
$('#ifAccountRegionCaptionCountry').val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.onDropContactImage = function (evt)
|
||||
{
|
||||
@@ -193,7 +188,6 @@
|
||||
let file = $fileCtrl[0].files[0];
|
||||
sax.onDropContactImageFile(file, dlg);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -215,9 +209,6 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.selectContactImage = $('#dlgSelectContactImage').dialog(opt);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Region selection.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let sr = sax.mdl.selectRegion = sax.mdl.selectRegion || {};
|
||||
sr.regions = {}; sr.fn = {}; sr.ajax = {}; sr.itemIdPrefix = 'Rgn_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Region selection config:
|
||||
@@ -19,7 +17,6 @@
|
||||
*/
|
||||
sr.fn.selectRegion = function (cfg)
|
||||
{
|
||||
sr.fn.init();
|
||||
sr.cfg = cfg;
|
||||
sr.regionId = cfg.regionId;
|
||||
if (sr.regions.length) sr.fn.showSelectRegion();
|
||||
@@ -43,7 +40,6 @@
|
||||
sr.fn.displayRegions();
|
||||
sax.openDialog(sr.$dlg.dialog('option', { title: sr.cfg.caption || 'Select Region' }), sr.cfg.width || 400, sr.cfg.height || 800);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.compareRegions = function (a, b)
|
||||
{
|
||||
@@ -52,7 +48,6 @@
|
||||
return a.name.localeCompare(b.name);
|
||||
return comparison;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.displayRegions = function ()
|
||||
{
|
||||
@@ -90,7 +85,6 @@
|
||||
let region = sr.fn.getRegion(id);
|
||||
return region ? region.name : '';
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.onClickRegion = function (region, $region)
|
||||
{
|
||||
@@ -117,26 +111,22 @@
|
||||
delete sr.cfg;
|
||||
delete sr.regionId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.onDlgSize = function ()
|
||||
{
|
||||
let $pnl = $('.sax-selectRegion-regions.AvailableRegions', sr.$dlg);
|
||||
$pnl.outerHeight(Math.floor(sr.$dlg.innerHeight() - $pnl.position().top - ($pnl.outerHeight(true) - $pnl.innerHeight())));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if (sr.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { sr.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { sr.fn.onDlgSize(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sr.fn.storeSelectRegion(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { sr.fn.cleanUp(); $(this).dialog('close'); };
|
||||
sr.$dlg = $('#dlgSelectRegion').dialog(opt);
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,12 +1,11 @@
|
||||
/*
|
||||
* Admin - Results paging.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let rp = sax.mdl.resultsPaging = sax.mdl.resultsPaging || { fn: {}, msg: {}, contexts: [] };
|
||||
|
||||
let rp = sax.mdl.resultsPaging = sax.mdl.resultsPaging || { msg: {} };
|
||||
rp.fn = {}; rp.contexts = [];
|
||||
//--------------------------------------------------------------
|
||||
rp.fn.refreshPaging = function (paging, contextSel, refreshFn)
|
||||
{
|
||||
@@ -20,7 +19,6 @@
|
||||
//$('.sax-paging-first,.sax-paging-prev', context.$rp).toggle(paging.pageNo > 1);
|
||||
//$('.sax-paging-next,.sax-paging-last', context.$rp).toggle(paging.pageNo < paging.pageCount);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
rp.fn.getContext = function (contextSel, refreshFn)
|
||||
{
|
||||
@@ -33,7 +31,6 @@
|
||||
rp.contexts.push(context);
|
||||
return context;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
rp.fn.firstPage = function (context)
|
||||
{
|
||||
@@ -63,7 +60,6 @@
|
||||
context.$pageNo.val(context.paging.pageCount);
|
||||
context.refreshFn();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
rp.fn.init = function (context)
|
||||
{
|
||||
@@ -77,7 +73,10 @@
|
||||
$('.sax-paging-next', context.$rp).off('click').on('click', function () { rp.fn.nextPage(context); });
|
||||
$('.sax-paging-last', context.$rp).off('click').on('click', function () { rp.fn.lastPage(context); });
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,11 +1,9 @@
|
||||
/*
|
||||
* Security page scripts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.doSignin = function ()
|
||||
{
|
||||
@@ -19,7 +17,6 @@
|
||||
if (!response.success) return;
|
||||
sax.goToPage('');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.doScorePassword = function ()
|
||||
{
|
||||
@@ -31,7 +28,6 @@
|
||||
var score = (response || {}).score || 0;
|
||||
sax.$prgPwordStrength.progressbar("option", "value", score).removeClass('amber green').addClass(score > 3 ? 'green' : score > 2 ? 'amber' : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.doChangePassword = function ()
|
||||
{
|
||||
@@ -47,7 +43,6 @@
|
||||
sax.goToPage('Security/Signin');
|
||||
else sax.goToPage('');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.doRequestPassword = function ()
|
||||
{
|
||||
@@ -67,7 +62,6 @@
|
||||
sax.doAlert($('.sax-page-caption').text(), response.successMsg, gotoSigninPage);
|
||||
else gotoSigninPage();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -85,8 +79,6 @@
|
||||
sax.$frm.reqPword.on('keypress', '#ifEmailAddress', function (e) { if (e.which == 13) sax.doRequestPassword(); });
|
||||
$('#pbRequestPassword', sax.$frm.reqPword).on('click', function () { sax.doRequestPassword(); }).on('keypress', function (e) { if (e.which == 13) sax.doRequestPassword(); });
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,12 +1,11 @@
|
||||
/*
|
||||
* Sport contact.
|
||||
* Sport contacts.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
"use strict";
|
||||
let sc = sax.mdl.sportContact = { ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
||||
let sc = sax.mdl.sportContact = { fn: {}, ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Sport Contact config:
|
||||
@@ -19,28 +18,25 @@
|
||||
* - typesUsed
|
||||
* - fnCallback - method to call on completion to store details.
|
||||
*/
|
||||
sax.showSportContact = function (cfg)
|
||||
sc.showSportContact = function (cfg)
|
||||
{
|
||||
sc.fn.init();
|
||||
sc.data.cfg = cfg;
|
||||
sax.openDialog(sc.$dlg.dialog('option', { title: sc.data.cfg.caption || 'Select Sport' }), sc.data.cfg.width || 400, sc.data.cfg.height || 800);
|
||||
sax.openDialog(sc.$dlg.sptCnt.dialog('option', { title: sc.data.cfg.caption || 'Sport Contact' }), sc.data.cfg.width || 400, sc.data.cfg.height || 800);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
sc.fn.displayContact = function ()
|
||||
{
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
sc.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if (sc.$dlg.sptCnt) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { sc.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { sc.fn.onDlgSize(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sc.fn.storeSelectSport(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { sc.fn.cleanUp(); $(this).dialog('close'); };
|
||||
sc.$dlg.sptCnt = $('#dlgSportContact').dialog(opt);
|
||||
}
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
+2
-4
@@ -9,7 +9,6 @@
|
||||
//--------------------------------------------------------------
|
||||
sax.showSportExperience = function (usrSpt)
|
||||
{
|
||||
se.init();
|
||||
//sax.debug('showSportExperience', usrSpt);
|
||||
$('.sax-header .SportName', se.$pnl.sportExp).text(usrSpt.sportName);
|
||||
$('.sax-panel-section').slideUp(750, function () { se.$pnl.sportExp.slideDown(750); });
|
||||
@@ -131,9 +130,8 @@
|
||||
sax.refreshProfileSportsInfo(50);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
se.init=function ()
|
||||
$(function ()
|
||||
{
|
||||
if (se.$pnl.sportExp) return;
|
||||
se.$pnl.sportExp = $('.sax-panel.ProfileSportExperience');
|
||||
se.$pnl.hdr = $('.sax-header', se.$pnl.sportExp);
|
||||
se.$pnl.results = $('.sax-panel-results.ProfileSportExperiences', se.$pnl.sportExp);
|
||||
@@ -151,7 +149,7 @@
|
||||
se.$dpPeriodTo = $('.sax-calendar.ExperiencePeriodTo', se.$frm.sportExp);
|
||||
se.$dpPeriodFrom.datepicker({ onSelect: function () { $(this).change(); } });
|
||||
sax.allowClearCalendar('#frmSportExperience .sax-calendar.ExperiencePeriodTo');
|
||||
}
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/*
|
||||
* Sport selection.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let ss = sax.mdl.selectSport = sax.mdl.selectSport || {};
|
||||
ss.sports = {}; ss.fn = {}; ss.ajax = {};;
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Sport selection config:
|
||||
@@ -18,7 +16,6 @@
|
||||
*/
|
||||
ss.fn.selectSport = function (cfg)
|
||||
{
|
||||
ss.fn.init();
|
||||
ss.cfg = cfg;
|
||||
ss.sportId = cfg.sportId;
|
||||
if (ss.sports.length) ss.fn.showSelectSport();
|
||||
@@ -42,7 +39,6 @@
|
||||
ss.fn.displaySports();
|
||||
sax.openDialog(ss.$dlg.dialog('option', { title: ss.cfg.caption || 'Select Sport' }), ss.cfg.width || 400, ss.cfg.height || 800);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.compareSports = function (a, b)
|
||||
{
|
||||
@@ -51,7 +47,6 @@
|
||||
return a.name.localeCompare(b.name);
|
||||
return comparison;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.displaySports = function ()
|
||||
{
|
||||
@@ -86,7 +81,6 @@
|
||||
let sport = ss.fn.getSport(id);
|
||||
return sport ? sport.name : '';
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.onClickSport = function (sport, $sport)
|
||||
{
|
||||
@@ -113,26 +107,22 @@
|
||||
delete ss.cfg;
|
||||
delete ss.sportId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.onDlgSize = function ()
|
||||
{
|
||||
let $pnl = $('.sax-selectSport-sports.AvailableSports', ss.$dlg);
|
||||
$pnl.outerHeight(Math.floor(ss.$dlg.innerHeight() - $pnl.position().top - ($pnl.outerHeight(true) - $pnl.innerHeight())));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.init = function ()
|
||||
$(function ()
|
||||
{
|
||||
if (ss.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { ss.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { ss.fn.onDlgSize(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { ss.fn.storeSelectSport(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { ss.fn.cleanUp(); $(this).dialog('close'); };
|
||||
ss.$dlg = $('#dlgSelectSport').dialog(opt);
|
||||
}
|
||||
|
||||
});
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Search - Organisations.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let so = sax.searchOrganisations = {};
|
||||
so.ajax = {}; so.data = {}; so.fn = {};
|
||||
let $pnl = so.$pnl = {}, $frm = so.$frm = {}, $dlg = so.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.refreshResults = function (delay)
|
||||
{
|
||||
@@ -63,7 +61,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -89,7 +86,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.selectFilterSport = function ()
|
||||
{
|
||||
@@ -107,7 +103,6 @@
|
||||
$('.FilterSportId,.FilterSportCaption', $frm.filter).val('');
|
||||
so.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.selectFilterRegion = function ()
|
||||
{
|
||||
@@ -125,7 +120,6 @@
|
||||
$('.FilterRegionId,.FilterRegionCaption', $frm.filter).val('');
|
||||
so.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
so.viewItem = function (item)
|
||||
{
|
||||
@@ -155,7 +149,6 @@
|
||||
$dlg.org.dialog('option', 'title', item.name || sax.dlg.title.organisation);
|
||||
sax.openDialog($dlg.org, 720, 800);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -177,7 +170,6 @@
|
||||
|
||||
setTimeout(so.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
@@ -1,14 +1,12 @@
|
||||
/*
|
||||
* Search - Users.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let su = sax.searchUsers = {};
|
||||
su.ajax = {}; su.data = {}; su.fn = {};
|
||||
let $pnl = su.$pnl = {}, $frm = su.$frm = {}, $dlg = su.$dlg = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
su.refreshResults = function (delay)
|
||||
{
|
||||
@@ -60,7 +58,6 @@
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
su.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
@@ -86,7 +83,6 @@
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
su.selectFilterSport = function ()
|
||||
{
|
||||
@@ -104,7 +100,6 @@
|
||||
$('.FilterSportId,.FilterSportCaption', $frm.filter).val('');
|
||||
su.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
su.selectFilterRegion = function ()
|
||||
{
|
||||
@@ -122,7 +117,6 @@
|
||||
$('.FilterRegionId,.FilterRegionCaption', $frm.filter).val('');
|
||||
su.refreshResults();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
su.viewItem = function (item)
|
||||
{
|
||||
@@ -141,7 +135,6 @@
|
||||
$dlg.usr.dialog('option', 'title', item.name || sax.dlg.title.user);
|
||||
sax.openDialog($dlg.usr, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
@@ -163,7 +156,6 @@
|
||||
|
||||
setTimeout(su.refreshResults, 250);
|
||||
});
|
||||
|
||||
//--------------------------------------------------------------
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
Reference in New Issue
Block a user