Skip to content

Commit f926574

Browse files
authored
Merge pull request #304 from cloudscribe/dev
merge changes from dev
2 parents ac52311 + 17111b4 commit f926574

File tree

6 files changed

+54
-52
lines changed

6 files changed

+54
-52
lines changed

src/cloudscribe.SimpleContent.CompiledViews.Bootstrap4/Views/Shared/NewContentPartial.cshtml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@
2323
</div>
2424
@foreach (var template in Model.Templates.Data)
2525
{
26-
<div class="form-check">
27-
<input class="form-check-input" type="radio" asp-for="SelectedTemplate" value="@template.Key" id="@(template.Key)" />
28-
<label class="form-check-label" for="@(template.Key)">
29-
@template.Title
30-
</label>
31-
<p>@template.Description</p>
32-
</div>
26+
<div class="form-check">
27+
<input class="form-check-input" type="radio" asp-for="SelectedTemplate" value="@template.Key" id="@(template.Key)" />
28+
<span asp-validation-for="SelectedTemplate" class="invalid-feedback"></span>
29+
<label class="form-check-label" for="@(template.Key)">
30+
@template.Title
31+
</label>
32+
<p>@template.Description</p>
33+
</div>
3334
}
34-
<span asp-validation-for="SelectedTemplate" class="invalid-feedback"></span>
35+
3536

3637
</form>
3738
<div class="mt-2">

src/cloudscribe.SimpleContent.ContentTemplates.Bootstrap4/Views/Shared/ContentTemplates/BingMapEdit.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<label asp-for="ApiKey" class="control-label">@sr["Bing Map Api Key"]</label>
3636
<input asp-for="ApiKey" class="form-control" />
3737
<span asp-validation-for="ApiKey" class="text-danger"></span>
38+
<p><a href="https://www.microsoft.com/en-us/maps/create-a-bing-maps-key" target="_blank">@sr["Get a Bing Map API Key"]</a></p>
3839
</div>
3940

4041

src/cloudscribe.SimpleContent.ContentTemplates.Bootstrap4/Views/Shared/ContentTemplates/BingMapRender.cshtml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77
<div class="content-top">
88
@Html.Raw(Model.ContentAbove)
99
</div>
10-
<div class="row">
11-
<div class="col-md-8">
12-
<div id="bingMap1" class='bingMap' style="width: 100%;height: 400px;"
13-
data-bing-map=""
14-
data-location-title="@Model.LocationName"
15-
data-address="@Model.LocationAddress"
16-
data-directions-element-id="bingMap1Directions"
17-
data-itinerary-element-id="bingMap1Itinerary"
18-
data-from-address-element-id="bingMap1FromAddress"
19-
data-get-directions-button-id="bingMap1GetDirectionsButton"></div>
20-
</div>
21-
<div class="col-md-4">
22-
<div id="bingMap1Directions" class="map-directions mt-2 mb-2">
23-
<div class="form-group">
24-
<input id="bingMap1FromAddress" type="text" class="form-control" placeholder="From Address" />
25-
</div>
26-
<button id="bingMap1GetDirectionsButton" type="button" class="btn btn-primary">Get Directions</button>
27-
<a href="@Context.Request.Path">Clear</a>
10+
@if (!string.IsNullOrWhiteSpace(Model.ApiKey))
11+
{
12+
<div id="bingMap1" class='bingMap' style="width: 100%;height: 400px;"
13+
data-bing-map=""
14+
data-location-title="@Model.LocationName"
15+
data-address="@Model.LocationAddress"
16+
data-directions-element-id="bingMap1Directions"
17+
data-itinerary-element-id="bingMap1Itinerary"
18+
data-from-address-element-id="bingMap1FromAddress"
19+
data-get-directions-button-id="bingMap1GetDirectionsButton"></div>
20+
21+
<div id="bingMap1Directions" class="map-directions mt-2 mb-2">
22+
<div class="form-group">
23+
<input id="bingMap1FromAddress" type="text" class="form-control" placeholder="From Address" />
2824
</div>
29-
<div id='bingMap1Itinerary'></div>
30-
25+
<button id="bingMap1GetDirectionsButton" type="button" class="btn btn-primary">@sr["Get Directions"]</button>
26+
<a href="javascript:window.location.reload(true)">@sr["Clear"]</a>
3127
</div>
32-
</div>
28+
<div id='bingMap1Itinerary'></div>
29+
}
3330
<div class="content-bottom">
3431
@Html.Raw(Model.ContentBelow)
3532
</div>
33+
@if (!string.IsNullOrWhiteSpace(Model.ApiKey))
34+
{
35+
<script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?callback=loadMapScenario&[email protected]' async defer></script>
36+
}
3637

37-
<script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?callback=loadMapScenario&[email protected]' async defer></script>

