From 4dcd437adeeae71336760a4ce9a30d7a56500942 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 01 Jun 2011 13:05:18 -0400 Subject: [PATCH] Add collected text labels in one single function call --- program/js/app.js | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index db79772..7878c9c 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -70,9 +70,12 @@ }; // add a localized label to the client environment - this.add_label = function(key, value) + this.add_label = function(p, value) { - this.labels[key] = value; + if (typeof p == 'string') + this.labels[p] = value; + else if (typeof p == 'object') + $.extend(this.labels, p); }; // add a button to the button list -- Gitblit v1.9.1