From 34640b90c41bcc070db53ab9d169d314aa40acb3 Mon Sep 17 00:00:00 2001 From: mariusfilipowski Date: Wed, 5 Feb 2014 12:43:29 +0100 Subject: [PATCH] Changed the private default options in activity plugin to global options in ko.bindingHandlers.activity.defaultOptions --- knockout.activity.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/knockout.activity.js b/knockout.activity.js index 19d73d4..25fd636 100644 --- a/knockout.activity.js +++ b/knockout.activity.js @@ -15,14 +15,8 @@ throw 'Knockout is required, please ensure it is loaded before loading the activity plug-in'; } - var defaultOptions = { - activityClass: 'fa fa-spinner fa-spin', - container: 'i', - inactiveClass: '' - }; - function getOptions(overrides) { - var options = ko.utils.extend({}, defaultOptions); + var options = ko.utils.extend({}, ko.bindingHandlers.activity.defaultOptions); return ko.utils.extend(options, overrides); } @@ -55,4 +49,10 @@ } } }; + + ko.bindingHandlers.activity.defaultOptions = { + activityClass: 'fa fa-spinner fa-spin', + container: 'i', + inactiveClass: '' + }; }));