src/cloudscribe.SimpleContent.ContentTemplates.Bootstrap4/Views/Shared/SectionsWithImageRenderColumnsPartial.cshtml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,56 +30,56 @@
3030
@if (!string.IsNullOrWhiteSpace(Model.SectionOneContent))
3131
{
3232
<div class="@GetCssClass(columnCount)">
33-
@if(!string.IsNullOrWhiteSpace(Model.SectionOneHeading))
34-
{
35-
<h3>@Model.SectionOneHeading</h3>
36-
}
3733
@if (!string.IsNullOrWhiteSpace(Model.SectionOneResizedUrl))
3834
{
3935
<img src="@Model.SectionOneResizedUrl" class="image-responsive mb-1" alt="@Model.SectionOneAltText" />
4036
}
37+
@if (!string.IsNullOrWhiteSpace(Model.SectionOneHeading))
38+
{
39+
<h3>@Model.SectionOneHeading</h3>
40+
}
4141
@Html.Raw(Model.SectionOneContent)
4242
</div>
4343
}
4444
@if (!string.IsNullOrWhiteSpace(Model.SectionTwoContent))
4545
{
4646
<div class="@GetCssClass(columnCount)">
47-
@if (!string.IsNullOrWhiteSpace(Model.SectionTwoHeading))
48-
{
49-
<h3>@Model.SectionTwoHeading</h3>
50-
}
5147
@if (!string.IsNullOrWhiteSpace(Model.SectionTwoResizedUrl))
5248
{
5349
<img src="@Model.SectionTwoResizedUrl" class="image-responsive mb-1" alt="@Model.SectionTwoAltText" />
5450
}
51+
@if (!string.IsNullOrWhiteSpace(Model.SectionTwoHeading))
52+
{
53+
<h3>@Model.SectionTwoHeading</h3>
54+
}
5555
@Html.Raw(Model.SectionTwoContent)
5656
</div>
5757
}
5858
@if (!string.IsNullOrWhiteSpace(Model.SectionThreeContent))
5959
{
6060
<div class="@GetCssClass(columnCount)">
61-
@if (!string.IsNullOrWhiteSpace(Model.SectionThreeHeading))
62-
{
63-
<h3>@Model.SectionThreeHeading</h3>
64-
}
6561
@if (!string.IsNullOrWhiteSpace(Model.SectionThreeResizedUrl))
6662
{
6763
<img src="@Model.SectionThreeResizedUrl" class="image-responsive mb-1" alt="@Model.SectionThreeAltText" />
6864
}
65+
@if (!string.IsNullOrWhiteSpace(Model.SectionThreeHeading))
66+
{
67+
<h3>@Model.SectionThreeHeading</h3>
68+
}
6969
@Html.Raw(Model.SectionThreeContent)
7070
</div>
7171
}
7272
@if (!string.IsNullOrWhiteSpace(Model.SectionFourContent))
7373
{
7474
<div class="@GetCssClass(columnCount)">
75-
@if (!string.IsNullOrWhiteSpace(Model.SectionFourHeading))
76-
{
77-
<h3>@Model.SectionFourHeading</h3>
78-
}
7975
@if (!string.IsNullOrWhiteSpace(Model.SectionFourResizedUrl))
8076
{
8177
<img src="@Model.SectionFourResizedUrl" class="image-responsive mb-1" alt="@Model.SectionFourAltText" />
8278
}
79+
@if (!string.IsNullOrWhiteSpace(Model.SectionFourHeading))
80+
{
81+
<h3>@Model.SectionFourHeading</h3>
82+
}
8383
@Html.Raw(Model.SectionFourContent)
8484
</div>
8585
}

src/cloudscribe.SimpleContent.Web/js/pagetree.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ $(function () {
8686
type: "POST",
8787
url: pageTree.urls.moveUrl,
8888
async: false,
89-
headers: { 'X-XSRF-TOKEN': this.xsrfToken },
89+
headers: { 'X-CSRFToken': this.xsrfToken },
9090
dataType: "json",
9191
data: obj,
9292
success: function (data, textStatus, jqXHR) {
@@ -118,7 +118,7 @@ $(function () {
118118
$.ajax({
119119
type: "POST",
120120
url: pageTree.urls.sortUrl,
121-
headers: { 'X-XSRF-TOKEN': pageTree.xsrfToken },
121+
headers: { 'X-CSRFToken': pageTree.xsrfToken },
122122
async: false,
123123
processData: true,
124124
dataType: "json",
@@ -163,7 +163,7 @@ $(function () {
163163
$.ajax({
164164
type: "POST",
165165
url: pageTree.urls.deleteUrl,
166-
headers: { 'X-XSRF-TOKEN': pageTree.xsrfToken },
166+
headers: { 'X-CSRFToken': pageTree.xsrfToken },
167167
async: false,
168168
dataType: "json",
169169
data: objDel,

src/cloudscribe.SimpleContent.Web/js/pagetree.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)