v1.1.1.0
This commit is contained in:
@@ -198,7 +198,7 @@
|
||||
<data name="label.article" xml:space="preserve">
|
||||
<value>Article</value>
|
||||
</data>
|
||||
<data name="label.Calendar" xml:space="preserve">
|
||||
<data name="label.calendar" xml:space="preserve">
|
||||
<value>Calendar</value>
|
||||
</data>
|
||||
<data name="label.cancel" xml:space="preserve">
|
||||
@@ -462,12 +462,15 @@
|
||||
<data name="organisation.caption.opportunity.update" xml:space="preserve">
|
||||
<value>Update Opportunity</value>
|
||||
</data>
|
||||
<data name="organisation.caption.organisation.request" xml:space="preserve">
|
||||
<value>Request Organisation</value>
|
||||
</data>
|
||||
<data name="organisation.caption.organisation.select" xml:space="preserve">
|
||||
<value>Select Organisation</value>
|
||||
</data>
|
||||
<data name="organisation.caption.organisations" xml:space="preserve">
|
||||
<value>Organisations</value>
|
||||
</data>
|
||||
<data name="organisation.caption.select.organisation" xml:space="preserve">
|
||||
<value>Select Organisation</value>
|
||||
</data>
|
||||
<data name="policies.caption.privacy" xml:space="preserve">
|
||||
<value>Privacy</value>
|
||||
</data>
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public short ItemType { get; set; }
|
||||
public String ItemTypeClass { get; set; }
|
||||
public long ItemIdx { get; set; }
|
||||
public String Organisation { get; set; }
|
||||
public String Author { get; set; }
|
||||
public String Caption { get; set; }
|
||||
public String Blurb { get; set; }
|
||||
public String Sport { get; set; }
|
||||
@@ -49,6 +51,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
public ActivityResponseData_Article(SaxController_Online controller, SaxModel_Online model, SaxJournalistArticle article)
|
||||
{
|
||||
Author = model.GetUserAccountDisplayName(article.UserAccountIdJournalist);
|
||||
Headline = article.Headline;
|
||||
Summary = article.Summary;
|
||||
Sport = model.GetSportCaption(article.SportIdPrimary);
|
||||
@@ -58,6 +61,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
foreach (SaxJournalistArticle.ContentData.SegmentData segment in content.Segments)
|
||||
Content.Segments.Add(new ContentData.SegmentData(controller, segment));
|
||||
}
|
||||
public String Organisation { get; set; }
|
||||
public String Author { get; set; }
|
||||
public String Headline { get; set; }
|
||||
public String Summary { get; set; }
|
||||
public String Sport { get; set; }
|
||||
@@ -100,12 +105,15 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
public ActivityResponseData_Opportunity(SaxModel_Online model, SaxOrganisationOpportunity opportunity)
|
||||
{
|
||||
Organisation = model.GetOrganisationName(opportunity.OrganisationId);
|
||||
Position = opportunity.Position;
|
||||
Outline = opportunity.Outline;
|
||||
Sport = model.GetSportCaption(opportunity.SportIdPrimary);
|
||||
Region = model.GetRegionCaption(opportunity.RegionIdPrimary);
|
||||
PublishedOnFmt = model.Localiser.FormatDate(opportunity.PublishedAt);
|
||||
}
|
||||
public String Organisation { get; set; }
|
||||
public String Author { get; set; }
|
||||
public String Position { get; set; }
|
||||
public String Outline { get; set; }
|
||||
public String Sport { get; set; }
|
||||
|
||||
@@ -26,38 +26,6 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
base(localiser, logger)
|
||||
{}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Regions
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_RegionList : AjaxResponse_Base
|
||||
{
|
||||
public List<SaxModel_Online.RegionData> Regions { get; } = new List<SaxModel_Online.RegionData>();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Reference/Ajax/GetRegions")]
|
||||
public IActionResult Ajax_GetRegionList(Model_Reference model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_GetRegionList";
|
||||
String messageTitle = Localiser["reference.caption.regions"];
|
||||
AjaxResponse_RegionList responseData = new AjaxResponse_RegionList();
|
||||
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer)
|
||||
return Forbid();
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Populate regions.
|
||||
foreach (SaxModel_Online.RegionData regionData in model.GetRegionDataList_Active())
|
||||
responseData.Regions.Add(regionData);
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sports
|
||||
//-------------------------------------------------------------------
|
||||
@@ -77,8 +45,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer)
|
||||
return Forbid();
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
// User doesn't have to be logged in, eg. to register organisation.
|
||||
//if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Populate sports.
|
||||
foreach (SaxModel_Online.SportData sportData in model.GetSportDataList_Active())
|
||||
@@ -90,6 +58,38 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Regions
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_RegionList : AjaxResponse_Base
|
||||
{
|
||||
public List<SaxModel_Online.RegionData> Regions { get; } = new List<SaxModel_Online.RegionData>();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Reference/Ajax/GetRegions")]
|
||||
public IActionResult Ajax_GetRegionList(Model_Reference model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_GetRegionList";
|
||||
String messageTitle = Localiser["reference.caption.regions"];
|
||||
AjaxResponse_RegionList responseData = new AjaxResponse_RegionList();
|
||||
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer)
|
||||
return Forbid();
|
||||
// User doesn't have to be logged in, eg. to register organisation.
|
||||
//if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Populate regions.
|
||||
foreach (SaxModel_Online.RegionData regionData in model.GetRegionDataList_Active())
|
||||
responseData.Regions.Add(regionData);
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -5,6 +5,7 @@ using Sarand.Net.Standard.Base.Utils;
|
||||
using Saxonite.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Base.Controllers;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -37,6 +38,13 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Organisation properties.
|
||||
public String OrganisationName { get; set; }
|
||||
public String OrganisationTypeValue { get; set; }
|
||||
public Sax.OrganisationType OrganisationType { get { return (Sax.OrganisationType)OrganisationTypeCodes.GetTypeForCode(OrganisationTypeValue); } }
|
||||
public String OrganisationCategoryValue { get; set; }
|
||||
public Sax.OrganisationCategory OrganisationCategory { get { return (Sax.OrganisationCategory)OrganisationCategoryCodes.GetTypeForCode(OrganisationCategoryValue); } }
|
||||
public String OrganisationSportId { get; set; }
|
||||
public String OrganisationRegionId { get; set; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Validation.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
sax.dlg.title.selectRegion = '@Localiser.GetJavascriptText("reference.caption.region.select")';
|
||||
sax.dlg.title.selectSport = '@Localiser.GetJavascriptText("reference.caption.sport.select")';
|
||||
</script>
|
||||
<partial name="~/Views/Common/SelectRegion.cshtml" />
|
||||
<partial name="~/Views/Common/SelectSport.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.orgReq = {};
|
||||
sax.orgReq.dlgTitleRequestOrganisation = '@Localiser.GetJavascriptText("organisation.caption.organisation.request")';
|
||||
</script>
|
||||
|
||||
<div id="dlgOrganisationRequest" class="sax-dialog sax-form">
|
||||
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmOrganisationRequest", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Organisation name *@
|
||||
<div class="sax-form-control OrganisationName">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationName"><span><span class="required">*</span> @Localiser["label.name"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<input type="text" id="ifOrganisationName" name="OrganisationName" class="OrganisationName sax-input" maxlength="@Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Name)" />
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation type *@
|
||||
<div class="sax-form-control OrganisationType">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationType"><span><span class="required">*</span> @Localiser["label.type"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownList("", Model.OrganisationTypesForSelect, Localiser["label.select"], new { @id = "cbOrganisationType", @name = "OrganisationTypeValue", @class = "OrganisationType sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation category *@
|
||||
<div class="sax-form-control OrganisationCategory">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationCategory"><span><span class="required">*</span> @Localiser["label.category"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownList("", Model.OrganisationCategoriesForSelect, Localiser["label.select"], new { @id = "cbOrganisationCategory", @name = "OrganisationCategoryValue", @class = "OrganisationCategory sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation sport *@
|
||||
<div class="sax-form-control OrganisationSportId">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationSportId"><span><span class="required">*</span> @Localiser["label.sport"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
<input type="hidden" id="ifOrganisationSportId" name="" OrganisationSportId"" class="OrganisationSportId" />
|
||||
<div class="col"><input type="text" id="ifOrganisationSportCaption" class="OrganisationSportCaption sax-input" readonly="readonly" ondblclick="sax.selectSport()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectSport" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectOrgSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation region *@
|
||||
<div class="sax-form-control OrganisationRegionId">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationRegionId"><span><span class="required">*</span> @Localiser["label.region"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
<input type="hidden" id="ifOrganisationRegionId" name="" OrganisationRegionId"" class="OrganisationRegionId" />
|
||||
<div class="col"><input type="text" id="ifOrganisationRegionCaption" class="OrganisationRegionCaption sax-input" readonly="readonly" ondblclick="sax.selectRegion()" /> </div>
|
||||
<div class="fixed"><button id="pbSelectRegion" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectOrgRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-org-req.js?@Model.HrefVersion"></script>
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
+5
-3
@@ -1,10 +1,10 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-selectOrganisation.css?@Model.HrefVersion" />
|
||||
<script src="~/js/sax-selectOrganisation.js?@Model.HrefVersion"></script>
|
||||
<link rel="stylesheet" href="~/css/sax-org-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
sax.selectOrganisation.dlgTitleSelectOrganisation = '@Localiser.GetJavascriptText("organisation.caption.select.organisation")';
|
||||
sax.selectOrganisation = {};
|
||||
sax.selectOrganisation.dlgTitleSelectOrganisation = '@Localiser.GetJavascriptText("organisation.caption.organisation.select")';
|
||||
</script>
|
||||
|
||||
<div id="dlgSelectOrganisation" class="sax-dialog sax-form">
|
||||
@@ -44,3 +44,5 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-org-sel.js?@Model.HrefVersion"></script>
|
||||
+6
-3
@@ -1,7 +1,10 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-selectRegion.css?@Model.HrefVersion" />
|
||||
<link rel="stylesheet" href="~/css/sax-reg-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
sax.data.selectRegion = {};
|
||||
</script>
|
||||
|
||||
<div id="dlgSelectRegion" class="sax-dialog sax-form">
|
||||
|
||||
@@ -44,6 +47,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-selectRegion.js?@Model.HrefVersion"></script>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-reg-sel.js?@Model.HrefVersion"></script>
|
||||
+11
-8
@@ -1,7 +1,10 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
<link rel="stylesheet" href="~/css/sax-selectSport.css?@Model.HrefVersion" />
|
||||
<link rel="stylesheet" href="~/css/sax-spt-sel.css?@Model.HrefVersion" />
|
||||
<script type="text/javascript">
|
||||
sax.data.selectSport = {};
|
||||
</script>
|
||||
|
||||
<div id="dlgSelectSport" class="sax-dialog sax-form">
|
||||
|
||||
@@ -38,12 +41,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="sax-panel-item-template">
|
||||
<div class="sax-panel-item Sport">
|
||||
<div class="SportName"></div>
|
||||
</div>
|
||||
<div class="sax-panel-item-template">
|
||||
<div class="sax-panel-item Sport">
|
||||
<div class="SportName"></div>
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-selectSport.js?@Model.HrefVersion"></script>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/js/sax-spt-sel.js?@Model.HrefVersion"></script>
|
||||
@@ -6,12 +6,30 @@
|
||||
|
||||
@if (Model.AwaitingLogin)
|
||||
{
|
||||
@* No user session *@
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">@Localiser["home.caption.welcome"]</h1>
|
||||
</div>
|
||||
<div class="spacer8"></div>
|
||||
|
||||
@* Register Organisation *@
|
||||
@if (false)
|
||||
{
|
||||
<div class="sax-panel-info">
|
||||
<div class="sax-content">
|
||||
<div class="sax-para">Do you belong to a club or association that would benefit from participating on this platform?</div>
|
||||
<div class="sax-para">Sign-up now with a few details and we'll let you know when you can login and get going.</div>
|
||||
<div class="sax-para center"><div class="sax-button-cta" onclick="sax.orgReq.fn.requestOrganisation()">Register Your Organisation</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<partial name="~/Views/Common/OrganisationRequest.cshtml" />
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@* User logged in *@
|
||||
|
||||
@* Activity filter *@
|
||||
<div class="sax-panel-filter">
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["home.caption.activities"]</div></div>
|
||||
@@ -29,6 +47,7 @@ else
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Activities *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
@@ -79,6 +98,7 @@ else
|
||||
<div class="sax-panel-item Article">
|
||||
<div class="ArticleHeadline"></div>
|
||||
<div class="ArticleSummary"></div>
|
||||
<div class="ArticleAuthor"></div>
|
||||
<div class="ArticleContent">
|
||||
<div class="ArticleContentSegments"></div>
|
||||
</div>
|
||||
|
||||
@@ -74,21 +74,21 @@
|
||||
</div>
|
||||
|
||||
@* Publication *@
|
||||
<div class="sax-form-control ArticlePublication">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.publication"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<div class="row ArticlePublish">
|
||||
<div class="fixed"><div class="pl16 pt4 pr8">@Html.CheckBoxFor(model => model.ArticlePublish, new { @id = "chkArticlePublish", @class = "ArticlePublish" }) <span class="" onclick="$('#chkArticlePublish').click()">@Localiser["label.publish"]</span></div></div>
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticlePublishOn, new { @id = "ifArticlePublishOn", @class = "sax-input sax-calendar ArticlePublishOn", @readonly = "readonly" })</div>
|
||||
<div class="sax-form-control ArticlePublication">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.publication"]</span></label>
|
||||
</div>
|
||||
<div class="row ArticlePublished">
|
||||
<div class="col"><div class="pl16">@Localiser["label.published"]: <span class="ArticlePublishedOn"></span></div></div>
|
||||
<div class="sax-control">
|
||||
<div class="row ArticlePublish">
|
||||
<div class="fixed"><div class="pl16 pt4 pr8">@Html.CheckBoxFor(model => model.ArticlePublish, new { @id = "chkArticlePublish", @class = "ArticlePublish" }) <span class="" onclick="$('#chkArticlePublish').click()">@Localiser["label.publish"]</span></div></div>
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticlePublishOn, new { @id = "ifArticlePublishOn", @class = "sax-input sax-calendar ArticlePublishOn", @readonly = "readonly" })</div>
|
||||
</div>
|
||||
<div class="row ArticlePublished">
|
||||
<div class="col"><div class="pl16">@Localiser["label.published"]: <span class="ArticlePublishedOn"></span></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
sax.msg.uploadFileTypeInvalid = '@Localiser.GetJavascriptText("msg.upload.file.type.invalid","{0}")';
|
||||
sax.msg.uploadingFile = '@Localiser.GetJavascriptText("msg.upload.file.uploading","{0}")';
|
||||
</script>
|
||||
<partial name="~/Views/Common/SelectRegion.cshtml" />
|
||||
<partial name="~/Views/Common/SelectSport.cshtml" />
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -65,5 +65,5 @@
|
||||
</div>
|
||||
|
||||
<partial name="Panel-OpportunityDialog.cshtml" />
|
||||
<partial name="~/Views/Common/SelectOrganisation.cshtml" />
|
||||
<partial name="~/Views/Common/OrganisationSelect.cshtml" />
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
}
|
||||
|
||||
<partial name="~/Views/Common/SelectRegion.cshtml" />
|
||||
<partial name="~/Views/Common/SelectSport.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
sax.links.facebook = '@Model.Links.Facebook';
|
||||
sax.links.linkedin = '@Model.Links.LinkedIn';
|
||||
sax.form.calendarDateFormat = '@(Model.CalendarDateFormat)';
|
||||
sax.lbl.calendar='@Localiser.GetJavascriptText("label.Calendar")';
|
||||
sax.lbl.calendar='@Localiser.GetJavascriptText("label.calendar")';
|
||||
sax.dlg.title.alert = '@Localiser.GetJavascriptText("dialog.title.alert")';
|
||||
sax.dlg.title.confirm = '@Localiser.GetJavascriptText("dialog.title.confirm")';
|
||||
sax.dlg.title.progress = '@Localiser.GetJavascriptText("dialog.title.progress")';
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
{
|
||||
margin: 2px 1px 0 1px;
|
||||
background-color: #a0a0a0;
|
||||
opacity:0.8;
|
||||
opacity: 0.8;
|
||||
box-shadow: 0 0 0 1px #40404080 inset;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,36 +47,46 @@
|
||||
#dlgActivity .sax-panel-item.Article .ArticleHeadline,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityOrganisation
|
||||
{
|
||||
margin: 0 0 8px 0;
|
||||
padding: 0 0 8px 0;
|
||||
margin: 0;
|
||||
padding: 8px 8px;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #b0b0b0;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleSummary,
|
||||
#dlgActivity .sax-panel-item.Article .ArticleAuthor,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityOrganisation,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityPosition,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityOutline
|
||||
{
|
||||
margin: 0 0 8px 0;
|
||||
padding: 0 0 8px 0;
|
||||
margin: 0;
|
||||
padding: 8px 8px;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #b0b0b0;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleAuthor
|
||||
{
|
||||
padding: 4px 8px;
|
||||
font-size: .9rem;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Opportunity
|
||||
{
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleContentSegment
|
||||
{
|
||||
margin:4px 0;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleContentSegmentImage img
|
||||
{
|
||||
max-width:75%;
|
||||
max-height:400px;
|
||||
max-width: 75%;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.ui-dialog.sax-dialog-activity button.ActivityReaction
|
||||
|
||||
@@ -113,6 +113,13 @@ button.accept-policy
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* Information */
|
||||
|
||||
.sax-para
|
||||
{
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
|
||||
a, a:hover
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
let $segs = $('.ArticleContentSegments', $itm);
|
||||
$('.ArticleHeadline', $itm).text(item.headline);
|
||||
$('.ArticleSummary', $itm).text(item.summary).toggle(!!item.summary);
|
||||
$('.ArticleAuthor', $itm).text(item.author).toggle(!!item.author);
|
||||
let segs = item.content.segments;
|
||||
for (let segIdx = 0; segIdx < segs.length; segIdx++)
|
||||
{
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
}
|
||||
sax.onUpdateItem = function (response)
|
||||
{
|
||||
sax.debug('onUpdateItem', response);
|
||||
//sax.debug('onUpdateItem', response);
|
||||
sax.clearItem();
|
||||
if (!response.success) return;
|
||||
let $frm = sax.$frm.article;
|
||||
@@ -347,17 +347,6 @@
|
||||
$('.sax-article').removeClass('ArticleHeader').addClass('ArticleContent');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectRegion = function ()
|
||||
{
|
||||
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('#ifArticleRegionId').val(), fnCallback: sax.onSelectRegion })
|
||||
}
|
||||
sax.onSelectRegion = function (region)
|
||||
{
|
||||
sax.clearControlError($('#ifArticleRegionId').val(region.id));
|
||||
$('#ifArticleRegionCaption').val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectSport = function ()
|
||||
{
|
||||
@@ -369,6 +358,17 @@
|
||||
$('#ifArticleSportCaption').val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectRegion = function ()
|
||||
{
|
||||
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('#ifArticleRegionId').val(), fnCallback: sax.onSelectRegion })
|
||||
}
|
||||
sax.onSelectRegion = function (region)
|
||||
{
|
||||
sax.clearControlError($('#ifArticleRegionId').val(region.id));
|
||||
$('#ifArticleRegionCaption').val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.storeItem = function ()
|
||||
{
|
||||
@@ -377,7 +377,7 @@
|
||||
}
|
||||
sax.onStoreItem = function (response)
|
||||
{
|
||||
sax.debug('onStoreItem', response);
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.article.dialog('close');
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Organisation Request.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let or = sax.orgReq;
|
||||
or.fn = {}; or.ajax = {};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.fn.requestOrganisation = function ()
|
||||
{
|
||||
or.fn.init();
|
||||
sax.openDialog(or.$dlg, 640, 760);
|
||||
}
|
||||
or.fn.storeOrganisation = function ()
|
||||
{
|
||||
//sax.debug('refreshResults');
|
||||
or.ajax.registerOrg = or.ajax.registerOrg || { url: sax.url.base + 'Organisation/Ajax/requestOrganisation', formId: 'frmOrganisationRequest', callbackFn: or.fn.handleRequestOrganisationResponse };
|
||||
sax.doAjaxRequest(or.ajax.registerOrg, 50);
|
||||
}
|
||||
or.fn.handleRequestOrganisationResponse = function (response)
|
||||
{
|
||||
sax.debug('or.handleRequestOrganisationResponse', response);
|
||||
if (!response.success) return;
|
||||
|
||||
}
|
||||
or.fn.cleanUp = function ()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectOrgSport = function ()
|
||||
{
|
||||
sax.data.selectSport.fn.selectSport({ caption: sax.dlg.title.selectSport, sportId: $('.OrganisationSportId', or.$frm).val(), fnCallback: sax.onSelectOrgSport })
|
||||
}
|
||||
sax.onSelectOrgSport = function (sport)
|
||||
{
|
||||
sax.clearControlError($('.OrganisationSportId', or.$frm).val(sport.id));
|
||||
$('.OrganisationSportCaption', or.$frm).val(sport ? sport.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.selectOrgRegion = function ()
|
||||
{
|
||||
sax.data.selectRegion.fn.selectRegion({ caption: sax.dlg.title.selectRegion, regionId: $('.OrganisationRegionId', or.$frm).val(), typesInc:[30], fnCallback: sax.onSelectOrgRegion })
|
||||
}
|
||||
sax.onSelectOrgRegion = function (region)
|
||||
{
|
||||
sax.clearControlError($('.OrganisationRegionId', or.$frm).val(region.id));
|
||||
$('.OrganisationRegionCaption', or.$frm).val(region ? region.name : '');
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
or.fn.init = function ()
|
||||
{
|
||||
if (or.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.title = sax.orgReq.dlgTitleRequestOrganisation;
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { or.fn.storeOrganisation(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { or.fn.cleanUp(); $(this).dialog('close'); };
|
||||
or.$dlg = $('#dlgOrganisationRequest').dialog(opt);
|
||||
or.$frm = $('#frmOrganisationRequest', or.$dlg);
|
||||
}
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
/* The End */
|
||||
+5
-3
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Admin - User page scripts.
|
||||
* Organisation selection.
|
||||
*/
|
||||
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let so = sax.selectOrganisation = sax.selectOrganisation || { data: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Org_' };
|
||||
let so = sax.selectOrganisation;
|
||||
so.data = {}; so.fn = {}; so.itemIdPrefix = 'Org_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
@@ -92,6 +93,7 @@
|
||||
so.fn.cleanUp = function ()
|
||||
{
|
||||
//sax.debug('confirmSelection', so.data.item);
|
||||
$('.sax-input.FilterOrganisation', so.$filter).val('');
|
||||
so.$results.empty();
|
||||
delete so.cfg;
|
||||
delete so.data.item;
|
||||
@@ -101,7 +103,7 @@
|
||||
//--------------------------------------------------------------
|
||||
so.fn.init = function ()
|
||||
{
|
||||
if (!so.$dlg) return;
|
||||
if (so.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function () { so.fn.refreshResults(200); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { so.fn.confirmSelection(); };
|
||||
+12
-4
@@ -5,13 +5,16 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let sr = sax.data.selectRegion = sax.data.selectRegion || { regions: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Rgn_' };
|
||||
let sr = sax.data.selectRegion;
|
||||
sr.regions = {}; sr.fn = {}; sr.ajax = {}; sr.itemIdPrefix = 'Rgn_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
* Region selection config:
|
||||
* - caption - dialog title.
|
||||
* - regionId - currently selected region.
|
||||
* - typesInc[] - included region types.
|
||||
* - typesExc[] - excluded region types.
|
||||
* - fnCallback - method to call on completion to store selected region.
|
||||
*/
|
||||
sr.fn.selectRegion = function (cfg)
|
||||
@@ -22,14 +25,15 @@
|
||||
if (sr.regions.length) sr.fn.showSelectRegion();
|
||||
else
|
||||
{
|
||||
sax.ajaxRegions = sax.ajaxRegions || { url: sax.url.base + 'Reference/Ajax/GetRegions', formId: 'frmNavigate', callbackFn: sr.fn.refreshRegionsAndSelect };
|
||||
sax.doAjaxRequest(sax.ajaxRegions, 20);
|
||||
sr.ajax.regions = sr.ajax.regions || { url: sax.url.base + 'Reference/Ajax/GetRegions', formId: 'frmNavigate', callbackFn: sr.fn.refreshRegionsAndSelect };
|
||||
sax.doAjaxRequest(sr.ajax.regions, 20);
|
||||
}
|
||||
}
|
||||
sr.fn.refreshRegionsAndSelect = function (response)
|
||||
{
|
||||
if (!response || !response.success) return;
|
||||
sr.regions = response.regions;
|
||||
sax.debug(sr.cfg);
|
||||
sr.fn.showSelectRegion();
|
||||
}
|
||||
sr.fn.showSelectRegion = function ()
|
||||
@@ -57,12 +61,16 @@
|
||||
let $regionsAvail = $('.sax-selectRegion-regions.AvailableRegions', sr.$dlg).empty();
|
||||
let $regionTmpl = $('.sax-panel-item-template .sax-panel-item.Region', sr.$dlg);
|
||||
let regions = [...sr.regions];
|
||||
let typesInc = sr.cfg.typesInc||[];
|
||||
let typesExc = sr.cfg.typesExc||[];
|
||||
regions.sort(sr.fn.compareRegions);
|
||||
for (let rgnIdx = 0; rgnIdx < regions.length; rgnIdx++)
|
||||
{
|
||||
let region = regions[rgnIdx];
|
||||
let id = region.id;
|
||||
if (filter && !region.name.match(reFilter)) continue;
|
||||
if (typesInc.length && !typesInc.includes(region.regionType)) continue;
|
||||
if (typesExc.length && typesExc.includes(region.regionType)) continue;
|
||||
let $region = $regionTmpl.clone();
|
||||
$region.prop('id', sr.itemIdPrefix + id).on('click', function () { sr.fn.onClickRegion(id); }).on('dblclick', function () { sr.fn.onDblClickRegion(id); }).find('.RegionName').text(region.name).end();
|
||||
if (id == sr.regionId) $region.addClass('sel');
|
||||
@@ -120,7 +128,7 @@
|
||||
//--------------------------------------------------------------
|
||||
sr.fn.init = function ()
|
||||
{
|
||||
if (!sr.$dlg) return;
|
||||
if (sr.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { sr.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { sr.fn.onDlgSize(); };
|
||||
@@ -15,8 +15,8 @@
|
||||
rp.paging = paging = paging || {};
|
||||
rp.$rp.toggle(paging.paged);
|
||||
$('.sax-paging-info', rp.$rp).text(sax.resultsPaging.msg.pageInfo.format(paging.pageNo, paging.pageCount));
|
||||
$('.sax-paging-first,.sax-paging-prev', rp.$rp).toggle(paging.pageNo > 1);
|
||||
$('.sax-paging-next,.sax-paging-last', rp.$rp).toggle(paging.pageNo < paging.pageCount);
|
||||
//$('.sax-paging-first,.sax-paging-prev', rp.$rp).toggle(paging.pageNo > 1);
|
||||
//$('.sax-paging-next,.sax-paging-last', rp.$rp).toggle(paging.pageNo < paging.pageCount);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
+5
-4
@@ -5,7 +5,8 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let ss = sax.data.selectSport = sax.data.selectSport || { sports: {}, fn: {}, $dlg: {}, itemIdPrefix: 'Spt_' };
|
||||
let ss = sax.data.selectSport;
|
||||
ss.sports = {}; ss.fn = {}; ss.ajax = {}; ss.itemIdPrefix = 'Spt_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
/*
|
||||
@@ -23,8 +24,8 @@
|
||||
if (ss.sports.length) ss.fn.showSelectSport();
|
||||
else
|
||||
{
|
||||
sax.ajaxSports = sax.ajaxSports || { url: sax.url.base + 'Reference/Ajax/GetSports', formId: 'frmNavigate', callbackFn: ss.fn.refreshSportsAndSelect };
|
||||
sax.doAjaxRequest(sax.ajaxSports, 20);
|
||||
ss.ajax.sports = ss.ajax.sports || { url: sax.url.base + 'Reference/Ajax/GetSports', formId: 'frmNavigate', callbackFn: ss.fn.refreshSportsAndSelect };
|
||||
sax.doAjaxRequest(ss.ajax.sports, 20);
|
||||
}
|
||||
}
|
||||
ss.fn.refreshSportsAndSelect = function (response)
|
||||
@@ -122,7 +123,7 @@
|
||||
//--------------------------------------------------------------
|
||||
ss.fn.init = function ()
|
||||
{
|
||||
if (!ss.$dlg) return;
|
||||
if (ss.$dlg) return;
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = function (evt, ui) { ss.fn.onDlgSize(); };
|
||||
opt.resize = function (evt, ui) { ss.fn.onDlgSize(); };
|
||||
Reference in New Issue
Block a user