issue ui update

This commit is contained in:
FuXiaoHei 2014-05-26 21:21:30 +08:00
parent bf5fcfb49c
commit e0a6e6dd1a
3 changed files with 71 additions and 6 deletions

View file

@ -1244,7 +1244,7 @@ html, body {
margin-bottom: 0;
}
#issue-create-form .nav-tabs, #issue .issue-reply .nav-tabs,#issue .issue-edit-content .nav-tabs {
#issue-create-form .nav-tabs, #issue .issue-reply .nav-tabs, #issue .issue-edit-content .nav-tabs {
margin-bottom: 10px;
}
@ -1355,6 +1355,10 @@ html, body {
color: #444;
}
#issue .issue-item h5 .labels .label {
margin-left: 12px;
}
#issue .issue-item .info span {
margin-right: 12px;
color: #888;
@ -1589,6 +1593,14 @@ html, body {
text-shadow: 0 0 2px #444;
}
#issue .label-selected .count, #issue .label-selected a {
color: #FAFAFA;
}
#issue .label-selected a {
text-shadow: 0 0 2px #444;
}
#issue .issue-bar .labels .label-white {
color: #FFF;
}
@ -1625,6 +1637,16 @@ html, body {
margin-left: 26px;
}
#label-color-ipt2, #label-color-change-ipt2 {
width: 120px;
display: inline-block;
vertical-align: top;
}
#label-color-change-ipt2{
margin-top: 1px;
}
/* wrapper and footer */
#wrapper {

View file

@ -647,18 +647,45 @@ function initIssue() {
$('#label-name-change-ipt').val($this.find('.name').text());
var color = $this.find('.color').data("color");
$('.label-change-color-picker').colorpicker("setValue", color);
$('#label-color-change-ipt').val(color);
$('#label-color-change-ipt,#label-color-change-ipt2').val(color);
$('#label-change-id-ipt').val($this.data("id"));
return false;
});
}
});
var colorRegex = new RegExp("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$");
$('#label-color-ipt2').on('keyup', function () {
var val = $(this).val();
if (val.length > 7) {
$(this).val(val.substr(0, 7));
}
if (colorRegex.test(val)) {
$('.label-color-picker').colorpicker("setValue", val);
}
return true;
});
$('#label-color-change-ipt2').on('keyup', function () {
var val = $(this).val();
console.log(val);
if (val.length > 7) {
$(this).val(val.substr(0, 7));
}
if (colorRegex.test(val)) {
$('.label-change-color-picker').colorpicker("setValue", val);
}
return true;
});
$("#label-list").on('click', '.del', function () {
var $p = $(this).parent();
removeLabels.push($p.data('id'));
$p.remove();
return false;
});
$('.label-selected').each(function (i, item) {
var $item = $(item);
var color = $item.find('.color').data('color');
$item.css('background-color', color);
});
$('.issue-bar .labels .dropdown-menu').on('click', 'li', function (e) {
var url = $('.issue-bar .labels').data("ajax");
var id = $(this).data('id');