chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct error message for ambiguous strings
[ypp-sc-tools.main.git]
/
yarrg
/
web
/
tabsort
diff --git
a/yarrg/web/tabsort
b/yarrg/web/tabsort
index db7ac2b48cdd5468e5ccab0fe553719e18c23a38..e114319a0254f4780bfcaa6071093d39f016f23f 100644
(file)
--- a/
yarrg/web/tabsort
+++ b/
yarrg/web/tabsort
@@
-40,6
+40,7
@@
$table => 'ts_table'
$sortkeys => 'ts_sortkeys'
$throw => undef
$tbrow => undef
$sortkeys => 'ts_sortkeys'
$throw => undef
$tbrow => undef
+$rowclass => undef
$cols
</%args>
$cols
</%args>
@@
-53,6
+54,8
@@
$cols
<&| script &>
<&| script &>
+% print $m->content();
+
% my $sortfn= "ts_sort__$table";
function <% $sortfn %>(compar) {
debug('sorting compar='+compar);
% my $sortfn= "ts_sort__$table";
function <% $sortfn %>(compar) {
debug('sorting compar='+compar);
@@
-90,6
+93,14
@@
function <% $sortfn %>(compar) {
debug('final row '+rowix+' [[ '+row+' ]]');
}
newrows.sort(compar);
debug('final row '+rowix+' [[ '+row+' ]]');
}
newrows.sort(compar);
+% if (defined $rowclass) {
+ for (var rowix=0; rowix < newrows.length; rowix++) {
+ var row= newrows[rowix];
+ var classname= '<% $rowclass %>'+(rowix % 2);
+ debug('fix row '+rowix+' class '+classname);
+ row.className= classname;
+ }
+% }
newrows= newrows.concat(finalrows);
for (var rowix=0; rowix < newrows.length; rowix++) {
var row= newrows[rowix];
newrows= newrows.concat(finalrows);
for (var rowix=0; rowix < newrows.length; rowix++) {
var row= newrows[rowix];
@@
-159,4
+170,6
@@
function ts_onload__<% $table %>() {
thlist.item(cix).innerHTML += ah;
}
}
thlist.item(cix).innerHTML += ah;
}
}
+
+register_onload(ts_onload__<% $table %>);
</&>
</&>