diff options
author | michael pereira | 2011-04-04 17:14:53 +0200 |
---|---|---|
committer | michael pereira | 2011-04-04 17:14:53 +0200 |
commit | b1a3923f98348f5145713315180b8e80e6ee89c0 (patch) | |
tree | bff2b1b25fc41d1581d78c9b858897419780c7a0 /public/media | |
parent | WICHTIG findBy Methode geändert & alles angepasst, siehe Ticket (diff) | |
parent | client-suche verändert (diff) | |
download | pbs2-b1a3923f98348f5145713315180b8e80e6ee89c0.tar.gz pbs2-b1a3923f98348f5145713315180b8e80e6ee89c0.tar.xz pbs2-b1a3923f98348f5145713315180b8e80e6ee89c0.zip |
merges
Diffstat (limited to 'public/media')
-rw-r--r-- | public/media/css/style.css | 10 | ||||
-rw-r--r-- | public/media/img/search.png | bin | 0 -> 367 bytes | |||
-rw-r--r-- | public/media/js/jquery.highlight-3.js | 53 |
3 files changed, 63 insertions, 0 deletions
diff --git a/public/media/css/style.css b/public/media/css/style.css index dd89e41..a8c4421 100644 --- a/public/media/css/style.css +++ b/public/media/css/style.css @@ -115,6 +115,9 @@ body { min-height: 400px; background-color: #F2F3F1; } +#content img { + border:none; +} #debug { text-align: left; @@ -310,6 +313,9 @@ td { .addbutton:before { content: url(/media/img/create.png) ' '; } +.searchbutton:before { + content: url(/media/img/search.png) ' '; +} .rightbutton { float: right; @@ -484,4 +490,8 @@ table.json td { border-style: none !important; } +.highlight { + background-color: yellow; +} + diff --git a/public/media/img/search.png b/public/media/img/search.png Binary files differnew file mode 100644 index 0000000..6a0dd1d --- /dev/null +++ b/public/media/img/search.png diff --git a/public/media/js/jquery.highlight-3.js b/public/media/js/jquery.highlight-3.js new file mode 100644 index 0000000..4d339ee --- /dev/null +++ b/public/media/js/jquery.highlight-3.js @@ -0,0 +1,53 @@ +/* + +highlight v3 + +Highlights arbitrary terms. + +<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html> + +MIT license. + +Johann Burkard +<http://johannburkard.de> +<mailto:jb@eaio.com> + +*/ + +jQuery.fn.highlight = function(pat) { + function innerHighlight(node, pat) { + var skip = 0; + if (node.nodeType == 3) { + var pos = node.data.toUpperCase().indexOf(pat); + if (pos >= 0) { + var spannode = document.createElement('span'); + spannode.className = 'highlight'; + var middlebit = node.splitText(pos); + var endbit = middlebit.splitText(pat.length); + var middleclone = middlebit.cloneNode(true); + spannode.appendChild(middleclone); + middlebit.parentNode.replaceChild(spannode, middlebit); + skip = 1; + } + } + else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) { + for (var i = 0; i < node.childNodes.length; ++i) { + i += innerHighlight(node.childNodes[i], pat); + } + } + return skip; + } + return this.each(function() { + innerHighlight(this, pat.toUpperCase()); + }); +}; + +jQuery.fn.removeHighlight = function() { + return this.find("span.highlight").each(function() { + this.parentNode.firstChild.nodeName; + with (this.parentNode) { + replaceChild(this.firstChild, this); + normalize(); + } + }).end(); +}; |