diff --git a/src/main/webapp/WEB-INF/view/advance.jsp b/src/main/webapp/WEB-INF/view/advance.jsp index 12f03d58f..62fd5e542 100644 --- a/src/main/webapp/WEB-INF/view/advance.jsp +++ b/src/main/webapp/WEB-INF/view/advance.jsp @@ -329,27 +329,11 @@ -
-
- -
- - -
-
-
- + diff --git a/src/main/webapp/js/advance.js b/src/main/webapp/js/advance.js new file mode 100644 index 000000000..75cec3635 --- /dev/null +++ b/src/main/webapp/js/advance.js @@ -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') + }); + } +});