UI: CURD labels

- fix update lable break connection with repository
This commit is contained in:
Unknwon committed 2015-07-24 23:13:42 +08:00
1 parent 3426ae42b3
commit dc4aab9925
14 files changed
+190 -81

No files matched your search

+11 -2
View File
@@ -143,6 +143,11 @@ invalid_code = Sorry, your confirmation code has expired or not valid.
reset_password_helper = Click here to reset your password
password_too_short = Password length cannot be less then 6.
[modal]
yes = Yes
no = No
modify = Modify
[form]
UserName = Username
RepoName = Repository name
@@ -372,14 +377,18 @@ issues.filter_type.assigned_to_you = Assigned to you
issues.filter_type.created_by_you = Created by you
issues.filter_type.mentioning_you = Mentioning you
issues.opened_by = opened %s by <a href="/%[2]s">%[2]s</a>
issues.previous = Previous Page
issues.next = Next Page
issues.label_title = Label name
issues.label_color = Label color
issues.label_count = %d labels
issues.label_open_issues = %d open issues
issues.label_edit = Edit
issues.label_delete = Delete
issues.previous = Previous Page
issues.next = Next Page
issues.label_modify = Label Modification
issues.label_deletion = Label Deletion
issues.label_deletion_desc = Delete label will remove it's information in all related issues. Do you want to continue?
issues.label_deletion_success = Label has been deleted successfully!
settings = Settings
settings.options = Options
-9
View File
@@ -86,15 +86,6 @@
"randomFootnoteNumbers": 0,
"useCompatibilityMode": 0
},
"\/public\/css\/bootstrap-colorpicker.min.css": {
"fileType": 16,
"ignore": 0,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/public\/css\/bootstrap-colorpicker.min.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/public\/css\/bootstrap.min.css": {
"fileType": 16,
"ignore": 0,
+7 -11
View File
@@ -242,10 +242,9 @@ const (
)
// GetIssuesByLabel returns a list of issues by given label and repository.
func GetIssuesByLabel(repoId int64, label string) ([]*Issue, error) {
func GetIssuesByLabel(repoID, labelID int64) ([]*Issue, error) {
issues := make([]*Issue, 0, 10)
err := x.Where("repo_id=?", repoId).And("label_ids like '%$" + label + "|%'").Find(&issues)
return issues, err
return issues, x.Where("repo_id=?", repoID).And("label_ids like '%$" + com.ToStr(labelID) + "|%'").Find(&issues)
}
// GetIssueCountByPoster returns number of issues of repository by poster.
@@ -577,9 +576,8 @@ func UpdateLabel(l *Label) error {
}
// DeleteLabel delete a label of given repository.
func DeleteLabel(repoId int64, strId string) error {
id, _ := com.StrTo(strId).Int64()
l, err := GetLabelById(id)
func DeleteLabel(repoID, labelID int64) error {
l, err := GetLabelById(labelID)
if err != nil {
if err == ErrLabelNotExist {
return nil
@@ -587,27 +585,25 @@ func DeleteLabel(repoId int64, strId string) error {
return err
}
issues, err := GetIssuesByLabel(repoId, strId)
issues, err := GetIssuesByLabel(repoID, labelID)
if err != nil {
return err
}
sess := x.NewSession()
defer sess.Close()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
for _, issue := range issues {
issue.LabelIds = strings.Replace(issue.LabelIds, "$"+strId+"|", "", -1)
issue.LabelIds = strings.Replace(issue.LabelIds, "$"+com.ToStr(labelID)+"|", "", -1)
if _, err = sess.Id(issue.ID).AllCols().Update(issue); err != nil {
sess.Rollback()
return err
}
}
if _, err = sess.Delete(l); err != nil {
sess.Rollback()
return err
}
return sess.Commit()
+1
View File
@@ -134,6 +134,7 @@ func (f *CreateMilestoneForm) Validate(ctx *macaron.Context, errs binding.Errors
// \/ \/ \/ \/
type CreateLabelForm struct {
ID int64
Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_name"`
Color string `binding:"Required;Size(7)" locale:"repo.issues.label_color"`
}
+2 -2
View File
@@ -771,7 +771,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
return a, nil
}
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\xeb\x72\xdc\x48\xb2\xde\x7f\x3c\x05\x66\x1c\xb2\x66\x22\xa8\x56\xcc\x4c\xd8\xe1\x98\x90\x34\xe6\x90\xa3\xcb\x1e\x51\xd4\x11\xa9\x5d\x1f\x2b\x14\x58\x74\x03\xec\xc6\xb2\x1b\xe8\xc5\x85\x3d\xdc\x5f\x7e\x0d\xbf\x9e\x9f\xc4\x99\x5f\x66\xd6\x05\x40\x53\xa3\x3d\x0e\x9f\x3f\x64\x75\x55\xd6\x2d\x2b\x2b\x2b\x6f\x55\xc8\xf7\xfb\xac\x28\xbb\x55\xfa\x3c\x3d\x4d\xf7\x79\x55\x6f\xcb\xae\x4b\xbb\x72\x7b\xf3\x64\xd3\x74\x7d\x59\xa4\xaf\xaa\x9e\x7e\xb7\x77\xd5\xaa\x4c\x92\x4d\xb3\x2b\x09\xf4\x35\xfd\x4b\x8a\xbc\xdb\x2c\x9b\xbc\x2d\x28\xe3\xdc\xd2\x49\xf9\xfb\x7e\xdb\xb4\x0c\xf4\x9b\xa4\x92\x4d\xb9\xdd\x73\x1d\xfa\x97\x74\xd5\xba\xce\xaa\x9a\x7e\x5e\x51\x2a\x7d\x53\x27\x5d\xb3\xaa\xf2\x6d\x16\x14\x20\xc3\xca\x7f\x4e\x7f\xac\x8b\xf4\xaa\x2f\xf7\xe9\xb3\x6e\x97\x6f\xb7\x2f\xf2\x0e\x55\xfa\x32\xcd\x57\xab\x66\xa8\xfb\x67\x4f\xa5\x40\x1a\x6f\x86\xde\x5a\xbf\x1c\x7a\xc9\x1b\xf6\x96\xf5\x71\x9f\xb4\xe5\xba\xa2\x89\xb5\x94\xf5\x41\x93\xc9\xa1\x5c\x76\x55\xcf\x83\xfe\x8b\xa4\x92\xbb\xb2\xed\xaa\x86\xc7\xf3\x67\x49\x25\xfb\x7c\xcd\x00\xef\xe9\x5f\xd2\x97\xbb\xfd\x36\x47\x85\x6b\x4d\x26\xdb\xbc\x5e\x0f\x02\xf3\x56\x93\x49\x32\x10\xe6\xea\x1c\x38\xfb\xa8\xc9\xa4\xdc\xe5\xd5\x96\xf1\xf3\x84\x13\xd4\x6e\xd7\x1d\x1a\x60\xf1\xbd\x26\x69\x8c\x59\x7f\xbf\x2f\x31\xc4\x27\xd7\x94\x4a\x56\xf9\xbe\x5f\x6d\x72\xca\x39\x93\x54\x42\x40\xfb\x86\xc6\xda\xb4\xf7\x80\xb3\x1f\x49\xd3\xae\xf3\xba\xfa\x47\xde\xcb\xf8\x2f\x83\x9f\xc9\xae\x6a\xdb\x86\xa7\x7e\x81\x44\x52\x97\x87\x8c\xdb\xa1\x9c\x77\xe5\x21\x6c\x85\x4b\x76\xd5\xba\x95\x59\x72\xe1\x05\x7e\x71\x2b\x5c\x76\xd3\xb4\xb7\x5a\xf0\x92\x93\xa3\xaa\x34\x08\x2d\x8d\xfb\xcf\x6b\xc2\x8b\x96\x5e\xe0\x47\x04\xd0\x25\x79\xb1\xab\xea\x6c\x9f\xd7\x25\xe3\xe8\x94\x7f\x11\x5e\xe8\x57\xa2\xcb\x9d\x75\x65\xdf\x57\xf5\xba\xe3\x62\xc9\x4a\xaf\x34\x2b\x09\xca\x5c\x1e\x8f\xa7\xcb\x6e\xca\xb2\x90\x11\x75\xe9\x4b\x4a\x27\xfb\x61\xbb\xa5\xb9\xff\x7d\x28\xbb\x9e\xe1\xdf\xd3\x6f\x9a\x85\xfc\x4e\xaa\xae\xa3\x04\x65\xbf\x41\x22\xa1\x05\xa8\x57\x18\xd2\x19\x12\x49\xf2\xa9\x2b\xf3\x76\xb5\xf9\x9c\xc8\x7f\xf4\xc8\x89\xc5\x62\x71\x74\x69\x98\x1c\x94\x14\xa4\x07\xeb\x20\x59\x35\x05\xff\x38\xa3\x7f\xd4\x74\x55\x77\x3d\x91\xf4\xe7\x44\x13\x0c\x26\x29\x41\x63\x5f\xf5\xdb\xd2\x67\x62\x7f\x74\xbc\x0e\xe9\xcb\xaa\xed\xfa\x27\x7d\x45\x24\xf7\x61\xa8\x13\x9e\x1f\x91\x73\x56\x2c\x6d\x97\xbf\x6a\x08\x3b\xc8\x6e\x69\x7e\x17\xf7\x57\xff\xfa\xf6\x24\x7d\x4f\x5b\x7d\xdd\x96\x94\x4e\xa9\x0d\xfa\x47\x75\x7e\x5a\x24\x54\xcb\x7a\x3a\xcf\xfb\x7c\x99\x77\xa5\x47\x2b\x17\x0a\x8d\xba\x32\x50\x2a\xb3\x0d\xb0\x88\xae\x8f\xe6\x3b\x47\xe7\xd4\x86\xee\x0e\xd7\xc6\x3b\xde\x22\x94\xcf\x5c\x03\x95\xdf\x6f\x4b\xce\xa7\xa6\xd2\x37\xef\xde\x5d\x9e\xff\x9a\x96\xf5\xba\xaa\xcb\xf4\x50\xf5\x9b\x74\xe8\x6f\xfe\x5b\xb6\x2e\xeb\xb2\x25\x26\xb2\xaa\x52\xda\x19\x2d\x11\x41\x4a\xe4\x29\x93\x5b\x24\x5d\xb7\xcd\x76\x82\xde\xab\xab\xb7\xe9\x05\xa3\x78\x9f\xf7\x1b\x0c\xa4\xdf\x24\xdd\xdf\xb7\x8c\x22\xd7\xe1\xf5\xa6\x4c\x6f\x2a\x9a\x35\x80\x9a\x1b\xc3\x47\x5a\xe8\x18\x17\x49\xd9\xb6\x19\xed\xfb\xfe\x3e\xd3\xca\xda\xde\x18\x52\x9a\x20\xd2\xa9\x9b\x3e\x5d\x96\x29\xea\x2c\x92\xc4\x06\x6c\xd8\x3d\xdd\xef\xb7\xd5\x4a\x76\xec\x2b\x29\xf3\x88\x66\x16\xad\x58\x0a\xe1\x80\x28\x2b\x0b\xd0\x45\xfc\xef\xbe\x19\xda\x34\x62\x03\xa8\xbf\x29\x89\x2f\x6f\x06\xda\x72\x39\xf1\xd4\x6d\x33\x14\xdf\x80\x52\x6d\xf4\x9e\x50\xd3\x0f\x0d\x0d\x18\xd8\x71\x00\xbe\x8b\x53\xa2\x38\x3e\x15\xda\x72\xd7\x10\x77\x70\xc4\x5e\x11\x41\x1d\x2a\x2a\xa4\x99\x76\xf9\x1d\xed\xb7\xbe\x49\xfb\x4d\xd5\xa5\x05\x11\xdb\x8a\x1b\xa6\xad\x31\x10\x3f\x16\xb2\x20\x02\x15\xd2\xb0\xbc\x78\x0d\x00\xb5\x1b\x88\x9a\x36\xd4\x18\x73\x7b\x3e\x9a\xa8\xc9\xb9\x71\x62\x4a\xd4\x0e\xe8\x9b\x28\xb7\x21\xde\xca\xdc\xef\x1c\x09\xfd\x1d\xb6\x4f\xa3\xca\x6f\x6e\x68\x54\x1d\x51\xc5\xeb\x74\xb5\x6d\x88\xa4\x3e\x7e\x78\x4b\x95\x37\x7d\xbf\xcf\xf6\x4d\x0b\x32\xbe\xbe\x7e\x4f\xdb\xa3\xed\x7d\x6e\x80\x6b\x86\xa9\x87\xdd\x92\x7e\x1d\x36\x15\x31\x81\x3c\x58\x20\xa0\x62\xcb\x07\x4c\x9d\x36\xf5\x02\x6b\x35\xb4\xdb\xd1\x32\x52\x97\x56\x72\x64\x78\x3c\x84\xa7\xfc\xe7\xca\x8f\x12\xd3\xed\xe8\x14\x3e\x60\x51\x69\xaa\x25\x4e\x13\xa2\xad\x66\xcf\xed\x06\xc4\x75\xa9\x19\x9e\xa2\x70\x02\xb9\x72\x39\x87\xa8\x14\x67\x7c\xc0\x4b\x77\x34\x61\xdd\xcd\x57\x17\x84\x06\x6c\x69\xe4\xde\xb4\xcd\x8e\x72\x5f\xd2\x3f\x9f\xe1\x87\x7f\xc1\xed\x01\x26\x2f\x0a\x62\x33\xdd\x49\xfa\xe1\xe5\x59\xfa\x5f\x7e\xfa\xf1\xc7\x45\xfa\xa6\xe7\x0d\xc1\x34\xf2\x37\x5e\x5b\x4a\xca\x81\xe8\x40\x69\xe7\xf6\xb4\xfc\xdf\x32\x81\x7f\x9b\x3e\x43\xe9\x7f\x2f\x7f\xcf\xe9\x9c\x2d\x17\xab\x66\xf7\x82\x37\xf7\x2e\xef\x17\x09\x97\x10\xd5\x28\x39\x5d\x95\x75\x41\x09\x3d\x56\xb5\x2c\xe0\x3a\x5a\x1e\x1c\xb2\x72\xfa\x67\xab\xa6\xbe\xa9\x5a\x9e\xd0\x6f\x75\xbe\x24\x9c\x98\x5c\x40\xec\x18\x25\x76\x76\x11\xd2\x68\x23\x57\x37\xf7\x1e\x14\x53\x7d\xc7\x99\xba\xa0\x09\xcb\x4a\xd4\xa8\x8a\x4c\x0e\xcb\x57\xc8\xc6\xba\x5d\xd2\xf4\x5a\xc3\x77\xe7\x11\xde\xdc\xdc\x6c\x89\xb1\x19\xb3\xd2\x1e\x2e\x25\x57\xf8\x56\x08\x42\xc4\xb8\x87\x6Line truncated
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\xbd\xdb\x72\xdc\x48\xd2\x1f\x7e\x8f\xa7\xc0\xcc\x3f\xf4\xd7\x4c\x04\xd5\x8a\x99\x09\x3b\x1c\x13\x92\xc6\x1c\x72\x74\xd8\x4f\x14\xf5\x89\xd4\xae\xd7\x0a\x05\x16\xdd\x00\xbb\xb1\xec\x06\x7a\x71\x60\x0f\xf7\xca\xaf\xe1\xd7\xf3\x93\x38\xf3\x97\x99\x75\x00\xd0\xd4\x68\x3f\x87\x7d\x43\x56\x57\x65\x9d\xb2\xb2\xb2\xf2\x54\x85\x7c\xbf\xcf\x8a\xb2\x5b\xa5\xcf\xd3\xd3\x74\x9f\x57\xf5\xb6\xec\xba\xb4\x2b\xb7\x37\x4f\x36\x4d\xd7\x97\x45\xfa\xaa\xea\xe9\x77\x7b\x57\xad\xca\x24\xd9\x34\xbb\x92\x40\x5f\xd3\xbf\xa4\xc8\xbb\xcd\xb2\xc9\xdb\x82\x32\xce\x2d\x9d\x94\xbf\xef\xb7\x4d\xcb\x40\xbf\x49\x2a\xd9\x94\xdb\x3d\xd7\xa1\x7f\x49\x57\xad\xeb\xac\xaa\xe9\xe7\x15\xa5\xd2\x37\x75\xd2\x35\xab\x2a\xdf\x66\x41\x01\x32\xac\xfc\xe7\xf4\xc7\xba\x48\xaf\xfa\x72\x9f\x3e\xeb\x76\xf9\x76\xfb\x22\xef\x50\xa5\x2f\xd3\x7c\xb5\x6a\x86\xba\x7f\xf6\x54\x0a\xa4\xf1\x66\xe8\xad\xf5\xcb\xa1\x97\xbc\x61\x6f\x59\x1f\xf7\x49\x5b\xae\x2b\x9a\x58\x4b\x59\x1f\x34\x99\x1c\xca\x65\x57\xf5\x3c\xe8\xbf\x48\x2a\xb9\x2b\xdb\xae\x6a\x78\x3c\x7f\x96\x54\xb2\xcf\xd7\x0c\xf0\x9e\xfe\x25\x7d\xb9\xdb\x6f\x73\x54\xb8\xd6\x64\xb2\xcd\xeb\xf5\x20\x30\x6f\x35\x99\x24\x03\x61\xae\xce\x81\xb3\x8f\x9a\x4c\xca\x5d\x5e\x6d\x19\x3f\x4f\x38\x41\xed\x76\xdd\xa1\x01\x16\xdf\x6b\x92\xc6\x98\xf5\xf7\xfb\x12\x43\x7c\x72\x4d\xa9\x64\x95\xef\xfb\xd5\x26\xa7\x9c\x33\x49\x25\x04\xb4\x6f\x68\xac\x4d\x7b\x0f\x38\xfb\x91\x34\xed\x3a\xaf\xab\x7f\xe6\xbd\x8c\xff\x32\xf8\x99\xec\xaa\xb6\x6d\x78\xea\x17\x48\x24\x75\x79\xc8\xb8\x1d\xca\x79\x57\x1e\xc2\x56\xb8\x64\x57\xad\x5b\x99\x25\x17\x5e\xe0\x17\xb7\xc2\x65\x37\x4d\x7b\xab\x05\x2f\x39\x39\xaa\x4a\x83\xd0\xd2\xb8\xff\xbc\x26\xbc\x68\xe9\x05\x7e\x44\x00\x5d\x92\x17\xbb\xaa\xce\xf6\x79\x5d\x32\x8e\x4e\xf9\x17\xe1\x85\x7e\x25\xba\xdc\x59\x57\xf6\x7d\x55\xaf\x3b\x2e\x96\xac\xf4\x4a\xb3\x92\xa0\xcc\xe5\xf1\x78\xba\xec\xa6\x2c\x0b\x19\x51\x97\xbe\xa4\x74\xb2\x1f\xb6\x5b\x9a\xfb\x3f\x86\xb2\xeb\x19\xfe\x3d\xfd\xa6\x59\xc8\xef\xa4\xea\x3a\x4a\x50\xf6\x1b\x24\x12\x5a\x80\x7a\x85\x21\x9d\x21\x91\x24\x9f\xba\x32\x6f\x57\x9b\xcf\x89\xfc\x47\x8f\x9c\x58\x2c\x16\x47\x97\x86\xc9\x41\x49\x41\x7a\xb0\x0e\x92\x55\x53\xf0\x8f\x33\xfa\x47\x4d\x57\x75\xd7\x13\x49\x7f\x4e\x34\xc1\x60\x92\x12\x34\xf6\x55\xbf\x2d\x7d\x26\xf6\x47\xc7\xeb\x90\xbe\xac\xda\xae\x7f\xd2\x57\x44\x72\x1f\x86\x3a\xe1\xf9\x11\x39\x67\xc5\xd2\x76\xf9\xab\x86\xb0\x83\xec\x96\xe6\x77\x71\x7f\xf5\xef\x6f\x4f\xd2\xf7\xb4\xd5\xd7\x6d\x49\xe9\x94\xda\xa0\x7f\x54\xe7\xa7\x45\x42\xb5\xac\xa7\xf3\xbc\xcf\x97\x79\x57\x7a\xb4\x72\xa1\xd0\xa8\x2b\x03\xa5\x32\xdb\x00\x8b\xe8\xfa\x68\xbe\x73\x74\x4e\x6d\xe8\xee\x70\x6d\xbc\xe3\x2d\x42\xf9\xcc\x35\x50\xf9\xfd\xb6\xe4\x7c\x6a\x2a\x7d\xf3\xee\xdd\xe5\xf9\xaf\x69\x59\xaf\xab\xba\x4c\x0f\x55\xbf\x49\x87\xfe\xe6\xbf\x64\xeb\xb2\x2e\x5b\x62\x22\xab\x2a\xa5\x9d\xd1\x12\x11\xa4\x44\x9e\x32\xb9\x45\xd2\x75\xdb\x6c\x27\xe8\xbd\xba\x7a\x9b\x5e\x30\x8a\xf7\x79\xbf\xc1\x40\xfa\x4d\xd2\xfd\x63\xcb\x28\x72\x1d\x5e\x6f\xca\xf4\xa6\xa2\x59\x03\xa8\xb9\x31\x7c\xa4\x85\x8e\x71\x91\x94\x6d\x9b\xd1\xbe\xef\xef\x33\xad\xac\xed\x8d\x21\xa5\x09\x22\x9d\xba\xe9\xd3\x65\x99\xa2\xce\x22\x49\x6c\xc0\x86\xdd\xd3\xfd\x7e\x5b\xad\x64\xc7\xbe\x92\x32\x8f\x68\x66\xd1\x8a\xa5\x10\x0e\x88\xb2\xb2\x00\x5d\xc4\xff\xee\x9b\xa1\x4d\x23\x36\x80\xfa\x9b\x92\xf8\xf2\x66\xa0\x2d\x97\x13\x4f\xdd\x36\x43\xf1\x0d\x28\xd5\x46\xef\x09\x35\xfd\xd0\xd0\x80\x81\x1d\x07\xe0\xbb\x38\x25\x8a\xe3\x53\xa1\x2d\x77\x0d\x71\x07\x47\xec\x15\x11\xd4\xa1\xa2\x42\x9a\x69\x97\xdf\xd1\x7e\xeb\x9b\xb4\xdf\x54\x5d\x5a\x10\xb1\xad\xb8\x61\xda\x1a\x03\xf1\x63\x21\x0b\x22\x50\x21\x0d\xcb\x8b\xd7\x00\x50\xbb\x81\xa8\x69\x43\x8d\x31\xb7\xe7\xa3\x89\x9a\x9c\x1b\x27\xa6\x44\xed\x80\xbe\x89\x72\x1b\xe2\xad\xcc\xfd\xce\x91\xd0\xdf\x61\xfb\x34\xaa\xfc\xe6\x86\x46\xd5\x11\x55\xbc\x4e\x57\xdb\x86\x48\xea\xe3\x87\xb7\x54\x79\xd3\xf7\xfb\x6c\xdf\xb4\x20\xe3\xeb\xeb\xf7\xb4\x3d\xda\xde\xe7\x06\xb8\x66\x98\x7a\xd8\x2d\xe9\xd7\x61\x53\x11\x13\xc8\x83\x05\x02\x2a\xb6\x7c\xc0\xd4\x69\x53\x2f\xb0\x56\x43\xbb\x1d\x2d\x23\x75\x69\x25\x47\x86\xc7\x43\x78\xca\x7f\xae\xfc\x28\x31\xdd\x8e\x4e\xe1\x03\x16\x95\xa6\x5a\xe2\x34\x21\xda\x6a\xf6\xdc\x6e\x40\x5c\x97\x9a\xe1\x29\x0a\x27\x90\x2b\x97\x73\x88\x4a\x71\xc6\x07\xbc\x74\x47\x13\xd6\xdd\x7c\x75\x41\x68\xc0\x96\x46\xee\x4d\xdb\xec\x28\xf7\x25\xfd\xf3\x19\x7e\xf8\x17\xdc\x1e\x60\xf2\xa2\x20\x36\xd3\x9d\xa4\x1f\x5e\x9e\xa5\xff\xe9\xa7\x1f\x7f\x5c\xa4\x6f\x7a\xde\x10\x4c\x23\x7f\xe7\xb5\xa5\xa4\x1c\x88\x0e\x94\x76\x6e\x4f\xcb\xff\x2d\x13\xf8\xb7\xe9\x33\x94\xfe\xd7\xf2\xf7\x9c\xce\xd9\x72\xb1\x6a\x76\x2f\x78\x73\xef\xf2\x7e\x91\x70\x09\x51\x8d\x92\xd3\x55\x59\x17\x94\xd0\x63\x55\xcb\x02\xae\xa3\xe5\xc1\x21\x2b\xa7\x7f\xb6\x6a\xea\x9b\xaa\xe5\x09\xfd\x56\xe7\x4b\xc2\x89\xc9\x05\xc4\x8e\x51\x62\x67\x17\x21\x8d\x36\x72\x75\x73\xef\x41\x31\xd5\x77\x9c\xa9\x0b\x9a\xb0\xac\x44\x8d\xaa\xc8\xe4\xb0\x7c\x85\x6c\xac\xdb\x25\x4d\xaf\x35\x7c\x77\x1e\xe1\xcd\xcd\xcd\x96\x18\x9b\x31\x2b\xed\xe1\x52\x72\x85\x6f\x85\x20\x44\x8c\x7Line truncated
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
return bindataRead(
@@ -786,7 +786,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 33685, mode: os.FileMode(420), modTime: time.Unix(1437742006, 0)}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 33996, mode: os.FileMode(420), modTime: time.Unix(1437749910, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
-9
View File
@@ -1,9 +0,0 @@
/*!
* Bootstrap Colorpicker
* http://mjolnic.github.io/bootstrap-colorpicker/
*
* Originally written by (c) 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
*/.colorpicker-saturation{float:left;width:100px;height:100px;cursor:crosshair;background-image:url("../img/bootstrap-colorpicker/saturation.png")}.colorpicker-saturation i{position:absolute;top:0;left:0;display:block;width:5px;height:5px;margin:-4px 0 0 -4px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-saturation i b{display:block;width:5px;height:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-hue,.colorpicker-alpha{float:left;width:15px;height:100px;margin-bottom:4px;margin-left:4px;cursor:row-resize}.colorpicker-hue i,.colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:100%;height:1px;margin-top:-1px;background:#000;border-top:1px solid #fff}.colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue.png")}.colorpicker-alpha{display:none;background-image:url("../img/bootstrap-colorpicker/alpha.png")}.colorpicker{top:0;left:0;z-index:2500;min-width:130px;padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1}.colorpicker:before,.colorpicker:after{display:table;line-height:0;content:""}.colorpicker:after{clear:both}.colorpicker:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.colorpicker:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url("../img/bootstrap-colorpicker/alpha.png");background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-element .input-group-addon i,.colorpicker-element .add-on i{display:inline-block;width:16px;height:16px;vertical-align:text-top;cursor:pointer}.colorpicker.colorpicker-inline{position:relative;z-index:auto;display:inline-block;float:none}.colorpicker.colorpicker-horizontal{width:110px;height:auto;min-width:110px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-hue,.colorpicker.colorpicker-horizontal .colorpicker-alpha{float:left;width:100px;height:15px;margin-bottom:4px;margin-left:0;cursor:col-resize}.colorpicker.colorpicker-horizontal .colorpicker-hue i,.colorpicker.colorpicker-horizontal .colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:1px;height:15px;margin-top:0;background:#fff;border:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue-horizontal.png")}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url("../img/bootstrap-colorpicker/alpha-horizontal.png")}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block}
+1 -1
View File
@@ -1 +1 @@
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
-1
View File
@@ -1 +0,0 @@
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.colorpicker&&a(window.jQuery)}(function(a){"use strict";var b=function(a){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,a&&(void 0!==a.toLowerCase?this.setColor(a):void 0!==a.h&&(this.value=a))};b.prototype={constructor:b,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:void 0!==a.toLowerCase?parseFloat(a):1},setColor:function(a){a=a.toLowerCase(),this.value=this.stringToHSB(a)||{h:0,s:0,b:0,a:1}},stringToHSB:function(b){b=b.toLowerCase();var c=this,d=!1;return a.each(this.stringParsers,function(a,e){var f=e.re.exec(b),g=f&&e.parse.apply(c,[f]),h=e.format||"rgba";return g?(d=h.match(/hsla?/)?c.RGBtoHSB.apply(c,c.HSLtoRGB.apply(c,g)):c.RGBtoHSB.apply(c,g),c.origFormat=h,!1):!0}),d},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=parseInt(100*(1-a),10)/100},toRGB:function(a,b,c,d){a||(a=this.value.h,b=this.value.s,c=this.value.b),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Math.abs(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],{r:Math.round(255*e),g:Math.round(255*f),b:Math.round(255*g),a:d||this.value.a}},toHex:function(a,b,c,d){var e=this.toRGB(a,b,c,d);return"#"+(1<<24|parseInt(e.r)<<16|parseInt(e.g)<<8|parseInt(e.b)).toString(16).substr(1)},toHSL:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&1>=f?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},toAlias:function(a,b,c,d){var e=this.toHex(a,b,c,d);for(var f in this.colors)if(this.colors[f]==e)return f;return!1},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return 0>c?c+=1:c>1&&(c-=1),1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:funLine truncated
+36 -4
View File
@@ -1,3 +1,5 @@
var csrf;
function initInstall() {
if ($('.install').length == 0) {
return;
@@ -32,25 +34,55 @@ function initInstall() {
});
};
function initRepository(){
function initRepository() {
if ($('.repository').length == 0) {
return;
}
if ($('.labels').length == 0) {
// Labels
if ($('.repository.labels').length == 0) {
return;
}
$('.color-picker').each( function() {
$('.color-picker').each(function () {
$(this).minicolors();
});
$('.precolors .color').click(function(){
$('.precolors .color').click(function () {
var color_hex = $(this).data('color-hex')
$('.color-picker').val(color_hex);
$('.minicolors-swatch-color').css("background-color", color_hex);
});
$('.delete-label-button').click(function () {
var $this = $(this);
$('.delete-label.modal').modal({
closable: false,
onApprove: function () {
$.post($this.data('url'), {
"_csrf": csrf,
"id": $this.data("id")
}).done(function (data) {
window.location.href = data.redirect;
});
}
}).modal('show');
return false;
});
$('.edit-label-button').click(function () {
$('#label-modal-id').val($(this).data('id'));
$('#label-modal-title').val($(this).data('title'));
$('#label-modal-color').val($(this).data('color'))
$('.minicolors-swatch-color').css("background-color", $(this).data('color'));
$('.edit-label.modal').modal({
onApprove: function () {
$('.edit-label.form').submit();
}
}).modal('show');
return false;
});
};
$(document).ready(function () {
csrf = $('meta[name=_csrf]').attr("content");
// Semantic UI modules.
$('.dropdown').dropdown();
$('.jump.dropdown').dropdown({
+28
View File
@@ -137,4 +137,32 @@
}
}
}
}
.edit-label.modal {
.color-picker {
margin-top: -8px!important;
height: 35px;
width: auto!important;
padding-left: 30px!important;
}
.minicolors-swatch.minicolors-sprite {
top: 1px;
left: 10px;
width: 15px;
height: 15px;
}
.precolors {
margin-bottom: -11px!important;
padding-left: 0!important;
padding-right: 0!important;
margin-right: 10px!important;
width: 120px!important;
.color {
float: left;
margin: 0!important;
width: 15px;
height: 15px;
}
}
}
+20 -24
View File
@@ -936,44 +936,40 @@ func NewLabel(ctx *middleware.Context, form auth.CreateLabelForm) {
}
func UpdateLabel(ctx *middleware.Context, form auth.CreateLabelForm) {
id := com.StrTo(ctx.Query("id")).MustInt64()
if id == 0 {
ctx.Error(404)
l, err := models.GetLabelById(form.ID)
if err != nil {
switch err {
case models.ErrLabelNotExist:
ctx.Error(404)
default:
ctx.Handle(500, "UpdateLabel", err)
}
return
}
l := &models.Label{
ID: id,
Name: form.Title,
Color: form.Color,
}
l.Name = form.Title
l.Color = form.Color
if err := models.UpdateLabel(l); err != nil {
ctx.Handle(500, "issue.UpdateLabel(UpdateLabel)", err)
ctx.Handle(500, "UpdateLabel", err)
return
}
ctx.Redirect(ctx.Repo.RepoLink + "/issues")
ctx.Redirect(ctx.Repo.RepoLink + "/labels")
}
func DeleteLabel(ctx *middleware.Context) {
removes := ctx.Query("remove")
if len(strings.TrimSpace(removes)) == 0 {
ctx.JSON(200, map[string]interface{}{
"ok": true,
})
return
}
strIds := strings.Split(removes, ",")
for _, strId := range strIds {
if err := models.DeleteLabel(ctx.Repo.Repository.Id, strId); err != nil {
ctx.Handle(500, "issue.DeleteLabel(DeleteLabel)", err)
return
id := ctx.QueryInt64("id")
if id > 0 {
if err := models.DeleteLabel(ctx.Repo.Repository.Id, id); err != nil {
ctx.Flash.Error("DeleteLabel: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success"))
}
}
ctx.JSON(200, map[string]interface{}{
"ok": true,
"redirect": ctx.Repo.RepoLink + "/labels",
})
return
}
func Milestones(ctx *middleware.Context) {
+5
View File
@@ -2,4 +2,9 @@
<div class="ui negative message">
<p>{{.Flash.ErrorMsg}}</p>
</div>
{{end}}
{{if .Flash.SuccessMsg}}
<div class="ui positive message">
<p>{{.Flash.SuccessMsg}}</p>
</div>
{{end}}
+16
View File
@@ -0,0 +1,16 @@
<a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a>
<a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a>
<a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a>
<a class="color" style="background-color:#009800" data-color-hex="#009800"></a>
<a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a>
<a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a>
<a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a>
<a class="color" style="background-color:#53e917" data-color-hex="#53e917"></a>
<a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a>
<a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a>
<a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a>
<a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a>
<a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a>
<a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a>
<a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a>
<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
+63 -18
View File
@@ -19,22 +19,7 @@
</div>
</div>
<div class="item precolors">
<a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a>
<a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a>
<a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a>
<a class="color" style="background-color:#009800" data-color-hex="#009800"></a>
<a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a>
<a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a>
<a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a>
<a class="color" style="background-color:#53e917" data-color-hex="#53e917"></a>
<a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a>
<a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a>
<a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a>
<a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a>
<a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a>
<a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a>
<a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a>
<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
{{template "repo/issue/label_precolors"}}
</div>
<button class="ui green button">{{.i18n.Tr "repo.issues.new_label"}}</button>
</div>
@@ -52,8 +37,8 @@
<li class="item">
<div class="ui label" style="background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
{{if $.IsRepositoryAdmin}}
<a class="ui right" href="#"><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
<a class="ui right" href="#"><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
<a class="ui right delete-label-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
{{end}}
<a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
</li>
@@ -61,4 +46,64 @@
</div>
</div>
</div>
{{if .IsRepositoryAdmin}}
<div class="ui basic delete-label modal">
<div class="header">
{{.i18n.Tr "repo.issues.label_deletion"}}
</div>
<div class="content">
<div class="image">
<i class="trash icon"></i>
</div>
<div class="description">
<p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
</div>
</div>
<div class="actions">
<div class="two fluid ui inverted buttons">
<div class="ui red basic inverted button">
<i class="remove icon"></i>
{{.i18n.Tr "modal.no"}}
</div>
<div class="ui green basic inverted positive button">
<i class="checkmark icon"></i>
{{.i18n.Tr "modal.yes"}}
</div>
</div>
</div>
</div>
<div class="ui small edit-label modal">
<div class="header">
{{.i18n.Tr "repo.issues.label_modify"}}
</div>
<div class="content">
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
{{.CsrfTokenHtml}}
<input id="label-modal-id" name="id" type="hidden">
<div class="inline fields">
<div class="field">
<input id="label-modal-title" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" required>
</div>
<div class="field">
<input id="label-modal-color" class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="field precolors">
{{template "repo/issue/label_precolors"}}
</div>
</div>
</form>
</div>
<div class="actions">
<div class="ui negative button">
{{.i18n.Tr "modal.no"}}
</div>
<div class="ui positive right labeled icon button">
{{.i18n.Tr "modal.modify"}}
<i class="checkmark icon"></i>
</div>
</div>
</div>
{{end}}
{{template "base/footer" .}}