* select users using chosen.

This commit is contained in:
xia0ta0
2014-03-04 10:58:40 +08:00
parent 427ee4c7f9
commit 5d4d8239f1
22 changed files with 41 additions and 28 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ js::set('page', 'assignedto');
<caption><?php echo $bug->title;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->bug->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='text-3'");?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='text-3 chosen'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->mailto;?></td>
+1 -1
View File
@@ -33,7 +33,7 @@
<td><?php echo $i+1;?></td>
<td class='a-left' style='overflow:visible'><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='select-1'");?></td>
<td><?php echo html::select("projects[$i]", $projects, $projectID, "class='select-1' onchange='loadProjectBuilds($productID, this.value, $i)'");?></td>
<td class='a-left chosenBox' style='overflow:visible' id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='select-1' multiple data-placeholder=' '");?></td>
<td class='a-left' style='overflow:visible' id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='select-1 chosen' multiple data-placeholder=' '");?></td>
<td><?php echo html::input("titles[$i]", '', 'class=select-1');?></td>
<td><?php echo html::textarea("stepses[$i]", '', "rows='1' class=text-1");?></td>
<td><?php echo html::select("types[$i]", $lang->bug->typeList, '');?></td>
+1 -1
View File
@@ -22,7 +22,7 @@ js::set('page', 'confirmbug');
<caption><?php echo $bug->title;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->bug->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-2'");?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-2 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->pri;?></th>
+1 -1
View File
@@ -56,7 +56,7 @@ js::set('refresh', $lang->refresh);
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td><span id='assignedToBox'><?php echo html::select('assignedTo', $users, $assignedTo, 'class=select-3');?></span></td>
<td><span id='assignedToBox'><?php echo html::select('assignedTo', $users, $assignedTo, "class='select-3 chosen'");?></span></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->title;?></th>
+1 -1
View File
@@ -108,7 +108,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, 'class=select-3');?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-3 chosen'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->os;?></td>
+1 -1
View File
@@ -33,7 +33,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $bug->openedBy, 'class=select-3');?></td>
<td><?php echo html::select('assignedTo', $users, $bug->openedBy, "class='select-3 chosen'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
+1
View File
@@ -17,5 +17,6 @@ $(document).ready(function()
$("#mailto").attr('data-placeholder', chooseUsersToMail);
$("#productID").chosen({no_results_text: noResultsMatch});
$("#projectID").chosen({no_results_text: noResultsMatch});
$(".chosen").chosen({no_results_text: noResultsMatch, allow_single_deselect: true});
});
</script>
+3 -3
View File
@@ -25,15 +25,15 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='select-3'");?></td>
<td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, '', "class='select-3'");?></td>
<td><?php echo html::select('QD', $qdUsers, '', "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, '', "class='select-3'");?></td>
<td><?php echo html::select('RD', $rdUsers, '', "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->desc;?></th>
+3 -3
View File
@@ -25,15 +25,15 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $product->PO, "class='select-3'");?></td>
<td><?php echo html::select('PO', $poUsers, $product->PO, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, $product->QD, "class='select-3'");?></td>
<td><?php echo html::select('QD', $qdUsers, $product->QD, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, $product->RD, "class='select-3'");?></td>
<td><?php echo html::select('RD', $rdUsers, $product->RD, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->product->status;?></th>
-1
View File
@@ -112,7 +112,6 @@ function computeEndDate(delta)
/* Auto compute the work days. */
$(function()
{
$(".chosenBox select").chosen({no_results_text: noResultsMatch});
if(typeof(replaceID) != 'undefined') setModal4List('iframe', replaceID);
$(".date").bind('dateSelected', function()
{
+1 -1
View File
@@ -77,7 +77,7 @@ $(document).ready(function()
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->manageProducts;?></th>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $products, "class='select-1' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
<td class='a-left' id='productsBox'><?php echo html::select("products[]", $allProducts, $products, "class='select-1 chosen' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->desc;?></th>
+5 -5
View File
@@ -51,23 +51,23 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $project->PO, 'class=text-3');?></td>
<td><?php echo html::select('PO', $poUsers, $project->PO, "class='text-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->PM;?></th>
<td><?php echo html::select('PM', $pmUsers, $project->PM, 'class=text-3');?></td>
<td><?php echo html::select('PM', $pmUsers, $project->PM, "class='text-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, $project->QD, 'class=text-3');?></td>
<td><?php echo html::select('QD', $qdUsers, $project->QD, "class='text-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, $project->RD, 'class=text-3');?></td>
<td><?php echo html::select('RD', $rdUsers, $project->RD, "class='text-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->manageProducts;?></th>
<td class='a-left chosenBox' id='productsBox'><?php echo html::select("products[]", $allProducts, $linkedProducts, "class='select-1' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
<td class='a-left' id='productsBox'><?php echo html::select("products[]", $allProducts, $linkedProducts, "class='select-1 chosen' data-placeholder='{$lang->project->linkProduct}' multiple");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->desc;?></th>
+1 -1
View File
@@ -16,7 +16,7 @@
<caption><?php echo $lang->story->change;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="select-3"') . html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");?></td>
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="select-3 chosen"') . html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->title;?></th>
+1 -1
View File
@@ -73,7 +73,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class=select-3') . html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");?></td>
<td><?php echo html::select('assignedTo', $users, '', "class='select-3 chosen'") . html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");?></td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->story->mailto;?></nobr></th>
+1 -1
View File
@@ -119,7 +119,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->story->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="select-3"');?></td>
<td><?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="select-3 chosen"');?></td>
</tr>
<?php if($story->reviewedBy):?>
<tr>
+1 -1
View File
@@ -17,7 +17,7 @@
<caption><?php echo $task->name;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', "class='text-3'");?></td>
<td><?php echo html::select('assignedTo', $users, '', "class='text-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->left;?></th>
+1 -1
View File
@@ -28,7 +28,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><?php echo html::select('assignedTo[]', $members, $task->assignedTo, 'class=select-3');?></td>
<td><?php echo html::select('assignedTo[]', $members, $task->assignedTo, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->type;?></th>
+1 -1
View File
@@ -64,7 +64,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $members, $task->assignedTo, 'class=select-1');?></span></td>
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $members, $task->assignedTo, "class='select-1 chosen'");?></span></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->type;?></th>
+1 -1
View File
@@ -21,7 +21,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->task->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $task->openedBy, "class='select-3'");?></td>
<td><?php echo html::select('assignedTo', $users, $task->openedBy, "class='select-3 chosen'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->task->finishedDate;?></td>
+1 -1
View File
@@ -37,7 +37,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, '', 'class=select-3');?></td>
<td><?php echo html::select('owner', $users, '', "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
+1 -1
View File
@@ -26,7 +26,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, $task->owner, 'class=select-3');?></td>
<td><?php echo html::select('owner', $users, $task->owner, "class='select-3 chosen'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
+13
View File
@@ -200,6 +200,19 @@
padding: 5px;
}
.chzn-container-single .search-choice-close {
background: url("./images/chosen/chosen-sprite.png") no-repeat scroll -47px 1px transparent;
border-bottom:none;
cursor:pointer;
display: block;
font-size: 1px;
height: 12px;
position: absolute;
right: 20px;
top: 4px;
width: 12px;
}
.chzn-container-multi .chzn-choices li.search-choice .search-choice-close {
background: url("./images/chosen/chosen-sprite.png") no-repeat scroll -47px 1px transparent;
display: block;