Skip to content

Commit

Permalink
Merge pull request #20 from KorzhCom/dev
Browse files Browse the repository at this point in the history
Version 1.2.1
  • Loading branch information
antifree authored Feb 25, 2021
2 parents e74b0d1 + d188513 commit af8dfb0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ We also add EasyData styles and the script file (`easydata.min.js`), which rende
@{
ViewData["Title"] = "EasyData";
}
<link rel="stylesheet" href="https://cdn.korzh.com/ed/1.2.0/easydata.min.css" />
<link rel="stylesheet" href="https://cdn.korzh.com/ed/1.2.1/easydata.min.css" />
<div id="EasyDataContainer"></div>
@section Scripts {
<script src="https://cdn.korzh.com/ed/1.2.0/easydata.min.js" type="text/javascript"></script>
<script src="https://cdn.korzh.com/ed/1.2.1/easydata.min.js" type="text/javascript"></script>
<script>
window.addEventListener('load', function () {
new easydata.crud.EasyDataViewDispatcher().run()
Expand Down
26 changes: 14 additions & 12 deletions easydata.js/packs/core/src/http/http_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,29 @@ export class HttpClient {

if (xhr.readyState != 4) {
return;
}

}
const responseContentType = xhr.getResponseHeader('Content-Type') || '';
const responseObj =
(xhr.responseType === 'arraybuffer'|| xhr.responseType === 'blob')
? xhr.response
: (responseContentType.indexOf('application/json') == 0)
? JSON.parse(xhr.responseText)
: xhr.responseText;

const status = xhr.status;
if (status >= 300 || status < 200) {
const responseObj = (responseContentType.indexOf('application/json') == 0)
? JSON.parse(xhr.responseText)
: xhr.responseText;
const message = responseObj.message ||
(status == 404
(status == 404
? `No such endpoint: ${url}`
: responseObj);

reject(new HttpResponseError(status, message));
reject(new HttpResponseError(status, message));
return;
}

const responseObj =
(xhr.responseType === 'arraybuffer'|| xhr.responseType === 'blob')
? xhr.response
: (responseContentType.indexOf('application/json') == 0)
? JSON.parse(xhr.responseText)
: xhr.responseText;

resolve(responseObj);
}

Expand Down
6 changes: 3 additions & 3 deletions easydata.js/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"baseVersion": "1.2.0",
"assetVersion": "01_02_00"
"version": "1.2.1",
"baseVersion": "1.2.1",
"assetVersion": "01_02_01"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ExcelHtmlDataExporter : HtmlDataExporter
/// Gets the MIME content type of the exporting format.
/// </summary>
/// <returns>System.String.</returns>
public new string GetContentType()
public override string GetContentType()
{
return "application/vnd.ms-excel";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ await writer.WriteLineAsync(" .eq-desc {"
/// Gets the MIME content type of the exporting format.
/// </summary>
/// <returns>System.String.</returns>
public string GetContentType()
public virtual string GetContentType()
{
return "text/html";
}
Expand Down
6 changes: 3 additions & 3 deletions easydata.net/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"assemblyVersion": "1.2.0.13",
"packageVersion": "1.2.0",
"assetVersion": "01_02_00"
"assemblyVersion": "1.2.1.0",
"packageVersion": "1.2.1",
"assetVersion": "01_02_01"
}

0 comments on commit af8dfb0

Please sign in to comment.