diff --git a/etemplate/js/et2_core_common.js b/etemplate/js/et2_core_common.js index 1c6dba6fcc..1ff87baccf 100644 --- a/etemplate/js/et2_core_common.js +++ b/etemplate/js/et2_core_common.js @@ -137,6 +137,10 @@ function et2_checkType(_val, _type, _attr, _cname) return _val; } + // Handle some less common possibilities + // Maybe a split on an empty string + if(typeof _val == "object" && jQuery.isEmptyObject(_val)) return ""; + return _err(); } diff --git a/etemplate/js/et2_core_inputWidget.js b/etemplate/js/et2_core_inputWidget.js index 0d30e603eb..75b1735faf 100644 --- a/etemplate/js/et2_core_inputWidget.js +++ b/etemplate/js/et2_core_inputWidget.js @@ -49,6 +49,12 @@ var et2_inputWidget = et2_valueWidget.extend(et2_IInput, { "type": "string", "default": et2_no_init, "description": "Used internally to store the validation error that came from the server." + }, + "tabindex": { + "name": "Tab index", + "type": "integer", + "default": et2_no_init, + "description": "Specifies the tab order of a widget when the 'tab' button is used for navigating." } }, @@ -235,6 +241,13 @@ var et2_inputWidget = et2_valueWidget.extend(et2_IInput, { } }, + /** + * Set tab index + */ + set_tabindex: function(index) { + jQuery(this.getInputNode()).attr("tabindex", index); + }, + getInputNode: function() { return this.node; }, diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index 6d1ed78635..494a33fe05 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -34,12 +34,13 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput }, 'value': { 'name': 'Custom fields', - 'description': 'Auto filled' + 'description': 'Auto filled', + 'type': "any" }, 'type_filter': { 'name': 'Field filter', "default": "", - "type": "string", + "type": "any", // String or array "description": "Filter displayed custom fields by their 'type2' attribute" } }, diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index d6b1c1f493..f827f8cb5b 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1706,6 +1706,8 @@ var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend({ default: _attrs.type = _attrs.widget_type; } + // Avoid warning about non-existant attribute + delete(_attrs.widget_type); this.real_node = et2_createWidget(_attrs.type, _attrs, this._parent); }, diff --git a/etemplate/js/et2_widget_button.js b/etemplate/js/et2_widget_button.js index af5343ccbc..8691a627e5 100644 --- a/etemplate/js/et2_widget_button.js +++ b/etemplate/js/et2_widget_button.js @@ -45,6 +45,18 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { "type": "string", "description": "JS code which gets executed when the button is clicked" }, + "accesskey": { + "name": "Access Key", + "type": "string", + "default": et2_no_init, + "description": "Alt + activates widget" + }, + "tabindex": { + "name": "Tab index", + "type": "integer", + "default": et2_no_init, + "description": "Specifies the tab order of a widget when the 'tab' button is used for navigating." + }, // No such thing as a required button "needed": { "ignore": true, @@ -76,6 +88,9 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { } }, + set_accesskey: function(key) { + jQuery(this.node).attr("accesskey", key); + }, set_ro_image: function(_image) { if(this.options.readonly) { @@ -161,6 +176,12 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { } }, + /** + * Set tab index + */ + set_tabindex: function(index) { + jQuery(this.btn).attr("tabindex", index); + }, /** * Implementation of the et2_IInput interface diff --git a/etemplate/js/et2_widget_grid.js b/etemplate/js/et2_widget_grid.js index 610555c318..f3a628218e 100644 --- a/etemplate/js/et2_widget_grid.js +++ b/etemplate/js/et2_widget_grid.js @@ -297,8 +297,13 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], { readRowNode = function _readRowNode(node, nodeName) { if (x >= w) { - this.egw().debug("warn", "Skipped grid cell in row, '" + - nodeName + "'"); + if(nodeName != "description") + { + // Only notify it skipping other than description, + // description used to pad + this.egw().debug("warn", "Skipped grid cell in row, '" + + nodeName + "'"); + } return; } diff --git a/etemplate/js/et2_widget_historylog.js b/etemplate/js/et2_widget_historylog.js index 4c09c438c0..5568cb734d 100644 --- a/etemplate/js/et2_widget_historylog.js +++ b/etemplate/js/et2_widget_historylog.js @@ -31,6 +31,12 @@ */ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{ + attributes: { + "value": { + "type": "any" + } + }, + columns: [ {'id': 'user_ts', caption: 'Date', 'width': '120px', widget_type: 'date-time'}, {'id': 'owner', caption: 'User', 'width': '150px', widget_type: 'select-account'}, diff --git a/etemplate/js/et2_widget_html.js b/etemplate/js/et2_widget_html.js index d3723e80cd..edb3480194 100644 --- a/etemplate/js/et2_widget_html.js +++ b/etemplate/js/et2_widget_html.js @@ -28,6 +28,9 @@ var et2_html = et2_valueWidget.extend([et2_IDetachedDOM], { name: "Label", translate: true, type: "string", + }, + "needed": { + "ignore": true } }, init: function() { diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 6b3ebcc59a..379daa9e39 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -57,6 +57,10 @@ var et2_link_to = et2_inputWidget.extend({ "type": "string", "default": "Link", "description": "Label for the link button" + }, + "value": { + // Could be string or int if application is provided, or an Object + "type": "any" } }, diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index 5db99588f5..0adbceb7fe 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -170,9 +170,18 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], { "multiline": { "ignore": true }, + "maxlength": { + "igore": true + }, + "onchange": { + "ignore": true + }, "rows": { "ignore": true }, + "cols": { + "ignore": true + }, "size": { "ignore": true },