Skip to content

Commit 908df56

Browse files
Added some smaller bug fixes
Nicer UI Datatables
1 parent 72841d3 commit 908df56

File tree

12 files changed

+98
-137
lines changed

12 files changed

+98
-137
lines changed

DeveloperTools/EPiServer.DeveloperTools.Views/Views/AppEnvironment/Index.cshtml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,3 @@
6565
}
6666
</table></pre>
6767
</div>
68-
69-
@section AdditionalScripts {
70-
<script>
71-
$(document).ready(function () {
72-
$('#theList').dataTable(
73-
{
74-
"aaSorting": [[0, "asc"]],
75-
"bPaginate": false,
76-
"bLengthChange": false,
77-
"bFilter": true,
78-
"bSort": true,
79-
"bInfo": false,
80-
"bAutoWidth": true
81-
});
82-
});
83-
</script>
84-
}

DeveloperTools/EPiServer.DeveloperTools.Views/Views/ContentTypeAnalyzer/Index.cshtml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,16 @@
4545
</table>
4646
</div>
4747

48-
@section AdditionalScripts {
48+
@section AdditionalScripts
49+
{
4950
<script>
5051
$(document).ready(function () {
51-
$('#theList').dataTable(
52-
{
53-
"aaSorting": [[1, "desc"]],
54-
"bPaginate": false,
55-
"bLengthChange": false,
56-
"bFilter": true,
57-
"bSort": true,
58-
"bInfo": false,
59-
"bAutoWidth": true
60-
});
52+
$('#theList').DataTable({
53+
"paging": false,
54+
"info": false,
55+
"fixedHeader": true,
56+
"ordering": false
57+
});
6158
});
6259
</script>
6360
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<h1>Welcome to EPiServer.DeveloperTools!</h1>
2-
<h2>USE AT YOUR OWN RISK!</h2>
1+
<h1>Welcome to Optimizely DeveloperTools!</h1>
2+
<br/>
3+
<h2>Set of tools that will help you to diagnose or view internals of your site.</h2>
4+
<p>DISCLAIMER: Use at your own risk!</p>

DeveloperTools/EPiServer.DeveloperTools.Views/Views/IOC/Index.cshtml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,3 @@
3131
</tbody>
3232
</table>
3333
</div>
34-
35-
@section AdditionalScripts {
36-
<script>
37-
$(document).ready(function () {
38-
$('#theList').dataTable(
39-
{
40-
"aaSorting": [[1, "desc"]],
41-
"bPaginate": false,
42-
"bLengthChange": false,
43-
"bFilter": true,
44-
"bSort": true,
45-
"bInfo": false,
46-
"bAutoWidth": true
47-
});
48-
});
49-
</script>
50-
}

DeveloperTools/EPiServer.DeveloperTools.Views/Views/LocalObjectCache/Index.cshtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
</span>
3838
</div>
3939

40-
<table class="table table-condensed table-bordered table-condensed stripe">
40+
<br/>
41+
42+
<table class="table table-condensed table-bordered table-condensed stripe" id="theList">
4143
<thead>
4244
<tr>
4345
<th><input type="checkbox" id="clearAll" name="clearAll" onClick="toggle(this)" value="true" /></th>
@@ -62,7 +64,6 @@
6264
</form>
6365
</div>
6466

65-
6667
@section AdditionalScripts {
6768
<script language="JavaScript">
6869
function toggle(source) {

DeveloperTools/EPiServer.DeveloperTools.Views/Views/RemoteEvent/Index.cshtml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,16 @@
7070
}
7171
</div>
7272
</div>
73+
74+
@section AdditionalScripts
75+
{
76+
<script>
77+
$(document).ready(function () {
78+
$('.dataTable').DataTable({
79+
"paging": false,
80+
"info": false,
81+
fixedHeader: true
82+
});
83+
});
84+
</script>
85+
}

DeveloperTools/EPiServer.DeveloperTools.Views/Views/Routes/Index.cshtml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,4 @@
4646
}
4747
</tbody>
4848
</table>
49-
5049
</div>
51-
52-
@section AdditionalScripts {
53-
<script>
54-
$(document).ready(function () {
55-
$('#theList').dataTable(
56-
{
57-
"aaSorting": [[0, "asc"]],
58-
"bPaginate": false,
59-
"bLengthChange": false,
60-
"bFilter": true,
61-
"bSort": true,
62-
"bInfo": false,
63-
"bAutoWidth": true
64-
});
65-
});
66-
</script>
67-
}

DeveloperTools/EPiServer.DeveloperTools.Views/Views/Shared/_ShellLayout.cshtml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,33 @@
77
<meta charset="utf-8">
88
<meta http-equiv="X-UA-Compatible" content="IE=edge">
99
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
10-
<title>EPiServer.DeveloperTools</title>
10+
<title>Optimizely DeveloperTools</title>
1111
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
12+
<link rel="stylesheet" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css" crossorigin="anonymous">
1213
<style>
1314
body {
1415
margin: 0;
1516
}
1617
17-
input[type='text'] {
18-
border: 0 !important;
19-
background: none !important;
18+
.main-body {
19+
padding: 0 15px;
2020
}
2121
2222
iframe {
2323
height: calc(100vh - 46px);
2424
width: 100vw;
2525
box-sizing: border-box;
2626
}
27+
28+
table.dataTable thead tr {
29+
background-color: #080736;
30+
color: #FFFFFF;
31+
}
32+
33+
table.dataTable thead th, table.dataTable tfoot th {
34+
font-weight: normal !important;
35+
}
36+
2737
</style>
2838
@await RenderSectionAsync("AdditionalStyles", false)
2939
</head>
@@ -34,12 +44,31 @@
3444
<div @Html.Raw(Html.ApplyPlatformNavigation()) style="z-index:auto;">
3545
</div>
3646

37-
@RenderBody()
47+
<div class="main-body">
48+
@RenderBody()
49+
</div>
3850

3951
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
4052
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
4153
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
4254
@ClientResources.RenderResources("developertools", new[] { ClientResourceType.Script })
43-
@await RenderSectionAsync("AdditionalScripts", false)
55+
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js" language="javascript" type="text/javascript"></script>
56+
57+
@if (IsSectionDefined("AdditionalScripts"))
58+
{
59+
@await RenderSectionAsync("AdditionalScripts", false)
60+
}
61+
else
62+
{
63+
<script>
64+
$(document).ready(function () {
65+
$('#theList').DataTable({
66+
"paging": false,
67+
"info": false,
68+
"fixedHeader": true
69+
});
70+
});
71+
</script>
72+
}
4473
</body>
4574
</html>

DeveloperTools/EPiServer.DeveloperTools.Views/Views/StartupPerf/Index.cshtml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,16 @@
2929
</table>
3030
</div>
3131

32-
@section AdditionalScripts {
33-
<script>
34-
$(document).ready(function () {
35-
$('#theList').dataTable(
36-
{
37-
"aaSorting": [[3, "desc"]],
38-
"bPaginate": false,
39-
"bLengthChange": false,
40-
"bFilter": true,
41-
"bSort": true,
42-
"bInfo": false,
43-
"bAutoWidth": true
32+
@section AdditionalScripts
33+
{
34+
<script>
35+
$(document).ready(function () {
36+
$('#theList').DataTable({
37+
"paging": false,
38+
"info": false,
39+
fixedHeader: true,
40+
"order": [[ 3, 'desc' ]]
4441
});
45-
});
46-
</script>
42+
});
43+
</script>
4744
}

DeveloperTools/EPiServer.DeveloperTools.Views/Views/Templates/Index.cshtml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<table cellpadding="0" cellspacing="0" border="0" class="display" id="theList">
99
<thead>
1010
<tr>
11+
<th align="left">Nr.</th>
1112
<th align="left">ContentModelType</th>
1213
<th align="left">Name</th>
1314
<th align="left">Category</th>
@@ -20,13 +21,17 @@
2021
</tr>
2122
</thead>
2223
<tbody>
24+
@{
25+
var index = 1;
26+
}
2327
@foreach (var a in Model.Templates)
2428
{
2529
var i = 0;
2630

2731
@foreach (var t in a.Value)
2832
{
2933
<tr>
34+
<td>@index</td>
3035
<td>@(i == 0 ? a.Key.ModelType.FullName : string.Empty)</td>
3136
<td>@t.DisplayName (@t.Name)</td>
3237
<td>@t.TemplateTypeCategory</td>
@@ -40,24 +45,9 @@
4045

4146
i++;
4247
}
48+
49+
index++;
4350
}
4451
</tbody>
4552
</table>
4653
</div>
47-
48-
@section AdditionalScripts {
49-
<script>
50-
$(document).ready(function () {
51-
$('#theList').dataTable(
52-
{
53-
"aaSorting": [[1, "desc"]],
54-
"bPaginate": false,
55-
"bLengthChange": false,
56-
"bFilter": true,
57-
"bSort": true,
58-
"bInfo": false,
59-
"bAutoWidth": true
60-
});
61-
});
62-
</script>
63-
}

0 commit comments

Comments
 (0)