Fixing issue 78

This commit is contained in:
Nathan Adams 2014-12-21 16:43:00 -06:00
parent 7a8b6343f8
commit ec8d6e93ea
3 changed files with 35 additions and 36 deletions

View File

@ -7,6 +7,7 @@
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Issue'}</a></p>{/if}
{/block}
{block context}
{aurl 'open_url', 'IDF_Views_Issue::searchStatus', array($project.shortname, 'open'), array('q' => $query)}
{aurl 'closed_url', 'IDF_Views_Issue::searchStatus', array($project.shortname, 'closed'), array('q' => $query)}
@ -17,7 +18,7 @@
{blocktrans}
<p><strong>Found open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Found closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans}
{if $tag !== null}
{if $tag != null}
{blocktrans}<p><strong>Label:</strong>
<a href="{$open_url}" class="label"><strong>{$tag.class}:</strong>{$tag.name}</a></p>{/blocktrans}
{else}

View File

@ -22,40 +22,6 @@
</ul>
{if $allProjects.count() != 0}
<script type="text/javascript" charset="utf-8">
{literal}
$(document).ready(function() {
$("#prjname").keydown(function(ev) {
if(ev.which === 13) {
window.location.replace($('.projectitem :visible').first().attr("href"));
}
});
$('#prjname').keyup(function(){
var valThis = $(this).val().toLowerCase();
if(valThis == ""){
$('.prjlistclass > li').show();
} else {
$('.prjlistclass > li').each(function(){
if ($(this).attr('id') && $(this).attr('id') == "searchkeep")
return true;
var text = $(this).text().toLowerCase();
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
});
};
});
$('#project-list').bind('mouseenter', function(ev) {
$(this).find('ul').show();
$("#prjname").focus();
}).bind('mouseleave', function(ev) {
$(this).find('ul').hide();
});
});
{/literal}
</script>
<script src="{media '/idf/js/projectsearch.js'}" type="text/javascript" charset="utf-8"></script>
{/if}

View File

@ -0,0 +1,32 @@
$(document).ready(function() {
$("#prjname").keydown(function(ev) {
if(ev.which === 13) {
window.location.replace($('.projectitem :visible').first().attr("href"));
}
});
$('#prjname').keyup(function(){
var valThis = $(this).val().toLowerCase();
if(valThis == ""){
$('.prjlistclass > li').show();
} else {
$('.prjlistclass > li').each(function(){
if ($(this).attr('id') && $(this).attr('id') == "searchkeep")
return true;
var text = $(this).text().toLowerCase();
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
});
};
});
$('#project-list').bind('mouseenter', function(ev) {
$(this).find('ul').show();
$("#prjname").focus();
}).bind('mouseleave', function(ev) {
$(this).find('ul').hide();
});
});