Skip to content

Commit 277134d

Browse files
authored
Merge pull request #209 from acjh/patch-17
Update abp-web-resources package
2 parents 82a1da9 + ed7b125 commit 277134d

File tree

9 files changed

+60
-53
lines changed

9 files changed

+60
-53
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"chart.js": "chartjs#^2.6.0",
2626
"jquery-sparkline": "^2.1.3",
2727
"Flot": "jquery-flot#^0.8.3",
28-
"abp-web-resources": "^3.1.0"
28+
"abp-web-resources": "^3.5.0"
2929
},
3030
"resolutions": {
3131
"jquery": ">=1.6.3"

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/.bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"authors": [
55
"Halil İbrahim Kalkan"
66
],
7-
"version": "3.3.0",
7+
"version": "3.5.0",
88
"description": "Script and style resources for ASP.NET Boilerplate based web projects.",
99
"main": "Abp/Framework/scripts/abp.js",
1010
"moduleType": [],
@@ -25,10 +25,10 @@
2525
".nuget",
2626
"packages"
2727
],
28-
"_release": "3.3.0",
28+
"_release": "3.5.0",
2929
"_resolution": {
3030
"type": "version",
31-
"tag": "v3.3.0",
31+
"tag": "v3.5.0",
3232
"commit": "5a6ff004cd1a55384dc8697dee3f06009d72e4ae"
3333
},
3434
"_source": "https://github.com/aspnetboilerplate/bower-abp-resources.git",

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ var abp = abp || {};
2929
}
3030

3131
setTimeout(function () {
32-
if ($.connection.hub.state === $.signalR.connectionState.disconnected) {
33-
$.connection.hub.start();
34-
}
32+
connection.start();
3533
}, 5000);
3634
});
3735

@@ -42,46 +40,51 @@ var abp = abp || {};
4240
}
4341

4442
// Connect to the server
45-
abp.signalr.connect = function() {
43+
abp.signalr.connect = function () {
4644
var url = abp.signalr.url || '/signalr';
4745

48-
// Add query string: https://github.com/aspnet/SignalR/issues/680
49-
if (abp.signalr.qs) {
50-
url += '?' + abp.signalr.qs;
51-
}
52-
5346
// Start the connection.
54-
startConnection(url, configureConnection).then(function (connection) {
55-
abp.log.debug('Connected to SignalR server!'); //TODO: Remove log
56-
abp.event.trigger('abp.signalr.connected');
57-
// Call the Register method on the hub.
58-
connection.invoke('register').then(function () {
59-
abp.log.debug('Registered to the SignalR server!'); //TODO: Remove log
47+
startConnection(url, configureConnection)
48+
.then(function (connection) {
49+
abp.log.debug('Connected to SignalR server!'); //TODO: Remove log
50+
abp.event.trigger('abp.signalr.connected');
51+
// Call the Register method on the hub.
52+
connection.invoke('register').then(function () {
53+
abp.log.debug('Registered to the SignalR server!'); //TODO: Remove log
54+
});
55+
})
56+
.catch(function (error) {
57+
abp.log.debug(error.message);
6058
});
61-
})
62-
.catch(error => {
63-
abp.log.debug(error.message);
64-
});
6559
};
6660

6761
// Starts a connection with transport fallback - if the connection cannot be started using
6862
// the webSockets transport the function will fallback to the serverSentEvents transport and
6963
// if this does not work it will try longPolling. If the connection cannot be started using
7064
// any of the available transports the function will return a rejected Promise.
7165
function startConnection(url, configureConnection) {
66+
if (abp.signalr.remoteServiceBaseUrl) {
67+
url = abp.signalr.remoteServiceBaseUrl + url;
68+
}
69+
70+
// Add query string: https://github.com/aspnet/SignalR/issues/680
71+
if (abp.signalr.qs) {
72+
url += '?' + abp.signalr.qs;
73+
}
74+
7275
return function start(transport) {
73-
abp.log.debug(`Starting connection using ${signalR.TransportType[transport]} transport`);
74-
var connection = new signalR.HubConnection(url, {transport: transport});
76+
abp.log.debug('Starting connection using ' + signalR.TransportType[transport] + ' transport');
77+
var connection = new signalR.HubConnection(url, { transport: transport });
7578
if (configureConnection && typeof configureConnection === 'function') {
7679
configureConnection(connection);
7780
}
7881

7982
return connection.start()
80-
.then(function() {
83+
.then(function () {
8184
return connection;
8285
})
83-
.catch(function(error) {
84-
abp.log.debug(`Cannot start the connection using ${signalR.TransportType[transport]} transport. ${error.message}`);
86+
.catch(function (error) {
87+
abp.log.debug('Cannot start the connection using ' + signalR.TransportType[transport] + ' transport. ' + error.message);
8588
if (transport !== signalR.TransportType.LongPolling) {
8689
return start(transport + 1);
8790
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66

77
let qs: string;
88

9+
let remoteServiceBaseUrl: string;
10+
911
let url: string;
1012

1113
function connect(): any;
1214

15+
function startConnection(url: string, configureConnection: Function): Promise<any>;
16+
1317
namespace hubs {
1418

1519
let common: any;

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/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.3.0",
7+
"version": "v3.5.0",
88
"description": "Script and style resources for ASP.NET Boilerplate based web projects.",
99
"main": "Abp/Framework/scripts/abp.js",
1010
"moduleType": [],

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/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.2.3",
3+
"version": "3.5.0",
44
"description": "ASP.NET Boilerplate web resources",
55
"main": "Abp/Framework/scripts/abp.js",
66
"dependencies": {},
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.3.0" targetFramework="net461" />
3+
<package id="Abp.Web.Resources" version="3.5.0" targetFramework="net461" />
44
</packages>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/_Bundles/account-layout.min.js

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

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/_Bundles/shared-layout.min.js

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

0 commit comments

Comments
 (0)