Skip to content

Commit 5ecd13b

Browse files
committed
Updated for ABP v3.8.
1 parent d36d74c commit 5ecd13b

File tree

6 files changed

+47
-25
lines changed

6 files changed

+47
-25
lines changed

Abp/Framework/scripts/abp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@
804804
}
805805

806806
var now = function () {
807-
return new Date();
807+
return toUtc(new Date());
808808
};
809809

810810
var normalize = function (date) {

Abp/Framework/scripts/libs/abp.signalr-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ var abp = abp || {};
6969

7070
// Add query string: https://github.com/aspnet/SignalR/issues/680
7171
if (abp.signalr.qs) {
72-
url += '?' + abp.signalr.qs;
72+
url += (url.indexOf('?') == -1 ? '?' : '&') + abp.signalr.qs;
7373
}
7474

7575
return function start(transport) {
7676
abp.log.debug('Starting connection using ' + signalR.HttpTransportType[transport] + ' transport');
7777
var connection = new signalR.HubConnectionBuilder()
78-
.withUrl(url, transport)
78+
.withUrl(abp.appPath + url, transport)
7979
.build();
8080
if (configureConnection && typeof configureConnection === 'function') {
8181
configureConnection(connection);

Abp/Framework/scripts/libs/abp.sweet-alert.js

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,31 @@
3434

3535
/* MESSAGE **************************************************/
3636

37-
var showMessage = function (type, message, title) {
37+
var showMessage = function (type, message, title, isHtml) {
38+
3839
if (!title) {
3940
title = message;
4041
message = undefined;
4142
}
4243

44+
var messageContent = {
45+
title: title
46+
};
47+
48+
if (isHtml) {
49+
const el = document.createElement('div');
50+
el.innerHTML = message;
51+
52+
messageContent.content = el;
53+
} else {
54+
messageContent.text = message;
55+
}
56+
4357
var opts = $.extend(
4458
{},
4559
abp.libs.sweetAlert.config['default'],
4660
abp.libs.sweetAlert.config[type],
47-
{
48-
title: title,
49-
text: message
50-
}
61+
messageContent
5162
);
5263

5364
return $.Deferred(function ($dfd) {
@@ -57,38 +68,49 @@
5768
});
5869
};
5970

60-
abp.message.info = function (message, title) {
61-
return showMessage('info', message, title);
71+
abp.message.info = function (message, title, isHtml) {
72+
return showMessage('info', message, title, isHtml);
6273
};
6374

64-
abp.message.success = function (message, title) {
65-
return showMessage('success', message, title);
75+
abp.message.success = function (message, title, isHtml) {
76+
return showMessage('success', message, title, isHtml);
6677
};
6778

68-
abp.message.warn = function (message, title) {
69-
return showMessage('warn', message, title);
79+
abp.message.warn = function (message, title, isHtml) {
80+
return showMessage('warn', message, title, isHtml);
7081
};
7182

72-
abp.message.error = function (message, title) {
73-
return showMessage('error', message, title);
83+
abp.message.error = function (message, title, isHtml) {
84+
return showMessage('error', message, title, isHtml);
7485
};
7586

76-
abp.message.confirm = function (message, titleOrCallback, callback) {
77-
var userOpts = {
78-
text: message
79-
};
87+
abp.message.confirm = function (message, titleOrCallback, callback, isHtml) {
88+
var messageContent;
89+
90+
if (isHtml) {
91+
const el = document.createElement('div');
92+
el.innerHTML = message;
93+
94+
messageContent = {
95+
content: el
96+
}
97+
} else {
98+
messageContent = {
99+
text: message
100+
}
101+
}
80102

81103
if ($.isFunction(titleOrCallback)) {
82104
callback = titleOrCallback;
83105
} else if (titleOrCallback) {
84-
userOpts.title = titleOrCallback;
106+
messageContent.title = titleOrCallback;
85107
};
86108

87109
var opts = $.extend(
88110
{},
89111
abp.libs.sweetAlert.config['default'],
90112
abp.libs.sweetAlert.config.confirm,
91-
userOpts
113+
messageContent
92114
);
93115

94116
return $.Deferred(function ($dfd) {

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"authors": [
55
"Halil İbrahim Kalkan"
66
],
7-
"version": "v3.7.0",
7+
"version": "v3.8.0",
88
"description": "Script and style resources for ASP.NET Boilerplate based web projects.",
99
"main": "Abp/Framework/scripts/abp.js",
1010
"moduleType": [],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "abp-web-resources",
3-
"version": "3.7.0",
3+
"version": "3.8.0",
44
"description": "ASP.NET Boilerplate web resources",
55
"main": "Abp/Framework/scripts/abp.js",
66
"dependencies": {},

packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Abp.Web.Resources" version="3.7.0" targetFramework="net461" />
3+
<package id="Abp.Web.Resources" version="3.8.0" targetFramework="net461" />
44
</packages>

0 commit comments

Comments
 (0)