Jihan Kim 2014-08-20
IssueLabel: don't close dropdown on select at create/edit issue form
@b544cd6d3cfe99ecdc23fc828393d5cc815ad2c3
app/views/issue/create.scala.html
--- app/views/issue/create.scala.html
+++ app/views/issue/create.scala.html
@@ -119,7 +119,7 @@
                         </dd>
                     </dl>
 
-                    @partial_select_label(IssueLabel.findByProject(project), null, "issue-option")
+                    @partial_select_label(IssueLabel.findByProject(project), null, "issue-option", "data-close-on-select=false")
                 </div>
             </div>
         </div>
app/views/issue/edit.scala.html
--- app/views/issue/edit.scala.html
+++ app/views/issue/edit.scala.html
@@ -157,7 +157,7 @@
                         </dd>
                     </dl>
 
-                    @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "issue-option")
+                    @partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "issue-option", "data-close-on-select=false")
                 </div>
             </div>
         </div>
app/views/issue/partial_select_label.scala.html
--- app/views/issue/partial_select_label.scala.html
+++ app/views/issue/partial_select_label.scala.html
@@ -18,7 +18,8 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **@
-@(labels:List[models.IssueLabel], selectedLabelIds:Set[Long] = null, wrapperCSSClassName:String = "")
+@(labels:List[models.IssueLabel], selectedLabelIds:Set[Long] = null,
+  wrapperCSSClassName:String = "", additionalAttr:String = "")
 
 @if(!labels.isEmpty){
 <dl class="@wrapperCSSClassName">
@@ -27,9 +28,9 @@
   </dt>
   <dd>
     <select name="labelIds" multiple="multiple" data-search="labelIds"
-            data-toggle="select2" data-format="issuelabel" data-allow-clear="true" data-close-on-select="true"
+            data-toggle="select2" data-format="issuelabel" data-allow-clear="true"
             data-dropdown-css-class="issue-labels" data-container-css-class="issue-labels bordered fullsize"
-            data-placeholder="@Messages("label.select")">
+            data-placeholder="@Messages("label.select")" @additionalAttr>
       <option></option>
       @labels.groupBy(_.category).map {
         case (category, labels) => {
Add a comment
List