Commit 6b8e261d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Create table element for ie in js rather than relying on it already existing

parent 774aec61
......@@ -52,12 +52,6 @@ var Paginator = function(id, datatable, script, extradata) {
sendjsonrequest(self.jsonScript, queryData, 'GET', function(data) {
var tbody = getFirstElementByTagAndClassName('tbody', null, self.datatable);
if (tbody) {
// Currently the paginator is used for the artefact chooser
// alone. This block assumes there is a DOM node with an ID
// of 'ie-workaround', but could be improved somewhat to
// perhaps not need the DOM node to be in the DOM - at
// least not when the page loads.
//
// You can't write to table nodes innerHTML in IE and
// konqueror, so this workaround detects them and does
// things differently
......@@ -65,10 +59,10 @@ var Paginator = function(id, datatable, script, extradata) {
(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'];
var temp = DIV({'id':'ie-workaround'});
temp.innerHTML = '<table><tbody>' + data.data.tablerows + '</tbody></table>';
swapDOM(tbody, temp.childNodes[0].childNodes[0]);
replaceChildNodes(temp);
removeElement(temp);
}
else {
tbody.innerHTML = data['data']['tablerows'];
......
......@@ -19,6 +19,5 @@
{else}
<p class="noartefacts">{str tag=noartefactstochoosefrom section=view}</p>
{/if}
<div style="visibility: hidden;" id="ie-workaround"></div>
</div>
</div>
Supports Markdown
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