diff options
author | Andrew Dolgov <[email protected]> | 2018-02-02 13:47:04 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-02-02 13:47:04 +0300 |
commit | fa6a735fe5e1d4b995d9ef5db23f9dcc411237d9 (patch) | |
tree | 7b78fdd50f000b62f8ca29535791764ce320ead4 /read.html | |
parent | 10149818546d048bc0121e7e09570bcc028d2d25 (diff) |
add search button to dict result dialog (uses google for now)
Diffstat (limited to 'read.html')
-rw-r--r-- | read.html | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -137,11 +137,13 @@ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Dictionary Lookup</h4> </div> + <input type="hidden" class="dict_query" value=""/> <div class="modal-body"> <div class="dict_result"> </div> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" class="dict_search_btn btn-default btn">Google</button> + <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> </div> </div> </div> @@ -539,8 +541,13 @@ $('#dict-modal').on('shown.bs.modal', function() { $(".dict_result").scrollTop(0); + }) + $(".dict_search_btn").on("click", function() { + $("#dict-modal").modal('hide'); + window.open("https://google.com/search?q=" + $(".dict_query").val()); + }); $('#toc-modal').on('shown.bs.modal', function() { function process_toc_sublist(row, list, nest) { |