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 (from r97545)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102727 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
03bbc1d40d
commit
7f063a9693
@ -14,16 +14,6 @@ WidgetAreaEditorClass.prototype = {
|
|||||||
if (widget.nodeType == 1) {
|
if (widget.nodeType == 1) {
|
||||||
// Gotta change their ID's because otherwise we get clashes between two tabs
|
// Gotta change their ID's because otherwise we get clashes between two tabs
|
||||||
widget.id = widget.id + '-'+this.name;
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +239,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 = Class.extend('TreeDropdownField');
|
||||||
WidgetTreeDropdownField.prototype = {
|
WidgetTreeDropdownField.prototype = {
|
||||||
getName: function() {
|
getName: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user