/*!
* ASP.NET SignalR JavaScript Library v2.2.0
* 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) {
///
"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['progressHub'] = this.createHubProxy('progressHub');
proxies['progressHub'].client = { };
proxies['progressHub'].server = {
abort: function () {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["Abort"], $.makeArray(arguments)));
},
clearCache: function () {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ClearCache"], $.makeArray(arguments)));
},
createSession: function (memberId, userId, languageId, serverPath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["CreateSession"], $.makeArray(arguments)));
},
createZip: function (fileID, serverPathTemplate, serverPath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["CreateZip"], $.makeArray(arguments)));
},
downloadBasketPhotosWithCaption: function (entityKeys) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["DownloadBasketPhotosWithCaption"], $.makeArray(arguments)));
},
downloadInvoiceState: function (key, entityKeys) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["DownloadInvoiceState"], $.makeArray(arguments)));
},
executeConditionsList: function (entityKeys) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExecuteConditionsList"], $.makeArray(arguments)));
},
executeJob: function (id) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExecuteJob"], $.makeArray(arguments)));
},
executeTrigger: function (id, serverPath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExecuteTrigger"], $.makeArray(arguments)));
},
exportBrunsRequestList: function (languageID, basketid) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExportBrunsRequestList"], $.makeArray(arguments)));
},
exportCMS: function (serverPath, template, typeNames) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExportCMS"], $.makeArray(arguments)));
},
exportData: function (languageID, type, mapper, parameters) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExportData"], $.makeArray(arguments)));
},
exportLanguage: function (languageID, templatePath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExportLanguage"], $.makeArray(arguments)));
},
exportStatisticsNode: function (languageID, node, filter) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ExportStatisticsNode"], $.makeArray(arguments)));
},
import: function (keys, toKey, folderId, types) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["Import"], $.makeArray(arguments)));
},
importChainStores: function (fileId) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportChainStores"], $.makeArray(arguments)));
},
importCMS: function (serverPath, language, template, typeNames, setupId, forceNullTypes, createIndex) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportCMS"], $.makeArray(arguments)));
},
importData: function (languageID, type, mapper, fileId) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportData"], $.makeArray(arguments)));
},
importLanguage: function (languageID, fileId, templatePath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportLanguage"], $.makeArray(arguments)));
},
importPartners: function (fileId) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportPartners"], $.makeArray(arguments)));
},
importRecipients: function (id, fileId) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportRecipients"], $.makeArray(arguments)));
},
importVillagesToRegion: function (fileid, regionid) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ImportVillagesToRegion"], $.makeArray(arguments)));
},
installCMS: function (setupConfigID, serverPath, articles, pricelists, template, menus, pages, forceUpdate, articleGroups, articleProperties, features, categories, paymentMethods, shippingMethods, container, customerGroups, mailTemplates, countries, languages, iso, printTemplates) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["InstallCMS"], $.makeArray(arguments)));
},
print: function (key, entityKeys, outputType) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["Print"], $.makeArray(arguments)));
},
processMessages: function (keys) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ProcessMessages"], $.makeArray(arguments)));
},
reinitCustomFields: function () {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ReinitCustomFields"], $.makeArray(arguments)));
},
reorderOrder: function (basketId, ownerMemberID, memberid, orderid, templatePath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ReorderOrder"], $.makeArray(arguments)));
},
sendMessages: function (keys) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["SendMessages"], $.makeArray(arguments)));
},
setupCMS: function (setupConfigID, serverPath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["SetupCMS"], $.makeArray(arguments)));
},
setupCmsAsJson: function (configurationID, serverPath) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["SetupCmsAsJson"], $.makeArray(arguments)));
},
updateFrames: function (fileId, leafletId, articleId, pageLimit) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["UpdateFrames"], $.makeArray(arguments)));
},
updateIndex: function () {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["UpdateIndex"], $.makeArray(arguments)));
},
validateBasket: function (basketId) {
return proxies['progressHub'].invoke.apply(proxies['progressHub'], $.merge(["ValidateBasket"], $.makeArray(arguments)));
}
};
return proxies;
};
signalR.hub = $.hubConnection("/signalr", { useDefaultPath: false });
$.extend(signalR, signalR.hub.createHubProxies());
}(window.jQuery, window));