From b420649145acee60c81f80db7b249fd0c65d4903 Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Thu, 2 Aug 2012 20:53:37 +0000 Subject: [PATCH] new attribute: label for action button --- etemplate/js/et2_widget_itempicker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_itempicker.js b/etemplate/js/et2_widget_itempicker.js index 1da918e9aa..cd4e2fc6d3 100755 --- a/etemplate/js/et2_widget_itempicker.js +++ b/etemplate/js/et2_widget_itempicker.js @@ -27,6 +27,12 @@ var et2_itempicker = et2_inputWidget.extend({ attributes: { + "action_label": { + "name": "Action label", + "type": "string", + "default": "Action", + "description": "Label for action button" + }, "application": { "name": "Application", "type": "string", @@ -140,7 +146,7 @@ var et2_itempicker = et2_inputWidget.extend({ // Action button this.button_action = et2_createWidget("button"); $j(this.button_action.getDOMNode()).addClass("et2_itempicker_button_action"); - this.button_action.set_label(this.egw().lang("Action")); + this.button_action.set_label(this.egw().lang(this.options.action_label)); this.button_action.click = function() { // ToDo: execute defined action console.log("Button action clicked!");