mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Fixed widgets not being clickable to use them in IE
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@97545 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
334beaeedd
commit
7e92d844c1
@ -14,16 +14,6 @@ WidgetAreaEditorClass.prototype = {
|
||||
if (widget.nodeType == 1) {
|
||||
// Gotta change their ID's because otherwise we get clashes between two tabs
|
||||
widget.id = widget.id + '-'+this.name;
|
||||
if(widget.id) {
|
||||
// Clicking applies to the h3 element only, not the widget div itself
|
||||
var header = widget.childNodes[1];
|
||||
header.onclick = function(event) {
|
||||
parts = event.currentTarget.parentNode.id.split('-');
|
||||
var widgetArea = parts.pop();
|
||||
var className = parts.pop();
|
||||
$('WidgetAreaEditor-'+widgetArea).addWidget(className, widgetArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,6 +238,18 @@ UsedWidget.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
AvailableWidgetHeader = Class.create();
|
||||
AvailableWidgetHeader.prototype = {
|
||||
onclick: function(event) {
|
||||
parts = this.parentNode.id.split('-');
|
||||
var widgetArea = parts.pop();
|
||||
var className = parts.pop();
|
||||
$('WidgetAreaEditor-'+widgetArea).addWidget(className, widgetArea);
|
||||
}
|
||||
}
|
||||
|
||||
AvailableWidgetHeader.applyTo('div.availableWidgets .Widget h3');
|
||||
|
||||
WidgetTreeDropdownField = Class.extend('TreeDropdownField');
|
||||
WidgetTreeDropdownField.prototype = {
|
||||
getName: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user