1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Allow labels to contain emoji (#6063)

* Add emoji to labels
Minor cleanup of tribute code in footer.tmpl

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Quick find/replace in other i18n files containing label translations

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Revert "Quick find/replace in other i18n files containing label translations"

This reverts commit ec3e1a3a17.

* Add style to overwrite emoji height in labels

* Revert Makefile change that makes Windows work
This commit is contained in:
John Olheiser
2019-02-16 11:33:09 -06:00
committed by Lauris BH
parent 8c8ac1a162
commit 0b72c00fad
9 changed files with 36 additions and 21 deletions

View File

@@ -68,8 +68,11 @@
}
return itemStr;
}
})
issuesTribute.attach(document.getElementById('content'))
});
var content = document.getElementById('content');
if (content != null) {
issuesTribute.attach(content);
}
</script>
<script>
var emojiTribute = new Tribute({
@@ -93,7 +96,7 @@
return item;
},
selectTemplate: function (item) {
if (typeof item === 'undefinied') return null;
if (typeof item === 'undefined') return null;
return ':' + item.original + ':';
},
menuItemTemplate: function (item) {
@@ -101,7 +104,14 @@
}
}]
});
emojiTribute.attach(document.getElementById('content'))
var emojiInputs = document.querySelectorAll('.emoji-input');
if (emojiInputs.length > 0) {
emojiTribute.attach(emojiInputs);
}
var content = document.getElementById('content');
if (content != null) {
emojiTribute.attach(document.getElementById('content'));
}
</script>
{{end}}
<script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>