Fix rendering of initial DataTable in IE7, IE8. Fixes bug #11205.

Added TR, TD tags to table containing the DataTable.  Also,
ran dataTable.js through jslint and fixed many issues.
This commit is contained in:
Colin Kuskie 2009-11-09 16:49:10 -08:00
parent ec30672d9e
commit 9d14e8b420
3 changed files with 12 additions and 9 deletions

View file

@ -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.

View file

@ -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{<tr><td>}
. WebGUI::Form::DataTable->new(
$self->session, {
name => "data",
value => $self->get("data"),
@ -162,6 +163,7 @@ sub getEditForm {
showEdit => 1,
}
)->toHtml
. q{</td></tr>}
);
return $tabform;

View file

@ -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" ) + "<br/>" );
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" ) + "<br/>" );
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();
}
};
};