Skip to content
This repository has been archived by the owner on Aug 18, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
aguacongas committed Oct 30, 2016
2 parents b363345 + 57e5c3c commit 0ad3450
Show file tree
Hide file tree
Showing 9 changed files with 29,149 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ To run it, launch dotnet command : `dotnet run`
As it connects to [chatle server](https://github.com/aguacongas/chatle/tree/develop/src/chatle), you'll need to run the server
[![Travis Build Status](https://travis-ci.org/aguacongas/chatle.aurelia.svg?branch=develop)](https://travis-ci.org/aguacongas/chatle.aurelia)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/github/aguacongas/chatle.aurelia?svg=true&retina=true)](https://ci.appveyor.com/project/aguacongas/chatle-aurelia)
[![Coverage Status](https://coveralls.io/repos/github/aguacongas/chatle.aurelia/badge.svg?branch=develop&service=github)](https://coveralls.io/github/aguacongas/chatle.aurelia?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/aguacongas/chatle.aurelia/badge.svg)](https://coveralls.io/github/aguacongas/chatle.aurelia)
Binary file added docs/favicon.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Chatle</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body class="chatle" aurelia-app="main">
<script src="scripts/vendor-bundle.js" data-main="aurelia-bootstrapper"></script>
<script src="scripts/jquery.signalR.min.js"></script>
<script src="scripts/chatle.signalR.js"></script>
</body>
</html>
2,803 changes: 2,803 additions & 0 deletions docs/scripts/app-bundle.js

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions docs/scripts/chatle.signalR.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*!
* ASP.NET SignalR JavaScript Library v2.2.0-pre
* http://signalr.net/
*
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
* Licensed under the Apache 2.0
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md
*
*/
(function ($, window, undefined) {
/// <param name="$" type="jQuery" />
"use strict";

if (typeof ($.signalR) !== "function") {
throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");
}

var signalR = $.signalR;

function makeProxyCallback(hub, callback) {
return function () {
// Call the client hub method
callback.apply(hub, $.makeArray(arguments));
};
}

function registerHubProxies(instance, shouldSubscribe) {
var key, hub, memberKey, memberValue, subscriptionMethod;

for (key in instance) {
if (instance.hasOwnProperty(key)) {
hub = instance[key];

if (!(hub.hubName)) {
// Not a client hub
continue;
}

if (shouldSubscribe) {
// We want to subscribe to the hub events
subscriptionMethod = hub.on;
} else {
// We want to unsubscribe from the hub events
subscriptionMethod = hub.off;
}

// Loop through all members on the hub and find client hub functions to subscribe/unsubscribe
for (memberKey in hub.client) {
if (hub.client.hasOwnProperty(memberKey)) {
memberValue = hub.client[memberKey];

if (!$.isFunction(memberValue)) {
// Not a client hub function
continue;
}

subscriptionMethod.call(hub, memberKey, makeProxyCallback(hub, memberValue));
}
}
}
}
}

$.hubConnection.prototype.createHubProxies = function () {
var proxies = {};
this.starting(function () {
// Register the hub proxies as subscribed
// (instance, shouldSubscribe)
registerHubProxies(proxies, true);

this._registerSubscribedHubs();
}).disconnected(function () {
// Unsubscribe all hub proxies when we "disconnect". This is to ensure that we do not re-add functional call backs.
// (instance, shouldSubscribe)
registerHubProxies(proxies, false);
});

proxies['chat'] = this.createHubProxy('chat');
proxies['chat'].client = { };
proxies['chat'].server = {
};

return proxies;
};

signalR.hub = $.hubConnection("http://localhost:5000/signalr", { useDefaultPath: false });
$.extend(signalR, signalR.hub.createHubProxies());

}(window.jQuery, window));
9 changes: 9 additions & 0 deletions docs/scripts/jquery.signalR.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 0ad3450

Please sign in to comment.