summaryrefslogtreecommitdiffhomepage
path: root/libs/web
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-20 12:35:42 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-20 12:35:42 +0000
commit8193a249f19526adfb9809eed666fa211b18b9b5 (patch)
treecbb926bd280b60c0f003949e9147dde2485b64ef /libs/web
parent94e437c2f02fbca2b88a0f9d7e12bfd1a4d864a4 (diff)
libs/web: fix row sorting in IE
Diffstat (limited to 'libs/web')
-rw-r--r--libs/web/htdocs/luci-static/resources/cbi.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js
index c1d0dfdc3..002214929 100644
--- 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;