* enhance ui of story search modal with chosen.
This commit is contained in:
@@ -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...";
|
||||
|
||||
@@ -370,6 +370,7 @@ $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font colo
|
||||
$lang->pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。";
|
||||
|
||||
$lang->noResultsMatch = "没有匹配结果";
|
||||
$lang->searchMore = "搜索此关键字的更多结果:";
|
||||
$lang->selectAnOption = "选择一个选项";
|
||||
$lang->selectSomeOptions = "选择一些选项";
|
||||
$lang->chooseUsersToMail = "选择要发信通知的用户...";
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<th><?php echo $lang->testcase->lblStory;?></th>
|
||||
<td colspan='3'>
|
||||
<div class='input-group' id='storyIdBox'>
|
||||
<?php echo html::select('story', $stories, $storyID, 'class="form-control chosen" onchange=setPreview();');?>
|
||||
<?php echo html::select('story', $stories, $storyID, 'class="form-control chosen" onchange="setPreview();" data-no_results_text="' . $lang->searchMore . '"');?>
|
||||
<span class='input-group-btn' style='width: 0.01%'>
|
||||
<?php if($storyID == 0): ?>
|
||||
<a href='' id='preview' class='btn iframe hidden'><?php echo $lang->preview;?></a>
|
||||
|
||||
Reference in New Issue
Block a user