Commit bacb3dd2 authored by Nigel McNie's avatar Nigel McNie
Browse files

A tested fix for bug #1719. Now the artefact chooser search tab works in IE and konqueror too.

The workaround is annoying. I hate IE. Konqueror can have a little hate too. There you go, little konqueror.
parent 67643ed1
......@@ -45,7 +45,18 @@ var Paginator = function(id, datatable, script, extradata) {
sendjsonrequest(self.jsonScript, queryData, 'GET', function(data) {
var tbody = getFirstElementByTagAndClassName('tbody', null, self.datatable);
if (tbody) {
tbody.innerHTML = data['data']['tablerows'];
if (
(document.all && document.documentElement && typeof(document.documentElement.style.maxHeight) != "undefined" && !window.opera)
||
(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent))) {
var temp = $('ie-workaround');
temp.innerHTML = '<table><tbody>' + data['data']['tablerows'];
swapDOM(tbody, temp.childNodes[0].childNodes[0]);
replaceChildNodes(temp);
}
else {
tbody.innerHTML = data['data']['tablerows'];
}
}
// Update the pagination
......
......@@ -204,13 +204,24 @@ if (ul) {
sendjsonrequest(p.jsonScript, queryData, 'GET', function(data) {
var tbody = getFirstElementByTagAndClassName('tbody', null, p.datatable);
if (tbody) {
var temp = DIV();
temp.innerHTML = data['data']['tablerows'];
swapDOM(tbody, temp);
// This does not work in IE and Konqueror, the tbody
// innerHTML property is readonly.
// http://www.ericvasilik.com/2006/07/code-karma.html
//tbody.innerHTML = data['data']['tablerows'];
// var temp = DIV();
// temp.innerHTML = data['data']['tablerows'];
// swapDOM(tbody, temp);
if (
(document.all && document.documentElement && typeof(document.documentElement.style.maxHeight) != "undefined" && !window.opera)
||
(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent))) {
var temp = $('ie-workaround');
temp.innerHTML = '<table><tbody>' + data['data']['tablerows'];
swapDOM(tbody, temp.childNodes[0].childNodes[0]);
replaceChildNodes(temp);
}
else {
// This does not work in IE and Konqueror, the tbody
// innerHTML property is readonly.
// http://www.ericvasilik.com/2006/07/code-karma.html
tbody.innerHTML = data['data']['tablerows'];
}
}
// Update the pagination
......
......@@ -19,5 +19,6 @@
{else}
<p class="noartefacts">{str tag=noartefactstochoosefrom section=view}</p>
{/if}
<div style="visibility: hidden;" id="ie-workaround"></div>
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment