Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6b8e261d
Commit
6b8e261d
authored
Aug 20, 2009
by
Richard Mansfield
Browse files
Create table element for ie in js rather than relying on it already existing
parent
774aec61
Changes
2
Show whitespace changes
Inline
Side-by-side
htdocs/js/paginator.js
View file @
6b8e261d
...
...
@@ -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
]);
re
placeChildNodes
(
temp
);
re
moveElement
(
temp
);
}
else
{
tbody
.
innerHTML
=
data
[
'
data
'
][
'
tablerows
'
];
...
...
htdocs/theme/raw/templates/form/artefactchooser.tpl
View file @
6b8e261d
...
...
@@ -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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment