mirror of https://github.com/jenkinsci/jenkins.git
more performance improvement.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4625 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
parent
f60218a3d2
commit
80f2025811
|
|
@ -103,6 +103,10 @@ var hudsonRules = {
|
|||
tooltip = new YAHOO.widget.Tooltip("tt", {context:[]});
|
||||
},
|
||||
|
||||
"TABLE.sortable" : function(e) {// sortable table
|
||||
ts_makeSortable(e);
|
||||
},
|
||||
|
||||
"INPUT.advancedButton" : function(e) {
|
||||
e.onclick = function() {
|
||||
var link = this.parentNode;
|
||||
|
|
|
|||
|
|
@ -42,12 +42,6 @@ The script guesses the table data, and try to use the right sorting algorithm.
|
|||
But you can override this behavior by having 'data="..."' attribute on each row,
|
||||
in which case the sort will be done on that field.
|
||||
*/
|
||||
addEvent(window, "load", sortables_init);
|
||||
|
||||
function sortables_init() {
|
||||
document.getElementsByClassName("sortable")._each(ts_makeSortable)
|
||||
}
|
||||
|
||||
function ts_makeSortable(table) {
|
||||
var firstRow;
|
||||
if (table.rows && table.rows.length > 0) {
|
||||
|
|
@ -225,21 +219,4 @@ function ts_sort_default(a,b) {
|
|||
if (a==b) return 0;
|
||||
if (a<b) return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
function addEvent(elm, evType, fn, useCapture)
|
||||
// addEvent and removeEvent
|
||||
// cross-browser event handling for IE5+, NS6 and Mozilla
|
||||
// By Scott Andrew
|
||||
{
|
||||
if (elm.addEventListener){
|
||||
elm.addEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
} else if (elm.attachEvent){
|
||||
var r = elm.attachEvent("on"+evType, fn);
|
||||
return r;
|
||||
} else {
|
||||
alert("Handler could not be removed");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue