summaryrefslogtreecommitdiffstats
path: root/public/js/gogs.js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-24 21:02:49 +0800
committerUnknwon <u@gogs.io>2015-07-24 21:02:49 +0800
commitac95f6d50f674cae1a5ae3889fdf3c56eb7c005d (patch)
tree274c1e8087aca7b0a366eaf61b08fbd177a52a29 /public/js/gogs.js
parent86dbda0b42d05caf11d5c6d040f18dfbcc742e04 (diff)
downloadgitea-ac95f6d50f674cae1a5ae3889fdf3c56eb7c005d.tar.gz
gitea-ac95f6d50f674cae1a5ae3889fdf3c56eb7c005d.zip
UI: basic label list
- create new label
Diffstat (limited to 'public/js/gogs.js')
-rw-r--r--public/js/gogs.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 5f08b59cdb..aa9acd0915 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -32,6 +32,24 @@ function initInstall() {
});
};
+function initRepository(){
+ if ($('.repository').length == 0) {
+ return;
+ }
+
+ if ($('.labels').length == 0) {
+ return;
+ }
+ $('.color-picker').each( function() {
+ $(this).minicolors();
+ });
+ $('.precolors .color').click(function(){
+ var color_hex = $(this).data('color-hex')
+ $('.color-picker').val(color_hex);
+ $('.minicolors-swatch-color').css("background-color", color_hex);
+ });
+};
+
$(document).ready(function () {
// Semantic UI modules.
$('.dropdown').dropdown();
@@ -46,4 +64,5 @@ $(document).ready(function () {
$('.poping.up').popup();
initInstall();
+ initRepository();
}); \ No newline at end of file