Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item13030: add topbar overlay for PatternSkin
... replacing the standard search boxes with a solrized one.
- Loading branch information
1 parent
5f33772
commit c3552ec
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
%TMPL:INCLUDE{"viewtopbar"}% | ||
%TMPL:DEF{"topbar"}%<div id="patternTopBar"><div id="patternTopBarContentsWrapper"><div id="patternTopBarContents"> | ||
<table border="0" cellpadding="0" cellspacing="0" style="width:100%" summary=""> | ||
<tr><td valign="middle"><span id="foswikiLogo" class="foswikiImage"><a href="%WEBLOGOURL%"><img src="%WEBLOGOIMG%" border="0" alt="%WEBLOGOALT%" style="border:none;" /></a></span></td> | ||
<td align="right" valign="top" class="patternMetaMenu"> | ||
<div class="natSearchBox foswikiHideOnPrint solrSearchBox jqUITooltip" data-theme="info" data-arrow="on" data-position="left"> | ||
<form name="searchbox" id="searchbox" class="natSearchForm" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/WebSearch" > | ||
<input type="hidden" name="origtopic" value="%BASEWEB%.%BASETOPIC%" /> | ||
<input type="text" class="foswikiInputField" placeholder="%TMPL:P{"searchbox::placeholder"}%" size="20" title="%MAKETEXT{"Enter topic name or a search string"}%" name="search" value="%TMPL:P{"searchbox::value"}%" accesskey="f" /> | ||
</form> | ||
</div> | ||
</td></tr></table> | ||
%JQREQUIRE{"autosuggest"}%<!-- --> | ||
%TMPL:P{"searchbox::javascript"}%<!-- --> | ||
%TMPL:P{"searchbox::css"}%<!-- --> | ||
</div></div></div>%TMPL:END% | ||
|
||
%TMPL:DEF{"searchbox::placeholder"}%%MAKETEXT{"search"}%%TMPL:END% | ||
%TMPL:DEF{"searchbox::value"}%%URLPARAM{"search" encode="entity"}%%TMPL:END% | ||
|
||
%TMPL:DEF{"searchbox::javascript"}%<literal><script> | ||
jQuery(function($) { | ||
$("#searchbox").each(function() { | ||
var $form = $(this), | ||
$input = $form.find("input[type=text]"); | ||
|
||
if (typeof($.fn.autosuggest) === 'function') { // make sure autosuggest realy is present | ||
$input.autosuggest({ | ||
menuClass: 'natSearchBoxMenu' | ||
}); | ||
} | ||
}); | ||
}); | ||
</script></literal>%TMPL:END% | ||
|
||
%TMPL:DEF{"searchbox::css"}%<literal><style> | ||
.natSearchBox .foswikiInputField { | ||
width:260px; | ||
} | ||
</style></literal>%TMPL:END% |