mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 12:00:21 -04:00
+ improvment by the display of the searchbox
This commit is contained in:
parent
50480447d5
commit
b071218ce6
@ -23,27 +23,24 @@ static const string HTMLScripts = " \
|
|||||||
\n \
|
\n \
|
||||||
#topbar{ \n \
|
#topbar{ \n \
|
||||||
position: absolute; \n \
|
position: absolute; \n \
|
||||||
border: 1px solid black; \n \
|
right: 0%; \n \
|
||||||
padding: 2px; \n \
|
border: 1px solid #BBBBBB; \n \
|
||||||
background-color: lightyellow; \n \
|
border-radius: 5px; \n \
|
||||||
width: 620px; \n \
|
-moz-border-radius: 5px; \n \
|
||||||
|
-webkit-border-radius: 5px; \n \
|
||||||
|
margin-top: 0px; \n \
|
||||||
|
margin-right: 5px; \n \
|
||||||
|
padding: 5px; \n \
|
||||||
|
font-weight: bold; \n \
|
||||||
|
background: #FFFFFF; \n \
|
||||||
visibility: hidden; \n \
|
visibility: hidden; \n \
|
||||||
z-index: 100; \n \
|
z-index: 100; \n \
|
||||||
} \n \
|
} \n \
|
||||||
\n \
|
\n \
|
||||||
</style> \n \
|
</style> \n \
|
||||||
\n \
|
|
||||||
<script type=\"text/javascript\"> \n \
|
<script type=\"text/javascript\"> \n \
|
||||||
\n \
|
|
||||||
/*********************************************** \n \
|
|
||||||
* Floating Top Bar script- Â Dynamic Drive (www.dynamicdrive.com) \n \
|
|
||||||
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/) \n \
|
|
||||||
* This notice must stay intact for legal use. \n \
|
|
||||||
* Visit http://www.dynamicdrive.com/ for full source code \n \
|
|
||||||
***********************************************/ \n \
|
|
||||||
\n \
|
|
||||||
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session \n \
|
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session \n \
|
||||||
var startX = 30 //set x offset of bar in pixels \n \
|
//var startX = 30 //set x offset of bar in pixels \n \
|
||||||
var startY = 5 //set y offset of bar in pixels \n \
|
var startY = 5 //set y offset of bar in pixels \n \
|
||||||
var verticalpos=\"fromtop\" //enter \"fromtop\" or \"frombottom\" \n \
|
var verticalpos=\"fromtop\" //enter \"fromtop\" or \"frombottom\" \n \
|
||||||
\n \
|
\n \
|
||||||
@ -59,7 +56,8 @@ offset = document.cookie.indexOf(search) \n \
|
|||||||
if (offset != -1) { \n \
|
if (offset != -1) { \n \
|
||||||
offset += search.length \n \
|
offset += search.length \n \
|
||||||
end = document.cookie.indexOf(\";\", offset); \n \
|
end = document.cookie.indexOf(\";\", offset); \n \
|
||||||
if (end == -1) end = document.cookie.length; \n \
|
if (end == -1) \n \
|
||||||
|
end = document.cookie.length; \n \
|
||||||
returnvalue=unescape(document.cookie.substring(offset, end)) \n \
|
returnvalue=unescape(document.cookie.substring(offset, end)) \n \
|
||||||
} \n \
|
} \n \
|
||||||
} \n \
|
} \n \
|
||||||
@ -76,13 +74,18 @@ function staticbar(){ \n \
|
|||||||
barheight=document.getElementById(\"topbar\").offsetHeight \n \
|
barheight=document.getElementById(\"topbar\").offsetHeight \n \
|
||||||
var ns = (navigator.appName.indexOf(\"Netscape\") != -1) || window.opera; \n \
|
var ns = (navigator.appName.indexOf(\"Netscape\") != -1) || window.opera; \n \
|
||||||
var d = document; \n \
|
var d = document; \n \
|
||||||
|
\n \
|
||||||
function ml(id){ \n \
|
function ml(id){ \n \
|
||||||
var el=d.getElementById(id); \n \
|
var el=d.getElementById(id); \n \
|
||||||
if (!persistclose || persistclose && get_cookie(\"remainclosed\")==\"\") \n \
|
if (!persistclose || persistclose && get_cookie(\"remainclosed\")==\"\") \n \
|
||||||
el.style.visibility=\"visible\" \n \
|
el.style.visibility=\"visible\" \n \
|
||||||
if(d.layers)el.style=el; \n \
|
if(d.layers) \n \
|
||||||
el.sP=function(x,y){this.style.left=x+\"px\";this.style.top=y+\"px\";}; \n \
|
el.style=el; \n \
|
||||||
el.x = startX; \n \
|
el.sP=function(x,y) { \n \
|
||||||
|
this.style.left=x+\"px\"; \n \
|
||||||
|
this.style.top=y+\"px\"; \n \
|
||||||
|
}; \n \
|
||||||
|
el.x = window.innerWidth - el.width - 5; \n \
|
||||||
if (verticalpos==\"fromtop\") \n \
|
if (verticalpos==\"fromtop\") \n \
|
||||||
el.y = startY; \n \
|
el.y = startY; \n \
|
||||||
else{ \n \
|
else{ \n \
|
||||||
@ -118,8 +121,7 @@ window.onload=staticbar \n \
|
|||||||
|
|
||||||
static const string HTMLDiv = " \
|
static const string HTMLDiv = " \
|
||||||
<div id=\"topbar\"> \n \
|
<div id=\"topbar\"> \n \
|
||||||
<a href=\"\" onClick=\"closebar(); return false\"><img src=\"close.gif\" border=\"0\" /></a> \n \
|
Search <input type=\"textbox\" />\n \
|
||||||
Your content here. \n \
|
|
||||||
</div> \n \
|
</div> \n \
|
||||||
";
|
";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user