1
0
Fork 0
forked from 0x2620/oxjs

add timeline view

This commit is contained in:
rolux 2010-09-18 00:10:07 +02:00
commit b237451eb5
11 changed files with 1486 additions and 1 deletions

View file

@ -1573,6 +1573,14 @@ Ox.endsWith = function(str, sub) {
return str.substr(-sub.length) === sub;
};
Ox.highlight = function(txt, str) {
// fixme: move to ox.ui
return str ? txt.replace(
new RegExp('(' + str + ')', 'ig'),
'<span class="OxHighlight">$1</span>'
) : txt;
}
Ox.pad = function(str, len, pad, pos) {
/*
>>> Ox.pad(1, 2)