-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…not supported. #16 - attempt at fixing the HTTPS server issue.
- Loading branch information
Alan Juden
committed
Feb 28, 2017
1 parent
d53c259
commit c741c6e
Showing
8 changed files
with
143 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,12 @@ | |
<link type="text/css" rel="stylesheet" href="~/css/select2.min.css" /> | ||
<link type="text/css" rel="stylesheet" href="~/css/select2-bootstrap.min.css" /> | ||
<link type="text/css" rel="stylesheet" href="~/css/mvcreportviewer-bootstrap.css" /> | ||
<style type="text/css"> | ||
.row { | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
</style> | ||
<script type="text/javascript" src="~/js/select2.min.4.0.3.js"></script> | ||
<script type="text/javascript" src="~/js/jquery.highlight-5.js"></script> | ||
<script type="text/javascript"> | ||
|
@@ -58,8 +64,12 @@ | |
exportReport($(this)); | ||
}); | ||
$('#ReportViewerSearchText').change(function () { | ||
findText(); | ||
$('#ReportViewerSearchText').on("keypress", function (e) { | ||
if (e.keyCode == 13) { | ||
// Cancel the default action on keypress event | ||
e.preventDefault(); | ||
findText(); | ||
} | ||
}); | ||
$('.FindTextButton').click(function () { | ||
|
@@ -72,8 +82,10 @@ | |
}); | ||
function showLoadingProgress(message) { | ||
hideLoadingProgress(); | ||
$('.ReportViewerContent').hide(); | ||
$('.ReportViewerContentContainer').append('<div class="loadingContainer"><div style="margin: 0 auto; width: 100%; text-align: center; vertical-align: middle;"><h2><i class="glyphicon glyphicon-cog gly-spin"></i>' + message + '</h2></div></div>'); | ||
$('.ReportViewerContentContainer').append('<div class="loadingContainer"><div style="margin: 0 auto; width: 100%; text-align: center; vertical-align: middle;"><h2><i class="glyphicon glyphicon-refresh gly-spin"></i>' + message + '</h2></div></div>'); | ||
} | ||
function hideLoadingProgress() { | ||
|
@@ -85,7 +97,7 @@ | |
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
window.open("/Report/PrintReport/[email protected]&" + urlParams, "_blank"); | ||
window.open("/Report/PrintReport/[email protected].UrlEncode()&" + urlParams, "_blank"); | ||
} | ||
function findText() { | ||
|
@@ -96,19 +108,23 @@ | |
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
var page = parseInt($('#ReportViewerCurrentPage').val()) + 1; | ||
var page = parseInt($('#ReportViewerCurrentPage').val()); | ||
$.get("/Report/FindStringInReport/[email protected]&page=" + page + "&" + urlParams).done(function (data) { | ||
$.get("/Report/FindStringInReport/[email protected].UrlEncode()&page=" + page + "&searchText=" + searchText + "&" + urlParams).done(function (data) { | ||
if (data > 0) { | ||
viewReportPage(data); | ||
viewReportPage(data, function () { | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
}); | ||
} else { | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
} | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
}); | ||
} | ||
} | ||
function viewReportPage(page) { | ||
function viewReportPage(page, afterReportLoadedCallback) { | ||
showLoadingProgress('Loading Report Page...'); | ||
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
|
@@ -120,10 +136,14 @@ | |
page = totalPages; | ||
} | ||
$.get("/Report/ViewReportPage/[email protected]&page=" + page + "&" + urlParams) | ||
$.get("/Report/ViewReportPage/[email protected].UrlEncode()&page=" + page + "&" + urlParams) | ||
.done(function (data) { | ||
updateReportContent(data); | ||
hideLoadingProgress(); | ||
if (afterReportLoadedCallback && typeof (afterReportLoadedCallback) == "function") { | ||
afterReportLoadedCallback(); | ||
} | ||
}) | ||
.fail(function (data) { | ||
$('.ReportViewerContent').html("<div class='ReportViewerError'>Report failed to load, check report parameters...</div>"); | ||
|
@@ -136,7 +156,7 @@ | |
var urlParams = $.param(params); | ||
var format = $(element).attr('class').replace("Export", ""); | ||
window.location.href = "/Report/ExportReport/[email protected]&format=" + format + "&" + urlParams; | ||
window.location.href = "/Report/ExportReport/[email protected].UrlEncode()&format=" + format + "&" + urlParams; | ||
} | ||
function updateReportContent(data) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,8 @@ | |
|
||
span a[disabled=disabled] { | ||
color: grey; | ||
} | ||
|
||
.loadingContainer i { | ||
margin-right: .5em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,8 @@ | |
|
||
span a[disabled=disabled] { | ||
color: grey; | ||
} | ||
|
||
.loadingContainer i { | ||
margin-right: .5em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,12 @@ | |
<link type="text/css" rel="stylesheet" href="~/Content/select2.min.css" /> | ||
<link type="text/css" rel="stylesheet" href="~/Content/select2-bootstrap.min.css" /> | ||
<link type="text/css" rel="stylesheet" href="~/Content/mvcreportviewer-bootstrap.css" /> | ||
<style type="text/css"> | ||
.row { | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
</style> | ||
<script type="text/javascript" src="~/Scripts/select2.min.4.0.3.js"></script> | ||
<script type="text/javascript" src="~/Scripts/jquery.highlight-5.js"></script> | ||
<script type="text/javascript"> | ||
|
@@ -58,8 +64,12 @@ | |
exportReport($(this)); | ||
}); | ||
$('#ReportViewerSearchText').change(function () { | ||
findText(); | ||
$('#ReportViewerSearchText').on("keypress", function (e) { | ||
if (e.keyCode == 13) { | ||
// Cancel the default action on keypress event | ||
e.preventDefault(); | ||
findText(); | ||
} | ||
}); | ||
$('.FindTextButton').click(function () { | ||
|
@@ -72,8 +82,10 @@ | |
}); | ||
function showLoadingProgress(message) { | ||
hideLoadingProgress(); | ||
$('.ReportViewerContent').hide(); | ||
$('.ReportViewerContentContainer').append('<div class="loadingContainer"><div style="margin: 0 auto; width: 100%; text-align: center; vertical-align: middle;"><h2><i class="glyphicon glyphicon-cog gly-spin"></i>' + message + '</h2></div></div>'); | ||
$('.ReportViewerContentContainer').append('<div class="loadingContainer"><div style="margin: 0 auto; width: 100%; text-align: center; vertical-align: middle;"><h2><i class="glyphicon glyphicon-refresh gly-spin"></i>' + message + '</h2></div></div>'); | ||
} | ||
function hideLoadingProgress() { | ||
|
@@ -85,7 +97,7 @@ | |
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
window.open("/Report/PrintReport/[email protected]&" + urlParams, "_blank"); | ||
window.open("/Report/PrintReport/[email protected].UrlEncode()&" + urlParams, "_blank"); | ||
} | ||
function findText() { | ||
|
@@ -96,19 +108,23 @@ | |
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
var page = parseInt($('#ReportViewerCurrentPage').val()) + 1; | ||
var page = parseInt($('#ReportViewerCurrentPage').val()); | ||
$.get("/Report/FindStringInReport/[email protected]&page=" + page + "&" + urlParams).done(function (data) { | ||
$.get("/Report/FindStringInReport/[email protected].UrlEncode()&page=" + page + "&searchText=" + searchText + "&" + urlParams).done(function (data) { | ||
if (data > 0) { | ||
viewReportPage(data); | ||
viewReportPage(data, function () { | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
}); | ||
} else { | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
} | ||
$('.ReportViewerContent').highlight(searchText); | ||
hideLoadingProgress(); | ||
}); | ||
} | ||
} | ||
function viewReportPage(page) { | ||
function viewReportPage(page, afterReportLoadedCallback) { | ||
showLoadingProgress('Loading Report Page...'); | ||
var params = $('.ParametersContainer :input').serializeArray(); | ||
var urlParams = $.param(params); | ||
|
@@ -120,10 +136,14 @@ | |
page = totalPages; | ||
} | ||
$.get("/Report/ViewReportPage/[email protected]&page=" + page + "&" + urlParams) | ||
$.get("/Report/ViewReportPage/[email protected].UrlEncode()&page=" + page + "&" + urlParams) | ||
.done(function (data) { | ||
updateReportContent(data); | ||
hideLoadingProgress(); | ||
if (afterReportLoadedCallback && typeof (afterReportLoadedCallback) == "function") { | ||
afterReportLoadedCallback(); | ||
} | ||
}) | ||
.fail(function (data) { | ||
$('.ReportViewerContent').html("<div class='ReportViewerError'>Report failed to load, check report parameters...</div>"); | ||
|
@@ -136,7 +156,7 @@ | |
var urlParams = $.param(params); | ||
var format = $(element).attr('class').replace("Export", ""); | ||
window.location.href = "/Report/ExportReport/[email protected]&format=" + format + "&" + urlParams; | ||
window.location.href = "/Report/ExportReport/[email protected].UrlEncode()&format=" + format + "&" + urlParams; | ||
} | ||
function updateReportContent(data) { | ||
|
@@ -162,5 +182,5 @@ | |
} | ||
|
||
@section Content { | ||
@Html.RenderReportViewer(Model) | ||
@Html.RenderReportViewer(Model) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.