diff --git a/module/common/lang/en.php b/module/common/lang/en.php index b4e184cb4d..e624d8d195 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -370,6 +370,7 @@ $lang->suhosinInfo = "Warming:data is too large! Please enlarge the setting of $lang->pasteTextInfo = "Paste the text into a text field, each line of text as a data header."; $lang->noResultsMatch = "No results match"; +$lang->searchMore = "Search more results with the key:"; $lang->selectAnOption = "Select an option"; $lang->selectSomeOptions = "Select some options"; $lang->chooseUsersToMail = "Choose users to mail..."; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index ffcceae6ec..e5acfefbb1 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -370,6 +370,7 @@ $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。"; $lang->noResultsMatch = "没有匹配结果"; +$lang->searchMore = "搜索此关键字的更多结果:"; $lang->selectAnOption = "选择一个选项"; $lang->selectSomeOptions = "选择一些选项"; $lang->chooseUsersToMail = "选择要发信通知的用户..."; diff --git a/module/testcase/css/create.css b/module/testcase/css/create.css index 5f081cdc55..661d26ce26 100644 --- a/module/testcase/css/create.css +++ b/module/testcase/css/create.css @@ -10,3 +10,7 @@ #searchResult > li.loading > .icon-spinner:before {font-size: 28px;} #searchResult > li > a {display: block; padding: 6px 15px; color: #333; border-bottom: 1px solid #e5e5e5} #searchResult > li > a:hover, #searchResult > li > a.selected {color: #1a4f85; background-color: #ddd;} + +#story_chosen .chosen-results > li.no-results {cursor: pointer;} +#story_chosen .chosen-results > li.no-results:hover {color: #1a4f85; background-color: #ddd;} +#story_chosen .chosen-results > li.no-results > span {font-weight: bold;} diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index 3806acb57d..a695c4e844 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -22,14 +22,25 @@ $(function() var $searchInput = $('#storySearchInput'); var $searchResult = $('#searchResult'); var $selectedItem; + var showSearchModal = function() + { + $searchStories.modal('show').on('shown.zui.modal', function() + { + var key = $('#story_chosen .chosen-results > li.no-results > span').text(); + if(key) $searchInput.val(key).trigger('change'); + $searchInput.focus(); + }); + }; $(document).on('change', '#story', function() { if($(this).val() === 'showmore') { - $searchStories.modal('show').on('shown.zui.modal', function(){$searchInput.focus();}); + showSearchModal(); } }); + $(document).on('click', '#story_chosen .chosen-results > li.no-results', showSearchModal); + $searchStories.on('hide.zui.modal', function() { var key = ''; diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 0d3e679322..b5f707692e 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -61,7 +61,7 @@ testcase->lblStory;?>
- + searchMore . '"');?>