/*! * ASP.NET SignalR JavaScript Library 2.4.3 * http://signalr.net/ * * Copyright (c) .NET Foundation. All rights reserved. * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. * */ /// /// (function ($, window, undefined) { /// "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; } // Use the actual user-provided callback as the "identity" value for the registration. subscriptionMethod.call(hub, memberKey, makeProxyCallback(hub, memberValue), 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['aztecHub'] = this.createHubProxy('aztecHub'); proxies['aztecHub'].client = { }; proxies['aztecHub'].server = { addToGroup: function (group) { return proxies['aztecHub'].invoke.apply(proxies['aztecHub'], $.merge(["AddToGroup"], $.makeArray(arguments))); }, sendAztec: function (group, aztec) { return proxies['aztecHub'].invoke.apply(proxies['aztecHub'], $.merge(["SendAztec"], $.makeArray(arguments))); } }; proxies['cenIStanowMagazynowychImportAktualizacjaHub'] = this.createHubProxy('cenIStanowMagazynowychImportAktualizacjaHub'); proxies['cenIStanowMagazynowychImportAktualizacjaHub'].client = { }; proxies['cenIStanowMagazynowychImportAktualizacjaHub'].server = { getKrokIWiadomosc: function () { return proxies['cenIStanowMagazynowychImportAktualizacjaHub'].invoke.apply(proxies['cenIStanowMagazynowychImportAktualizacjaHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; proxies['pojazdyAktualizacjaHub'] = this.createHubProxy('pojazdyAktualizacjaHub'); proxies['pojazdyAktualizacjaHub'].client = { }; proxies['pojazdyAktualizacjaHub'].server = { getKrokIWiadomosc: function () { return proxies['pojazdyAktualizacjaHub'].invoke.apply(proxies['pojazdyAktualizacjaHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; proxies['productPriceHistoryHub'] = this.createHubProxy('productPriceHistoryHub'); proxies['productPriceHistoryHub'].client = { }; proxies['productPriceHistoryHub'].server = { getKrokIWiadomosc: function () { return proxies['productPriceHistoryHub'].invoke.apply(proxies['productPriceHistoryHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; proxies['stanyMagazynoweImportAktualizacjaHub'] = this.createHubProxy('stanyMagazynoweImportAktualizacjaHub'); proxies['stanyMagazynoweImportAktualizacjaHub'].client = { }; proxies['stanyMagazynoweImportAktualizacjaHub'].server = { getKrokIWiadomosc: function () { return proxies['stanyMagazynoweImportAktualizacjaHub'].invoke.apply(proxies['stanyMagazynoweImportAktualizacjaHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; proxies['statystykiAktualizacjaHub'] = this.createHubProxy('statystykiAktualizacjaHub'); proxies['statystykiAktualizacjaHub'].client = { }; proxies['statystykiAktualizacjaHub'].server = { }; proxies['towaryImportAktualizacjaHub'] = this.createHubProxy('towaryImportAktualizacjaHub'); proxies['towaryImportAktualizacjaHub'].client = { }; proxies['towaryImportAktualizacjaHub'].server = { getKrokIWiadomosc: function () { return proxies['towaryImportAktualizacjaHub'].invoke.apply(proxies['towaryImportAktualizacjaHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; proxies['tPSHub'] = this.createHubProxy('tPSHub'); proxies['tPSHub'].client = { }; proxies['tPSHub'].server = { addToGroup: function (group) { return proxies['tPSHub'].invoke.apply(proxies['tPSHub'], $.merge(["AddToGroup"], $.makeArray(arguments))); }, sendUstawTermin: function (group, ustaw) { return proxies['tPSHub'].invoke.apply(proxies['tPSHub'], $.merge(["SendUstawTermin"], $.makeArray(arguments))); } }; proxies['zamiennikiImportAktualizacjaHub'] = this.createHubProxy('zamiennikiImportAktualizacjaHub'); proxies['zamiennikiImportAktualizacjaHub'].client = { }; proxies['zamiennikiImportAktualizacjaHub'].server = { getKrokIWiadomosc: function () { return proxies['zamiennikiImportAktualizacjaHub'].invoke.apply(proxies['zamiennikiImportAktualizacjaHub'], $.merge(["GetKrokIWiadomosc"], $.makeArray(arguments))); } }; return proxies; }; signalR.hub = $.hubConnection("/signalr", { useDefaultPath: false }); $.extend(signalR, signalR.hub.createHubProxies()); }(window.jQuery, window));