Feature: Bulk Issues update

This commit is contained in:
randx 2012-07-28 03:35:24 +03:00
parent d63706d72c
commit 00b280c3f9
10 changed files with 144 additions and 32 deletions

View file

@ -52,14 +52,6 @@ $(document).ready(function(){
}
});
$("#issues-table .issue").live('click', function(e){
if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
location.href = $(this).attr("url");
e.stopPropagation();
return false;
}
});
/**
* Focus search field by pressing 's' key
*/

View file

@ -67,6 +67,10 @@ function initIssuesSearch() {
*/
function issuesPage(){
initIssuesSearch();
$("#update_status").chosen();
$("#update_assignee_id").chosen();
$("#update_milestone_id").chosen();
$("#label_name").chosen();
$("#assignee_id").chosen();
$("#milestone_id").chosen();
@ -94,4 +98,29 @@ function issuesPage(){
});
});
$(".check_all_issues").click(function () {
$('.selected_issue').attr('checked', this.checked);
issuesCheckChanged();
});
$('.selected_issue').bind('change', issuesCheckChanged);
}
function issuesCheckChanged() {
var checked_issues = $('.selected_issue:checked');
if(checked_issues.length > 0) {
var ids = []
$.each(checked_issues, function(index, value) {
ids.push($(value).attr("data-id"));
})
$('#update_issues_ids').val(ids);
$('.issues_filters').hide();
$('.issues_bulk_update').show();
} else {
$('#update_issues_ids').val([]);
$('.issues_bulk_update').hide();
$('.issues_filters').show();
}
}

View file

@ -30,6 +30,13 @@
.issue {
padding:7px 10px;
.issue_check {
float:left;
padding: 8px 0;
padding-right: 8px;
min-width: 15px;
}
p {
padding-top:0;
padding-bottom:2px;
@ -41,3 +48,28 @@
}
}
}
input.check_all_issues {
float:left;
padding: 8px 0;
margin: 14px 0;
margin-right: 10px;
}
#issues-table-holder {
.issues_bulk_update {
padding: 0 5px;
margin: 0;
form {
margin:0;
padding-bottom:5px;
}
.update_selected_issues {
position:relative;
top:-2px;
margin-left:3px;
}
}
}