projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94e437c
)
libs/web: fix row sorting in IE
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 20 Jan 2011 12:35:42 +0000
(12:35 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 20 Jan 2011 12:35:42 +0000
(12:35 +0000)
libs/web/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/web/htdocs/luci-static/resources/cbi.js
b/libs/web/htdocs/luci-static/resources/cbi.js
index c1d0dfdc368a9e3f2eefb77ed2f0048f3c83f469..0022149294887e02bc492692b656167603dca90b 100644
(file)
--- a/
libs/web/htdocs/luci-static/resources/cbi.js
+++ b/
libs/web/htdocs/luci-static/resources/cbi.js
@@
-721,13
+721,19
@@
function cbi_validate_field(cbid, optional, type)
function cbi_row_swap(elem, up, store)
{
var tr = elem.parentNode;
- while (tr && tr.nodeName != 'tr')
+ while (tr && tr.nodeName
.toLowerCase()
!= 'tr')
tr = tr.parentNode;
+ if (!tr)
+ return false;
+
var table = tr.parentNode;
- while (table && table.nodeName != 'table')
+ while (table && table.nodeName
.toLowerCase()
!= 'table')
table = table.parentNode;
+ if (!table)
+ return false;
+
var s = up ? 3 : 2;
var e = up ? table.rows.length : table.rows.length - 1;