Message ID | 1441986924-26689-31-git-send-email-damien.lespiau@intel.com |
---|---|
State | Superseded |
Headers | show |
diff --git a/htdocs/js/patchwork.js b/htdocs/js/patchwork.js index b92b319..b7c4ad3 100644 --- a/htdocs/js/patchwork.js +++ b/htdocs/js/patchwork.js @@ -30,10 +30,14 @@ var pw = (function() { return reviewer; } + exports.amend_context = function(new_ctx) { + $.extend(ctx, new_ctx); + } + exports.init = function(init_ctx) { _this = this; - $.extend(ctx, init_ctx); + this.amend_context(init_ctx); $.dynatableSetup({ dataset: {
Because I'd like to modify the context after init time, let's split out a function that updates the context (the object that holds global information, like which project, series, patch we're talking about). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> --- htdocs/js/patchwork.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)