diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index ea16ec167..616eb1533 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -6,6 +6,7 @@
- fixed #11209: Form::HTMLArea uses invalid javascript identifier
- fixed #11186: Template Attachments i18n
- fixed #11218: LDAPS does not create users automatically
+ - fixed #11205: DataTable borked in IE
7.8.4
- Fixed a compatibility problem between WRE and new Spectre code.
diff --git a/lib/WebGUI/Asset/Wobject/DataTable.pm b/lib/WebGUI/Asset/Wobject/DataTable.pm
index 3d6b964f6..6dd346a37 100644
--- a/lib/WebGUI/Asset/Wobject/DataTable.pm
+++ b/lib/WebGUI/Asset/Wobject/DataTable.pm
@@ -125,7 +125,7 @@ sub getDataTemplateVars {
my $self = shift;
my $json = $self->getDataJson;
- my $dt = JSON->new->decode($json);
+ my $dt = eval { JSON->new->decode($json) };
# Make row data more friendly to templates
my %cols = map { $_->{key} => $_ } @{ $dt->{columns} };
@@ -154,7 +154,8 @@ sub getEditForm {
my $tabform = $self->SUPER::getEditForm(@_);
$tabform->getTab("data")->raw(
- WebGUI::Form::DataTable->new(
+ q{
| }
+ . WebGUI::Form::DataTable->new(
$self->session, {
name => "data",
value => $self->get("data"),
@@ -162,6 +163,7 @@ sub getEditForm {
showEdit => 1,
}
)->toHtml
+ . q{ |
}
);
return $tabform;
diff --git a/www/extras/yui-webgui/build/form/datatable.js b/www/extras/yui-webgui/build/form/datatable.js
index 96319828e..39d6882ea 100644
--- a/www/extras/yui-webgui/build/form/datatable.js
+++ b/www/extras/yui-webgui/build/form/datatable.js
@@ -135,7 +135,7 @@ WebGUI.Form.DataTable
/* If we set the focus now, something might (and sometimes does) set
* it later in the event handling chain. Let's defer the focus set
* until this chain is finished. */
- setTimeout(function() { obj.editor.focus() }, 0);
+ setTimeout(function() { obj.editor.focus(); }, 0);
};
/************************************************************************
@@ -475,7 +475,7 @@ WebGUI.Form.DataTable
// Find the last indexed column
var newIdx = cols.length;
// create a new column object
- cols[newIdx] = new YAHOO.widget.Column;
+ cols[newIdx] = new YAHOO.widget.Column();
// add it to the dialog box
this.appendChild( createTableColumn(newIdx,cols) );
};
@@ -526,13 +526,13 @@ WebGUI.Form.DataTable
fixedcenter : true
} );
dialog.setBody( this.i18n.get( "Form_DataTable", "save success" ) + "
" );
- new YAHOO.widget.Button( {
+ var button = new YAHOO.widget.Button( {
id : "ok",
type : "push",
label : this.i18n.get( "Form_DataTable", "ok" ),
container : dialog.body,
onclick : {
- fn : function () { this.destroy() },
+ fn : function () { this.destroy(); },
scope : dialog
}
} );
@@ -544,13 +544,13 @@ WebGUI.Form.DataTable
fixedcenter : true
} );
dialog.setBody( this.i18n.get( "Form_DataTable", "save failure" ) + "
" );
- new YAHOO.widget.Button( {
+ var button = new YAHOO.widget.Button( {
id : "ok",
type : "push",
label : this.i18n.get( "Form_DataTable", "ok" ),
container : dialog.body,
onclick : {
- fn : function () { this.destroy() },
+ fn : function () { this.destroy(); },
scope : dialog
}
} );
@@ -656,6 +656,6 @@ WebGUI.Form.DataTable
this.dataTable.render();
this.schemaDialog.cancel();
- }
+ };
};