v1.2.4.1
This commit is contained in:
@@ -167,6 +167,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Identify item.
|
||||
SysId regionId = model.RegionId.ToSysId();
|
||||
if (!SysId.IsValid(regionId))
|
||||
@@ -174,6 +178,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Retrieve item.
|
||||
SaxRegion region = ReferenceMgr.GetRegionById(regionId);
|
||||
disposableItems.Add(region);
|
||||
if (region == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve region for Id: '" + model.RegionId + "'");
|
||||
@@ -182,6 +187,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Construct response.
|
||||
PopulateRegionResponseData(region, responseData.region);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
@@ -204,6 +210,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Validate item properties.
|
||||
model.ValidateRegionData(responseData);
|
||||
if (responseData.HasControlErrors())
|
||||
@@ -212,6 +222,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Retrieve existing item.
|
||||
SysId regionId = model.RegionId.ToSysId();
|
||||
SaxRegion region = ReferenceMgr.GetRegionById(regionId);
|
||||
disposableItems.Add(region);
|
||||
if (region == null && SysId.IsValid(regionId))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve region for Id: '" + model.RegionId + "'");
|
||||
@@ -220,7 +231,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Create new item if required.
|
||||
if (region == null)
|
||||
{
|
||||
region = ReferenceMgr.CreateRegion();
|
||||
disposableItems.Add(region);
|
||||
}
|
||||
|
||||
// Populate item properties.
|
||||
if (model.RegionTypeCode != null)
|
||||
@@ -254,6 +268,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Construct response.
|
||||
PopulateRegionResponseData(region, responseData.region);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
@@ -22,24 +22,28 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
private class SportData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Name { get; set; }
|
||||
public String SportIdParent { get; set; }
|
||||
public String SportNameParent { get; set; }
|
||||
public String SpecialityLabelCode { get; set; }
|
||||
public String SpecialityLabelDesc { get; set; }
|
||||
}
|
||||
private class SportData_Full : SportData_List
|
||||
{
|
||||
}
|
||||
private void PopulateSportResponseData(SaxSport sport, SportData_List data)
|
||||
private void PopulateSportResponseData(SaxSport sport, SaxSport parentSport, SportData_List data)
|
||||
{
|
||||
data.Id = SysId.ToString(sport.Id);
|
||||
data.SportNameParent = parentSport?.Name ?? null;
|
||||
data.SportIdParent = parentSport?.Id.ToString() ?? null;
|
||||
data.Name = sport.Name;
|
||||
data.SpecialityLabelCode = SportSpecialityLabelCodes.GetCodeForType(sport.SpecialityLabel);
|
||||
data.SpecialityLabelDesc = SportSpecialityLabelCodes.GetDescForType(sport.SpecialityLabel);
|
||||
data.StatusCode = sport.StatusCode;
|
||||
data.StatusDesc = sport.StatusDesc;
|
||||
}
|
||||
private void PopulateSportResponseData(SaxSport sport, SportData_Full data)
|
||||
private void PopulateSportResponseData(SaxSport sport, SaxSport parentSport, SportData_Full data)
|
||||
{
|
||||
PopulateSportResponseData(sport, data as SportData_List);
|
||||
PopulateSportResponseData(sport, parentSport, data as SportData_List);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -82,14 +86,15 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Item columns.
|
||||
ColumnDfn colId = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Id);
|
||||
ColumnDfn colParentId = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.SportIdParent);
|
||||
ColumnDfn colParentName = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.ParentSport_Name);
|
||||
ColumnDfn colName = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Name);
|
||||
ColumnDfn colSpecialityLabel = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.SpecialityLabel);
|
||||
ColumnDfn colStatus = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Status);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId,
|
||||
colName, colSpecialityLabel,
|
||||
colStatus
|
||||
colId, colParentId, colParentName,
|
||||
colName, colSpecialityLabel, colStatus
|
||||
};
|
||||
|
||||
// Sort order.
|
||||
@@ -105,6 +110,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
SportData_List sportData = new SportData_List()
|
||||
{
|
||||
Id = values.GetString(colId.DataName),
|
||||
SportIdParent = values.GetString(colParentId.DataName),
|
||||
SportNameParent = values.GetString(colParentName.DataName),
|
||||
Name = values.GetString(colName.DataName),
|
||||
SpecialityLabelCode = SportSpecialityLabelCodes.GetCodeForType(specialityLabel),
|
||||
SpecialityLabelDesc = SportSpecialityLabelCodes.GetDescForType(specialityLabel),
|
||||
@@ -146,6 +153,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Identify item.
|
||||
SysId sportId = model.SportId.ToSysId();
|
||||
if (!SysId.IsValid(sportId))
|
||||
@@ -153,14 +164,20 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Retrieve item.
|
||||
SaxSport sport = ReferenceMgr.GetSportById(sportId);
|
||||
disposableItems.Add(sport);
|
||||
if (sport == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve sport for Id: '" + model.SportId + "'");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.id.not.found"]));
|
||||
}
|
||||
|
||||
// Parent sport.
|
||||
SaxSport parentSport = ReferenceMgr.GetSportById(sport.SportIdParent);
|
||||
disposableItems.Add(parentSport);
|
||||
|
||||
// Construct response.
|
||||
PopulateSportResponseData(sport, responseData.sport);
|
||||
PopulateSportResponseData(sport, parentSport, responseData.sport);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
@@ -183,6 +200,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Validate item properties.
|
||||
model.ValidateSportData(responseData);
|
||||
if (responseData.HasControlErrors())
|
||||
@@ -191,6 +212,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Retrieve existing item.
|
||||
SysId sportId = model.SportId.ToSysId();
|
||||
SaxSport sport = ReferenceMgr.GetSportById(sportId);
|
||||
disposableItems.Add(sport);
|
||||
if (sport == null && SysId.IsValid(sportId))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve sport for Id: '" + model.SportId + "'");
|
||||
@@ -199,9 +221,14 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
|
||||
// Create new item if required.
|
||||
if (sport == null)
|
||||
{
|
||||
sport = ReferenceMgr.CreateSport();
|
||||
disposableItems.Add(sport);
|
||||
}
|
||||
|
||||
// Populate item properties.
|
||||
if (model.SportIdParent != null)
|
||||
sport.SportIdParent = model.SportIdParent.ToSysId();
|
||||
if (model.SportName != null)
|
||||
sport.Name = model.SportName;
|
||||
if (model.SportSpecialityLabelCode != null)
|
||||
@@ -227,8 +254,13 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
// Parent sport.
|
||||
SaxSport parentSport = ReferenceMgr.GetSportById(sport.SportIdParent);
|
||||
disposableItems.Add(parentSport);
|
||||
|
||||
// Construct response.
|
||||
PopulateSportResponseData(sport, responseData.sport);
|
||||
PopulateSportResponseData(sport, parentSport, responseData.sport);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Paging.
|
||||
Model_UsersOnline model = new Model_UsersOnline(Localiser);
|
||||
model.Paging.PageNo = 1;
|
||||
model.Paging.PageLength = 24;
|
||||
model.Paging.PageLength = 12;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
public Model_Organisation(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
AdditionalFiles_JS.Add("js/sax-organisation.js");
|
||||
AdditionalFiles_JS.Add("js/sax-org.js");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
public Model_OrganisationMembers(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
AdditionalFiles_JS.Add("js/sax-organisationMembers.js");
|
||||
AdditionalFiles_JS.Add("js/sax-org-mbr.js");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
public Model_Region(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
AdditionalFiles_JS.Add("js/sax-region.js");
|
||||
AdditionalFiles_JS.Add("js/sax-rgn.js");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -58,12 +58,13 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
SysId sportIdParent = SportIdParent.ToSysId();
|
||||
if (SportIdParent != null && SysId.IsValid(sportIdParent))
|
||||
{
|
||||
String controlName = "SportParent";
|
||||
SaxSport sport = ReferenceMgr.GetSportById(SportIdParent.ToSysId());
|
||||
disposableItems.Add(sport);
|
||||
if (sport == null)
|
||||
responseData.SetControlError(nameof(SportIdParent), Localiser["msg.validation.invalid.value"]);
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]);
|
||||
else if (SysId.IsValid(sport.SportIdParent))
|
||||
responseData.SetControlError(nameof(SportIdParent), Localiser["msg.validation.invalid.value"]);
|
||||
responseData.SetControlError(controlName, Localiser["msg.validation.invalid.value"]);
|
||||
}
|
||||
|
||||
// Sport name.
|
||||
@@ -81,7 +82,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
SysId sportId = SportId.ToSysId();
|
||||
if (SysId.IsValid(sportId))
|
||||
prmSport.IdsExcluded.Add(sportId);
|
||||
prmSport.NamePartial = SportName;
|
||||
prmSport.NameFull = SportName;
|
||||
prmSport.StatusCat = SaxSport.StatusCat.Any;
|
||||
if (ReferenceMgr.GetSportCount(prmSport) > 0)
|
||||
responseData.SetControlError(nameof(SportName), Localiser["msg.validation.duplicate.value"]);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
public Model_User(SaxLocaliser localiser) :
|
||||
base(localiser)
|
||||
{
|
||||
AdditionalFiles_JS.Add("js/sax-user.js");
|
||||
AdditionalFiles_JS.Add("js/sax-usr.js");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@model SaxModel_Admin
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<script src="~/js/sax-resultsPaging.js?@Model.HrefVersion"></script>
|
||||
<script src="~/js/sax-res-pag.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
sax.resultsPaging.msg.pageInfo = '@Localiser.GetJavascriptText("label.page.info","{0}","{1}")';
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-selectCode.css?@Model.HrefVersion" />
|
||||
<script src="~/js/sax-selectCode.js?@Model.HrefVersion"></script>
|
||||
<script src="~/js/sax-sel-cod.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-selectItem.js?@Model.HrefVersion"></script>
|
||||
<script src="~/js/sax-sel-itm.js?@Model.HrefVersion"></script>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-selectOrganisation.css?@Model.HrefVersion" />
|
||||
<script src="~/js/sax-selectOrganisation.js?@Model.HrefVersion"></script>
|
||||
<script src="~/js/sax-sel-org.js?@Model.HrefVersion"></script>
|
||||
<script type="text/javascript">
|
||||
sax.selectOrganisation.dlgTitleSelectOrganisation = '@Localiser.GetJavascriptText("organisation.caption.select.organisation")';
|
||||
</script>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<div class="sax-panel Organisations">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.refresh = '@(Localiser.GetJavascriptText("label.refresh"))';
|
||||
sax.lbl.create = '@(Localiser.GetJavascriptText("label.create"))';
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
sax.lbl.activate = '@(Localiser.GetJavascriptText("label.activate"))';
|
||||
</script>
|
||||
@@ -30,9 +32,14 @@
|
||||
<div class="col">
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action sax-results-refresh"><img src="~/img/action/refresh24.png" alt="@(Localiser["label.refresh"])" title="@(Localiser["label.refresh"])" /></div>
|
||||
<div class="sax-action sax-item-create"><img src="~/img/action/add24.png" alt="@(Localiser["label.create"])" title="@(Localiser["label.create"])" /></div>
|
||||
<div class="fixed">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,6 +95,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu OrganisationFilter">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ViewData["Title"] = "Regions";
|
||||
}
|
||||
|
||||
<div class="">
|
||||
<div class="sax-panel Regions">
|
||||
|
||||
<div class="sax-panel-filter">
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmRegionFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><div class="RegionTypeDesc"></div></div>
|
||||
<div class="col-sm-4"><div class="RegionParentName"></div></div>
|
||||
<div class="col-sm-4 right"><div class="RegionStatusDesc"></div></div>
|
||||
<div class="col-sm-4 right"><div class="sax-note RegionStatusDesc"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
</script>
|
||||
|
||||
@* Filter Panel *@
|
||||
<div class="sax-panel-filter">
|
||||
|
||||
@* Filter Form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSportFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Filter Panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Header - Page caption, paging controls, actions. *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["sport.caption.sports"]</div></div>
|
||||
@@ -51,9 +52,8 @@
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
@@ -81,8 +81,8 @@
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><div class="sax-note SportSpeciality">@Localiser["label.speciality"]: <span class="SportSpecialityLabel"></span></div></div>
|
||||
<div class="col-sm-4"><div class="sax-note "></div></div>
|
||||
<div class="col-sm-4"><div class="SportSpeciality">@Localiser["label.speciality"]: <span class="SportSpecialityLabel"></span></div></div>
|
||||
<div class="col-sm-4"><div class="SportParent">@Localiser["label.parent"]: <span class="SportNameParent"></span></div></div>
|
||||
<div class="col-sm-4 right"><div class="sax-note StatusDesc"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -101,6 +101,7 @@
|
||||
</div>
|
||||
|
||||
<partial name="Panel-SportDialog.cshtml" />
|
||||
<partial name="~/Views/Common/SelectItem.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,14 +7,20 @@
|
||||
<script type="text/javascript">
|
||||
sax.dlg.title.createSport = '@Localiser.GetJavascriptText("sport.caption.sport.create")';
|
||||
sax.dlg.title.updateSport = '@Localiser.GetJavascriptText("sport.caption.sport.update")';
|
||||
sax.dlg.title.selectSport = '@Localiser.GetJavascriptText("sport.caption.sport.select")';
|
||||
</script>
|
||||
|
||||
@* Sport Id form. *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSportId", @class = "sax-form" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.SportId, new { @class = "SportId" })
|
||||
}
|
||||
<div id="dlgSport" class="sax-dialog" title="">
|
||||
|
||||
<div class="spacer2"></div>
|
||||
@* Sport dialog *@
|
||||
<div id="dlgSport" class="sax-dialog" title="">
|
||||
<div class="spacer4"></div>
|
||||
|
||||
@* Sport form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSport", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.SportId, new { @class = "SportId" })
|
||||
@@ -36,6 +42,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Sport Parent *@
|
||||
<div class="sax-form-control SportParent">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifSportNameParent"><span>@Localiser["label.parent"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.SportIdParent, new { @id = "ifSportIdParent", @class = "SportIdParent" })
|
||||
<div class="col"><input type="text" class="SportNameParent sax-input" readonly="readonly" /></div>
|
||||
<div class="fixed"><div class="sax-action ParentSportClear"><img src="~/img/action/delete24.png" alt="@(Localiser["label.clear"])" title="@(Localiser["label.clear"])" /></div></div>
|
||||
<div class="fixed"><button type="button" id="pbSelectParentSport" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Sport Speciality Label *@
|
||||
<div class="sax-form-control SportSpecialityLabel">
|
||||
<div class="row">
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
<style>
|
||||
#dlgDbTable tr.sax-heading td
|
||||
{
|
||||
color:#808080;
|
||||
color: #606060;
|
||||
background-color: #f0f0f0;
|
||||
border-top: 1px solid #808080;
|
||||
border-bottom: 1px solid #808080;
|
||||
}
|
||||
</style>
|
||||
@@ -74,14 +76,14 @@
|
||||
<tr>
|
||||
<td class="right pt2 pr8">Properties:</td>
|
||||
<td>
|
||||
<table class="TableProperties">
|
||||
<table class="sax-striped TableProperties">
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="right pt2 pr8">Columns:</td>
|
||||
<td>
|
||||
<table class="TableColumns">
|
||||
<table class="sax-striped TableColumns">
|
||||
<tr class="sax-heading">
|
||||
<td class="right pl8 pr8">Pos</td>
|
||||
<td class="pl8 pr8">Name</td>
|
||||
@@ -93,7 +95,7 @@
|
||||
<tr>
|
||||
<td class="right pt2 pr8">Indices:</td>
|
||||
<td>
|
||||
<table class="TableIndices">
|
||||
<table class="sax-striped TableIndices">
|
||||
<tr class="sax-heading">
|
||||
<td class="pl8 pr8">Name</td>
|
||||
<td class="center pl8 pr8">Unique</td>
|
||||
|
||||
@@ -102,6 +102,21 @@ table
|
||||
empty-cells: inherit;
|
||||
}
|
||||
|
||||
table.sax-striped
|
||||
{
|
||||
border-spacing: 0 2px;
|
||||
}
|
||||
|
||||
table.sax-striped tr.sax-odd
|
||||
{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
table.sax-striped tr.sax-even
|
||||
{
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
|
||||
th, td
|
||||
{
|
||||
vertical-align: top;
|
||||
|
||||
@@ -100,6 +100,105 @@
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
|
||||
/* Panel header - Burger */
|
||||
|
||||
.sax-header ul.nav.sax-burger
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu
|
||||
{
|
||||
padding: 4px 8px 4px 4px;
|
||||
box-shadow: 0 0 8px 2px #80808080;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item
|
||||
{
|
||||
margin: 2px 4px 2px 0;
|
||||
padding: 2px 4px 2px 30px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-refresh
|
||||
{
|
||||
background-image: url('../img/action/refresh24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-add
|
||||
{
|
||||
background-image: url('../img/action/add24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-edit
|
||||
{
|
||||
background-image: url('../img/action/edit24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-remove
|
||||
{
|
||||
background-image: url('../img/action/delete24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-experience
|
||||
{
|
||||
background-image: url('../img/action/trophy24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-user
|
||||
{
|
||||
background-image: url('../img/action/user24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-users
|
||||
{
|
||||
background-image: url('../img/action/users24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-mail
|
||||
{
|
||||
background-image: url('../img/action/mail24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-process
|
||||
{
|
||||
background-image: url('../img/action/process24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-close
|
||||
{
|
||||
background-image: url('../img/action/prev24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-itemlock
|
||||
{
|
||||
background-image: url('../img/action/lock24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-unlock
|
||||
{
|
||||
background-image: url('../img/action/unlock24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item .sax-label
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover .sax-label
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
box-shadow: 0 0 2px 1px #80808080;
|
||||
}
|
||||
|
||||
/* Data Items panel */
|
||||
|
||||
.sax-panel-results
|
||||
|
||||
+47
-26
@@ -10,7 +10,7 @@
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
op.refreshResults = function (delay)
|
||||
{
|
||||
if (!op.awaitingRefreshResponse)
|
||||
{
|
||||
@@ -21,14 +21,6 @@
|
||||
sax.doAjaxRequest(op.ajax.refreshResults, delay || 50);
|
||||
op.awaitingRefreshResponse = true;
|
||||
}
|
||||
op.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.results).clone();
|
||||
}
|
||||
op.getDropdownItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Organisation li.sax-dropdown-item', $pnl.results);
|
||||
}
|
||||
op.doRefreshResults = function (response)
|
||||
{
|
||||
//sax.debug('doRefreshResults', response);
|
||||
@@ -36,12 +28,18 @@
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
sax.refreshPaging(response, '#frmOrganisationFilter', sax.refreshResults);
|
||||
sax.refreshPaging(response, '#frmOrganisationFilter', op.refreshResults);
|
||||
if (!response.success) return;
|
||||
// Reference data - Statuses.
|
||||
if (response.defaultStatusCode) sax.data.defaultStatusCode = response.defaultStatusCode;
|
||||
if (response.statuses)
|
||||
sax.populateSelectCodeDesc('#cbOrganisationStatus', response.statuses);
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(op.getFilterMenuOption(sax.lbl.refresh, function () { op.refreshResults(); }, 'sax-refresh'));
|
||||
$mnu.append(op.getFilterMenuOption(sax.lbl.create, function () { op.createItem(); }, 'sax-add'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.organisations;
|
||||
if (!items.length)
|
||||
@@ -62,20 +60,46 @@
|
||||
$('.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);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item);
|
||||
$mnu.append(op.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.edit).end().on('click', function () { op.updateItem(item, $item) }));
|
||||
$mnu.append(op.getItemMenuOption(sax.lbl.edit, function () { op.updateItem(item, $item) }, 'sax-edit'));
|
||||
if (item.awaiting)
|
||||
$mnu.append(op.getDropdownItemTemplate().clone().find('div.sax-label').text(sax.lbl.activate).end().on('click', function () { op.activateItem(item) }));
|
||||
$mnu.append(op.getItemMenuOption(sax.lbl.activate, function () { op.activateItem(item) }, 'sax-unlock'));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { op.updateItem(item, $item) });
|
||||
$item.off('dblclick').on('dblclick', function () { op.updateItem(item, $item) });
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-burger .sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.OrganisationFilter li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
op.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.results).clone();
|
||||
}
|
||||
op.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Organisation li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
op.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return op.getMenuOption(op.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
op.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return op.getMenuOption(op.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
op.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.selectFilterSport = function ()
|
||||
{
|
||||
@@ -92,12 +116,12 @@
|
||||
let frm = $frm.filter;
|
||||
$('.FilterOrganisationSportId', frm).val(spt.id);
|
||||
$('.FilterOrganisationSportCaption', frm).val(spt.name);
|
||||
sax.refreshResults();
|
||||
op.refreshResults();
|
||||
}
|
||||
op.clearFilterSport = function ()
|
||||
{
|
||||
$('.FilterOrganisationSportId,.FilterOrganisationSportCaption', $frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
op.refreshResults();
|
||||
}
|
||||
op.populateSports = function (nextFn)
|
||||
{
|
||||
@@ -151,12 +175,12 @@
|
||||
let frm = $frm.filter;
|
||||
$('.FilterOrganisationRegionId', frm).val(rgn.id);
|
||||
$('.FilterOrganisationRegionCaption', frm).val(rgn.name);
|
||||
sax.refreshResults();
|
||||
op.refreshResults();
|
||||
}
|
||||
op.clearFilterRegion = function ()
|
||||
{
|
||||
$('.FilterOrganisationRegionId,.FilterOrganisationRegionCaption', $frm.filter).val('');
|
||||
sax.refreshResults();
|
||||
op.refreshResults();
|
||||
}
|
||||
op.populateRegions = function (nextFn)
|
||||
{
|
||||
@@ -252,10 +276,10 @@
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Organisation', $pnl.results).clone();
|
||||
$item = op.getItemTemplate();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
$item.replaceWith(op.populateItem(op.getItemTemplate(), item));
|
||||
op.populateItem($item, item);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -331,12 +355,9 @@
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.orgs);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.orgs);
|
||||
|
||||
$('.sax-action.sax-item-create', $pnl.filter).on('click', function () { op.createItem(); });
|
||||
$('.sax-action.sax-results-refresh', $pnl.filter).on('click', function () { sax.refreshResults(); });
|
||||
|
||||
$frm.filter = $('#frmOrganisationFilter');
|
||||
$('.FilterOrganisation', $frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
$('.FilterOrganisationCategory,.FilterOrganisationStatusCategory', $frm.filter).on('change', function () { sax.refreshResults(50); });
|
||||
$('.FilterOrganisation', $frm.filter).on('input', function () { op.refreshResults(250); });
|
||||
$('.FilterOrganisationCategory,.FilterOrganisationStatusCategory', $frm.filter).on('change', function () { op.refreshResults(50); });
|
||||
$frm.filter.on('dblclick', '.FilterOrganisationSportCaption', op.selectFilterSport).on('click', '.FilterSportSelect', op.selectFilterSport).on('click', '.FilterSportClear', op.clearFilterSport);
|
||||
$frm.filter.on('dblclick', '.FilterOrganisationRegionCaption', op.selectFilterRegion).on('click', '.FilterRegionSelect', op.selectFilterRegion).on('click', '.FilterRegionClear', op.clearFilterRegion);
|
||||
$frm.orgId = $('#frmOrganisationId');
|
||||
@@ -355,7 +376,7 @@
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.activate = $('#dlgOrganisationActivation').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
setTimeout(op.refreshResults, 250);
|
||||
});
|
||||
|
||||
}(window, window.document));
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
$('.RegionCountryIso2Code', $item).text(item.countryIso2Code);
|
||||
$('.RegionTypeDesc', $item).text(item.regionTypeDesc);
|
||||
$('.RegionParentName', $item).text(item.parentName);
|
||||
$('.RegionStatusDesc', $item).text(item.statusDesc);
|
||||
$('.RegionStatusDesc', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
$('.sax-caption .sax-action, .sax-actions .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item.id) })
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item.id) })
|
||||
$('.sax-panel-results .sax-panel-messages').hide().empty();
|
||||
@@ -5,30 +5,33 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm, $dlg = sax.$dlg;
|
||||
let sm = sax.sportMgt = {
|
||||
$pnl: {}, $frm: {}, $dlg: {}, ajax: {}, data: {}
|
||||
};
|
||||
let $pnl = sm.$pnl, $frm = sm.$frm, $dlg = sm.$dlg;
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
sm.refreshResults = function (delay)
|
||||
{
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
if (!sm.awaitingRefreshResponse)
|
||||
{
|
||||
$('.sax-burger', $pnl.filter).hide();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmSportFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmSportFilter', callbackFn: sm.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
sax.awaitingRefreshResponse = true;
|
||||
sm.awaitingRefreshResponse = true;
|
||||
}
|
||||
sax.doRefreshResults = function (response)
|
||||
sm.doRefreshResults = function (response)
|
||||
{
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
delete sm.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
sax.refreshPaging(response, '#frmSportFilter', sax.refreshResults);
|
||||
sax.refreshPaging(response, '#frmSportFilter', sm.refreshResults);
|
||||
if (!response.success) return;
|
||||
// Reference data - Statuses.
|
||||
if (response.defaultStatusCode) sax.data.defaultStatusCode = response.defaultStatusCode;
|
||||
@@ -37,32 +40,34 @@
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.create, function () { sax.createItem(); }));
|
||||
$mnu.append(sm.getFilterMenuOption(sax.lbl.refresh, function () { sm.refreshResults(); }, 'sax-refresh'));
|
||||
$mnu.append(sm.getFilterMenuOption(sax.lbl.create, function () { sm.createItem(); }, 'sax-add'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.sports;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dataNoneFound + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
$items.append(sax.populateItem(sax.getItemTemplate(), items[itemIdx]));
|
||||
$items.append(sm.populateItem(sm.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
sm.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$('.SportName', $item).text(item.name);
|
||||
$('.SportNameParent', $item).text(item.sportNameParent);
|
||||
$('.SportParent', $item).toggle(!!item.sportNameParent);
|
||||
$('.SportSpecialityLabel', $item).text(item.specialityLabelDesc);
|
||||
$('.SportSpeciality', $item).toggle(!!item.specialityLabelCode);
|
||||
$('.StatusDesc', $item).text(item.statusDesc);
|
||||
$('.StatusDesc', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
$('.sax-caption .sax-action').toggleClass('sax-action', !item.deleted);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, function () { sax.updateItem(item) }));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item) });
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item) });
|
||||
$mnu.append(sm.getItemMenuOption(sax.lbl.edit, function () { sm.updateItem(item) }, 'sax-edit'));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { sm.updateItem(item) });
|
||||
$item.off('dblclick').on('dblclick', function () { sm.updateItem(item) });
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -70,50 +75,55 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
sm.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.SportFilter li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
sm.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Sport', $pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
sm.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Sport li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn)
|
||||
sm.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn);
|
||||
return sm.getMenuOption(sm.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn)
|
||||
sm.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn);
|
||||
return sm.getMenuOption(sm.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn)
|
||||
sm.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.createItem = function ()
|
||||
sm.createItem = function ()
|
||||
{
|
||||
sm.clearItem();
|
||||
$dlg.sport.dialog('option', 'title', sax.dlg.title.createSport);
|
||||
sax.openDialog($dlg.sport, 600, 600);
|
||||
}
|
||||
sm.clearItem = function ()
|
||||
{
|
||||
let frm = $frm.sport;
|
||||
$('.SportId,input[type="text"],textarea,select', frm).val('');
|
||||
$('.SportStatus', frm).val(sax.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
$dlg.sport.dialog('option', 'title', sax.dlg.title.createSport);
|
||||
sax.openDialog($dlg.sport, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (item)
|
||||
sm.updateItem = function (item)
|
||||
{
|
||||
sm.clearItem();
|
||||
$('.SportId', $frm.sportId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Sport/Ajax/GetItem', formId: 'frmSportId', callbackFn: sax.onUpdateItem };
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Sport/Ajax/GetItem', formId: 'frmSportId', callbackFn: sm.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
}
|
||||
sax.onUpdateItem = function (response)
|
||||
sm.onUpdateItem = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItem', response);
|
||||
let frm = $frm.sport;
|
||||
@@ -121,6 +131,8 @@
|
||||
if (!response.success) return;
|
||||
let item = response.sport;
|
||||
$('.SportId', frm).val(item.id);
|
||||
$('.SportIdParent', frm).val(item.sportIdParent);
|
||||
$('.SportNameParent', frm).val(item.sportNameParent);
|
||||
$('.SportName', frm).val(item.name);
|
||||
$('.SportSpecialityLabel', frm).val(item.specialityLabelCode);
|
||||
$('.SportStatus', frm).val(item.statusCode);
|
||||
@@ -130,12 +142,52 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.storeItem = function ()
|
||||
sm.populateSports = function (nextFn)
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Sport/Ajax/StoreItem', formId: 'frmSport', callbackFn: sax.onStoreItem };
|
||||
let handleResponse = function (response)
|
||||
{
|
||||
if (response && response.success && response.sports)
|
||||
sm.data.sports = response.sports;
|
||||
if (nextFn) nextFn();
|
||||
}
|
||||
sm.ajax.sports = sm.ajax.sports || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmNavigate', callbackFn: handleResponse };
|
||||
sax.doAjaxRequest(sm.ajax.sports, 50);
|
||||
}
|
||||
sm.selectParentSport = function ()
|
||||
{
|
||||
if (!sm.data.sports)
|
||||
sm.populateSports(sm.showSelectParentSport);
|
||||
else sm.showSelectParentSport();
|
||||
}
|
||||
sm.showSelectParentSport = function ()
|
||||
{
|
||||
let sports = [];
|
||||
for (const spt of sm.data.sports || [])
|
||||
{
|
||||
if (spt.sportIdParent * 1 || 'a' * 1 || spt.id == $('.SportId', $frm.org).val()) continue;
|
||||
sports.push(spt);
|
||||
}
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, items: sports, itemId: $('.SportIdParent', $frm.sport).val(), fnCallback: sm.onParentSportSelected });
|
||||
}
|
||||
sm.onParentSportSelected = function (spt)
|
||||
{
|
||||
let frm = $frm.org;
|
||||
$('.SportIdParent', frm).val(spt.id);
|
||||
$('.SportNameParent', frm).val(spt.name);
|
||||
sax.clearControlError($('.SportParent', frm));
|
||||
}
|
||||
sm.clearParentSport = function ()
|
||||
{
|
||||
$('.SportIdParent,.SportNameParent', $frm.org).val('');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sm.storeItem = function ()
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Sport/Ajax/StoreItem', formId: 'frmSport', callbackFn: sm.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
}
|
||||
sax.onStoreItem = function (response)
|
||||
sm.onStoreItem = function (response)
|
||||
{
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
@@ -146,32 +198,35 @@
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = sax.getItemTemplate();
|
||||
$item = sm.getItemTemplate();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
sm.populateItem($item, item);
|
||||
// Force repopulation of sprts.
|
||||
delete sm.data.sports;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
$pnl.sports = $('.sax-panel.Sports');
|
||||
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.sports);
|
||||
$frm.filter = $('#frmSportFilter', $pnl.filter);
|
||||
$('.FilterSport', $frm.filter).on('input', function () { sm.refreshResults(250); });
|
||||
$pnl.results = $('.sax-panel-results', $pnl.sports);
|
||||
|
||||
sax.$frm.filter = $('#frmSportFilter');
|
||||
$('.FilterSport', sax.$frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
sax.$frm.sportId = $('#frmSportId');
|
||||
sax.$frm.sport = $('#frmSport');
|
||||
$('.sax-input', sax.$frm.sport).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select', sax.$frm.sport).on('change', function () { sax.clearControlError(this); });
|
||||
$frm.sportId = $('#frmSportId');
|
||||
$frm.sport = $('#frmSport');
|
||||
$frm.sport.on('input', '.sax-input', function () { sax.clearControlError(this); }).on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
$frm.sport.on('dblclick', '.SportNameParent', sm.selectParentSport).on('click', '#pbSelectParentSport', sm.selectParentSport).on('click', '.ParentSportClear', sm.clearParentSport);
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sm.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.sport = $('#dlgSport').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
setTimeout(sm.refreshResults, 250);
|
||||
});
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
for (let prtIdx = 0; prtIdx < prts.length; prtIdx++)
|
||||
{
|
||||
let prt = prts[prtIdx];
|
||||
let $prt = sd.getTablePropertyTemplate();
|
||||
let $prt = sd.getTablePropertyTemplate().addClass('sax-' + (prtIdx % 2 ? 'even' : 'odd'));
|
||||
$('.Label', $prt).text(prt.label);
|
||||
$('.Value', $prt).text(prt.value);
|
||||
$prts.append($prt);
|
||||
@@ -90,7 +90,7 @@
|
||||
for (let colIdx = 0; colIdx < cols.length; colIdx++)
|
||||
{
|
||||
let col = cols[colIdx];
|
||||
let $col = sd.getTableColumnTemplate();
|
||||
let $col = sd.getTableColumnTemplate().addClass('sax-' + (colIdx % 2 ? 'even' : 'odd'));
|
||||
$('.Pos', $col).text(col.pos);
|
||||
$('.Name', $col).text(col.name);
|
||||
$('.Format', $col).text(col.format);
|
||||
@@ -103,7 +103,7 @@
|
||||
for (let idxIdx = 0; idxIdx < idxs.length; idxIdx++)
|
||||
{
|
||||
let idx = idxs[idxIdx];
|
||||
let $idx = sd.getTableIndexTemplate();
|
||||
let $idx = sd.getTableIndexTemplate().addClass('sax-' + (idxIdx % 2 ? 'even' : 'odd'));
|
||||
$('.Name', $idx).text(idx.name);
|
||||
for (const col of idx.columns)
|
||||
$('.Columns', $idx).append($('<div>').text(col.name));
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }, 'sax-refresh'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.users;
|
||||
@@ -85,17 +85,17 @@
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.User li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn)
|
||||
sax.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn);
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn)
|
||||
sax.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn);
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn)
|
||||
sax.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
+10
-10
@@ -41,8 +41,8 @@
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.create, function () { sax.createItem(); }));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }, 'sax-refresh'));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.create, function () { sax.createItem(); }, 'sax-add'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.users;
|
||||
@@ -72,10 +72,10 @@
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item);
|
||||
if (!item.deleted)
|
||||
{
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, function () { sax.updateItem(item) }));
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, function () { sax.updateItem(item) }, 'sax-edit'));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item) });
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item) });
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.emails, function () { sax.userEmails(item) }));
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.emails, function () { sax.userEmails(item) }, 'sax-mail'));
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -95,17 +95,17 @@
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.User li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn)
|
||||
sax.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn);
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn)
|
||||
sax.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn);
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn)
|
||||
sax.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -41,7 +41,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
private void PopulateProfileSportResponseData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseData_Item data)
|
||||
{
|
||||
data.Id = SysId.ToString(userSport.Id);
|
||||
data.Id = model.EncryptId(userSport.Id);
|
||||
data.SportId = model.GetEncryptedSportId(userSport.SportId);
|
||||
data.SportName = sport.Name;
|
||||
data.SportSpecialityLabel = model.GetSportSpecialityLabel(userSport.SportId);
|
||||
@@ -113,7 +113,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
SysId sportId = new SysId(values.GetLong(colSportId.DataName));
|
||||
ProfileSportResponseData_List userSportData = new ProfileSportResponseData_List()
|
||||
{
|
||||
Id = values.GetLong(colId.DataName).ToString(),
|
||||
Id = model.EncryptId(new SysId(values.GetLong(colId.DataName))),
|
||||
SportId = model.GetEncryptedSportId(sportId),
|
||||
SportName = values.GetString(colSportName.DataName),
|
||||
SportSpecialityLabel = model.GetSportSpecialityLabel(sportId),
|
||||
@@ -158,6 +158,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
RefreshModel(model);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Identify item.
|
||||
SysId userSportId = model.ExtractSysId(model.UserSportId);
|
||||
if (!SysId.IsValid(userSportId))
|
||||
@@ -165,6 +169,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Retrieve item.
|
||||
SaxUserSport userSport = AccountMgr.GetUserSportById(userSportId);
|
||||
disposableItems.Add(userSport);
|
||||
if (userSport == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve User Sport for Id: '" + model.UserSportId + "'");
|
||||
@@ -173,6 +178,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Retrieve sport.
|
||||
SaxSport sport = ReferenceMgr.GetSportById(userSport.SportId);
|
||||
disposableItems.Add(sport);
|
||||
if (sport == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve Sport for Id: '" + userSport.SportId + "'");
|
||||
@@ -182,6 +188,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Construct response.
|
||||
PopulateProfileSportResponseData(model, userSport, sport, responseData.Sport);
|
||||
responseData.Success = true;
|
||||
}
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
@@ -201,6 +208,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
RefreshModel(model);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Validate item properties.
|
||||
model.ValidateProfileSportData(responseData);
|
||||
if (responseData.HasControlErrors())
|
||||
@@ -223,6 +234,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Retrieve the sport.
|
||||
SysId sportId = model.ExtractSysId(model.ProfileSportId);
|
||||
SaxSport sport = ReferenceMgr.GetSportById(sportId);
|
||||
disposableItems.Add(sport);
|
||||
if (sport == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve Sport for Id: " + sportId);
|
||||
@@ -231,6 +243,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Retrieve existing item.
|
||||
SaxUserSport userSport = AccountMgr.GetUserSportById(userSportId);
|
||||
disposableItems.Add(userSport);
|
||||
if (userSport == null && SysId.IsValid(userSportId))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve User Sport for Id: '" + model.UserSportId + "'");
|
||||
@@ -256,6 +269,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
userSport = AccountMgr.GetUserSport(prmUserSport);
|
||||
if (userSport != null)
|
||||
{
|
||||
disposableItems.Add(userSport);
|
||||
if (userSport.Status == SaStatus.Deleted)
|
||||
{
|
||||
SaLogger.Info(fn + " Resurrecting User Sport with status: " + userSport.StatusDesc + ". Id: " + SysId.ToString(userSport.Id));
|
||||
@@ -268,7 +282,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
userSport = AccountMgr.CreateUserSport(UserAccountId, sportId);
|
||||
disposableItems.Add(userSport);
|
||||
}
|
||||
}
|
||||
|
||||
// Populate item properties.
|
||||
@@ -303,6 +320,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Construct response.
|
||||
PopulateProfileSportResponseData(model, userSport, sport, responseData.Sport);
|
||||
responseData.Success = true;
|
||||
}
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -29,9 +29,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Common response data.
|
||||
private class SportExperienceResponseData_List
|
||||
private class SportExperienceResponseData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String UserSportId { get; set; }
|
||||
public String Period { get; set; }
|
||||
public String PeriodFrom { get; set; }
|
||||
|
||||
@@ -182,8 +182,18 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
indexContext.EffectiveTo = DateTime.Today;
|
||||
|
||||
// Sport and region combinations.
|
||||
List<SysId> sportIds = new List<SysId>();
|
||||
foreach (SysId sportId in sessionData.Profile.Sports.Select(item => item.SportId))
|
||||
{
|
||||
if (sportIds.Contains(sportId)) continue;
|
||||
sportIds.AddId(sportId);
|
||||
// Include child sports.
|
||||
sportIds.AddIds(model.GetChildSports_Active(sportId).Select(item => item.Id));
|
||||
model.GetSportCaption(sportId);
|
||||
}
|
||||
foreach (SysId sportId in sportIds)
|
||||
{
|
||||
// Regions.
|
||||
if (SysId.IsValid(sessionData.User.RegionIdProvince))
|
||||
indexContext.SportRegionIdsIncluded.Add(new SaxActivityIndex.SportRegionIds(sportId, sessionData.User.RegionIdProvince));
|
||||
else if (SysId.IsValid(sessionData.User.RegionIdCountry))
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
private class ArticleData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String OrganisationId { get; set; }
|
||||
public String OrganisationName { get; set; }
|
||||
public String Headline { get; set; }
|
||||
public String Summary { get; set; }
|
||||
public String RegionCaptionPrimary { get; set; }
|
||||
@@ -69,7 +70,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public String PublishedOn_Calendar { get; set; }
|
||||
public ArticleContentData Content { get; } = new ArticleContentData();
|
||||
}
|
||||
private void PopulateArticleResponseData(Model_Article model, SaxArticle article, ArticleData_List data)
|
||||
private void PopulateArticleResponseData(Model_Article model, SaxArticle article, SaxOrganisation organisation, ArticleData_List data)
|
||||
{
|
||||
data.Id = model.EncryptId(article.Id);
|
||||
data.OrganisationId = SysId.ToString(article.OrganisationId);
|
||||
@@ -82,9 +83,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
data.StatusCode = article.StatusCode;
|
||||
data.StatusDesc = article.StatusDesc;
|
||||
}
|
||||
private void PopulateArticleResponseData(Model_Article model, SaxArticle article, ArticleData_Full data)
|
||||
private void PopulateArticleResponseData(Model_Article model, SaxArticle article, SaxOrganisation organisation, ArticleData_Full data)
|
||||
{
|
||||
PopulateArticleResponseData(model, article, data as ArticleData_List);
|
||||
PopulateArticleResponseData(model, article, organisation, data as ArticleData_List);
|
||||
data.RegionIdPrimary = model.GetEncryptedRegionId(article.RegionIdPrimary);
|
||||
data.SportIdPrimary = model.GetEncryptedSportId(article.SportIdPrimary);
|
||||
data.Published = DateUtil.IsValid(article.PublishedAt) ? true : (bool?)null;
|
||||
@@ -207,6 +208,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmArticle.UserAccountIdsAuthorIncluded.Add(sessionData.User.UserAccountId);
|
||||
if (SysId.IsValid(organisationIdFilter))
|
||||
prmArticle.OrganisationIdsIncluded.Add(organisationIdFilter);
|
||||
else
|
||||
prmArticle.ExcludeOrganisationArticles = true;
|
||||
prmArticle.ArticleFilter = model.Filter.Article;
|
||||
prmArticle.StatusCat = SaxArticle.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)ActivityMgr.GetArticleCount(prmArticle);
|
||||
@@ -215,6 +218,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Item columns.
|
||||
ColumnDfn colId = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.Id);
|
||||
ColumnDfn colOrganisationId = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.OrganisationId);
|
||||
ColumnDfn colOrganisationName = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.Organisation_Name);
|
||||
ColumnDfn colHeadline = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.Headline);
|
||||
ColumnDfn colSummary = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.Summary);
|
||||
ColumnDfn colRegionIdPrimary = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.RegionIdPrimary);
|
||||
@@ -224,7 +228,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
ColumnDfn colCreatedOn = ActivityMgr.GetArticleColumnDfn(SaxArticle.Column.CreateOn_Date);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId, colOrganisationId, colHeadline, colSummary,
|
||||
colId, colOrganisationId, colOrganisationName, colHeadline, colSummary,
|
||||
colRegionIdPrimary, colSportIdPrimary, colPublishedOn,
|
||||
colStatus, colCreatedOn
|
||||
};
|
||||
@@ -243,6 +247,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
Id = model.EncryptId(new SysId(values.GetLong(colId.DataName))),
|
||||
OrganisationId = model.EncryptId(new SysId(values.GetLong(colOrganisationId.DataName))),
|
||||
OrganisationName = values.GetString(colOrganisationName.DataName),
|
||||
Headline = values.GetString(colHeadline.DataName),
|
||||
Summary = values.GetString(colSummary.DataName),
|
||||
RegionCaptionPrimary = model.GetRegionCaption(values.GetString(colRegionIdPrimary.DataName).ToSysId()),
|
||||
@@ -315,6 +320,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Organisation.
|
||||
SaxOrganisation organisation = AccountMgr.GetOrganisationById(article.OrganisationId);
|
||||
disposableItems.Add(organisation);
|
||||
|
||||
// Delete upload images.
|
||||
SaxItemImage.Params prmItemImage = new SaxItemImage.Params();
|
||||
prmItemImage.ItemIdsIncluded.Add(new ItemId((short)Sax.DataItemType.Article, articleId));
|
||||
@@ -330,7 +339,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
PopulateArticleResponseData(model, article, responseData.Article);
|
||||
PopulateArticleResponseData(model, article, organisation, responseData.Article);
|
||||
}
|
||||
responseData.Success = true;
|
||||
return Json(responseData);
|
||||
@@ -484,6 +493,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
SaxSessionData_Online sessionData = SessionData_Online;
|
||||
RefreshModel(model);
|
||||
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Validate item properties.
|
||||
model.ValidateArticleData(responseData);
|
||||
if (responseData.HasControlErrors())
|
||||
@@ -527,6 +540,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Retrieve existing item.
|
||||
SaxArticle article = ActivityMgr.GetArticleById(articleId);
|
||||
disposableItems.Add(article);
|
||||
if (article == null && SysId.IsValid(articleId))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve article for Id: '" + model.ArticleId + "'");
|
||||
@@ -547,9 +561,16 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
// Organisation.
|
||||
SaxOrganisation organisation = AccountMgr.GetOrganisationById(article.OrganisationId);
|
||||
disposableItems.Add(organisation);
|
||||
|
||||
// Create new item if required.
|
||||
if (article == null)
|
||||
{
|
||||
article = ActivityMgr.CreateArticle(sessionData.User.UserAccountId, organisationId);
|
||||
disposableItems.Add(article);
|
||||
}
|
||||
|
||||
// Populate item properties.
|
||||
if (model.ArticleRegionId != null)
|
||||
@@ -580,6 +601,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
prmItemImage.ImageTypesIncluded.Add(Sax.ImageType.ArticleUpload);
|
||||
prmItemImage.StatusCat = SaxItemImage.StatusCat.NotDeleted;
|
||||
List<SaxItemImage> itemImages = ItemDataMgr.GetItemImageList(prmItemImage);
|
||||
disposableItems.AddRange(itemImages);
|
||||
|
||||
// If Article doesn't yet exist, create it now so that images can be assigned.
|
||||
bool articleCreated = false;
|
||||
@@ -664,8 +686,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
PopulateArticleResponseData(model, article, responseData.Article);
|
||||
PopulateArticleResponseData(model, article, organisation, responseData.Article);
|
||||
responseData.Success = true;
|
||||
}
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,71 +129,50 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
}
|
||||
private OrganisationData GetOrganisationForFilter(SysId filterOrganisationId, String filterOrganisationCaption, Sax.OrganisationRole organisationRole)
|
||||
{
|
||||
// Check that user is associated with organisations.
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.UserAccountIdsIncluded.Add(UserAccountId);
|
||||
prmUserOrganisation.OrganisationStatusCat = SaxOrganisation.StatusCat.ActiveOnly;
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.ActiveOnly;
|
||||
if (AccountMgr.GetUserOrganisationCount(prmUserOrganisation) < 1)
|
||||
return null;
|
||||
OrganisationData organisationData = null;
|
||||
|
||||
// Roles (any) required for organisation list.
|
||||
List <Sax.OrganisationRole> requiredRoles = new List<Sax.OrganisationRole>() { Sax.OrganisationRole.Admin };
|
||||
if (organisationRole > 0)
|
||||
requiredRoles.Add(organisationRole);
|
||||
|
||||
// Retrieve specified organisation.
|
||||
OrganisationData organisationData = null;
|
||||
if (SysId.IsValid(filterOrganisationId))
|
||||
{
|
||||
organisationData = new OrganisationData(filterOrganisationId) { Caption = filterOrganisationCaption };
|
||||
using (SaxOrganisation organisation = AccountMgr.GetOrganisationById(organisationData.Id))
|
||||
{
|
||||
// Validate organisation.
|
||||
if (organisation != null && organisation.IsStatusActive && AccountMgr.UserHasAnyOrganisationRole(UserAccountId, organisation.Id, requiredRoles))
|
||||
organisationData.Caption = organisation.Name;
|
||||
else
|
||||
organisationData = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (organisationData == null)
|
||||
{
|
||||
// Pick the first valid Organisation that the user is a member of.
|
||||
ColumnDfn colOrganisationId = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.OrganisationId);
|
||||
ColumnDfn colOrganisationName = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.Organisation_Name);
|
||||
prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
// Filter to identify suitable organisations that user is a member of and has the appropriate rights.
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.UserAccountIdsIncluded.Add(UserAccountId);
|
||||
if (organisationData != null && SysId.IsValid(organisationData.Id))
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Add(organisationData.Id);
|
||||
prmUserOrganisation.OrganisationStatusCat = SaxOrganisation.StatusCat.ActiveOnly;
|
||||
prmUserOrganisation.OrganisationMembersOnly = true;
|
||||
prmUserOrganisation.OrganisationRolesAny.AddRange(requiredRoles);
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.ActiveOnly;
|
||||
|
||||
// Restrict to specified Organisation.
|
||||
if (SysId.IsValid(filterOrganisationId))
|
||||
{
|
||||
// Verify that the specified organisation is valid for the filter conditions.
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Add(filterOrganisationId);
|
||||
if (AccountMgr.GetUserOrganisationCount(prmUserOrganisation) < 1)
|
||||
// Specified organisation is not valid - remove restriction.
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Clear();
|
||||
}
|
||||
|
||||
// Pick the first valid Organisation.
|
||||
ColumnDfn colOrganisationId = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.OrganisationId);
|
||||
ColumnDfn colOrganisationName = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.Organisation_Name);
|
||||
prmUserOrganisation.SortColumns.Add(colOrganisationName);
|
||||
prmUserOrganisation.ResultsPaging.PageLength = 1;
|
||||
prmUserOrganisation.ResultsPaging.PageNo = 1;
|
||||
using (DbResultSet resultSet = AccountMgr.ExecuteUserOrganisationQuery(new List<ColumnDfn>() { colOrganisationId, colOrganisationName }, prmUserOrganisation))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
if (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
SysId organisationId = new SysId(values.GetLong(colOrganisationId.DataName));
|
||||
if (SysId.IsValid(organisationId))
|
||||
{
|
||||
organisationData = new OrganisationData(organisationId);
|
||||
organisationData.Caption = values.GetString(colOrganisationName.DataName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SysId.IsValid(organisationData.Id) && StringUtil.IsEmpty(organisationData.Caption))
|
||||
organisationData = new OrganisationData(organisationId)
|
||||
{
|
||||
// Organisation has been identified but no caption available as yet.
|
||||
using (SaxOrganisation organisation = AccountMgr.GetOrganisationById(organisationData.Id))
|
||||
{
|
||||
if (organisation != null)
|
||||
organisationData.Caption = organisation.Name;
|
||||
Caption = values.GetString(colOrganisationName.DataName)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return organisationData;
|
||||
|
||||
@@ -166,6 +166,8 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
}
|
||||
public SysId DecryptId(String encryptedId)
|
||||
{
|
||||
if (StringUtil.IsEmpty(encryptedId))
|
||||
return new SysId();
|
||||
if (StringUtil.IsNumeric(encryptedId))
|
||||
return encryptedId.ToSysId();
|
||||
NameValueCollection idObfuscationParams = SaxController_Base.DecryptParameters(encryptedId, Base64IV_IdObfuscation, Base64Key_IdObfuscation);
|
||||
@@ -230,6 +232,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
{
|
||||
/// <summary>Encrypted Id</summary>
|
||||
public String Id { get; set; }
|
||||
public String SportIdParent { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String StatusCode { get; set; }
|
||||
public String StatusDesc { get; set; }
|
||||
@@ -242,6 +245,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
SportData sportData = new SportData()
|
||||
{
|
||||
Id = GetEncryptedSportId(sport.Id),
|
||||
SportIdParent = SysId.IsValid(sport.SportIdParent) ? GetEncryptedSportId(sport.SportIdParent) : null,
|
||||
Name = GetSportCaption(sport),
|
||||
StatusCode = sport.StatusCode,
|
||||
StatusDesc = Localiser.GetStatusCaption(sport.Status)
|
||||
@@ -250,6 +254,14 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
}
|
||||
return sports;
|
||||
}
|
||||
public List<SaxSport.Data> GetChildSports_Active(SysId sportIdParent)
|
||||
{
|
||||
List<SaxSport.Data> sports = new List<SaxSport.Data>();
|
||||
if (!SysId.IsValid(sportIdParent)) return sports;
|
||||
List<SaxSport.Data> activeSports = DataCacheConsole.GetActiveSports();
|
||||
sports.AddRange(activeSports.FindAll(item => sportIdParent.Equals(item.SportIdParent)));
|
||||
return sports;
|
||||
}
|
||||
public String GetEncryptedSportId(SysId sportId)
|
||||
{
|
||||
return DataCacheConsole.GetEncryptedSportId(sportId, EncryptId(sportId));
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<div class="col">
|
||||
<div class="sax-caption"><div class="sax-action ArticleHeadline"></div></div>
|
||||
</div>
|
||||
<div class="fixed"><div class="OrganisationName pt4 pr16"></div></div>
|
||||
<div class="fixed sax-actions">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item .sax-label
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover .sax-label
|
||||
@@ -251,8 +251,8 @@
|
||||
.sax-alpha .sax-panel-item
|
||||
{
|
||||
background-color: #fff;
|
||||
border-radius: 0;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"use strict";
|
||||
sax.segIdPrefix = 'Seg_';
|
||||
sax.classFileDrag = 'sax-file-drag';
|
||||
let am = sax.articleMgt = { data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
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 || {};
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
$('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Article/Ajax/GetList', formId: 'frmArticleFilter', callbackFn: am.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
am.ajax.refreshResults = am.ajax.refreshResults || { url: sax.url.base + 'Article/Ajax/GetList', formId: 'frmArticleFilter', callbackFn: am.doRefreshResults };
|
||||
sax.doAjaxRequest(am.ajax.refreshResults, delay || 50);
|
||||
am.awaitingRefreshResponse = true;
|
||||
}
|
||||
am.doRefreshResults = function (response)
|
||||
@@ -53,6 +53,8 @@
|
||||
{
|
||||
if (!item) return;
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
if (!$('#ifFilterOrganisationId', $frm.filter).val())
|
||||
$('.OrganisationName', $item).text(item.organisationName);
|
||||
$('.ArticleHeadline', $item).text(item.headline);
|
||||
$('.ArticleSummary', $item).text(item.summary);
|
||||
$('.ArticleRegionCaption', $item).text(item.regionCaptionPrimary);
|
||||
@@ -173,8 +175,8 @@
|
||||
am.clearItem();
|
||||
am.data.item = item; am.data.$item = $item;
|
||||
$('.ArticleId', $frm.articleId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Article/Ajax/GetItem', formId: 'frmArticleId', callbackFn: am.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
am.ajax.updateItem = am.ajax.updateItem || { url: sax.url.base + 'Article/Ajax/GetItem', formId: 'frmArticleId', callbackFn: am.onUpdateItem };
|
||||
sax.doAjaxRequest(am.ajax.updateItem, 50);
|
||||
}
|
||||
am.onUpdateItem = function (response)
|
||||
{
|
||||
@@ -419,12 +421,12 @@
|
||||
sax.clearControlError();
|
||||
sax.data.contactImageUploadContext = context;
|
||||
|
||||
sax.ajax.uploadArticleImage = sax.ajax.uploadArticleImage || { url: sax.url.base + 'Article/Ajax/UploadImage', callbackFn: am.handleArticleImageUploadResponse, noWaitIcon: true };
|
||||
sax.ajax.uploadArticleImage.formData = new FormData();
|
||||
sax.ajax.uploadArticleImage.formData.append("__RequestVerificationToken", $('#frmNavigate input[name="__RequestVerificationToken"]').val());
|
||||
sax.ajax.uploadArticleImage.formData.append("ArticleId", $('#ifArticleId', $frm.article).val());
|
||||
sax.ajax.uploadArticleImage.formData.append("ArticleImage", file);
|
||||
sax.doAjaxRequest(sax.ajax.uploadArticleImage, 50);
|
||||
am.ajax.uploadArticleImage = am.ajax.uploadArticleImage || { url: sax.url.base + 'Article/Ajax/UploadImage', callbackFn: am.handleArticleImageUploadResponse, noWaitIcon: true };
|
||||
am.ajax.uploadArticleImage.formData = new FormData();
|
||||
am.ajax.uploadArticleImage.formData.append("__RequestVerificationToken", $('#frmNavigate input[name="__RequestVerificationToken"]').val());
|
||||
am.ajax.uploadArticleImage.formData.append("ArticleId", $('#ifArticleId', $frm.article).val());
|
||||
am.ajax.uploadArticleImage.formData.append("ArticleImage", file);
|
||||
sax.doAjaxRequest(am.ajax.uploadArticleImage, 50);
|
||||
}
|
||||
am.handleArticleImageUploadResponse = function (response)
|
||||
{
|
||||
@@ -445,8 +447,8 @@
|
||||
//--------------------------------------------------------------
|
||||
am.storeItem = function ()
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Article/Ajax/StoreItem', formId: 'frmArticle', callbackFn: am.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
am.ajax.storeItem = am.ajax.storeItem || { url: sax.url.base + 'Article/Ajax/StoreItem', formId: 'frmArticle', callbackFn: am.onStoreItem };
|
||||
sax.doAjaxRequest(am.ajax.storeItem, 50);
|
||||
}
|
||||
am.onStoreItem = function (response)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let cs = sax.codeSelect = sax.codeSelect || { fn: {}, $dlg: {}, codeIdPrefix: 'Code_' };
|
||||
let cs = sax.codeSelect = sax.codeSelect || { fn: {}, $dlg: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
@@ -39,23 +39,23 @@
|
||||
let code = codes[codeIdx];
|
||||
let selected = cs.selectedCodes.indexOf(code.code) >= 0;
|
||||
let $code = $codeTmpl.clone();
|
||||
$($code).prop('id', cs.codeIdPrefix + code.code).attr('aria-code', code.code).on('click', function () { cs.fn.onClickCode(code.code); }).on('dblclick', function () { cs.fn.onDblClickCode(code.code); }).find('.CodeDesc').text(code.desc).end();
|
||||
$($code).attr('aria-code', code.code).on('click', function () { cs.fn.onClickCode(code.code, $code); }).on('dblclick', function () { cs.fn.onDblClickCode(code.code, $code); }).find('.CodeDesc').text(code.desc).end();
|
||||
if (selected) $codesSelec.append($code);
|
||||
else $codesAvail.append($code);
|
||||
}
|
||||
}
|
||||
cs.fn.onClickCode = function (code)
|
||||
cs.fn.onClickCode = function (code, $code)
|
||||
{
|
||||
$('.sax-panel-item.Code').removeClass('sel');
|
||||
$('.sax-panel-item.Code[aria-code="' + code + '"]').addClass('sel');
|
||||
$code.addClass('sel');
|
||||
}
|
||||
cs.fn.onDblClickCode = function (code)
|
||||
cs.fn.onDblClickCode = function (code, $code)
|
||||
{
|
||||
let codeIdx = cs.selectedCodes.indexOf(code);
|
||||
//sax.debug('onDblClickCode', code, codeIdx);
|
||||
if (codeIdx >= 0) cs.selectedCodes.splice(codeIdx, 1); else cs.selectedCodes.push(code)
|
||||
cs.fn.displayCodes(cs.cfg.codes)
|
||||
$('.sax-panel-item.Code[aria-code="' + code + '"]').addClass('sel');
|
||||
$code.addClass('sel');
|
||||
}
|
||||
cs.fn.onClickSelect = function ()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let se = sax.sportExperience = { fn: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
let se = sax.sportExperience = { fn: {}, ajax: {}, data: {}, $pnl: {}, $frm: {}, $dlg: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.showSportExperience = function (usrSpt)
|
||||
@@ -22,8 +22,8 @@
|
||||
se.fn.refreshResults = function ()
|
||||
{
|
||||
let frm = $('#frmProfileSportId');
|
||||
sax.ajax.sportExperiences = sax.ajax.sportExperiences || { url: sax.url.base + 'UserSport/Ajax/GetExperienceList', formId: frm.prop('id'), callbackFn: se.fn.handleSportExperiencesResponse };
|
||||
sax.doAjaxRequest(sax.ajax.sportExperiences, 50);
|
||||
se.ajax.sportExperiences = se.ajax.sportExperiences || { url: sax.url.base + 'UserSport/Ajax/GetExperienceList', formId: frm.prop('id'), callbackFn: se.fn.handleSportExperiencesResponse };
|
||||
sax.doAjaxRequest(se.ajax.sportExperiences, 50);
|
||||
}
|
||||
se.fn.handleSportExperiencesResponse = function (response)
|
||||
{
|
||||
@@ -41,8 +41,7 @@
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
item.idx = ++se.idx;
|
||||
let $item = se.fn.getItemTemplate(item.idx);
|
||||
//sax.debug(item, $item);
|
||||
let $item = se.fn.getItemTemplate();
|
||||
$('.ExperiencePeriod', $item).text(item.period);
|
||||
$('.ExperienceSummary', $item).text(item.summary);
|
||||
$('.ExperienceTeam', $item).text(item.team);
|
||||
@@ -58,17 +57,13 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
se.fn.getItemId = function (idx)
|
||||
{
|
||||
return 'SptExp_' + idx;
|
||||
}
|
||||
se.fn.getItemActionTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template ul.sax-dropdown-menu.SportExperience li', se.$pnl.results).clone();
|
||||
}
|
||||
se.fn.getItemTemplate = function (idx)
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.SportExperience', se.$pnl.results).clone().prop('id', se.fn.getItemId(idx));
|
||||
return $('.sax-panel-item-template .sax-panel-item.SportExperience', se.$pnl.results).clone();
|
||||
}
|
||||
se.fn.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
@@ -92,8 +87,8 @@
|
||||
//sax.debug('updateSportExperience', item);
|
||||
let frm = se.$frm.sportExpId;
|
||||
$('.UserSportExperienceId', se.$frm.sportExpId).val(item.id);
|
||||
sax.ajax.sportExp = sax.ajax.sportExp || { url: sax.url.base + 'UserSport/Ajax/GetExperience', formId: frm.prop('id'), callbackFn: se.fn.doUpdateSportExperience };
|
||||
sax.doAjaxRequest(sax.ajax.sportExp, 50);
|
||||
se.ajax.sportExp = se.ajax.sportExp || { url: sax.url.base + 'UserSport/Ajax/GetExperience', formId: frm.prop('id'), callbackFn: se.fn.doUpdateSportExperience };
|
||||
sax.doAjaxRequest(se.ajax.sportExp, 50);
|
||||
}
|
||||
se.fn.doUpdateSportExperience = function (response)
|
||||
{
|
||||
@@ -118,8 +113,8 @@
|
||||
{
|
||||
//sax.debug('storeSportExperience');
|
||||
let frm = se.$frm.sportExp;
|
||||
sax.ajax.storeSportExp = sax.ajax.storeSportExp || { url: sax.url.base + 'UserSport/Ajax/StoreExperience', formId: frm.prop('id'), callbackFn: se.fn.onStoreSportExperience };
|
||||
sax.doAjaxRequest(sax.ajax.storeSportExp, 50);
|
||||
se.ajax.storeSportExp = se.ajax.storeSportExp || { url: sax.url.base + 'UserSport/Ajax/StoreExperience', formId: frm.prop('id'), callbackFn: se.fn.onStoreSportExperience };
|
||||
sax.doAjaxRequest(se.ajax.storeSportExp, 50);
|
||||
}
|
||||
se.fn.onStoreSportExperience = function (response)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let ps = sax.mdl.profileSports = sax.mdl.profileSports || {};
|
||||
let $pnl = ps.$pnl = {}, $dlg = ps.$dlg = {}, $frm = ps.$frm = {};
|
||||
let ps = sax.mdl.profileSports = { ajax: {}, data: {}, $pnl: {}, $dlg: {}, $frm: {} };
|
||||
let $pnl = ps.$pnl, $dlg = ps.$dlg, $frm = ps.$frm;
|
||||
ps.data = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -21,9 +21,9 @@
|
||||
{
|
||||
//sax.debug('refreshProfileSports');
|
||||
delete sax.page.profileSportsChanged;
|
||||
sax.ajax.profileSports = sax.ajax.profileSports || { url: sax.url.base + 'Account/Ajax/GetProfileSports', formId: 'frmNavigate', noWaitIcon: true };
|
||||
sax.ajax.profileSports.callbackFn = callbackFn;
|
||||
sax.doAjaxRequest(sax.ajax.profileSports, 50);
|
||||
ps.ajax.profileSports = ps.ajax.profileSports || { url: sax.url.base + 'Account/Ajax/GetProfileSports', formId: 'frmNavigate', noWaitIcon: true };
|
||||
ps.ajax.profileSports.callbackFn = callbackFn;
|
||||
sax.doAjaxRequest(ps.ajax.profileSports, 50);
|
||||
}
|
||||
ps.onRefreshProfileSportsInfo = function (response)
|
||||
{
|
||||
@@ -39,9 +39,9 @@
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
sax.profile.sports.Ids.push(item.sportId);
|
||||
let $item = $tmpl.clone().prop('id', 'ProSpt_' + item.id);
|
||||
$('.sax-header .sax-action.sax-edit', $item).on('click', function (evt) { ps.updateProfileSport(item.id); });
|
||||
$('.sax-content', $item).on('dblclick', function (evt) { ps.updateProfileSport(item.id); });
|
||||
let $item = $tmpl.clone();
|
||||
$('.sax-header .sax-action.sax-edit', $item).on('click', function (evt) { ps.updateProfileSport(item); });
|
||||
$('.sax-content', $item).on('dblclick', function (evt) { ps.updateProfileSport(item); });
|
||||
$('.sax-header .sax-action.sax-experience', $item).on('click', function (evt) { sax.showSportExperience(item); });
|
||||
$('.SportName', $item).text(item.sportName);
|
||||
$('.SportParticipationValue', $item).text(item.sportParticipation);
|
||||
@@ -63,12 +63,12 @@
|
||||
dlg.dialog('option', 'title', sax.dlg.title.addUserSport);
|
||||
sax.openDialog(dlg, 640, 480);
|
||||
}
|
||||
ps.updateProfileSport = function (id)
|
||||
ps.updateProfileSport = function (item)
|
||||
{
|
||||
//sax.debug('updateProfileSport', id);
|
||||
$('#frmProfileSportId .UserSportId').val(id);
|
||||
sax.ajax.profileSport = sax.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: 'frmProfileSportId', callbackFn: ps.doUpdateProfileSport };
|
||||
sax.doAjaxRequest(sax.ajax.profileSport, 50);
|
||||
//sax.debug('updateProfileSport', item);
|
||||
$('#frmProfileSportId .UserSportId').val(item.id);
|
||||
ps.ajax.profileSport = ps.ajax.profileSport || { url: sax.url.base + 'Account/Ajax/GetProfileSport', formId: 'frmProfileSportId', callbackFn: ps.doUpdateProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.profileSport, 50);
|
||||
}
|
||||
ps.doUpdateProfileSport = function (response)
|
||||
{
|
||||
@@ -101,8 +101,8 @@
|
||||
{
|
||||
//sax.debug('storeProfileSport');
|
||||
sax.clearControlErrors();
|
||||
sax.ajax.storeProfileSport = sax.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: 'frmProfileSport', callbackFn: ps.onStoreProfileSport };
|
||||
sax.doAjaxRequest(sax.ajax.storeProfileSport, 50);
|
||||
ps.ajax.storeProfileSport = ps.ajax.storeProfileSport || { url: sax.url.base + 'Account/Ajax/StoreProfileSport', formId: 'frmProfileSport', callbackFn: ps.onStoreProfileSport };
|
||||
sax.doAjaxRequest(ps.ajax.storeProfileSport, 50);
|
||||
}
|
||||
ps.onStoreProfileSport = function (response)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.2.4";
|
||||
private static String version { get; } = "1.2.4.1";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -46,9 +46,9 @@ namespace Saxonite.Base.App
|
||||
ActivityIndex_ItemId,
|
||||
ActivityIndex_SportId,
|
||||
ActivityIndex_RegionId,
|
||||
ActivityIndex_EffectiveOn,
|
||||
ActivityIndex_UserAccountIdOwner,
|
||||
ActivityIndex_OrganisationIdOwner,
|
||||
ActivityIndex_EffectiveOn,
|
||||
ActivityIndex_ExpiresOn,
|
||||
ActivityIndex_Notes,
|
||||
ActivityIndex_Flags,
|
||||
@@ -247,6 +247,7 @@ namespace Saxonite.Base.App
|
||||
UserAccount_DateOfBirthYear,
|
||||
UserAccount_RegionIdCountry,
|
||||
UserAccount_RegionIdProvince,
|
||||
UserAccount_JournalistData,
|
||||
UserAccount_PasswordToken,
|
||||
UserAccount_PasswordHashed,
|
||||
UserAccount_PasswordHistory,
|
||||
@@ -364,7 +365,7 @@ namespace Saxonite.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 18;
|
||||
private static readonly int columnCount = 317;
|
||||
private static readonly int columnCount = 318;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -558,9 +559,9 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(1,"ItemId",5,-5,false,19),
|
||||
new ColumnDfn(1,"SportId",4,4,false,10),
|
||||
new ColumnDfn(1,"RegionId",4,4,false,10),
|
||||
new ColumnDfn(1,"EffectiveOn",9,93,false,16),
|
||||
new ColumnDfn(1,"UserAccountIdOwner",4,4,false,10),
|
||||
new ColumnDfn(1,"OrganisationIdOwner",4,4,false,10),
|
||||
new ColumnDfn(1,"EffectiveOn",9,93,false,16),
|
||||
new ColumnDfn(1,"ExpiresOn",9,93,false,16),
|
||||
new ColumnDfn(1,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(1,"Flags",3,5,false,5),
|
||||
@@ -759,6 +760,7 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(11,"DateOfBirthYear",3,5,false,5),
|
||||
new ColumnDfn(11,"RegionIdCountry",4,4,false,10),
|
||||
new ColumnDfn(11,"RegionIdProvince",4,4,false,10),
|
||||
new ColumnDfn(11,"JournalistData",0,-9,false,0),
|
||||
new ColumnDfn(11,"PasswordToken",0,12,false,32),
|
||||
new ColumnDfn(11,"PasswordHashed",0,-9,false,100),
|
||||
new ColumnDfn(11,"PasswordHistory",0,-9,false,0),
|
||||
|
||||
@@ -274,7 +274,10 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public List<SysId> IdsIncluded { get; } = new List<SysId>();
|
||||
public List<SysId> IdsExcluded { get; } = new List<SysId>();
|
||||
public List<SysId> UserAccountIdsAuthorIncluded { get; } = new List<SysId>();
|
||||
/// <summary>Restrict to articles belonging to organisation.</summary>
|
||||
public List<SysId> OrganisationIdsIncluded { get; } = new List<SysId>();
|
||||
/// <summary>Exclude articles belonging to organisations. Ignored if any organisations specified.</summary>
|
||||
public bool ExcludeOrganisationArticles { get; set; }
|
||||
public List<SysId> SportIdsIncluded { get; set; } = new List<SysId>();
|
||||
public List<SysId> RegionIdsIncluded { get; } = new List<SysId>();
|
||||
public String HeadlinePartial { get; set; }
|
||||
|
||||
@@ -276,6 +276,9 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
// Common properties.
|
||||
public String NotesPartial { get; set; }
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.ActiveOnly;
|
||||
// Table aliases - blank if not linked.
|
||||
public String Alias_Sport_Primary { get; set; }
|
||||
public String Alias_Region_Primary { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -506,6 +506,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public StatusCat StatusCat { get; set; } = StatusCat.ActiveOnly;
|
||||
// Table aliases - blank if not linked.
|
||||
public String Alias_UserSport { get; set; }
|
||||
public String Alias_UserSport_Sport { get; set; }
|
||||
public String Alias_UserRole { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -23,9 +23,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnDataInt64 _ItemId { get; } = new ColumnDataInt64("ItemId");
|
||||
public ColumnDataInt32 _SportId { get; } = new ColumnDataInt32("SportId");
|
||||
public ColumnDataInt32 _RegionId { get; } = new ColumnDataInt32("RegionId");
|
||||
public ColumnDataDateTime _EffectiveOn { get; } = new ColumnDataDateTime("EffectiveOn");
|
||||
public ColumnDataInt32 _UserAccountIdOwner { get; } = new ColumnDataInt32("UserAccountIdOwner");
|
||||
public ColumnDataInt32 _OrganisationIdOwner { get; } = new ColumnDataInt32("OrganisationIdOwner");
|
||||
public ColumnDataDateTime _EffectiveOn { get; } = new ColumnDataDateTime("EffectiveOn");
|
||||
public ColumnDataDateTime _ExpiresOn { get; } = new ColumnDataDateTime("ExpiresOn");
|
||||
public ColumnDataString _Notes { get; } = new ColumnDataString("Notes");
|
||||
public ColumnDataInt16 _Flags { get; } = new ColumnDataInt16("Flags");
|
||||
@@ -46,9 +46,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
"ItemId",
|
||||
"SportId",
|
||||
"RegionId",
|
||||
"EffectiveOn",
|
||||
"UserAccountIdOwner",
|
||||
"OrganisationIdOwner",
|
||||
"EffectiveOn",
|
||||
"ExpiresOn",
|
||||
"Notes",
|
||||
"Flags",
|
||||
@@ -97,9 +97,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public Int64 _ItemId { get { return Cols._ItemId.Value; } set { Cols._ItemId.Value = value; } }
|
||||
public Int32 _SportId { get { return Cols._SportId.Value; } set { Cols._SportId.Value = value; } }
|
||||
public Int32 _RegionId { get { return Cols._RegionId.Value; } set { Cols._RegionId.Value = value; } }
|
||||
public DateTime _EffectiveOn { get { return Cols._EffectiveOn.Value; } set { Cols._EffectiveOn.Value = value; } }
|
||||
public Int32 _UserAccountIdOwner { get { return Cols._UserAccountIdOwner.Value; } set { Cols._UserAccountIdOwner.Value = value; } }
|
||||
public Int32 _OrganisationIdOwner { get { return Cols._OrganisationIdOwner.Value; } set { Cols._OrganisationIdOwner.Value = value; } }
|
||||
public DateTime _EffectiveOn { get { return Cols._EffectiveOn.Value; } set { Cols._EffectiveOn.Value = value; } }
|
||||
public DateTime _ExpiresOn { get { return Cols._ExpiresOn.Value; } set { Cols._ExpiresOn.Value = value; } }
|
||||
public String _Notes { get { return Cols._Notes.Value; } set { Cols._Notes.Value = value; } }
|
||||
public Int16 _Flags { get { return Cols._Flags.Value; } set { Cols._Flags.Value = value; } }
|
||||
@@ -135,9 +135,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
_ItemId = GetFieldInt64(dbDataReader, "ItemId", _ItemId);
|
||||
_SportId = GetFieldInt32(dbDataReader, "SportId", _SportId);
|
||||
_RegionId = GetFieldInt32(dbDataReader, "RegionId", _RegionId);
|
||||
_EffectiveOn = GetFieldDateTime(dbDataReader, "EffectiveOn", _EffectiveOn);
|
||||
_UserAccountIdOwner = GetFieldInt32(dbDataReader, "UserAccountIdOwner", _UserAccountIdOwner);
|
||||
_OrganisationIdOwner = GetFieldInt32(dbDataReader, "OrganisationIdOwner", _OrganisationIdOwner);
|
||||
_EffectiveOn = GetFieldDateTime(dbDataReader, "EffectiveOn", _EffectiveOn);
|
||||
_ExpiresOn = GetFieldDateTime(dbDataReader, "ExpiresOn", _ExpiresOn);
|
||||
_Notes = GetFieldString(dbDataReader, "Notes", _Notes);
|
||||
_Flags = GetFieldInt16(dbDataReader, "Flags", _Flags);
|
||||
@@ -170,9 +170,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("ItemId")) AddCommandParameter(dbCommand, "@ItemId", _ItemId);
|
||||
if (columnNames.ContainsCI("SportId")) AddCommandParameter(dbCommand, "@SportId", _SportId);
|
||||
if (columnNames.ContainsCI("RegionId")) AddCommandParameter(dbCommand, "@RegionId", _RegionId);
|
||||
if (columnNames.ContainsCI("EffectiveOn")) AddCommandParameter(dbCommand, "@EffectiveOn", _EffectiveOn);
|
||||
if (columnNames.ContainsCI("UserAccountIdOwner")) AddCommandParameter(dbCommand, "@UserAccountIdOwner", _UserAccountIdOwner);
|
||||
if (columnNames.ContainsCI("OrganisationIdOwner")) AddCommandParameter(dbCommand, "@OrganisationIdOwner", _OrganisationIdOwner);
|
||||
if (columnNames.ContainsCI("EffectiveOn")) AddCommandParameter(dbCommand, "@EffectiveOn", _EffectiveOn);
|
||||
if (columnNames.ContainsCI("ExpiresOn")) AddCommandParameter(dbCommand, "@ExpiresOn", _ExpiresOn);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
@@ -215,9 +215,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
Log(GetType().Name + ".ExecuteUpdateCommand", dbCommand.CommandText);
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("EffectiveOn")) AddCommandParameter(dbCommand, "@EffectiveOn", _EffectiveOn);
|
||||
if (columnNames.ContainsCI("UserAccountIdOwner")) AddCommandParameter(dbCommand, "@UserAccountIdOwner", _UserAccountIdOwner);
|
||||
if (columnNames.ContainsCI("OrganisationIdOwner")) AddCommandParameter(dbCommand, "@OrganisationIdOwner", _OrganisationIdOwner);
|
||||
if (columnNames.ContainsCI("EffectiveOn")) AddCommandParameter(dbCommand, "@EffectiveOn", _EffectiveOn);
|
||||
if (columnNames.ContainsCI("ExpiresOn")) AddCommandParameter(dbCommand, "@ExpiresOn", _ExpiresOn);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:00
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -35,6 +35,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnDataInt16 _DateOfBirthYear { get; } = new ColumnDataInt16("DateOfBirthYear");
|
||||
public ColumnDataInt32 _RegionIdCountry { get; } = new ColumnDataInt32("RegionIdCountry");
|
||||
public ColumnDataInt32 _RegionIdProvince { get; } = new ColumnDataInt32("RegionIdProvince");
|
||||
public ColumnDataString _JournalistData { get; } = new ColumnDataString("JournalistData");
|
||||
public ColumnDataString _PasswordToken { get; } = new ColumnDataString("PasswordToken");
|
||||
public ColumnDataString _PasswordHashed { get; } = new ColumnDataString("PasswordHashed");
|
||||
public ColumnDataString _PasswordHistory { get; } = new ColumnDataString("PasswordHistory");
|
||||
@@ -73,6 +74,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
"DateOfBirthYear",
|
||||
"RegionIdCountry",
|
||||
"RegionIdProvince",
|
||||
"JournalistData",
|
||||
"PasswordToken",
|
||||
"PasswordHashed",
|
||||
"PasswordHistory",
|
||||
@@ -137,6 +139,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public Int16 _DateOfBirthYear { get { return Cols._DateOfBirthYear.Value; } set { Cols._DateOfBirthYear.Value = value; } }
|
||||
public Int32 _RegionIdCountry { get { return Cols._RegionIdCountry.Value; } set { Cols._RegionIdCountry.Value = value; } }
|
||||
public Int32 _RegionIdProvince { get { return Cols._RegionIdProvince.Value; } set { Cols._RegionIdProvince.Value = value; } }
|
||||
public String _JournalistData { get { return Cols._JournalistData.Value; } set { Cols._JournalistData.Value = value; } }
|
||||
public String _PasswordToken { get { return Cols._PasswordToken.Value; } set { Cols._PasswordToken.Value = value; } }
|
||||
public String _PasswordHashed { get { return Cols._PasswordHashed.Value; } set { Cols._PasswordHashed.Value = value; } }
|
||||
public String _PasswordHistory { get { return Cols._PasswordHistory.Value; } set { Cols._PasswordHistory.Value = value; } }
|
||||
@@ -190,6 +193,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
_DateOfBirthYear = GetFieldInt16(dbDataReader, "DateOfBirthYear", _DateOfBirthYear);
|
||||
_RegionIdCountry = GetFieldInt32(dbDataReader, "RegionIdCountry", _RegionIdCountry);
|
||||
_RegionIdProvince = GetFieldInt32(dbDataReader, "RegionIdProvince", _RegionIdProvince);
|
||||
_JournalistData = GetFieldString(dbDataReader, "JournalistData", _JournalistData);
|
||||
_PasswordToken = GetFieldString(dbDataReader, "PasswordToken", _PasswordToken);
|
||||
_PasswordHashed = GetFieldString(dbDataReader, "PasswordHashed", _PasswordHashed);
|
||||
_PasswordHistory = GetFieldString(dbDataReader, "PasswordHistory", _PasswordHistory);
|
||||
@@ -242,6 +246,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("DateOfBirthYear")) AddCommandParameter(dbCommand, "@DateOfBirthYear", _DateOfBirthYear);
|
||||
if (columnNames.ContainsCI("RegionIdCountry")) AddCommandParameter(dbCommand, "@RegionIdCountry", _RegionIdCountry);
|
||||
if (columnNames.ContainsCI("RegionIdProvince")) AddCommandParameter(dbCommand, "@RegionIdProvince", _RegionIdProvince);
|
||||
if (columnNames.ContainsCI("JournalistData")) AddCommandParameter(dbCommand, "@JournalistData", _JournalistData);
|
||||
if (columnNames.ContainsCI("PasswordToken")) AddCommandParameter(dbCommand, "@PasswordToken", _PasswordToken);
|
||||
if (columnNames.ContainsCI("PasswordHashed")) AddCommandParameter(dbCommand, "@PasswordHashed", _PasswordHashed);
|
||||
if (columnNames.ContainsCI("PasswordHistory")) AddCommandParameter(dbCommand, "@PasswordHistory", _PasswordHistory);
|
||||
@@ -309,6 +314,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("DateOfBirthYear")) AddCommandParameter(dbCommand, "@DateOfBirthYear", _DateOfBirthYear);
|
||||
if (columnNames.ContainsCI("RegionIdCountry")) AddCommandParameter(dbCommand, "@RegionIdCountry", _RegionIdCountry);
|
||||
if (columnNames.ContainsCI("RegionIdProvince")) AddCommandParameter(dbCommand, "@RegionIdProvince", _RegionIdProvince);
|
||||
if (columnNames.ContainsCI("JournalistData")) AddCommandParameter(dbCommand, "@JournalistData", _JournalistData);
|
||||
if (columnNames.ContainsCI("PasswordToken")) AddCommandParameter(dbCommand, "@PasswordToken", _PasswordToken);
|
||||
if (columnNames.ContainsCI("PasswordHashed")) AddCommandParameter(dbCommand, "@PasswordHashed", _PasswordHashed);
|
||||
if (columnNames.ContainsCI("PasswordHistory")) AddCommandParameter(dbCommand, "@PasswordHistory", _PasswordHistory);
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 3-Mar-2022 16:50:01
|
||||
// Code generated by Sarand Database Utilities Fri 4-Mar-2022 15:28:05
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -426,12 +426,56 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
// Sport Ids.
|
||||
String sportIdsIncluded = prm.SportIdsIncluded.Concat(",");
|
||||
if (!sportIdsIncluded.IsEmpty())
|
||||
filter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_SportIdPrimary, aliasOrganisation) + " IN (" + sportIdsIncluded + ")");
|
||||
{
|
||||
// Sport can be matched directly or as the parent of the sport.
|
||||
List<String> sportFilter = new List<string>();
|
||||
String aliasSport = prm.Alias_Sport_Primary;
|
||||
if (StringUtil.IsEmpty(aliasSport))
|
||||
{
|
||||
// Sport table is not linked in query.
|
||||
aliasSport = "aSpt";
|
||||
DbQuery sportQuery = new DbQuery(CoreDatabase.DbmsType);
|
||||
sportQuery.Tables.Add(SaxDbDfn_Core.GetTableName(SaxDbDfn_Core.TableIdx.Sport), aliasSport);
|
||||
sportQuery.Columns.Add("1");
|
||||
sportQuery.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_SportIdParent, aliasSport) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_SportIdPrimary, aliasOrganisation));
|
||||
sportQuery.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_SportIdParent, aliasSport) + " IN (" + sportIdsIncluded + ")");
|
||||
sportFilter.Add("Exists(" + sportQuery.BuildQuery() + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sport table is linked in the main query.
|
||||
sportFilter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_SportIdParent, aliasSport) + " IN (" + sportIdsIncluded + ")");
|
||||
}
|
||||
sportFilter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_SportIdPrimary, aliasOrganisation) + " IN (" + sportIdsIncluded + ")");
|
||||
filter.Add(sportFilter.Concat(" OR ", "(", ")"));
|
||||
}
|
||||
|
||||
// Region Ids.
|
||||
String regionIdsIncluded = prm.RegionIdsIncluded.Concat(",");
|
||||
if (!regionIdsIncluded.IsEmpty())
|
||||
filter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_RegionIdPrimary, aliasOrganisation) + " IN (" + regionIdsIncluded + ")");
|
||||
{
|
||||
// Region can be matched directly or as the parent of the region.
|
||||
List<String> regionFilter = new List<string>();
|
||||
String aliasRegion = prm.Alias_Region_Primary;
|
||||
if (StringUtil.IsEmpty(aliasRegion))
|
||||
{
|
||||
// Region table is not linked in query.
|
||||
aliasRegion = "aRgn";
|
||||
DbQuery regionQuery = new DbQuery(CoreDatabase.DbmsType);
|
||||
regionQuery.Tables.Add(SaxDbDfn_Core.GetTableName(SaxDbDfn_Core.TableIdx.Region), aliasRegion);
|
||||
regionQuery.Columns.Add("1");
|
||||
regionQuery.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Region_RegionIdParent, aliasRegion) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_RegionIdPrimary, aliasOrganisation));
|
||||
regionQuery.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Region_RegionIdParent, aliasRegion) + " IN (" + regionIdsIncluded + ")");
|
||||
regionFilter.Add("Exists(" + regionQuery.BuildQuery() + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Region table is linked in the main query.
|
||||
regionFilter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Region_RegionIdParent, aliasRegion) + " IN (" + regionIdsIncluded + ")");
|
||||
}
|
||||
regionFilter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_RegionIdPrimary, aliasOrganisation) + " IN (" + regionIdsIncluded + ")");
|
||||
filter.Add(regionFilter.Concat(" OR ", "(", ")"));
|
||||
}
|
||||
|
||||
// Notes.
|
||||
if (!StringUtil.IsEmpty(prm.NotesPartial))
|
||||
@@ -588,8 +632,9 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Sport.
|
||||
if (hasSportCols)
|
||||
if (hasSportCols || prm.SportIdsIncluded.HasValidIds())
|
||||
{
|
||||
prm.Alias_Sport_Primary = aliasOrganisation_Sport;
|
||||
DbQueryJoin joinSport = new DbQueryJoin(DbJoinType.LeftOuter);
|
||||
joinSport.Table = new StringPair(SaxDbDfn_Core.GetTableName(SaxDbDfn_Core.TableIdx.Sport), aliasOrganisation_Sport);
|
||||
joinSport.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_Id, aliasOrganisation_Sport) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_SportIdPrimary, aliasOrganisation));
|
||||
@@ -602,8 +647,9 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Region.
|
||||
if (hasRegionCols)
|
||||
if (hasRegionCols || prm.RegionIdsIncluded.HasValidIds())
|
||||
{
|
||||
prm.Alias_Region_Primary = aliasOrganisation_Region;
|
||||
DbQueryJoin joinRegion = new DbQueryJoin(DbJoinType.LeftOuter);
|
||||
joinRegion.Table = new StringPair(SaxDbDfn_Core.GetTableName(SaxDbDfn_Core.TableIdx.Region), aliasOrganisation_Region);
|
||||
joinRegion.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Region_Id, aliasOrganisation_Region) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_RegionIdPrimary, aliasOrganisation));
|
||||
|
||||
@@ -426,6 +426,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
String organisationIdsIncluded = prm.OrganisationIdsIncluded.Concat(",");
|
||||
if (!organisationIdsIncluded.IsEmpty())
|
||||
filter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Article_OrganisationId, aliasArticle) + " IN (" + organisationIdsIncluded + ")");
|
||||
else if (prm.ExcludeOrganisationArticles)
|
||||
filter.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Article_OrganisationId, aliasArticle) + "=0 Or " + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Article_OrganisationId, aliasArticle) + " Is Null");
|
||||
|
||||
// Sport Ids.
|
||||
String sportIdsIncluded = prm.SportIdsIncluded.Concat(",");
|
||||
|
||||
@@ -78,23 +78,6 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
<Pos>5</Pos>
|
||||
<Name>EffectiveOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>smalldatetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>16</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
<Pos>6</Pos>
|
||||
<Name>UserAccountIdOwner</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -111,7 +94,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
<Pos>7</Pos>
|
||||
<Pos>6</Pos>
|
||||
<Name>OrganisationIdOwner</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -125,6 +108,23 @@
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>EffectiveOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>93</DataTypeNative>
|
||||
<DataTypeNameNative>smalldatetime</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>16</Size>
|
||||
<BufferLen>16</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>NoNulls</Nullable>
|
||||
<IsNullable>false</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
@@ -300,14 +300,14 @@
|
||||
<DbDfnIndex>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>ActivityIndex</Table>
|
||||
<Name>PK_ActivityIndex_1</Name>
|
||||
<Name>PK_ActivityIndex</Name>
|
||||
<IndexType>1</IndexType>
|
||||
<Unique>true</Unique>
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>18</UniqueValues>
|
||||
<UniqueValues>22</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -762,7 +762,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>3</Pages>
|
||||
<UniqueValues>19</UniqueValues>
|
||||
<UniqueValues>20</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -2979,7 +2979,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>2</UniqueValues>
|
||||
<UniqueValues>3</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -4062,7 +4062,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>14</UniqueValues>
|
||||
<UniqueValues>17</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -4395,6 +4395,23 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>17</Pos>
|
||||
<Name>JournalistData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>0</Size>
|
||||
<BufferLen>0</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>18</Pos>
|
||||
<Name>PasswordToken</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4411,7 +4428,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>18</Pos>
|
||||
<Pos>19</Pos>
|
||||
<Name>PasswordHashed</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4428,7 +4445,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>19</Pos>
|
||||
<Pos>20</Pos>
|
||||
<Name>PasswordHistory</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4445,7 +4462,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>20</Pos>
|
||||
<Pos>21</Pos>
|
||||
<Name>PasswordChangedAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4462,7 +4479,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>21</Pos>
|
||||
<Pos>22</Pos>
|
||||
<Name>LastLoginAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4479,7 +4496,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>22</Pos>
|
||||
<Pos>23</Pos>
|
||||
<Name>LastInvalidLoginAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4496,7 +4513,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>23</Pos>
|
||||
<Pos>24</Pos>
|
||||
<Name>InvalidLoginCount</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4513,7 +4530,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>24</Pos>
|
||||
<Pos>25</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4530,7 +4547,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>25</Pos>
|
||||
<Pos>26</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4547,7 +4564,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>26</Pos>
|
||||
<Pos>27</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4564,7 +4581,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>27</Pos>
|
||||
<Pos>28</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4581,7 +4598,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>28</Pos>
|
||||
<Pos>29</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4598,7 +4615,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>29</Pos>
|
||||
<Pos>30</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4615,7 +4632,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>30</Pos>
|
||||
<Pos>31</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4632,7 +4649,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>31</Pos>
|
||||
<Pos>32</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4649,7 +4666,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>32</Pos>
|
||||
<Pos>33</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5138,7 +5155,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>24</UniqueValues>
|
||||
<UniqueValues>32</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -6385,7 +6402,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>14</UniqueValues>
|
||||
<UniqueValues>15</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
|
||||
Reference in New Issue
Block a user