fix #1549 add advance.js

This commit is contained in:
Shinsuke Sugaya 2018-03-08 11:45:14 +09:00
parent 711e71ea0d
commit 22a509f8cd
2 changed files with 43 additions and 17 deletions

View file

@ -329,27 +329,11 @@
</div>
<jsp:include page="footer.jsp" />
</div>
<div id="searchOptions" class="control-options">
<div class="container">
<jsp:include page="searchOptions.jsp" />
<div>
<button type="button" class="btn btn-secondary" id="searchOptionsClearButton">
<la:message key="labels.search_options_clear" />
</button>
<button type="button" class="btn btn-secondary pull-right" data-toggle="control-options"
data-target="#searchOptions" id="searchOptionsCloseButton"
>
<i class="fa fa-times-circle"></i>
<la:message key="labels.search_options_close" />
</button>
</div>
</div>
</div>
</la:form>
<input type="hidden" id="contextPath" value="${contextPath}" />
<script type="text/javascript" src="${fe:url('/js/jquery-3.2.1.min.js')}"></script>
<script type="text/javascript" src="${fe:url('/js/bootstrap.js')}"></script>
<script type="text/javascript" src="${fe:url('/js/suggestor.js')}"></script>
<script type="text/javascript" src="${fe:url('/js/index.js')}"></script>
<script type="text/javascript" src="${fe:url('/js/advance.js')}"></script>
</body>
</html>

View file

@ -0,0 +1,42 @@
$(function() {
var $searchButton = $('#searchButton');
var contextPath = $('#contextPath').val();
$('#searchForm').on('submit', function(e) {
$searchButton.attr('disabled', true);
setTimeout(function() {
$searchButton.attr('disabled', false);
}, 3000);
return true;
});
if (typeof $.fn.suggestor === 'function') {
$('#as_q')
.suggestor(
{
ajaxinfo : {
url : contextPath + '/suggest',
fn : '_default,content,title',
num : 10,
lang : $('#langSearchOption').val()
},
boxCssInfo : {
border : '1px solid rgba(82, 168, 236, 0.5)',
'-webkit-box-shadow' : '0 1px 1px 0px rgba(0, 0, 0, 0.1), 0 3px 2px 0px rgba(82, 168, 236, 0.2)',
'-moz-box-shadow' : '0 1px 1px 0px rgba(0, 0, 0, 0.1), 0 3px 2px 0px rgba(82, 168, 236, 0.2)',
'box-shadow' : '0 1px 1px 0px rgba(0, 0, 0, 0.1), 0 3px 2px 0px rgba(82, 168, 236, 0.2)',
'background-color' : '#fff',
'z-index' : '10000'
},
listSelectedCssInfo : {
'background-color' : 'rgba(82, 168, 236, 0.1)'
},
listDeselectedCssInfo : {
'background-color' : '#ffffff'
},
minterm : 1,
adjustWidthVal : 11,
searchForm : $('#searchForm')
});
}
});