new attribute: label for action button

This commit is contained in:
Christian Binder 2012-08-02 20:53:37 +00:00
parent 0fb3008dc8
commit b420649145

View File

@ -27,6 +27,12 @@
var et2_itempicker = et2_inputWidget.extend({ var et2_itempicker = et2_inputWidget.extend({
attributes: { attributes: {
"action_label": {
"name": "Action label",
"type": "string",
"default": "Action",
"description": "Label for action button"
},
"application": { "application": {
"name": "Application", "name": "Application",
"type": "string", "type": "string",
@ -140,7 +146,7 @@ var et2_itempicker = et2_inputWidget.extend({
// Action button // Action button
this.button_action = et2_createWidget("button"); this.button_action = et2_createWidget("button");
$j(this.button_action.getDOMNode()).addClass("et2_itempicker_button_action"); $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() { this.button_action.click = function() {
// ToDo: execute defined action // ToDo: execute defined action
console.log("Button action clicked!"); console.log("Button action clicked!");