From c28b8662f5434d80d4aa16399d9649d15425e435 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 27 Mar 2012 15:05:30 +0000 Subject: [PATCH] Fix buttononly in datagrid, implement legacy options --- etemplate/js/et2_widget_button.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_button.js b/etemplate/js/et2_widget_button.js index cebda7516e..15d4e63bb4 100644 --- a/etemplate/js/et2_widget_button.js +++ b/etemplate/js/et2_widget_button.js @@ -51,6 +51,8 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { } }, + legacyOptions: ["image", "ro_image"], + init: function() { this._super.apply(this, arguments); @@ -197,7 +199,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { setDetachedAttributes: function(_nodes, _values) { // Datagrid puts in the row for null - this.btn = _nodes[0].nodeName == 'button' ? jQuery(_nodes[0]) : null; + this.btn = _nodes[0].nodeName[0] != '#' ? jQuery(_nodes[0]) : null; this.image = jQuery(_nodes[1]); if (typeof _values["id"] != "undefined")