forked from NYANDEV/forgejo
#1659 fix change label title resets color
This commit is contained in:
parent
86d3c5cbb3
commit
d9c5b3bcee
4 changed files with 4 additions and 2 deletions
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.6.13.0917 Beta"
|
const APP_VER = "0.6.13.0918 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -238,6 +238,7 @@ function initRepository() {
|
||||||
$('.edit-label-button').click(function () {
|
$('.edit-label-button').click(function () {
|
||||||
$('#label-modal-id').val($(this).data('id'));
|
$('#label-modal-id').val($(this).data('id'));
|
||||||
$('.edit-label .new-label-input').val($(this).data('title'));
|
$('.edit-label .new-label-input').val($(this).data('title'));
|
||||||
|
$('.edit-label .color-picker').val($(this).data('color'));
|
||||||
$('.minicolors-swatch-color').css("background-color", $(this).data('color'));
|
$('.minicolors-swatch-color').css("background-color", $(this).data('color'));
|
||||||
$('.edit-label.modal').modal({
|
$('.edit-label.modal').modal({
|
||||||
onApprove: function () {
|
onApprove: function () {
|
||||||
|
|
|
@ -904,6 +904,7 @@ func UpdateLabel(ctx *middleware.Context, form auth.CreateLabelForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println(form.Title, form.Color)
|
||||||
l.Name = form.Title
|
l.Name = form.Title
|
||||||
l.Color = form.Color
|
l.Color = form.Color
|
||||||
if err := models.UpdateLabel(l); err != nil {
|
if err := models.UpdateLabel(l); err != nil {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.6.13.0917 Beta
|
0.6.13.0918 Beta
|
Loading…
Reference in a new issue